(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.EZUIKit = factory());
})(this, (function () { 'use strict';
  function ownKeys(e, r) {
    var t = Object.keys(e);
    if (Object.getOwnPropertySymbols) {
      var o = Object.getOwnPropertySymbols(e);
      r && (o = o.filter(function (r) {
        return Object.getOwnPropertyDescriptor(e, r).enumerable;
      })), t.push.apply(t, o);
    }
    return t;
  }
  function _objectSpread2(e) {
    for (var r = 1; r < arguments.length; r++) {
      var t = null != arguments[r] ? arguments[r] : {};
      r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
        _defineProperty(e, r, t[r]);
      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
        Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
      });
    }
    return e;
  }
  function _regeneratorRuntime() {
    _regeneratorRuntime = function () {
      return e;
    };
    var t,
      e = {},
      r = Object.prototype,
      n = r.hasOwnProperty,
      o = Object.defineProperty || function (t, e, r) {
        t[e] = r.value;
      },
      i = "function" == typeof Symbol ? Symbol : {},
      a = i.iterator || "@@iterator",
      c = i.asyncIterator || "@@asyncIterator",
      u = i.toStringTag || "@@toStringTag";
    function define(t, e, r) {
      return Object.defineProperty(t, e, {
        value: r,
        enumerable: !0,
        configurable: !0,
        writable: !0
      }), t[e];
    }
    try {
      define({}, "");
    } catch (t) {
      define = function (t, e, r) {
        return t[e] = r;
      };
    }
    function wrap(t, e, r, n) {
      var i = e && e.prototype instanceof Generator ? e : Generator,
        a = Object.create(i.prototype),
        c = new Context(n || []);
      return o(a, "_invoke", {
        value: makeInvokeMethod(t, r, c)
      }), a;
    }
    function tryCatch(t, e, r) {
      try {
        return {
          type: "normal",
          arg: t.call(e, r)
        };
      } catch (t) {
        return {
          type: "throw",
          arg: t
        };
      }
    }
    e.wrap = wrap;
    var h = "suspendedStart",
      l = "suspendedYield",
      f = "executing",
      s = "completed",
      y = {};
    function Generator() {}
    function GeneratorFunction() {}
    function GeneratorFunctionPrototype() {}
    var p = {};
    define(p, a, function () {
      return this;
    });
    var d = Object.getPrototypeOf,
      v = d && d(d(values([])));
    v && v !== r && n.call(v, a) && (p = v);
    var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
    function defineIteratorMethods(t) {
      ["next", "throw", "return"].forEach(function (e) {
        define(t, e, function (t) {
          return this._invoke(e, t);
        });
      });
    }
    function AsyncIterator(t, e) {
      function invoke(r, o, i, a) {
        var c = tryCatch(t[r], t, o);
        if ("throw" !== c.type) {
          var u = c.arg,
            h = u.value;
          return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
            invoke("next", t, i, a);
          }, function (t) {
            invoke("throw", t, i, a);
          }) : e.resolve(h).then(function (t) {
            u.value = t, i(u);
          }, function (t) {
            return invoke("throw", t, i, a);
          });
        }
        a(c.arg);
      }
      var r;
      o(this, "_invoke", {
        value: function (t, n) {
          function callInvokeWithMethodAndArg() {
            return new e(function (e, r) {
              invoke(t, n, e, r);
            });
          }
          return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
        }
      });
    }
    function makeInvokeMethod(e, r, n) {
      var o = h;
      return function (i, a) {
        if (o === f) throw new Error("Generator is already running");
        if (o === s) {
          if ("throw" === i) throw a;
          return {
            value: t,
            done: !0
          };
        }
        for (n.method = i, n.arg = a;;) {
          var c = n.delegate;
          if (c) {
            var u = maybeInvokeDelegate(c, n);
            if (u) {
              if (u === y) continue;
              return u;
            }
          }
          if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
            if (o === h) throw o = s, n.arg;
            n.dispatchException(n.arg);
          } else "return" === n.method && n.abrupt("return", n.arg);
          o = f;
          var p = tryCatch(e, r, n);
          if ("normal" === p.type) {
            if (o = n.done ? s : l, p.arg === y) continue;
            return {
              value: p.arg,
              done: n.done
            };
          }
          "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
        }
      };
    }
    function maybeInvokeDelegate(e, r) {
      var n = r.method,
        o = e.iterator[n];
      if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
      var i = tryCatch(o, e.iterator, r.arg);
      if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
      var a = i.arg;
      return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
    }
    function pushTryEntry(t) {
      var e = {
        tryLoc: t[0]
      };
      1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
    }
    function resetTryEntry(t) {
      var e = t.completion || {};
      e.type = "normal", delete e.arg, t.completion = e;
    }
    function Context(t) {
      this.tryEntries = [{
        tryLoc: "root"
      }], t.forEach(pushTryEntry, this), this.reset(!0);
    }
    function values(e) {
      if (e || "" === e) {
        var r = e[a];
        if (r) return r.call(e);
        if ("function" == typeof e.next) return e;
        if (!isNaN(e.length)) {
          var o = -1,
            i = function next() {
              for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
              return next.value = t, next.done = !0, next;
            };
          return i.next = i;
        }
      }
      throw new TypeError(typeof e + " is not iterable");
    }
    return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
      value: GeneratorFunctionPrototype,
      configurable: !0
    }), o(GeneratorFunctionPrototype, "constructor", {
      value: GeneratorFunction,
      configurable: !0
    }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
      var e = "function" == typeof t && t.constructor;
      return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
    }, e.mark = function (t) {
      return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
    }, e.awrap = function (t) {
      return {
        __await: t
      };
    }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
      return this;
    }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
      void 0 === i && (i = Promise);
      var a = new AsyncIterator(wrap(t, r, n, o), i);
      return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
        return t.done ? t.value : a.next();
      });
    }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
      return this;
    }), define(g, "toString", function () {
      return "[object Generator]";
    }), e.keys = function (t) {
      var e = Object(t),
        r = [];
      for (var n in e) r.push(n);
      return r.reverse(), function next() {
        for (; r.length;) {
          var t = r.pop();
          if (t in e) return next.value = t, next.done = !1, next;
        }
        return next.done = !0, next;
      };
    }, e.values = values, Context.prototype = {
      constructor: Context,
      reset: function (e) {
        if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
      },
      stop: function () {
        this.done = !0;
        var t = this.tryEntries[0].completion;
        if ("throw" === t.type) throw t.arg;
        return this.rval;
      },
      dispatchException: function (e) {
        if (this.done) throw e;
        var r = this;
        function handle(n, o) {
          return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
        }
        for (var o = this.tryEntries.length - 1; o >= 0; --o) {
          var i = this.tryEntries[o],
            a = i.completion;
          if ("root" === i.tryLoc) return handle("end");
          if (i.tryLoc <= this.prev) {
            var c = n.call(i, "catchLoc"),
              u = n.call(i, "finallyLoc");
            if (c && u) {
              if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
              if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
            } else if (c) {
              if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
            } else {
              if (!u) throw new Error("try statement without catch or finally");
              if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
            }
          }
        }
      },
      abrupt: function (t, e) {
        for (var r = this.tryEntries.length - 1; r >= 0; --r) {
          var o = this.tryEntries[r];
          if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
            var i = o;
            break;
          }
        }
        i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
        var a = i ? i.completion : {};
        return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
      },
      complete: function (t, e) {
        if ("throw" === t.type) throw t.arg;
        return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
      },
      finish: function (t) {
        for (var e = this.tryEntries.length - 1; e >= 0; --e) {
          var r = this.tryEntries[e];
          if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
        }
      },
      catch: function (t) {
        for (var e = this.tryEntries.length - 1; e >= 0; --e) {
          var r = this.tryEntries[e];
          if (r.tryLoc === t) {
            var n = r.completion;
            if ("throw" === n.type) {
              var o = n.arg;
              resetTryEntry(r);
            }
            return o;
          }
        }
        throw new Error("illegal catch attempt");
      },
      delegateYield: function (e, r, n) {
        return this.delegate = {
          iterator: values(e),
          resultName: r,
          nextLoc: n
        }, "next" === this.method && (this.arg = t), y;
      }
    }, e;
  }
  function _typeof(o) {
    "@babel/helpers - typeof";

    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
      return typeof o;
    } : function (o) {
      return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
    }, _typeof(o);
  }
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
    try {
      var info = gen[key](arg);
      var value = info.value;
    } catch (error) {
      reject(error);
      return;
    }
    if (info.done) {
      resolve(value);
    } else {
      Promise.resolve(value).then(_next, _throw);
    }
  }
  function _asyncToGenerator(fn) {
    return function () {
      var self = this,
        args = arguments;
      return new Promise(function (resolve, reject) {
        var gen = fn.apply(self, args);
        function _next(value) {
          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
        }
        function _throw(err) {
          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
        }
        _next(undefined);
      });
    };
  }
  function _classCallCheck$1(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }
  function _defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
    }
  }
  function _createClass$1(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    Object.defineProperty(Constructor, "prototype", {
      writable: false
    });
    return Constructor;
  }
  function _defineProperty(obj, key, value) {
    key = _toPropertyKey(key);
    if (key in obj) {
      Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
      });
    } else {
      obj[key] = value;
    }
    return obj;
  }
  function _toConsumableArray(arr) {
    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  }
  function _arrayWithoutHoles(arr) {
    if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  }
  function _iterableToArray(iter) {
    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  }
  function _unsupportedIterableToArray(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(o);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  }
  function _arrayLikeToArray(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
    return arr2;
  }
  function _nonIterableSpread() {
    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 _createForOfIteratorHelper(o, allowArrayLike) {
    var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
    if (!it) {
      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
        if (it) o = it;
        var i = 0;
        var F = function () {};
        return {
          s: F,
          n: function () {
            if (i >= o.length) return {
              done: true
            };
            return {
              done: false,
              value: o[i++]
            };
          },
          e: function (e) {
            throw e;
          },
          f: F
        };
      }
      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 normalCompletion = true,
      didErr = false,
      err;
    return {
      s: function () {
        it = it.call(o);
      },
      n: function () {
        var step = it.next();
        normalCompletion = step.done;
        return step;
      },
      e: function (e) {
        didErr = true;
        err = e;
      },
      f: function () {
        try {
          if (!normalCompletion && it.return != null) it.return();
        } finally {
          if (didErr) throw err;
        }
      }
    };
  }
  function _toPrimitive(input, hint) {
    if (typeof input !== "object" || input === null) return input;
    var prim = input[Symbol.toPrimitive];
    if (prim !== undefined) {
      var res = prim.call(input, hint || "default");
      if (typeof res !== "object") return res;
      throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return (hint === "string" ? String : Number)(input);
  }
  function _toPropertyKey(arg) {
    var key = _toPrimitive(arg, "string");
    return typeof key === "symbol" ? key : String(key);
  }

  var Core = /*#__PURE__*/function () {
    function Core(x, y) {
      _classCallCheck$1(this, Core);
      this.coreX = x;
      this.coreY = y;
    }
    _createClass$1(Core, [{
      key: "toString",
      value: function toString() {
        return "".concat(this.coreX, "-").concat(this.coreY);
      }
    }]);
    return Core;
  }();

  // eslint-disable-next-line no-extend-native
  Date.prototype.Format = function (fmt) {
    var o = {
      "M+": this.getMonth() + 1,
      "d+": this.getDate(),
      "h+": this.getHours(),
      "m+": this.getMinutes(),
      "s+": this.getSeconds(),
      "q+": Math.floor((this.getMonth() + 3) / 3),
      "S": this.getMilliseconds()
    };
    if (/(y+)/.test(fmt)) {
      fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    }
    for (var k in o) {
      if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
    }
    return fmt;
  };

  /**
   * Add js/css callback
   *
   * @callback AddCallback
   * @param {any=} event 
   */

  /**
   * isReadyFun
   *
   * @callback IsReadyFun
   * @returns {boolean}
   */

  /**
   * @description 加载js
   * 
   * @private
   * 
   * @param {String} filepath js路径
   * @param {AddJsCallback} callback 加载完js后的回调
   * @param {IsReadyFun} isReadyFun 判断js是否已经加载的函数
   * @example
   * addJs("https://open.ys7.com/assets/js/ezuikit.js", () => {
   *   console.log("加载完")
   * })
   */
  var addJs = function addJs(filepath, callback, isReadyFun, callbackValue) {
    var headerScript = document.getElementsByTagName('head')[0].getElementsByTagName("script");
    var isReady = false;
    if (isReadyFun) {
      isReady = isReadyFun();
    } else {
      for (var i = 0; i < headerScript.length; i++) {
        if (headerScript[i].getAttribute("src") == filepath) {
          isReady = true;
          if (headerScript[i].readyState) {
            headerScript[i].onreadystatechange = function () {
              if (headerScript[i].readyState == 'complete' || headerScript[i].readyState == 'loaded') {
                headerScript[i].onreadystatechange = null;
                callback(callbackValue);
              }
            };
          } else {
            headerScript[i].onload = function () {
              // headerScript[i].onload = null
              callback(callbackValue);
            };
          }
        }
      }
    }
    if (!isReady) {
      var oJs = document.createElement("script");
      oJs.setAttribute("src", filepath);
      oJs.setAttribute("crossorigin", true);
      oJs.onload = function () {
        return callback(callbackValue);
      };
      document.getElementsByTagName("head")[0].appendChild(oJs);
    } else {
      setTimeout(function () {
        callback(callbackValue);
      }, 15);
    }
  };

  /**
   * @description 加载css
   * @private
   * @param {string} filepath css路径
   * @param {AddCallback} callback 加载完css后的回调
   * @returns {void}
   * 
   * @example
   * addCss("https://open.ys7.com/assets/css/ezuikit.css", (event) => {})
   */
  var addCss = function addCss(filepath, callback) {
    var headerLink = document.getElementsByTagName('head')[0].getElementsByTagName("link");
    var isReady = false;
    for (var i = 0; i < headerLink.length; i++) {
      if (headerLink[i].getAttribute("href") == filepath) {
        isReady = true;
      }
    }
    if (!isReady) {
      var oJs = document.createElement('link');
      oJs.rel = 'stylesheet';
      oJs.type = 'text/css';
      oJs.href = filepath;
      oJs.onload = callback;
      document.getElementsByTagName("head")[0].appendChild(oJs);
    }
  };

  /**
   * @description 判断对象是不是promise
   * 
   * @private
   * @param {*} obj 判断的对象
   * @returns {boolean}
   * 
   * @example 
   * isPromise(new Promise((resolve, reject) => {})) // true
   */
  var isPromise = function isPromise(obj) {
    return !!obj && (_typeof(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  };

  /**
   * @description 获取url参数
   * 
   * @private
   * @param {*} name query参数名 第一个值
   * @param {*} url url 路径
   * @returns {string}
   * 
   * @example
   * getQueryString("channelNo", 'https://open.ys7.com/console/setezopenlive.html?serial=L03977937&channelNo=1&channelNo=2') // 1
   */
  var getQueryString = function getQueryString(name, url) {
    var r = new RegExp("(\\?|#|&)" + name + "=(.*?)(#|&|$)");
    var m = (url || window.location.href).match(r);
    return decodeURIComponent(m ? m[2] : '');
  };

  /**
   * @description 把dom元素插入到目标元素后面
   * @private
   * @param {Node} newElement 需要插入的dom元素
   * @param {Node} targetElement 目标dom元素
   * @returns {void}
   * 
   * @example
   * insertAfter(document.createElement("div"), document.getElementById("targetElement"))
   */
  var insertAfter = function insertAfter(newElement, targetElement) {
    var parent = targetElement.parentNode;
    if (parent.lastChild == targetElement) {
      parent.appendChild(newElement);
    } else {
      parent.insertBefore(newElement, targetElement.nextSibling);
    }
  };

  /**
   * @description 请求全屏
   * @param {Node} element 
   * @returns {void}
   * 
   * @example
   * requestFullScreen(document.getElementById("targetElement"))
   */
  var requestFullScreen = function requestFullScreen(element) {
    console.log("requestFullScreen", document.getElementById(element));
    if (navigator.userAgent.indexOf("Safari") != -1 && navigator.userAgent.indexOf("Chrome") == -1) {
      element.webkitRequestFullScreen();
    } else {
      var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
      if (requestMethod) {
        requestMethod.call(element);
      } else if (typeof window.ActiveXObject !== "undefined") {
        var wscript = new window.ActiveXObject("WScript.Shell");
        if (wscript !== null) {
          wscript.SendKeys("{F11}");
        }
      }
    }
  };

  /**
   * @description 请求全屏 promise
   * @param {Node} element 
   * @returns {Promise<boolean>}
   * 
   * @example
   * requestFullScreenPromise(document.getElementById("targetElement")) 
   */
  var requestMobileFullScreen = function requestMobileFullScreen(element) {
    var width = document.documentElement.clientWidth;
    var height = document.documentElement.clientHeight;
    var wrapper = element;
    var style = "";
    style += "width:" + height + "px;"; // 注意旋转后的宽高切换
    style += "height:" + width + "px;";
    style += "-webkit-transform: rotate(90.001deg); transform: rotate(90.001deg);";
    // 注意旋转中点的处理
    style += "-webkit-transform-origin: " + width / 2 + "px " + width / 2 + "px;";
    style += "transform-origin: " + width / 2 + "px " + width / 2 + "px;";
    style += 'position: fixed;top: 0;left: 0;z-index:10';
    wrapper.style.cssText = style;
  };
  var requestFullScreenPromise = function requestFullScreenPromise(element) {
    requestFullScreen(element);
    var promise = new Promise(function (resolve, reject) {
      var timeInterval = setInterval(function () {
        var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
        if (isFullScreen) {
          clearInterval(timeInterval);
          return resolve(true);
        }
      }, 100);
      var timeOut = setTimeout(function () {
        var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
        if (!isFullScreen) {
          reject(false);
        }
        clearTimeout(timeOut);
      }, 2000);
    });
    return promise;
  };

  /**
   * @description 取消移动端全屏
   * @param {*} element 
   * @param {*} width 
   * @param {*} height 
   */
  var cancelMobileFullScreen = function cancelMobileFullScreen(element, width, height) {
    var style = "";
    style += "width:" + width + "px;";
    style += "height:" + height + "px;";
    style += "-webkit-transform: none; transform: none;";
    style += "-webkit-transform-origin: 0 0;";
    style += "transform-origin: 0 0;";
    element.style.cssText = style;
  };

  /**
   * @description 取消全屏
   * @returns {void}
   */
  var cancelFullScreen = function cancelFullScreen() {
    if (document.exitFullscreen) {
      document.exitFullscreen();
    } else if (document.webkitCancelFullScreen) {
      document.webkitCancelFullScreen();
    } else if (document.mozCancelFullScreen) {
      document.mozCancelFullScreen();
    }
  };

  /**
   * @description 取消全屏 promise
   * @param {Node} element
   * @returns {Promise<boolean>}
   */
  var cancelFullScreenPromise = function cancelFullScreenPromise(element) {
    cancelFullScreen();
    var promise = new Promise(function (resolve, reject) {
      var timeInterval = setInterval(function () {
        var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
        if (!isFullScreen) {
          clearInterval(timeInterval);
          return resolve(true);
        }
      }, 50);
      var timeOut = setTimeout(function () {
        var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
        if (isFullScreen) {
          reject(false);
        }
        clearTimeout(timeOut);
      }, 2000);
    });
    return promise;
  };

  /**
   * @description 匹配ezopen url 中的设备序列号， 通道， 验证码，是否高清 和类型
   * 
   * @param {string} ezopenUrl ezopen协议的url 
   * @returns {{ deviceSerial: string, channelNo: string, validCode: string, hd: boolean, type: string}}
   */
  var matchEzopenUrl = function matchEzopenUrl(ezopenUrl) {
    var deviceSerial = ezopenUrl.split("/")[3];
    var channelNo = ezopenUrl.split("/")[4].split(".")[0];
    var validCode = ezopenUrl.split("/")[2].split("@").length === 2 ? ezopenUrl.split("/")[2].split("@")[0] : "";
    var hd = ezopenUrl.indexOf('.hd') !== -1;
    var type = ezopenUrl.split("/")[4].split(".")[ezopenUrl.split("/")[4].split(".").length - 1].split("?")[0];
    if (type === 'rec' && ezopenUrl.indexOf(".cloud.rec") !== -1) {
      type = 'cloud.rec';
    }
    return {
      deviceSerial: deviceSerial,
      channelNo: channelNo,
      validCode: validCode,
      hd: hd,
      type: type
    };
  };

  /**
   * @description 匹配HLS或FLV协议 url 中的设备序列号， 通道， 验证码，是否高清 和回放类型
   * 
   * @param {string} url HLS或FLV协议 url
   * @returns {{ deviceSerial: string, channelNo: string, validCode: string, hd: boolean, type: string}}
   */
  var matchUrl = function matchUrl(url) {
    var reg = /\/([A-Za-z\d]{9})\_(\d)\_(\d)/;
    var matchedArray = url.match(reg);
    if (matchedArray.length > 3) {
      var deviceSerial = matchedArray[1];
      var channelNo = matchedArray[2];
      var hd = matchedArray[3] === '1';
      var type = 'live';
      // 本地回放
      if (url.indexOf('rec=local') > -1) {
        type = 'rec';
      } else
        // 云存储回放
        if (url.indexOf('rec=cloud') > -1) {
          type = 'cloud.rec';
        }
      return {
        deviceSerial: deviceSerial,
        channelNo: channelNo,
        hd: hd,
        type: type
      };
    }
    return {};
  };

  /**
   * @description 判断是否是json格式的字符串
   * @private 
   * @param {string} str 
   * @returns {boolean}
   * @example
   * isJSON("{}") // true
   * isJSON("123") // false
   */
  function isJSON(str) {
    if (typeof str === 'string') {
      try {
        var obj = JSON.parse(str);
        if (_typeof(obj) === 'object' && obj) {
          return true;
        }
        return false;
      } catch (e) {
        return false;
      }
    }
    console.log('It is not a string!');
  }

  /**
   * @description XMLHttpRequest 请求
   * 
   * @private
   * 
   * @param {string} url  请求地址 
   * @param {string} method 请求方法  
   * @param {Object} params 请求参数
   * @param {Object} header  请求头
   * @param {Function} success   请求成功回调
   * @param {Function} error 请求失败回调
   * 
   * @example
   * request("https://open.ys7.com", "GET", {}, {}, (data) => {}, (err) => {}) 
   */
  var request = function request(url, method, params, header, success, error) {
    var _url = url;
    var http_request = new XMLHttpRequest();
    http_request.onreadystatechange = function () {
      if (http_request.readyState == 4) {
        if (http_request.status == 200) {
          if (isJSON(http_request.responseText)) {
            var _data = JSON.parse(http_request.responseText);
            success(_data);
          } else {
            success(http_request.responseText);
          }
        }
      }
    };
    http_request.open(method, _url, true);
    // http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    var data = new FormData();
    for (var i in params) {
      data.append(i, params[i]);
    }
    if (header && _typeof(header) === 'object') {
      for (var i in header) {
        http_request.setRequestHeader(i, header[i]);
      }
    }
    http_request.send(data);
  };

  /**
   * @description 判断当前浏览器环境
   * @private
   * @returns {boolean}
   */
  var isMobile = function isMobile() {
    if (window) {
      return navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone|Opera Mini)/i);
    }
    return false;
  };

  var HLS = /*#__PURE__*/function () {
    function HLS(videoId, url) {
      var _this = this;
      _classCallCheck$1(this, HLS);
      addJs("https://open.ys7.com/assets/ezuikit_v3.4/js/hls.js", function () {
        console.log("加载hls.min.js成功", window.Hls);
        console.log("isSupportHls", window.Hls.isSupported());
        if (window.Hls.isSupported()) {
          _this.initHLS(videoId, url);
        }
      }, function () {
        return !!window.Hls;
      });
    }
    _createClass$1(HLS, [{
      key: "toString",
      value: function toString() {
        return "hls ".concat(this.coreX, "-").concat(this.coreY);
      }
    }, {
      key: "initHLS",
      value: function initHLS(videoId, hlsUrl) {
        var _matchUrl = matchUrl(hlsUrl),
          deviceSerial = _matchUrl.deviceSerial,
          channelNo = _matchUrl.channelNo;
          _matchUrl.hd;
        window.ezuikitMonitor.report({
          protocol: 'hls',
          url: hlsUrl,
          serial: deviceSerial,
          no: channelNo,
          action: 1
        });
        var video = document.getElementById(videoId);
        var hls = new window.Hls({
          defaultAudioCodec: 'mp4a.40.2'
        }); // 萤石设备默认使用 AAC LC 音频编码
        hls.loadSource(hlsUrl);
        hls.attachMedia(video);
        hls.on(window.Hls.Events.MANIFEST_PARSED, function () {
          video.play();
        });
        hls.on(window.Hls.Events.ERROR, function (event, data) {
          if (data.fatal) {
            switch (data.type) {
              case window.Hls.ErrorTypes.NETWORK_ERROR:
                // try to recover network error
                console.log("fatal network error encountered, try to recover");
                hls.startLoad();
                break;
              case window.Hls.ErrorTypes.MEDIA_ERROR:
                console.log("fatal media error encountered, try to recover");
                hls.recoverMediaError();
                break;
              default:
                // cannot recover
                hls.destroy();
                break;
            }
          }
        });
        this.hls = hls;
        this.video = video;
        this.hlsUrl = hlsUrl;
      }
    }, {
      key: "play",
      value: function play() {
        console.log("执行hls播放", this.video);
        this.hls.startLoad();
        // this.video.src = this.hlsUrl;
        this.video.play();
      }
    }, {
      key: "stop",
      value: function stop() {
        // 通过暂停停止播放
        // this.video.pause();
        // this.video.src = "";
        this.video.pause();
        // 停止取流
        this.hls.stopLoad();
        // this.hls.destroy();
      }
    }]);
    return HLS;
  }();

  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};

  function getDefaultExportFromCjs (x) {
  	return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  }

  var flv_min = {exports: {}};

  (function (module, exports) {
    !function (e, t) {
      module.exports = t() ;
    }(self, () => (() => {
      var e = {
          99: e => {

            var t,
              i = "object" == typeof Reflect ? Reflect : null,
              s = i && "function" == typeof i.apply ? i.apply : function (e, t, i) {
                return Function.prototype.apply.call(e, t, i);
              };
            t = i && "function" == typeof i.ownKeys ? i.ownKeys : Object.getOwnPropertySymbols ? function (e) {
              return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e));
            } : function (e) {
              return Object.getOwnPropertyNames(e);
            };
            var a = Number.isNaN || function (e) {
              return e != e;
            };
            function n() {
              n.init.call(this);
            }
            e.exports = n, e.exports.once = function (e, t) {
              return new Promise(function (i, s) {
                function a(i) {
                  e.removeListener(t, n), s(i);
                }
                function n() {
                  "function" == typeof e.removeListener && e.removeListener("error", a), i([].slice.call(arguments));
                }
                f(e, t, n, {
                  once: !0
                }), "error" !== t && function (e, t, i) {
                  "function" == typeof e.on && f(e, "error", t, i);
                }(e, a, {
                  once: !0
                });
              });
            }, n.EventEmitter = n, n.prototype._events = void 0, n.prototype._eventsCount = 0, n.prototype._maxListeners = void 0;
            var o = 10;
            function r(e) {
              if ("function" != typeof e) throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
            }
            function d(e) {
              return void 0 === e._maxListeners ? n.defaultMaxListeners : e._maxListeners;
            }
            function l(e, t, i, s) {
              var a, n, o, l;
              if (r(i), void 0 === (n = e._events) ? (n = e._events = Object.create(null), e._eventsCount = 0) : (void 0 !== n.newListener && (e.emit("newListener", t, i.listener ? i.listener : i), n = e._events), o = n[t]), void 0 === o) o = n[t] = i, ++e._eventsCount;else if ("function" == typeof o ? o = n[t] = s ? [i, o] : [o, i] : s ? o.unshift(i) : o.push(i), (a = d(e)) > 0 && o.length > a && !o.warned) {
                o.warned = !0;
                var h = new Error("Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
                h.name = "MaxListenersExceededWarning", h.emitter = e, h.type = t, h.count = o.length, l = h, console && console.warn && console.warn(l);
              }
              return e;
            }
            function h() {
              if (!this.fired) return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, 0 === arguments.length ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
            }
            function _(e, t, i) {
              var s = {
                  fired: !1,
                  wrapFn: void 0,
                  target: e,
                  type: t,
                  listener: i
                },
                a = h.bind(s);
              return a.listener = i, s.wrapFn = a, a;
            }
            function c(e, t, i) {
              var s = e._events;
              if (void 0 === s) return [];
              var a = s[t];
              return void 0 === a ? [] : "function" == typeof a ? i ? [a.listener || a] : [a] : i ? function (e) {
                for (var t = new Array(e.length), i = 0; i < t.length; ++i) t[i] = e[i].listener || e[i];
                return t;
              }(a) : m(a, a.length);
            }
            function u(e) {
              var t = this._events;
              if (void 0 !== t) {
                var i = t[e];
                if ("function" == typeof i) return 1;
                if (void 0 !== i) return i.length;
              }
              return 0;
            }
            function m(e, t) {
              for (var i = new Array(t), s = 0; s < t; ++s) i[s] = e[s];
              return i;
            }
            function f(e, t, i, s) {
              if ("function" == typeof e.on) s.once ? e.once(t, i) : e.on(t, i);else {
                if ("function" != typeof e.addEventListener) throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
                e.addEventListener(t, function a(n) {
                  s.once && e.removeEventListener(t, a), i(n);
                });
              }
            }
            Object.defineProperty(n, "defaultMaxListeners", {
              enumerable: !0,
              get: function () {
                return o;
              },
              set: function (e) {
                if ("number" != typeof e || e < 0 || a(e)) throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
                o = e;
              }
            }), n.init = function () {
              void 0 !== this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
            }, n.prototype.setMaxListeners = function (e) {
              if ("number" != typeof e || e < 0 || a(e)) throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + e + ".");
              return this._maxListeners = e, this;
            }, n.prototype.getMaxListeners = function () {
              return d(this);
            }, n.prototype.emit = function (e) {
              for (var t = [], i = 1; i < arguments.length; i++) t.push(arguments[i]);
              var a = "error" === e,
                n = this._events;
              if (void 0 !== n) a = a && void 0 === n.error;else if (!a) return !1;
              if (a) {
                var o;
                if (t.length > 0 && (o = t[0]), o instanceof Error) throw o;
                var r = new Error("Unhandled error." + (o ? " (" + o.message + ")" : ""));
                throw r.context = o, r;
              }
              var d = n[e];
              if (void 0 === d) return !1;
              if ("function" == typeof d) s(d, this, t);else {
                var l = d.length,
                  h = m(d, l);
                for (i = 0; i < l; ++i) s(h[i], this, t);
              }
              return !0;
            }, n.prototype.addListener = function (e, t) {
              return l(this, e, t, !1);
            }, n.prototype.on = n.prototype.addListener, n.prototype.prependListener = function (e, t) {
              return l(this, e, t, !0);
            }, n.prototype.once = function (e, t) {
              return r(t), this.on(e, _(this, e, t)), this;
            }, n.prototype.prependOnceListener = function (e, t) {
              return r(t), this.prependListener(e, _(this, e, t)), this;
            }, n.prototype.removeListener = function (e, t) {
              var i, s, a, n, o;
              if (r(t), void 0 === (s = this._events)) return this;
              if (void 0 === (i = s[e])) return this;
              if (i === t || i.listener === t) 0 == --this._eventsCount ? this._events = Object.create(null) : (delete s[e], s.removeListener && this.emit("removeListener", e, i.listener || t));else if ("function" != typeof i) {
                for (a = -1, n = i.length - 1; n >= 0; n--) if (i[n] === t || i[n].listener === t) {
                  o = i[n].listener, a = n;
                  break;
                }
                if (a < 0) return this;
                0 === a ? i.shift() : function (e, t) {
                  for (; t + 1 < e.length; t++) e[t] = e[t + 1];
                  e.pop();
                }(i, a), 1 === i.length && (s[e] = i[0]), void 0 !== s.removeListener && this.emit("removeListener", e, o || t);
              }
              return this;
            }, n.prototype.off = n.prototype.removeListener, n.prototype.removeAllListeners = function (e) {
              var t, i, s;
              if (void 0 === (i = this._events)) return this;
              if (void 0 === i.removeListener) return 0 === arguments.length ? (this._events = Object.create(null), this._eventsCount = 0) : void 0 !== i[e] && (0 == --this._eventsCount ? this._events = Object.create(null) : delete i[e]), this;
              if (0 === arguments.length) {
                var a,
                  n = Object.keys(i);
                for (s = 0; s < n.length; ++s) "removeListener" !== (a = n[s]) && this.removeAllListeners(a);
                return this.removeAllListeners("removeListener"), this._events = Object.create(null), this._eventsCount = 0, this;
              }
              if ("function" == typeof (t = i[e])) this.removeListener(e, t);else if (void 0 !== t) for (s = t.length - 1; s >= 0; s--) this.removeListener(e, t[s]);
              return this;
            }, n.prototype.listeners = function (e) {
              return c(this, e, !0);
            }, n.prototype.rawListeners = function (e) {
              return c(this, e, !1);
            }, n.listenerCount = function (e, t) {
              return "function" == typeof e.listenerCount ? e.listenerCount(t) : u.call(e, t);
            }, n.prototype.listenerCount = u, n.prototype.eventNames = function () {
              return this._eventsCount > 0 ? t(this._events) : [];
            };
          },
          994: (e, t, i) => {

            i.d(t, {
              Z: () => s
            });
            const s = class {
              constructor() {
                this.mimeType = null, this.duration = null, this.hasAudio = null, this.hasVideo = null, this.audioCodec = null, this.videoCodec = null, this.audioDataRate = null, this.videoDataRate = null, this.audioSampleRate = null, this.audioChannelCount = null, this.width = null, this.height = null, this.fps = null, this.profile = null, this.level = null, this.refFrames = null, this.chromaFormat = null, this.sarNum = null, this.sarDen = null, this.metadata = null, this.segments = null, this.segmentCount = null, this.hasKeyframesIndex = null, this.keyframesIndex = null;
              }
              isComplete() {
                const e = !this.hasAudio || this.hasAudio && null != this.audioCodec && null != this.audioSampleRate && null != this.audioChannelCount,
                  t = !this.hasVideo || this.hasVideo && null != this.videoCodec && null != this.width && null != this.height && null != this.fps && null != this.profile && null != this.level && null != this.refFrames && null != this.chromaFormat && null != this.sarNum && null != this.sarDen;
                return null != this.mimeType && e && t;
              }
              isSeekable() {
                return this.hasKeyframesIndex;
              }
              getNearestKeyframe(e) {
                if (null == this.keyframesIndex) return null;
                const t = this.keyframesIndex,
                  i = this._search(t.times, e);
                return {
                  index: i,
                  milliseconds: t.times[i],
                  fileposition: t.filepositions[i]
                };
              }
              _search(e, t) {
                let i = 0;
                const s = e.length - 1;
                let a = 0,
                  n = 0,
                  o = s;
                for (t < e[0] && (i = 0, n = o + 1); n <= o;) {
                  if (a = n + Math.floor((o - n) / 2), a === s || t >= e[a] && t < e[a + 1]) {
                    i = a;
                    break;
                  }
                  e[a] < t ? n = a + 1 : o = a - 1;
                }
                return i;
              }
            };
          },
          68: (e, t, i) => {

            i.d(t, {
              J1: () => o,
              Vn: () => n,
              Wk: () => s,
              Yy: () => a
            });
            class s {
              constructor(e, t, i, s, a) {
                this.dts = e, this.pts = t, this.duration = i, this.originalDts = s, this.isSyncPoint = a, this.fileposition = null;
              }
            }
            class a {
              constructor() {
                this.beginDts = 0, this.endDts = 0, this.beginPts = 0, this.endPts = 0, this.originalBeginDts = 0, this.originalEndDts = 0, this.syncPoints = [], this.firstSample = null, this.lastSample = null;
              }
              appendSyncPoint(e) {
                e.isSyncPoint = !0, this.syncPoints.push(e);
              }
            }
            class n {
              constructor() {
                this._list = [];
              }
              clear() {
                this._list = [];
              }
              appendArray(e) {
                const t = this._list;
                0 !== e.length && (t.length > 0 && e[0].originalDts < t[t.length - 1].originalDts && this.clear(), Array.prototype.push.apply(t, e));
              }
              getLastSyncPointBeforeDts(e) {
                if (0 === this._list.length) return null;
                const t = this._list;
                let i = 0;
                const s = t.length - 1;
                let a = 0,
                  n = 0,
                  o = s;
                for (e < t[0].dts && (i = 0, n = o + 1); n <= o;) {
                  if (a = n + Math.floor((o - n) / 2), a === s || e >= t[a].dts && e < t[a + 1].dts) {
                    i = a;
                    break;
                  }
                  t[a].dts < e ? n = a + 1 : o = a - 1;
                }
                return this._list[i];
              }
            }
            class o {
              constructor(e) {
                this._type = e, this._list = [], this._lastAppendLocation = -1;
              }
              get type() {
                return this._type;
              }
              get length() {
                return this._list.length;
              }
              isEmpty() {
                return 0 === this._list.length;
              }
              clear() {
                this._list = [], this._lastAppendLocation = -1;
              }
              _searchNearestSegmentBefore(e) {
                var t;
                const i = this._list;
                if (0 === i.length) return -2;
                const s = i.length - 1;
                let a = 0,
                  n = 0,
                  o = s,
                  r = 0;
                if (e < i[0].originalBeginDts) return r = -1, r;
                for (; n <= o;) {
                  if (a = n + Math.floor((o - n) / 2), a === s || e > ((null === (t = i[a].lastSample) || void 0 === t ? void 0 : t.originalDts) || 0) && e < i[a + 1].originalBeginDts) {
                    r = a;
                    break;
                  }
                  i[a].originalBeginDts < e ? n = a + 1 : o = a - 1;
                }
                return r;
              }
              _searchNearestSegmentAfter(e) {
                return this._searchNearestSegmentBefore(e) + 1;
              }
              append(e) {
                var t, i;
                const s = this._list,
                  a = e,
                  n = this._lastAppendLocation;
                let o = 0;
                -1 !== n && n < s.length && a.originalBeginDts >= ((null === (i = null === (t = s[n]) || void 0 === t ? void 0 : t.lastSample) || void 0 === i ? void 0 : i.originalDts) || 0) && (n === s.length - 1 || n < s.length - 1 && a.originalBeginDts < s[n + 1].originalBeginDts) ? o = n + 1 : s.length > 0 && (o = this._searchNearestSegmentBefore(a.originalBeginDts) + 1), this._lastAppendLocation = o, this._list.splice(o, 0, a);
              }
              getLastSegmentBefore(e) {
                const t = this._searchNearestSegmentBefore(e);
                return t >= 0 ? this._list[t] : null;
              }
              getLastSampleBefore(e) {
                const t = this.getLastSegmentBefore(e);
                return null != t ? t.lastSample : null;
              }
              getLastSyncPointBefore(e) {
                let t = this._searchNearestSegmentBefore(e),
                  i = this._list[t].syncPoints;
                for (; 0 === i.length && t > 0;) t--, i = this._list[t].syncPoints;
                return i.length > 0 ? i[i.length - 1] : null;
              }
            }
          },
          943: (e, t, i) => {

            i.d(t, {
              Z: () => Ie
            });
            var s = i(99),
              a = i(645),
              n = i(479),
              o = i(994);
            function r(e, t, i) {
              const s = e;
              if (t + i < s.length) {
                for (; i--;) if (128 != (192 & s[++t])) return !1;
                return !0;
              }
              return !1;
            }
            const d = function (e) {
              const t = [],
                i = e;
              let s = 0;
              const a = e.length;
              for (; s < a;) if (i[s] < 128) t.push(String.fromCharCode(i[s])), ++s;else {
                if (i[s] < 192) ;else if (i[s] < 224) {
                  if (r(i, s, 1)) {
                    const e = (31 & i[s]) << 6 | 63 & i[s + 1];
                    if (e >= 128) {
                      t.push(String.fromCharCode(65535 & e)), s += 2;
                      continue;
                    }
                  }
                } else if (i[s] < 240) {
                  if (r(i, s, 2)) {
                    const e = (15 & i[s]) << 12 | (63 & i[s + 1]) << 6 | 63 & i[s + 2];
                    if (e >= 2048 && 55296 != (63488 & e)) {
                      t.push(String.fromCharCode(65535 & e)), s += 3;
                      continue;
                    }
                  }
                } else if (i[s] < 248 && r(i, s, 3)) {
                  let e = (7 & i[s]) << 18 | (63 & i[s + 1]) << 12 | (63 & i[s + 2]) << 6 | 63 & i[s + 3];
                  if (e > 65536 && e < 1114112) {
                    e -= 65536, t.push(String.fromCharCode(e >>> 10 | 55296)), t.push(String.fromCharCode(1023 & e | 56320)), s += 4;
                    continue;
                  }
                }
                t.push(String.fromCharCode(65533)), ++s;
              }
              return t.join("");
            };
            var l = i(411);
            const h = function () {
              const e = new ArrayBuffer(2);
              return new DataView(e).setInt16(0, 256, !0), 256 === new Int16Array(e)[0];
            }();
            class _ {
              static parseScriptData(e, t, i) {
                const s = {};
                try {
                  const a = _.parseValue(e, t, i),
                    n = _.parseValue(e, t + a.size, i - a.size);
                  s[a.data] = n.data;
                } catch (e) {
                  a.Z.e("AMF", e.toString());
                }
                return s;
              }
              static parseObject(e, t, i) {
                if (i < 3) throw new l.rT("Data not enough when parse ScriptDataObject");
                const s = _.parseString(e, t, i),
                  a = _.parseValue(e, t + s.size, i - s.size),
                  n = a.objectEnd;
                return {
                  data: {
                    name: s.data,
                    value: a.data
                  },
                  size: s.size + a.size,
                  objectEnd: n
                };
              }
              static parseVariable(e, t, i) {
                return _.parseObject(e, t, i);
              }
              static parseString(e, t, i) {
                if (i < 2) throw new l.rT("Data not enough when parse String");
                const s = new DataView(e, t, i).getUint16(0, !h);
                let a;
                return a = s > 0 ? d(new Uint8Array(e, t + 2, s)) : "", {
                  data: a,
                  size: 2 + s
                };
              }
              static parseLongString(e, t, i) {
                if (i < 4) throw new l.rT("Data not enough when parse LongString");
                const s = new DataView(e, t, i).getUint32(0, !h);
                let a;
                return a = s > 0 ? d(new Uint8Array(e, t + 4, s)) : "", {
                  data: a,
                  size: 4 + s
                };
              }
              static parseDate(e, t, i) {
                if (i < 10) throw new l.rT("Data size invalid when parse Date");
                const s = new DataView(e, t, i);
                let a = s.getFloat64(0, !h);
                return a += 60 * s.getInt16(8, !h) * 1e3, {
                  data: new Date(a),
                  size: 10
                };
              }
              static parseValue(e, t, i) {
                if (i < 1) throw new l.rT("Data not enough when parse Value");
                const s = new DataView(e, t, i);
                let n = 1;
                const o = s.getUint8(0);
                let r,
                  d = !1;
                try {
                  switch (o) {
                    case 0:
                      r = s.getFloat64(1, !h), n += 8;
                      break;
                    case 1:
                      r = !!s.getUint8(1), n += 1;
                      break;
                    case 2:
                      {
                        const s = _.parseString(e, t + 1, i - 1);
                        r = s.data, n += s.size;
                        break;
                      }
                    case 3:
                      {
                        r = {};
                        let a = 0;
                        for (9 == (16777215 & s.getUint32(i - 4, !h)) && (a = 3); n < i - 4;) {
                          const s = _.parseObject(e, t + n, i - n - a);
                          if (s.objectEnd) break;
                          r[s.data.name] = s.data.value, n += s.size;
                        }
                        if (n <= i - 3) {
                          9 === (16777215 & s.getUint32(n - 1, !h)) && (n += 3);
                        }
                        break;
                      }
                    case 8:
                      {
                        r = {}, n += 4;
                        let a = 0;
                        for (9 == (16777215 & s.getUint32(i - 4, !h)) && (a = 3); n < i - 8;) {
                          const s = _.parseVariable(e, t + n, i - n - a);
                          if (s.objectEnd) break;
                          r[s.data.name] = s.data.value, n += s.size;
                        }
                        if (n <= i - 3) {
                          9 === (16777215 & s.getUint32(n - 1, !h)) && (n += 3);
                        }
                        break;
                      }
                    case 9:
                      r = void 0, n = 1, d = !0;
                      break;
                    case 10:
                      {
                        r = [];
                        const a = s.getUint32(1, !h);
                        n += 4;
                        for (let s = 0; s < a; s++) {
                          const s = _.parseValue(e, t + n, i - n);
                          r.push(s.data), n += s.size;
                        }
                        break;
                      }
                    case 11:
                      {
                        const s = _.parseDate(e, t + 1, i - 1);
                        r = s.data, n += s.size;
                        break;
                      }
                    case 12:
                      {
                        const s = _.parseString(e, t + 1, i - 1);
                        r = s.data, n += s.size;
                        break;
                      }
                    default:
                      n = i, a.Z.w("AMF", "Unsupported AMF value type " + o.toString());
                  }
                } catch (e) {
                  a.Z.e("AMF", e.toString());
                }
                return {
                  data: r,
                  size: n,
                  objectEnd: d
                };
              }
            }
            const c = _;
            const u = class {
              constructor(e) {
                this.TAG = "ExpGolomb", this._buffer = e, this._buffer_index = 0, this._total_bytes = e.byteLength, this._total_bits = 8 * e.byteLength, this._current_word = 0, this._current_word_bits_left = 0;
              }
              destroy() {
                this._buffer = null;
              }
              _fillCurrentWord() {
                var e;
                const t = this._total_bytes - this._buffer_index;
                if (t <= 0) throw new l.rT("ExpGolomb: _fillCurrentWord() but no bytes available");
                const i = Math.min(4, t),
                  s = new Uint8Array(4);
                s.set(null === (e = this._buffer) || void 0 === e ? void 0 : e.subarray(this._buffer_index, this._buffer_index + i)), this._current_word = new DataView(s.buffer).getUint32(0, !1), this._buffer_index += i, this._current_word_bits_left = 8 * i;
              }
              readBits(e) {
                if (e > 32) throw new l.OC("ExpGolomb: readBits() bits exceeded max 32bits!");
                if (e <= this._current_word_bits_left) {
                  const t = this._current_word >>> 32 - e;
                  return this._current_word <<= e, this._current_word_bits_left -= e, t;
                }
                let t = this._current_word_bits_left ? this._current_word : 0;
                t >>>= 32 - this._current_word_bits_left;
                const i = e - this._current_word_bits_left;
                this._fillCurrentWord();
                const s = Math.min(i, this._current_word_bits_left),
                  a = this._current_word >>> 32 - s;
                return this._current_word <<= s, this._current_word_bits_left -= s, t = t << s | a, t;
              }
              readBool() {
                return 1 === this.readBits(1);
              }
              readByte() {
                return this.readBits(8);
              }
              _skipLeadingZero() {
                let e;
                for (e = 0; e < this._current_word_bits_left; e++) if (0 != (this._current_word & 2147483648 >>> e)) return this._current_word <<= e, this._current_word_bits_left -= e, e;
                return this._fillCurrentWord(), e + this._skipLeadingZero();
              }
              readUEG() {
                const e = this._skipLeadingZero();
                return this.readBits(e + 1) - 1;
              }
              readSEG() {
                const e = this.readUEG();
                return 1 & e ? e + 1 >>> 1 : -1 * (e >>> 1);
              }
            };
            class m {
              static _ebsp2rbsp(e) {
                const t = e,
                  i = t.byteLength,
                  s = new Uint8Array(i);
                let a = 0;
                for (let e = 0; e < i; e++) e >= 2 && 3 === t[e] && 0 === t[e - 1] && 0 === t[e - 2] || (s[a] = t[e], a++);
                return new Uint8Array(s.buffer, 0, a);
              }
              static parseSPS(e) {
                const t = e.subarray(1, 4);
                let i = "avc1.";
                for (let e = 0; e < 3; e++) {
                  let s = t[e].toString(16);
                  s.length < 2 && (s = "0" + s), i += s;
                }
                const s = m._ebsp2rbsp(e);
                let a = new u(s);
                a.readByte();
                const n = a.readByte();
                a.readByte();
                const o = a.readByte();
                a.readUEG();
                const r = m.getProfileString(n),
                  d = m.getLevelString(o);
                let l = 1,
                  h = 420;
                const _ = [0, 420, 422, 444];
                let c = 8,
                  f = 8;
                if ((100 === n || 110 === n || 122 === n || 244 === n || 44 === n || 83 === n || 86 === n || 118 === n || 128 === n || 138 === n || 144 === n) && (l = a.readUEG(), 3 === l && a.readBits(1), l <= 3 && (h = _[l]), c = a.readUEG() + 8, f = a.readUEG() + 8, a.readBits(1), a.readBool())) {
                  const e = 3 !== l ? 8 : 12;
                  for (let t = 0; t < e; t++) a.readBool() && (t < 6 ? m._skipScalingList(a, 16) : m._skipScalingList(a, 64));
                }
                a.readUEG();
                const p = a.readUEG();
                if (0 === p) a.readUEG();else if (1 === p) {
                  a.readBits(1), a.readSEG(), a.readSEG();
                  const e = a.readUEG();
                  for (let t = 0; t < e; t++) a.readSEG();
                }
                const g = a.readUEG();
                a.readBits(1);
                const v = a.readUEG(),
                  E = a.readUEG(),
                  S = a.readBits(1);
                0 === S && a.readBits(1), a.readBits(1);
                let y = 0,
                  A = 0,
                  b = 0,
                  R = 0;
                a.readBool() && (y = a.readUEG(), A = a.readUEG(), b = a.readUEG(), R = a.readUEG());
                let T = 1,
                  k = 1,
                  L = 0,
                  w = !0,
                  D = 0,
                  C = 0;
                if (a.readBool()) {
                  if (a.readBool()) {
                    const e = a.readByte();
                    e > 0 && e < 16 ? (T = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2][e - 1], k = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1][e - 1]) : 255 === e && (T = a.readByte() << 8 | a.readByte(), k = a.readByte() << 8 | a.readByte());
                  }
                  if (a.readBool() && a.readBool(), a.readBool() && (a.readBits(4), a.readBool() && a.readBits(24)), a.readBool() && (a.readUEG(), a.readUEG()), a.readBool()) {
                    const e = a.readBits(32),
                      t = a.readBits(32);
                    w = a.readBool(), D = t, C = 2 * e, L = D / C;
                  }
                }
                let B = 1;
                1 === T && 1 === k || (B = T / k);
                let I = 0,
                  M = 0;
                if (0 === l) I = 1, M = 2 - S;else {
                  I = 3 === l ? 1 : 2, M = (1 === l ? 2 : 1) * (2 - S);
                }
                let O = 16 * (v + 1),
                  P = 16 * (E + 1) * (2 - S);
                O -= (y + A) * I, P -= (b + R) * M;
                const x = Math.ceil(O * B);
                return a.destroy(), a = null, {
                  codec_mimetype: i,
                  profile_idc: n,
                  level_idc: o,
                  profile_string: r,
                  level_string: d,
                  chroma_format_idc: l,
                  bit_depth: c,
                  bit_depth_luma: c,
                  bit_depth_chroma: f,
                  ref_frames: g,
                  chroma_format: h,
                  chroma_format_string: m.getChromaFormatString(h),
                  frame_rate: {
                    fixed: w,
                    fps: L,
                    fps_den: C,
                    fps_num: D
                  },
                  sar_ratio: {
                    width: T,
                    height: k
                  },
                  codec_size: {
                    width: O,
                    height: P
                  },
                  present_size: {
                    width: x,
                    height: P
                  }
                };
              }
              static _skipScalingList(e, t) {
                let i = 8,
                  s = 8,
                  a = 0;
                for (let n = 0; n < t; n++) 0 !== s && (a = e.readSEG(), s = (i + a + 256) % 256), i = 0 === s ? i : s;
              }
              static getProfileString(e) {
                switch (e) {
                  case 66:
                    return "Baseline";
                  case 77:
                    return "Main";
                  case 88:
                    return "Extended";
                  case 100:
                    return "High";
                  case 110:
                    return "High10";
                  case 122:
                    return "High422";
                  case 244:
                    return "High444";
                  default:
                    return "Unknown";
                }
              }
              static getLevelString(e) {
                return (e / 10).toFixed(1);
              }
              static getChromaFormatString(e) {
                switch (e) {
                  case 420:
                    return "4:2:0";
                  case 422:
                    return "4:2:2";
                  case 444:
                    return "4:4:4";
                  default:
                    return "Unknown";
                }
              }
            }
            const f = m;
            var p = i(898);
            class g {
              static _ebsp2rbsp(e) {
                const t = e,
                  i = t.byteLength,
                  s = new Uint8Array(i);
                let a = 0;
                for (let e = 0; e < i; e++) e >= 2 && 3 === t[e] && 0 === t[e - 1] && 0 === t[e - 2] || (s[a] = t[e], a++);
                return new Uint8Array(s.buffer, 0, a);
              }
              static parseVPS(e) {
                const t = g._ebsp2rbsp(e),
                  i = new u(t);
                i.readByte(), i.readByte();
                i.readBits(4);
                i.readBits(2);
                i.readBits(6);
                return {
                  num_temporal_layers: i.readBits(3) + 1,
                  temporal_id_nested: i.readBool()
                };
              }
              static parseSPS(e) {
                const t = g._ebsp2rbsp(e);
                let i = new u(t);
                i.readByte(), i.readByte();
                let s = 0,
                  a = 0,
                  n = 0,
                  o = 0;
                i.readBits(4);
                const r = i.readBits(3),
                  d = (i.readBool(), i.readBits(2)),
                  l = i.readBool(),
                  h = i.readBits(5),
                  _ = i.readByte(),
                  c = i.readByte(),
                  m = i.readByte(),
                  f = i.readByte(),
                  p = i.readByte(),
                  v = i.readByte(),
                  E = i.readByte(),
                  S = i.readByte(),
                  y = i.readByte(),
                  A = i.readByte(),
                  b = i.readByte(),
                  R = [],
                  T = [];
                for (let e = 0; e < r; e++) R.push(i.readBool()), T.push(i.readBool());
                if (r > 0) for (let e = r; e < 8; e++) i.readBits(2);
                for (let e = 0; e < r; e++) R[e] && (i.readByte(), i.readByte(), i.readByte(), i.readByte(), i.readByte(), i.readByte(), i.readByte(), i.readByte(), i.readByte(), i.readByte(), i.readByte()), T[e] && i.readByte();
                i.readUEG();
                const k = i.readUEG();
                3 === k && i.readBits(1);
                const L = i.readUEG(),
                  w = i.readUEG();
                i.readBool() && (s += i.readUEG(), a += i.readUEG(), n += i.readUEG(), o += i.readUEG());
                const D = i.readUEG(),
                  C = i.readUEG(),
                  B = i.readUEG();
                for (let e = i.readBool() ? 0 : r; e <= r; e++) i.readUEG(), i.readUEG(), i.readUEG();
                i.readUEG(), i.readUEG(), i.readUEG(), i.readUEG(), i.readUEG(), i.readUEG();
                if (i.readBool()) {
                  if (i.readBool()) for (let e = 0; e < 4; e++) for (let t = 0; t < (3 === e ? 2 : 6); t++) {
                    if (i.readBool()) {
                      const t = Math.min(64, 1 << 4 + (e << 1));
                      e > 1 && i.readSEG();
                      for (let e = 0; e < t; e++) i.readSEG();
                    } else i.readUEG();
                  }
                }
                i.readBool(), i.readBool();
                i.readBool() && (i.readByte(), i.readUEG(), i.readUEG(), i.readBool());
                const I = i.readUEG();
                let M = 0;
                for (let e = 0; e < I; e++) {
                  let t = !1;
                  if (0 !== e && (t = i.readBool()), t) {
                    e === I && i.readUEG(), i.readBool(), i.readUEG();
                    let t = 0;
                    for (let e = 0; e <= M; e++) {
                      const e = i.readBool();
                      let s = !1;
                      e || (s = i.readBool()), (e || s) && t++;
                    }
                    M = t;
                  } else {
                    const e = i.readUEG(),
                      t = i.readUEG();
                    M = e + t;
                    for (let t = 0; t < e; t++) i.readUEG(), i.readBool();
                    for (let e = 0; e < t; e++) i.readUEG(), i.readBool();
                  }
                }
                if (i.readBool()) {
                  const e = i.readUEG();
                  for (let t = 0; t < e; t++) {
                    for (let e = 0; e < B + 4; e++) i.readBits(1);
                    i.readBits(1);
                  }
                }
                let O = !1,
                  P = 0,
                  x = 1,
                  U = 1,
                  Z = !1,
                  N = 1,
                  G = 1;
                i.readBool(), i.readBool();
                if (i.readBool()) {
                  if (i.readBool()) {
                    const e = i.readByte();
                    e > 0 && e <= 16 ? (x = [1, 12, 10, 16, 40, 24, 20, 32, 80, 18, 15, 64, 160, 4, 3, 2][e - 1], U = [1, 11, 11, 11, 33, 11, 11, 11, 33, 11, 11, 33, 99, 3, 2, 1][e - 1]) : 255 === e && (x = i.readBits(16), U = i.readBits(16));
                  }
                  i.readBool() && i.readBool();
                  if (i.readBool()) {
                    i.readBits(3), i.readBool();
                    i.readBool() && (i.readByte(), i.readByte(), i.readByte());
                  }
                  i.readBool() && (i.readUEG(), i.readUEG());
                  i.readBool(), i.readBool(), i.readBool();
                  O = i.readBool(), O && (i.readUEG(), i.readUEG(), i.readUEG(), i.readUEG());
                  if (i.readBool()) {
                    N = i.readBits(32), G = i.readBits(32);
                    i.readBool() && i.readUEG();
                    if (i.readBool()) {
                      let e = !1,
                        t = !1,
                        s = !1;
                      if ((e = i.readBool(), t = i.readBool(), e || t)) {
                        s = i.readBool(), s && (i.readByte(), i.readBits(5), i.readBool(), i.readBits(5));
                        i.readBits(4), i.readBits(4);
                        s && i.readBits(4), i.readBits(5), i.readBits(5), i.readBits(5);
                      }
                      for (let a = 0; a <= r; a++) {
                        const a = i.readBool();
                        Z = a;
                        let n = !1,
                          o = 1;
                        a || (n = i.readBool());
                        let r = !1;
                        if (n ? i.readSEG() : r = i.readBool(), r || (o = i.readUEG() + 1), e) for (let e = 0; e < o; e++) i.readUEG(), i.readUEG(), s && (i.readUEG(), i.readUEG());
                        if (t) for (let e = 0; e < o; e++) i.readUEG(), i.readUEG(), s && (i.readUEG(), i.readUEG());
                      }
                    }
                  }
                  if (i.readBool()) {
                    i.readBool(), i.readBool(), i.readBool();
                    P = i.readUEG();
                    i.readUEG(), i.readUEG(), i.readUEG(), i.readUEG();
                  }
                }
                i.readBool();
                const V = `hvc1.${h}.1.L${b}.B0`,
                  F = L - (s + a) * (1 === k || 2 === k ? 2 : 1),
                  z = w - (n + o) * (1 === k ? 2 : 1);
                let H = 1;
                return 1 !== x && 1 !== U && (H = x / U), i.destroy(), i = null, {
                  codec_mimetype: V,
                  level_string: g.getLevelString(b),
                  profile_idc: h,
                  bit_depth: D + 8,
                  ref_frames: 1,
                  chroma_format: k,
                  chroma_format_string: g.getChromaFormatString(k),
                  general_level_idc: b,
                  general_profile_space: d,
                  general_tier_flag: l,
                  general_profile_idc: h,
                  general_profile_compatibility_flags_1: _,
                  general_profile_compatibility_flags_2: c,
                  general_profile_compatibility_flags_3: m,
                  general_profile_compatibility_flags_4: f,
                  general_constraint_indicator_flags_1: p,
                  general_constraint_indicator_flags_2: v,
                  general_constraint_indicator_flags_3: E,
                  general_constraint_indicator_flags_4: S,
                  general_constraint_indicator_flags_5: y,
                  general_constraint_indicator_flags_6: A,
                  min_spatial_segmentation_idc: P,
                  constant_frame_rate: 0,
                  chroma_format_idc: k,
                  bit_depth_luma_minus8: D,
                  bit_depth_chroma_minus8: C,
                  frame_rate: {
                    fixed: Z,
                    fps: G / N,
                    fps_den: N,
                    fps_num: G
                  },
                  sar_ratio: {
                    width: x,
                    height: U
                  },
                  codec_size: {
                    width: F,
                    height: z
                  },
                  present_size: {
                    width: F * H,
                    height: z
                  }
                };
              }
              static parsePPS(e) {
                const t = g._ebsp2rbsp(e),
                  i = new u(t);
                i.readByte(), i.readByte();
                i.readUEG(), i.readUEG(), i.readBool(), i.readBool(), i.readBits(3), i.readBool(), i.readBool(), i.readUEG(), i.readUEG(), i.readSEG(), i.readBool(), i.readBool();
                if (i.readBool()) {
                  i.readUEG();
                }
                i.readSEG(), i.readSEG(), i.readBool(), i.readBool(), i.readBool(), i.readBool();
                const s = i.readBool(),
                  a = i.readBool();
                let n = 1;
                return a && s ? n = 0 : a ? n = 3 : s && (n = 2), {
                  parallelismType: n
                };
              }
              static getChromaFormatString(e) {
                switch (e) {
                  case 0:
                    return "4:0:0";
                  case 1:
                    return "4:2:0";
                  case 2:
                    return "4:2:2";
                  case 3:
                    return "4:4:4";
                  default:
                    return "Unknown";
                }
              }
              static getProfileString(e) {
                switch (e) {
                  case 1:
                    return "Main";
                  case 2:
                    return "Main10";
                  case 3:
                    return "MainSP";
                  case 4:
                    return "Rext";
                  case 9:
                    return "SCC";
                  default:
                    return "Unknown";
                }
              }
              static getLevelString(e) {
                return (e / 30).toFixed(1);
              }
            }
            const v = g;
            function E(e) {
              return e.byteOffset % 2 == 0 && e.byteLength % 2 == 0;
            }
            function S(e) {
              return e.byteOffset % 4 == 0 && e.byteLength % 4 == 0;
            }
            function y(e, t) {
              for (let i = 0; i < e.length; i++) if (e[i] !== t[i]) return !1;
              return !0;
            }
            const A = function (e, t) {
              return e.byteLength === t.byteLength && (S(e) && S(t) ? function (e, t) {
                return y(new Uint32Array(e.buffer, e.byteOffset, e.byteLength / 4), new Uint32Array(t.buffer, t.byteOffset, t.byteLength / 4));
              }(e, t) : E(e) && E(t) ? function (e, t) {
                return y(new Uint16Array(e.buffer, e.byteOffset, e.byteLength / 2), new Uint16Array(t.buffer, t.byteOffset, t.byteLength / 2));
              }(e, t) : function (e, t) {
                return y(e, t);
              }(e, t));
            };
            class b {
              static parseOBUs(e) {
                let t = null;
                for (let i = 0; i < e.byteLength;) {
                  e[i];
                  const s = (120 & e[i]) >> 3,
                    a = 0 != (4 & e[i]),
                    n = 0 != (2 & e[i]);
                  e[i];
                  i += 1, a && (i += 1);
                  let o = Number.POSITIVE_INFINITY;
                  if (n) {
                    o = 0;
                    for (let t = 0; o |= (127 & e[i]) << 7 * t, i += 1, 0 != (128 & e[i]); t++);
                  }
                  1 === s && (t = b.parseSeuqneceHeader(e.subarray(i, i + o))), i += o;
                }
                return t;
              }
              static parseSeuqneceHeader(e) {
                let t = new u(e);
                const i = t.readBits(3),
                  s = (t.readBool(), t.readBool());
                let n = !0,
                  o = 0,
                  r = 0;
                const d = [];
                if (s) d.push({
                  operating_point_idc: 0,
                  level: t.readBits(5),
                  tier: 0
                });else {
                  const e = !1;
                  if (t.readBool()) {
                    const e = t.readBits(32),
                      s = t.readBits(32),
                      d = t.readBool();
                    if (d) {
                      let e = 0;
                      for (;;) {
                        if (0 !== t.readBits(1)) break;
                        e += 1;
                      }
                      e >= 32 ? 4294967295 : (1 << e) - 1 + t.readBits(e);
                    }
                    r = e, o = s, n = d;
                    if (t.readBool()) {
                      t.readBits(5);
                      t.readBits(32), t.readBits(5), t.readBits(5);
                    }
                  }
                  const s = t.readBool(),
                    l = t.readBits(5);
                  for (let a = 0; a <= l; a++) {
                    const a = t.readBits(12),
                      n = t.readBits(5),
                      o = n > 7 ? t.readBits(1) : 0;
                    if (d.push({
                      operating_point_idc: a,
                      level: n,
                      tier: o
                    }), e) ;
                    if (s) {
                      if (t.readBool()) {
                        t.readBits(4);
                      }
                    }
                  }
                }
                const {
                    level: l,
                    tier: h
                  } = d[0],
                  _ = t.readBits(4),
                  c = t.readBits(4),
                  m = t.readBits(_ + 1) + 1,
                  f = t.readBits(c + 1) + 1;
                let p = !1;
                if (s || (p = t.readBool()), p) {
                  t.readBits(4), t.readBits(4);
                }
                t.readBool(), t.readBool(), t.readBool();
                let y = !1;
                let A = 2;
                if (!s) {
                  if (t.readBool(), t.readBool(), t.readBool(), t.readBool(), y = t.readBool(), y) {
                    t.readBool(), t.readBool();
                  }
                  if (A = t.readBool() ? 2 : t.readBits(1), A) {
                    t.readBool() ? 2 : t.readBits(1);
                  }
                  if (y) {
                    t.readBits(3) + 1;
                  }
                }
                t.readBool(), t.readBool(), t.readBool();
                const k = t.readBool();
                let L = 8;
                if (2 === i && k) {
                  L = t.readBool() ? 12 : 10;
                } else L = k ? 10 : 8;
                let w = !1;
                1 !== i && (w = t.readBool());
                if (t.readBool()) {
                  t.readBits(8), t.readBits(8), t.readBits(8);
                }
                let C = 1,
                  B = 1;
                if (w) {
                  t.readBits(1), C = 1, B = 1;
                } else {
                  if (t.readBits(1), 0 === i) C = 1, B = 1;else if (1 === i) C = 0, B = 0;else if (12 === L) {
                    if (t.readBits(1)) {
                      t.readBits(1);
                    }
                  } else C = 1, B = 0;
                  if (C && B) {
                    t.readBits(2);
                  }
                  t.readBits(1);
                }
                t.readBool();
                t.destroy(), t = null;
                return {
                  codec_mimetype: `av01.${i}.${b.getLevelString(l, h)}.${L.toString(10).padStart(2, "0")}`,
                  level: l,
                  tier: h,
                  level_string: b.getLevelString(l, h),
                  profile_idc: i,
                  profile_string: `${i}`,
                  bit_depth: L,
                  ref_frames: 1,
                  chroma_format: b.getChromaFormat(w, C, B),
                  chroma_format_string: b.getChromaFormatString(w, C, B),
                  frame_rate: {
                    fixed: n,
                    fps: o / r,
                    fps_den: r,
                    fps_num: o
                  },
                  sar_ratio: {
                    width: 1,
                    height: 1
                  },
                  codec_size: {
                    width: m,
                    height: f
                  },
                  present_size: {
                    width: 1 * m,
                    height: f
                  }
                };
              }
              static getLevelString(e, t) {
                return `${e.toString(10).padStart(2, "0")}${0 === t ? "M" : "H"}`;
              }
              static getChromaFormat(e, t, i) {
                return e ? 0 : 0 === t && 0 === i ? 3 : 1 === t && 0 === i ? 2 : 1 === t && 1 === i ? 1 : Number.NaN;
              }
              static getChromaFormatString(e, t, i) {
                return e ? "4:0:0" : 0 === t && 0 === i ? "4:4:4" : 1 === t && 0 === i ? "4:2:2" : 1 === t && 1 === i ? "4:2:0" : "Unknown";
              }
            }
            const R = b;
            class T {
              constructor(e, t) {
                this.TAG = "FLVDemuxer", this._config = t, this._onError = null, this._onMediaInfo = null, this._onMetaDataArrived = null, this._onScriptDataArrived = null, this._onTrackMetadata = null, this._onDataAvailable = null, this._dataOffset = e.dataOffset, this._firstParse = !0, this._dispatch = !1, this._hasAudio = e.hasAudioTrack, this._hasVideo = e.hasVideoTrack, this._hasAudioFlagOverrided = !1, this._hasVideoFlagOverrided = !1, this._audioInitialMetadataDispatched = !1, this._videoInitialMetadataDispatched = !1, this._mediaInfo = new o.Z(), this._mediaInfo.hasAudio = this._hasAudio, this._mediaInfo.hasVideo = this._hasVideo, this._metadata = null, this._audioMetadata = null, this._videoMetadata = null, this._naluLengthSize = 4, this._timestampBase = 0, this._timescale = 1e3, this._duration = 0, this._durationOverrided = !1, this._referenceFrameRate = {
                  fixed: !0,
                  fps: 23.976,
                  fps_num: 23976,
                  fps_den: 1e3
                }, this._flvSoundRateTable = [5500, 11025, 22050, 44100, 48e3], this._mpegSamplingRates = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350], this._mpegAudioV10SampleRateTable = [44100, 48e3, 32e3, 0], this._mpegAudioV20SampleRateTable = [22050, 24e3, 16e3, 0], this._mpegAudioV25SampleRateTable = [11025, 12e3, 8e3, 0], this._mpegAudioL1BitRateTable = [0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, -1], this._mpegAudioL2BitRateTable = [0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, -1], this._mpegAudioL3BitRateTable = [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1], this._videoTrack = {
                  type: "video",
                  id: 1,
                  sequenceNumber: 0,
                  samples: [],
                  length: 0
                }, this._audioTrack = {
                  type: "audio",
                  id: 2,
                  sequenceNumber: 0,
                  samples: [],
                  length: 0
                }, this._littleEndian = function () {
                  const e = new ArrayBuffer(2);
                  return new DataView(e).setInt16(0, 256, !0), 256 === new Int16Array(e)[0];
                }();
              }
              destroy() {
                this._mediaInfo = null, this._metadata = null, this._audioMetadata = null, this._videoMetadata = null, this._videoTrack = null, this._audioTrack = null, this._onError = null, this._onMediaInfo = null, this._onMetaDataArrived = null, this._onScriptDataArrived = null, this._onTrackMetadata = null, this._onDataAvailable = null;
              }
              static probe(e) {
                const t = new Uint8Array(e);
                if (t.byteLength < 9) return {
                  needMoreData: !0
                };
                const i = {
                  match: !1
                };
                if (70 !== t[0] || 76 !== t[1] || 86 !== t[2] || 1 !== t[3]) return i;
                const s = (4 & t[4]) >>> 2 != 0,
                  a = 0 != (1 & t[4]),
                  n = (o = t)[r = 5] << 24 | o[r + 1] << 16 | o[r + 2] << 8 | o[r + 3];
                var o, r;
                return n < 9 ? i : {
                  match: !0,
                  consumed: n,
                  dataOffset: n,
                  hasAudioTrack: s,
                  hasVideoTrack: a
                };
              }
              bindDataSource(e) {
                return e.onDataArrival = this.parseChunks.bind(this), this;
              }
              get onTrackMetadata() {
                return this._onTrackMetadata;
              }
              set onTrackMetadata(e) {
                this._onTrackMetadata = e;
              }
              get onMediaInfo() {
                return this._onMediaInfo;
              }
              set onMediaInfo(e) {
                this._onMediaInfo = e;
              }
              get onMetaDataArrived() {
                return this._onMetaDataArrived;
              }
              set onMetaDataArrived(e) {
                this._onMetaDataArrived = e;
              }
              get onScriptDataArrived() {
                return this._onScriptDataArrived;
              }
              set onScriptDataArrived(e) {
                this._onScriptDataArrived = e;
              }
              get onError() {
                return this._onError;
              }
              set onError(e) {
                this._onError = e;
              }
              get onDataAvailable() {
                return this._onDataAvailable;
              }
              set onDataAvailable(e) {
                this._onDataAvailable = e;
              }
              get timestampBase() {
                return this._timestampBase;
              }
              set timestampBase(e) {
                this._timestampBase = e;
              }
              get overridedDuration() {
                return this._duration;
              }
              set overridedDuration(e) {
                this._durationOverrided = !0, this._duration = e, this._mediaInfo && (this._mediaInfo.duration = e);
              }
              set overridedHasAudio(e) {
                this._hasAudioFlagOverrided = !0, this._hasAudio = e, this._mediaInfo && (this._mediaInfo.hasAudio = e);
              }
              set overridedHasVideo(e) {
                this._hasVideoFlagOverrided = !0, this._hasVideo = e, this._mediaInfo && (this._mediaInfo.hasVideo = e);
              }
              resetMediaInfo() {
                this._mediaInfo = new o.Z();
              }
              _isInitialMetadataDispatched() {
                return this._hasAudio && this._hasVideo ? this._audioInitialMetadataDispatched && this._videoInitialMetadataDispatched : this._hasAudio && !this._hasVideo ? this._audioInitialMetadataDispatched : !(this._hasAudio || !this._hasVideo) && this._videoInitialMetadataDispatched;
              }
              parseChunks(e, t) {
                var i, s;
                if (!(this._onError && this._onMediaInfo && this._onTrackMetadata && this._onDataAvailable)) throw new l.rT("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");
                let n = 0;
                const o = this._littleEndian;
                if (0 === t) {
                  if (!(e.byteLength > 13)) return 0;
                  {
                    const t = T.probe(e);
                    n = (null == t ? void 0 : t.dataOffset) || 0;
                  }
                }
                if (this._firstParse) {
                  this._firstParse = !1, t + n !== this._dataOffset && a.Z.w(this.TAG, "First time parsing but chunk byteStart invalid!");
                  0 !== new DataView(e, n).getUint32(0, !o) && a.Z.w(this.TAG, "PrevTagSize0 !== 0 !!!"), n += 4;
                }
                for (; n < e.byteLength;) {
                  this._dispatch = !0;
                  const i = new DataView(e, n);
                  if (n + 11 + 4 > e.byteLength) break;
                  const s = i.getUint8(0),
                    r = 16777215 & i.getUint32(0, !o);
                  if (n + 11 + r + 4 > e.byteLength) break;
                  if (8 !== s && 9 !== s && 18 !== s) {
                    a.Z.w(this.TAG, `Unsupported tag type ${s}, skipped`), n += 11 + r + 4;
                    continue;
                  }
                  const d = i.getUint8(4),
                    l = i.getUint8(5),
                    h = i.getUint8(6) | l << 8 | d << 16 | i.getUint8(7) << 24;
                  0 !== (16777215 & i.getUint32(7, !o)) && a.Z.w(this.TAG, "Meet tag which has StreamID != 0!");
                  const _ = n + 11;
                  switch (s) {
                    case 8:
                      this._parseAudioData(e, _, r, h);
                      break;
                    case 9:
                      this._parseVideoData(e, _, r, h, t + n);
                      break;
                    case 18:
                      this._parseScriptData(e, _, r);
                  }
                  const c = i.getUint32(11 + r, !o);
                  c !== 11 + r && a.Z.w(this.TAG, `Invalid PrevTagSize ${c}`), n += 11 + r + 4;
                }
                return this._isInitialMetadataDispatched() && this._dispatch && ((null === (i = this._audioTrack) || void 0 === i ? void 0 : i.length) || (null === (s = this._videoTrack) || void 0 === s ? void 0 : s.length)) && this._onDataAvailable(this._audioTrack, this._videoTrack), n;
              }
              _parseScriptData(e, t, i) {
                var s, n, o;
                const r = c.parseScriptData(e, t, i);
                if (r.hasOwnProperty("onMetaData")) {
                  if (null == r.onMetaData || "object" != typeof r.onMetaData) return void a.Z.w(this.TAG, "Invalid onMetaData structure!");
                  this._metadata && a.Z.w(this.TAG, "Found another onMetaData tag!"), this._metadata = r;
                  const e = null === (s = this._metadata) || void 0 === s ? void 0 : s.onMetaData;
                  if (this._onMetaDataArrived && this._onMetaDataArrived(Object.assign({}, e)), "boolean" == typeof (null == e ? void 0 : e.hasAudio) && (this._hasAudioFlagOverrided || (this._hasAudio = e.hasAudio, this._mediaInfo && (this._mediaInfo.hasAudio = this._hasAudio))), "boolean" == typeof (null == e ? void 0 : e.hasVideo) && (this._hasVideoFlagOverrided || (this._hasVideo = e.hasVideo, this._mediaInfo && (this._mediaInfo.hasVideo = this._hasVideo))), "number" == typeof (null == e ? void 0 : e.audiodatarate) && this._mediaInfo && (this._mediaInfo.audioDataRate = e.audiodatarate), "number" == typeof (null == e ? void 0 : e.videodatarate) && this._mediaInfo && (this._mediaInfo.videoDataRate = e.videodatarate), "number" == typeof (null == e ? void 0 : e.width) && this._mediaInfo && (this._mediaInfo.width = e.width), "number" == typeof (null == e ? void 0 : e.height) && this._mediaInfo && (this._mediaInfo.height = e.height), "number" == typeof (null == e ? void 0 : e.duration)) {
                    if (!this._durationOverrided) {
                      const t = Math.floor(e.duration * this._timescale);
                      this._duration = t, this._mediaInfo && (this._mediaInfo.duration = t);
                    }
                  } else this._mediaInfo && (this._mediaInfo.duration = 0);
                  if ("number" == typeof (null == e ? void 0 : e.framerate)) {
                    const t = Math.floor(1e3 * e.framerate);
                    if (t > 0) {
                      const e = t / 1e3;
                      this._referenceFrameRate.fixed = !0, this._referenceFrameRate.fps = e, this._referenceFrameRate.fps_num = t, this._referenceFrameRate.fps_den = 1e3, this._mediaInfo && (this._mediaInfo.fps = e);
                    }
                  }
                  if ("object" == typeof (null == e ? void 0 : e.keyframes)) {
                    this._mediaInfo && (this._mediaInfo.hasKeyframesIndex = !0);
                    const t = e.keyframes;
                    this._mediaInfo && (this._mediaInfo.keyframesIndex = this._parseKeyframesIndex(t)), e.keyframes = null;
                  } else this._mediaInfo && (this._mediaInfo.hasKeyframesIndex = !1);
                  this._dispatch = !1, this._mediaInfo && (this._mediaInfo.metadata = e), a.Z.v(this.TAG, "Parsed onMetaData"), (null === (n = this._mediaInfo) || void 0 === n ? void 0 : n.isComplete()) && (null === (o = this._onMediaInfo) || void 0 === o || o.call(this, this._mediaInfo));
                }
                Object.keys(r).length > 0 && this._onScriptDataArrived && this._onScriptDataArrived(Object.assign({}, r));
              }
              _parseKeyframesIndex(e) {
                const t = [],
                  i = [];
                for (let s = 1; s < e.times.length; s++) {
                  const a = this._timestampBase + Math.floor(1e3 * e.times[s]);
                  t.push(a), i.push(e.filepositions[s]);
                }
                return {
                  times: t,
                  filepositions: i
                };
              }
              _parseAudioData(e, t, i, s) {
                var n, o, r, d, l, h, _, c, u, m;
                if (i <= 1) return void a.Z.w(this.TAG, "Flv: Invalid audio packet, missing SoundData payload!");
                if (this._hasAudioFlagOverrided && !1 === this._hasAudio) return;
                this._littleEndian;
                const f = new DataView(e, t, i).getUint8(0),
                  g = f >>> 4;
                if (2 !== g && 10 !== g) return void (null === (n = this._onError) || void 0 === n || n.call(this, p.Z.CODEC_UNSUPPORTED, "Flv: Unsupported audio codec idx: " + g));
                let v = 0;
                const E = (12 & f) >>> 2;
                if (!(E >= 0 && E <= 4)) return void (null === (o = this._onError) || void 0 === o || o.call(this, p.Z.FORMAT_ERROR, "Flv: Invalid audio sample rate idx: " + E));
                v = this._flvSoundRateTable[E];
                const S = 1 & f;
                let y = this._audioMetadata;
                const b = this._audioTrack;
                if (y || (!1 !== this._hasAudio || this._hasAudioFlagOverrided || (this._hasAudio = !0, this._mediaInfo && (this._mediaInfo.hasAudio = !0)), y = this._audioMetadata = {}, y.type = "audio", y.id = null == b ? void 0 : b.id, y.timescale = this._timescale, y.duration = this._duration, y.audioSampleRate = v, y.channelCount = 0 === S ? 1 : 2), 10 === g) {
                  const n = this._parseAACAudioData(e, t + 1, i - 1);
                  if (void 0 === n) return;
                  if (0 === (null == n ? void 0 : n.packetType)) {
                    if (null == y ? void 0 : y.config) {
                      if (A(n.data.config, null == y ? void 0 : y.config)) return;
                      a.Z.w(this.TAG, "AudioSpecificConfig has been changed, re-generate initialization segment");
                    }
                    const e = n.data;
                    y.audioSampleRate = null == e ? void 0 : e.samplingRate, y.channelCount = null == e ? void 0 : e.channelCount, y.codec = null == e ? void 0 : e.codec, y.originalCodec = null == e ? void 0 : e.originalCodec, y.config = null == e ? void 0 : e.config, y.refSampleDuration = 1024 / y.audioSampleRate * y.timescale, a.Z.v(this.TAG, "Parsed AudioSpecificConfig"), this._isInitialMetadataDispatched() ? this._dispatch && ((null === (r = this._audioTrack) || void 0 === r ? void 0 : r.length) || (null === (d = this._videoTrack) || void 0 === d ? void 0 : d.length)) && (null === (l = this._onDataAvailable) || void 0 === l || l.call(this, this._audioTrack, this._videoTrack)) : this._audioInitialMetadataDispatched = !0, this._dispatch = !1, null === (h = this._onTrackMetadata) || void 0 === h || h.call(this, "audio", y);
                    const t = this._mediaInfo;
                    t.audioCodec = y.originalCodec || "", t.audioSampleRate = y.audioSampleRate, t.audioChannelCount = y.channelCount, t.hasVideo ? null != t.videoCodec && (t.mimeType = 'video/x-flv; codecs="' + t.videoCodec + "," + t.audioCodec + '"') : t.mimeType = 'video/x-flv; codecs="' + t.audioCodec + '"', (null == t ? void 0 : t.isComplete()) && (null === (_ = this._onMediaInfo) || void 0 === _ || _.call(this, t));
                  } else if (1 === n.packetType) {
                    const e = this._timestampBase + s,
                      t = {
                        unit: n.data,
                        length: n.data.byteLength,
                        dts: e,
                        pts: e
                      };
                    b && (null == b || b.samples.push(t), b.length += (null === (c = null == n ? void 0 : n.data) || void 0 === c ? void 0 : c.length) || 0);
                  } else a.Z.e(this.TAG, `Flv: Unsupported AAC data type ${n.packetType}`);
                } else if (2 === g) {
                  if (!y.codec) {
                    const s = this._parseMP3AudioData(e, t + 1, i - 1, !0);
                    if (void 0 === s) return;
                    y.audioSampleRate = s.samplingRate, y.channelCount = s.channelCount, y.codec = s.codec, y.originalCodec = s.originalCodec, y.refSampleDuration = 1152 / y.audioSampleRate * y.timescale, a.Z.v(this.TAG, "Parsed MPEG Audio Frame Header"), this._audioInitialMetadataDispatched = !0, null === (u = this._onTrackMetadata) || void 0 === u || u.call(this, "audio", y);
                    const n = this._mediaInfo;
                    n.audioCodec = y.codec, n.audioSampleRate = y.audioSampleRate, n.audioChannelCount = y.channelCount, n.audioDataRate = s.bitRate, (null == n ? void 0 : n.hasVideo) ? null != n.videoCodec && (n.mimeType = 'video/x-flv; codecs="' + n.videoCodec + "," + n.audioCodec + '"') : n.mimeType = 'video/x-flv; codecs="' + n.audioCodec + '"', n.isComplete() && (null === (m = this._onMediaInfo) || void 0 === m || m.call(this, n));
                  }
                  const n = this._parseMP3AudioData(e, t + 1, i - 1, !1);
                  if (void 0 === n) return;
                  const o = this._timestampBase + s,
                    r = {
                      unit: n,
                      length: n.byteLength,
                      dts: o,
                      pts: o
                    };
                  null == b || b.samples.push(r), b && (b.length += n.length);
                }
              }
              _parseAACAudioData(e, t, i) {
                if (i <= 1) return void a.Z.w(this.TAG, "Flv: Invalid AAC packet, missing AACPacketType or/and Data!");
                const s = {},
                  n = new Uint8Array(e, t, i);
                return s.packetType = n[0], 0 === n[0] ? s.data = this._parseAACAudioSpecificConfig(e, t + 1, i - 1) : s.data = n.subarray(1), s;
              }
              _parseAACAudioSpecificConfig(e, t, i) {
                var s, a;
                const n = new Uint8Array(e, t, i);
                let o = null,
                  r = 0,
                  d = 0,
                  h = 0,
                  _ = null;
                if (r = d = n[0] >>> 3, h = (7 & n[0]) << 1 | n[1] >>> 7, h < 0 || h >= this._mpegSamplingRates.length) return void (null === (s = this._onError) || void 0 === s || s.call(this, p.Z.FORMAT_ERROR, "Flv: AAC invalid sampling frequency index!"));
                const c = this._mpegSamplingRates[h],
                  u = (120 & n[1]) >>> 3;
                if (u < 0 || u >= 8) return void (null === (a = this._onError) || void 0 === a || a.call(this, p.Z.FORMAT_ERROR, "Flv: AAC invalid channel configuration"));
                5 === r && (_ = (7 & n[1]) << 1 | n[2] >>> 7, (124 & n[2]) >>> 2);
                const m = self.navigator.userAgent.toLowerCase();
                return m.includes("firefox") ? h >= 6 ? (r = 5, o = new Array(4), _ = h - 3) : (r = 2, o = new Array(2), _ = h) : m.includes("android") ? (r = 2, o = new Array(2), _ = h) : (r = 5, _ = h, o = new Array(4), h >= 6 ? _ = h - 3 : 1 === u && (r = 2, o = new Array(2), _ = h)), o[0] = r << 3, o[0] |= (15 & h) >>> 1, o[1] = (15 & h) << 7, o[1] |= (15 & u) << 3, 5 === r && (o[1] |= (15 & _) >>> 1, o[2] = (1 & _) << 7, o[2] |= 8, o[3] = 0), {
                  config: o,
                  samplingRate: c,
                  channelCount: u,
                  codec: "mp4a.40." + r,
                  originalCodec: "mp4a.40." + d
                };
              }
              _parseMP3AudioData(e, t, i, s) {
                if (i < 4) return void a.Z.w(this.TAG, "Flv: Invalid MP3 packet, header missing!");
                this._littleEndian;
                const n = new Uint8Array(e, t, i);
                let o;
                if (s) {
                  if (255 !== n[0]) return;
                  const e = n[1] >>> 3 & 3,
                    t = (6 & n[1]) >> 1,
                    i = (240 & n[2]) >>> 4,
                    s = (12 & n[2]) >>> 2,
                    a = 3 !== (n[3] >>> 6 & 3) ? 2 : 1;
                  let r = 0,
                    d = 0;
                  const h = "mp3";
                  switch (e) {
                    case 0:
                      r = this._mpegAudioV25SampleRateTable[s];
                      break;
                    case 2:
                      r = this._mpegAudioV20SampleRateTable[s];
                      break;
                    case 3:
                      r = this._mpegAudioV10SampleRateTable[s];
                  }
                  switch (t) {
                    case 1:
                      i < this._mpegAudioL3BitRateTable.length && (d = this._mpegAudioL3BitRateTable[i]);
                      break;
                    case 2:
                      i < this._mpegAudioL2BitRateTable.length && (d = this._mpegAudioL2BitRateTable[i]);
                      break;
                    case 3:
                      i < this._mpegAudioL1BitRateTable.length && (d = this._mpegAudioL1BitRateTable[i]);
                  }
                  o = {
                    bitRate: d,
                    samplingRate: r,
                    channelCount: a,
                    codec: h,
                    originalCodec: h
                  };
                } else o = n;
                return o;
              }
              _parseVideoData(e, t, i, s, n) {
                var o, r;
                if (i <= 1) return void a.Z.w(this.TAG, "Flv: Invalid video packet, missing VideoData payload!");
                if (this._hasVideoFlagOverrided && !1 === this._hasVideo) return;
                const d = new Uint8Array(e, t, i)[0],
                  l = (112 & d) >>> 4;
                if (0 != (128 & d)) {
                  const a = 15 & d,
                    o = String.fromCharCode(...new Uint8Array(e, t, i).slice(1, 5));
                  "hvc1" === o ? this._parseEnhancedHEVCVideoPacket(e, t + 5, i - 5, s, n, l, a) : "av01" === o ? this._parseEnhancedAV1VideoPacket(e, t + 5, i - 5, s, n, l, a) : null === (r = this._onError) || void 0 === r || r.call(this, p.Z.CODEC_UNSUPPORTED, `Flv: Unsupported codec in video frame: ${o}`);
                } else {
                  const a = 15 & d;
                  7 === a ? this._parseAVCVideoPacket(e, t + 1, i - 1, s, n, l) : 12 === a ? this._parseHEVCVideoPacket(e, t + 1, i - 1, s, n, l) : null === (o = this._onError) || void 0 === o || o.call(this, p.Z.CODEC_UNSUPPORTED, `Flv: Unsupported codec in video frame: ${a}`);
                }
              }
              _parseAVCVideoPacket(e, t, i, s, n, o) {
                var r;
                if (i < 4) return void a.Z.w(this.TAG, "Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");
                const d = this._littleEndian,
                  l = new DataView(e, t, i),
                  h = l.getUint8(0),
                  _ = (16777215 & l.getUint32(0, !d)) << 8 >> 8;
                0 === h ? this._parseAVCDecoderConfigurationRecord(e, t + 4, i - 4) : 1 === h ? this._parseAVCVideoData(e, t + 4, i - 4, s, n, o, _) : 2 === h || null === (r = this._onError) || void 0 === r || r.call(this, p.Z.FORMAT_ERROR, `Flv: Invalid video packet type ${h}`);
              }
              _parseHEVCVideoPacket(e, t, i, s, n, o) {
                var r;
                if (i < 4) return void a.Z.w(this.TAG, "Flv: Invalid HEVC packet, missing HEVCPacketType or/and CompositionTime");
                const d = this._littleEndian,
                  l = new DataView(e, t, i),
                  h = l.getUint8(0),
                  _ = (16777215 & l.getUint32(0, !d)) << 8 >> 8;
                0 === h ? this._parseHEVCDecoderConfigurationRecord(e, t + 4, i - 4) : 1 === h ? this._parseHEVCVideoData(e, t + 4, i - 4, s, n, o, _) : 2 === h || null === (r = this._onError) || void 0 === r || r.call(this, p.Z.FORMAT_ERROR, `Flv: Invalid video packet type ${h}`);
              }
              _parseEnhancedHEVCVideoPacket(e, t, i, s, a, n, o) {
                var r;
                const d = this._littleEndian,
                  l = new DataView(e, t, i);
                if (0 === o) this._parseHEVCDecoderConfigurationRecord(e, t, i);else if (1 === o) {
                  const o = (4294967040 & l.getUint32(0, !d)) >> 8;
                  this._parseHEVCVideoData(e, t + 3, i - 3, s, a, n, o);
                } else 3 === o ? this._parseHEVCVideoData(e, t, i, s, a, n, 0) : 2 === o || null === (r = this._onError) || void 0 === r || r.call(this, p.Z.FORMAT_ERROR, `Flv: Invalid video packet type ${o}`);
              }
              _parseEnhancedAV1VideoPacket(e, t, i, s, a, n, o) {
                var r, d;
                this._littleEndian;
                0 === o ? this._parseAV1CodecConfigurationRecord(e, t, i) : 1 === o ? this._parseAV1VideoData(e, t, i, s, a, n, 0) : 5 === o ? null === (r = this._onError) || void 0 === r || r.call(this, p.Z.FORMAT_ERROR, `Flv: Not Suported MP2T AV1 video packet type ${o}`) : 2 === o || null === (d = this._onError) || void 0 === d || d.call(this, p.Z.FORMAT_ERROR, `Flv: Invalid video packet type ${o}`);
              }
              _parseAVCDecoderConfigurationRecord(e, t, i) {
                var s, n, o, r, d, l, h, _, c, u, m;
                if (i < 7) return void a.Z.w(this.TAG, "Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");
                let g = this._videoMetadata;
                const v = this._videoTrack,
                  E = this._littleEndian,
                  S = new DataView(e, t, i);
                if (g) {
                  if (void 0 !== g.avcc) {
                    const s = new Uint8Array(e, t, i);
                    if (A(s, g.avcc)) return;
                    a.Z.w(this.TAG, "AVCDecoderConfigurationRecord has been changed, re-generate initialization segment");
                  }
                } else !1 !== this._hasVideo || this._hasVideoFlagOverrided || (this._hasVideo = !0, this._mediaInfo && (this._mediaInfo.hasVideo = !0)), g = this._videoMetadata = {}, g.type = "video", g.id = null == v ? void 0 : v.id, g.timescale = this._timescale, g.duration = this._duration;
                const y = S.getUint8(0),
                  b = S.getUint8(1);
                S.getUint8(2), S.getUint8(3);
                if (1 !== y || 0 === b) return void (null === (s = this._onError) || void 0 === s || s.call(this, p.Z.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord"));
                if (this._naluLengthSize = 1 + (3 & S.getUint8(4)), 3 !== this._naluLengthSize && 4 !== this._naluLengthSize) return void (null === (n = this._onError) || void 0 === n || n.call(this, p.Z.FORMAT_ERROR, "Flv: Strange NaluLengthSizeMinusOne: " + (this._naluLengthSize - 1)));
                const R = 31 & S.getUint8(5);
                if (0 === R) return void (null === (o = this._onError) || void 0 === o || o.call(this, p.Z.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord: No SPS"));
                R > 1 && a.Z.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${R}`);
                let T = 6;
                for (let i = 0; i < R; i++) {
                  const s = S.getUint16(T, !E);
                  if (T += 2, 0 === s) continue;
                  const a = new Uint8Array(e, t + T, s);
                  T += s;
                  const n = f.parseSPS(a);
                  if (0 !== i) continue;
                  g.codecWidth = n.codec_size.width, g.codecHeight = n.codec_size.height, g.presentWidth = n.present_size.width, g.presentHeight = n.present_size.height, g.profile = n.profile_string, g.level = n.level_string, g.bitDepth = n.bit_depth, g.chromaFormat = n.chroma_format, g.sarRatio = n.sar_ratio, g.frameRate = n.frame_rate, n.frame_rate.fixed && 0 !== n.frame_rate.fps_num && 0 !== n.frame_rate.fps_den || (g.frameRate = this._referenceFrameRate);
                  const o = null === (r = g.frameRate) || void 0 === r ? void 0 : r.fps_den,
                    h = null === (d = g.frameRate) || void 0 === d ? void 0 : d.fps_num;
                  g.refSampleDuration = g.timescale * (o / h);
                  const _ = a.subarray(1, 4);
                  let c = "avc1.";
                  for (let e = 0; e < 3; e++) {
                    let t = _[e].toString(16);
                    t.length < 2 && (t = "0" + t), c += t;
                  }
                  g.codec = c;
                  const u = this._mediaInfo;
                  u.width = g.codecWidth, u.height = g.codecHeight, u.fps = g.frameRate.fps, u.profile = g.profile, u.level = g.level, u.refFrames = n.ref_frames, u.chromaFormat = n.chroma_format_string, u.sarNum = g.sarRatio.width, u.sarDen = g.sarRatio.height, u.videoCodec = c, u.hasAudio ? null != u.audioCodec && (u.mimeType = 'video/x-flv; codecs="' + u.videoCodec + "," + u.audioCodec + '"') : u.mimeType = 'video/x-flv; codecs="' + u.videoCodec + '"', u.isComplete() && (null === (l = this._onMediaInfo) || void 0 === l || l.call(this, u));
                }
                const k = S.getUint8(T);
                if (0 !== k) {
                  k > 1 && a.Z.w(this.TAG, `Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${k}`), T++;
                  for (let e = 0; e < k; e++) {
                    const e = S.getUint16(T, !E);
                    T += 2, 0 !== e && (T += e);
                  }
                  g.avcc = new Uint8Array(i), g.avcc.set(new Uint8Array(e, t, i), 0), a.Z.v(this.TAG, "Parsed AVCDecoderConfigurationRecord"), this._isInitialMetadataDispatched() ? this._dispatch && ((null === (_ = this._audioTrack) || void 0 === _ ? void 0 : _.length) || (null === (c = this._videoTrack) || void 0 === c ? void 0 : c.length)) && (null === (u = this._onDataAvailable) || void 0 === u || u.call(this, this._audioTrack, this._videoTrack)) : this._videoInitialMetadataDispatched = !0, this._dispatch = !1, null === (m = this._onTrackMetadata) || void 0 === m || m.call(this, "video", g);
                } else null === (h = this._onError) || void 0 === h || h.call(this, p.Z.FORMAT_ERROR, "Flv: Invalid AVCDecoderConfigurationRecord: No PPS");
              }
              _parseHEVCDecoderConfigurationRecord(e, t, i) {
                var s, n, o, r, d, l, h;
                if (i < 22) return void a.Z.w(this.TAG, "Flv: Invalid HEVCDecoderConfigurationRecord, lack of data!");
                let _ = this._videoMetadata;
                const c = this._videoTrack,
                  u = this._littleEndian,
                  m = new DataView(e, t, i);
                if (_) {
                  if (void 0 !== _.hvcc) {
                    const s = new Uint8Array(e, t, i);
                    if (A(s, _.hvcc)) return;
                    a.Z.w(this.TAG, "HEVCDecoderConfigurationRecord has been changed, re-generate initialization segment");
                  }
                } else !1 !== this._hasVideo || this._hasVideoFlagOverrided || (this._hasVideo = !0, this._mediaInfo && (this._mediaInfo.hasVideo = !0)), _ = this._videoMetadata = {}, _.type = "video", _.id = null == c ? void 0 : c.id, _.timescale = this._timescale, _.duration = this._duration;
                const f = m.getUint8(0),
                  g = 31 & m.getUint8(1);
                if (1 !== f || 0 === g) return void (null === (s = this._onError) || void 0 === s || s.call(this, p.Z.FORMAT_ERROR, "Flv: Invalid HEVCDecoderConfigurationRecord"));
                if (this._naluLengthSize = 1 + (3 & m.getUint8(21)), 3 !== this._naluLengthSize && 4 !== this._naluLengthSize) return void (null === (n = this._onError) || void 0 === n || n.call(this, p.Z.FORMAT_ERROR, "Flv: Strange NaluLengthSizeMinusOne: " + (this._naluLengthSize - 1)));
                const E = m.getUint8(22);
                for (let i = 0, s = 23; i < E; i++) {
                  const i = 63 & m.getUint8(s + 0),
                    a = m.getUint16(s + 1, !u);
                  s += 3;
                  for (let n = 0; n < a; n++) {
                    const a = m.getUint16(s + 0, !u);
                    if (0 === n) {
                      if (33 === i) {
                        s += 2;
                        const i = new Uint8Array(e, t + s, a),
                          n = v.parseSPS(i);
                        _.codecWidth = n.codec_size.width, _.codecHeight = n.codec_size.height, _.presentWidth = n.present_size.width, _.presentHeight = n.present_size.height, _.profile = null == n ? void 0 : n.profile_string, _.level = n.level_string, _.bitDepth = n.bit_depth, _.chromaFormat = n.chroma_format, _.sarRatio = n.sar_ratio, _.frameRate = n.frame_rate, n.frame_rate.fixed && 0 !== n.frame_rate.fps_num && 0 !== n.frame_rate.fps_den || (_.frameRate = this._referenceFrameRate);
                        const r = _.frameRate.fps_den,
                          d = _.frameRate.fps_num;
                        _.refSampleDuration = _.timescale * (r / d), _.codec = n.codec_mimetype;
                        const l = this._mediaInfo;
                        l.width = _.codecWidth, l.height = _.codecHeight, l.fps = _.frameRate.fps, l.profile = _.profile, l.level = _.level, l.refFrames = n.ref_frames, l.chromaFormat = n.chroma_format_string, l.sarNum = _.sarRatio.width, l.sarDen = _.sarRatio.height, l.videoCodec = n.codec_mimetype, l.hasAudio ? null != l.audioCodec && (l.mimeType = 'video/x-flv; codecs="' + l.videoCodec + "," + l.audioCodec + '"') : l.mimeType = 'video/x-flv; codecs="' + l.videoCodec + '"', l.isComplete() && (null === (o = this._onMediaInfo) || void 0 === o || o.call(this, l)), s += a;
                      } else s += 2 + a;
                    } else s += 2 + a;
                  }
                }
                _.hvcc = new Uint8Array(i), _.hvcc.set(new Uint8Array(e, t, i), 0), a.Z.v(this.TAG, "Parsed HEVCDecoderConfigurationRecord"), this._isInitialMetadataDispatched() ? this._dispatch && ((null === (r = this._audioTrack) || void 0 === r ? void 0 : r.length) || (null === (d = this._videoTrack) || void 0 === d ? void 0 : d.length)) && (null === (l = this._onDataAvailable) || void 0 === l || l.call(this, this._audioTrack, this._videoTrack)) : this._videoInitialMetadataDispatched = !0, this._dispatch = !1, null === (h = this._onTrackMetadata) || void 0 === h || h.call(this, "video", _);
              }
              _parseAV1CodecConfigurationRecord(e, t, i) {
                var s, n, o, r, d, l, h, _, c, u, m;
                if (i < 4) return void a.Z.w(this.TAG, "Flv: Invalid AV1CodecConfigurationRecord, lack of data!");
                let f = this._videoMetadata;
                const g = this._videoTrack,
                  v = (this._littleEndian, new DataView(e, t, i));
                f ? void 0 !== f.av1c && a.Z.w(this.TAG, "Found another AV1CodecConfigurationRecord!") : (!1 !== this._hasVideo || this._hasVideoFlagOverrided || (this._hasVideo = !0, this._mediaInfo && (this._mediaInfo.hasVideo = !0)), f = this._videoMetadata = {}, f.type = "video", f.id = null == g ? void 0 : g.id, f.timescale = this._timescale, f.duration = this._duration);
                const E = 127 & v.getUint8(0);
                v.getUint8(1), v.getUint8(1), v.getUint8(2);
                if (1 !== E) return void (null === (s = this._onError) || void 0 === s || s.call(this, p.Z.FORMAT_ERROR, "Flv: Invalid AV1CodecConfigurationRecord"));
                const S = R.parseOBUs(new Uint8Array(e, t + 4, i - 4));
                if (null == S) return void (null === (n = this._onError) || void 0 === n || n.call(this, p.Z.FORMAT_ERROR, "Flv: Invalid AV1CodecConfigurationRecord"));
                f.codecWidth = null === (o = null == S ? void 0 : S.codec_size) || void 0 === o ? void 0 : o.width, f.codecHeight = null === (r = null == S ? void 0 : S.codec_size) || void 0 === r ? void 0 : r.height, f.presentWidth = null === (d = null == S ? void 0 : S.present_size) || void 0 === d ? void 0 : d.width, f.presentHeight = null === (l = null == S ? void 0 : S.present_size) || void 0 === l ? void 0 : l.height, f.profile = S.profile_string, f.level = S.level_string, f.bitDepth = S.bit_depth, f.chromaFormat = S.chroma_format, f.sarRatio = S.sar_ratio, f.frameRate = S.frame_rate, S.frame_rate.fixed && 0 !== S.frame_rate.fps_num && 0 !== S.frame_rate.fps_den || (f.frameRate = this._referenceFrameRate);
                const y = f.frameRate.fps_den,
                  A = f.frameRate.fps_num;
                f.refSampleDuration = f.timescale * (y / A), f.codec = S.codec_mimetype;
                const b = this._mediaInfo;
                b.width = f.codecWidth, b.height = f.codecHeight, b.fps = f.frameRate.fps, b.profile = f.profile, b.level = f.level, b.refFrames = S.ref_frames, b.chromaFormat = S.chroma_format_string, b.sarNum = f.sarRatio.width, b.sarDen = f.sarRatio.height, b.videoCodec = S.codec_mimetype, b.hasAudio ? null != b.audioCodec && (b.mimeType = 'video/x-flv; codecs="' + b.videoCodec + "," + b.audioCodec + '"') : b.mimeType = 'video/x-flv; codecs="' + b.videoCodec + '"', b.isComplete() && (null === (h = this._onMediaInfo) || void 0 === h || h.call(this, b)), f.av1c = new Uint8Array(i), f.av1c.set(new Uint8Array(e, t, i), 0), a.Z.v(this.TAG, "Parsed AV1CodecConfigurationRecord"), this._isInitialMetadataDispatched() ? this._dispatch && ((null === (_ = this._audioTrack) || void 0 === _ ? void 0 : _.length) || (null === (c = this._videoTrack) || void 0 === c ? void 0 : c.length)) && (null === (u = this._onDataAvailable) || void 0 === u || u.call(this, this._audioTrack, this._videoTrack)) : this._videoInitialMetadataDispatched = !0, this._dispatch = !1, null === (m = this._onTrackMetadata) || void 0 === m || m.call(this, "video", f);
              }
              _parseAVCVideoData(e, t, i, s, n, o, r) {
                const d = this._littleEndian,
                  l = new DataView(e, t, i),
                  h = [];
                let _ = 0,
                  c = 0;
                const u = this._naluLengthSize,
                  m = this._timestampBase + s;
                let f = 1 === o;
                for (; c < i;) {
                  if (c + 4 >= i) {
                    a.Z.w(this.TAG, `Malformed Nalu near timestamp ${m}, offset = ${c}, dataSize = ${i}`);
                    break;
                  }
                  let s = l.getUint32(c, !d);
                  if (3 === u && (s >>>= 8), s > i - u) return void a.Z.w(this.TAG, `Malformed Nalus near timestamp ${m}, NaluSize > DataSize!`);
                  const n = 31 & l.getUint8(c + u);
                  5 === n && (f = !0);
                  const o = new Uint8Array(e, t + c, u + s),
                    r = {
                      type: n,
                      data: o
                    };
                  h.push(r), _ += o.byteLength, c += u + s;
                }
                if (h.length) {
                  const e = this._videoTrack,
                    t = {
                      units: h,
                      length: _,
                      isKeyframe: f,
                      dts: m,
                      cts: r,
                      pts: m + r
                    };
                  f && (t.fileposition = n), e && (e.samples.push(t), e.length += _);
                }
              }
              _parseHEVCVideoData(e, t, i, s, n, o, r) {
                const d = this._littleEndian,
                  l = new DataView(e, t, i),
                  h = [];
                let _ = 0,
                  c = 0;
                const u = this._naluLengthSize,
                  m = this._timestampBase + s;
                let f = 1 === o;
                for (; c < i;) {
                  if (c + 4 >= i) {
                    a.Z.w(this.TAG, `Malformed Nalu near timestamp ${m}, offset = ${c}, dataSize = ${i}`);
                    break;
                  }
                  let s = l.getUint32(c, !d);
                  if (3 === u && (s >>>= 8), s > i - u) return void a.Z.w(this.TAG, `Malformed Nalus near timestamp ${m}, NaluSize > DataSize!`);
                  const n = 31 & l.getUint8(c + u);
                  19 !== n && 20 !== n || (f = !0);
                  const o = new Uint8Array(e, t + c, u + s),
                    r = {
                      type: n,
                      data: o
                    };
                  h.push(r), _ += o.byteLength, c += u + s;
                }
                if (h.length) {
                  const e = this._videoTrack,
                    t = {
                      units: h,
                      length: _,
                      isKeyframe: f,
                      dts: m,
                      cts: r,
                      pts: m + r
                    };
                  f && (t.fileposition = n), e && (null == e || e.samples.push(t), e.length += _);
                }
              }
              _parseAV1VideoData(e, t, i, s, a, n, o) {
                this._littleEndian;
                const r = [];
                let d = 0;
                const l = this._timestampBase + s,
                  h = 1 === n;
                if (d = i, r.push({
                  unitType: 0,
                  data: new Uint8Array(e, t + 0, i)
                }), r.length) {
                  const e = this._videoTrack,
                    t = {
                      units: r,
                      length: d,
                      isKeyframe: h,
                      dts: l,
                      cts: o,
                      pts: l + o
                    };
                  h && (t.fileposition = a), e && (null == e || e.samples.push(t), e.length += d);
                }
              }
            }
            const k = T;
            class L {
              constructor() {}
              destroy() {
                this.onError = null, this.onMediaInfo = null, this.onMetaDataArrived = null, this.onTrackMetadata = null, this.onDataAvailable = null, this.onTimedID3Metadata = null, this.onSMPTE2038Metadata = null, this.onSCTE35Metadata = null, this.onPESPrivateData = null, this.onPESPrivateDataDescriptor = null;
              }
            }
            class w {
              constructor() {
                this.program_pmt_pid = {};
              }
            }
            var D, C, B, I;
            !function (e) {
              e[e.kMPEG1Audio = 3] = "kMPEG1Audio", e[e.kMPEG2Audio = 4] = "kMPEG2Audio", e[e.kPESPrivateData = 6] = "kPESPrivateData", e[e.kADTSAAC = 15] = "kADTSAAC", e[e.kLOASAAC = 17] = "kLOASAAC", e[e.kAC3 = 129] = "kAC3", e[e.kEAC3 = 135] = "kEAC3", e[e.kID3 = 21] = "kID3", e[e.kSCTE35 = 134] = "kSCTE35", e[e.kH264 = 27] = "kH264", e[e.kH265 = 36] = "kH265";
            }(D || (D = {}));
            class M {
              constructor() {
                this.pid_stream_type = {}, this.common_pids = {
                  h264: void 0,
                  h265: void 0,
                  adts_aac: void 0,
                  loas_aac: void 0,
                  opus: void 0,
                  ac3: void 0,
                  eac3: void 0,
                  mp3: void 0
                }, this.pes_private_data_pids = {}, this.timed_id3_pids = {}, this.scte_35_pids = {}, this.smpte2038_pids = {};
              }
            }
            class O {}
            class P {}
            class x {
              constructor() {
                this.slices = [], this.total_length = 0, this.expected_length = 0, this.file_position = 0, this.random_access_indicator = 0;
              }
            }
            !function (e) {
              e[e.kUnspecified = 0] = "kUnspecified", e[e.kSliceNonIDR = 1] = "kSliceNonIDR", e[e.kSliceDPA = 2] = "kSliceDPA", e[e.kSliceDPB = 3] = "kSliceDPB", e[e.kSliceDPC = 4] = "kSliceDPC", e[e.kSliceIDR = 5] = "kSliceIDR", e[e.kSliceSEI = 6] = "kSliceSEI", e[e.kSliceSPS = 7] = "kSliceSPS", e[e.kSlicePPS = 8] = "kSlicePPS", e[e.kSliceAUD = 9] = "kSliceAUD", e[e.kEndOfSequence = 10] = "kEndOfSequence", e[e.kEndOfStream = 11] = "kEndOfStream", e[e.kFiller = 12] = "kFiller", e[e.kSPSExt = 13] = "kSPSExt", e[e.kReserved0 = 14] = "kReserved0";
            }(C || (C = {}));
            class U {}
            class Z {
              constructor(e) {
                const t = e.data.byteLength;
                this.type = e.type, this.data = new Uint8Array(4 + t);
                new DataView(this.data.buffer).setUint32(0, t), this.data.set(e.data, 4);
              }
            }
            class N {
              constructor(e) {
                this.TAG = "H264AnnexBParser", this.current_startcode_offset_ = 0, this.eof_flag_ = !1, this.data_ = e, this.current_startcode_offset_ = this.findNextStartCodeOffset(0), this.eof_flag_ && a.Z.e(this.TAG, "Could not find H264 startcode until payload end!");
              }
              findNextStartCodeOffset(e) {
                let t = e;
                const i = this.data_;
                for (;;) {
                  if (t + 3 >= i.byteLength) return this.eof_flag_ = !0, i.byteLength;
                  const e = i[t + 0] << 24 | i[t + 1] << 16 | i[t + 2] << 8 | i[t + 3],
                    s = i[t + 0] << 16 | i[t + 1] << 8 | i[t + 2];
                  if (1 === e || 1 === s) return t;
                  t++;
                }
              }
              readNextNaluPayload() {
                const e = this.data_;
                let t = null;
                for (; null == t && !this.eof_flag_;) {
                  let i = this.current_startcode_offset_;
                  i += 1 === (e[i] << 24 | e[i + 1] << 16 | e[i + 2] << 8 | e[i + 3]) ? 4 : 3;
                  const s = 31 & e[i],
                    a = (128 & e[i]) >>> 7,
                    n = this.findNextStartCodeOffset(i);
                  if (this.current_startcode_offset_ = n, s >= C.kReserved0) continue;
                  if (0 !== a) continue;
                  const o = e.subarray(i, n);
                  t = new U(), t.type = s, t.data = o;
                }
                return t;
              }
            }
            class G {
              constructor(e, t, i) {
                let s = 8 + e.byteLength + 1 + 2 + t.byteLength,
                  a = !1;
                66 !== e[3] && 77 !== e[3] && 88 !== e[3] && (a = !0, s += 4);
                const n = this.data = new Uint8Array(s);
                n[0] = 1, n[1] = e[1], n[2] = e[2], n[3] = e[3], n[4] = 255, n[5] = 225;
                const o = e.byteLength;
                n[6] = o >>> 8, n[7] = 255 & o;
                let r = 8;
                n.set(e, 8), r += o, n[r] = 1;
                const d = t.byteLength;
                n[r + 1] = d >>> 8, n[r + 2] = 255 & d, n.set(t, r + 3), r += 3 + d, a && (n[r] = 252 | i.chroma_format_idc, n[r + 1] = 248 | i.bit_depth_luma - 8, n[r + 2] = 248 | i.bit_depth_chroma - 8, n[r + 3] = 0, r += 4);
              }
              getData() {
                return this.data;
              }
            }
            !function (e) {
              e[e.kNull = 0] = "kNull", e[e.kAACMain = 1] = "kAACMain", e[e.kAAC_LC = 2] = "kAAC_LC", e[e.kAAC_SSR = 3] = "kAAC_SSR", e[e.kAAC_LTP = 4] = "kAAC_LTP", e[e.kAAC_SBR = 5] = "kAAC_SBR", e[e.kAAC_Scalable = 6] = "kAAC_Scalable", e[e.kLayer1 = 32] = "kLayer1", e[e.kLayer2 = 33] = "kLayer2", e[e.kLayer3 = 34] = "kLayer3";
            }(B || (B = {})), function (e) {
              e[e.k96000Hz = 0] = "k96000Hz", e[e.k88200Hz = 1] = "k88200Hz", e[e.k64000Hz = 2] = "k64000Hz", e[e.k48000Hz = 3] = "k48000Hz", e[e.k44100Hz = 4] = "k44100Hz", e[e.k32000Hz = 5] = "k32000Hz", e[e.k24000Hz = 6] = "k24000Hz", e[e.k22050Hz = 7] = "k22050Hz", e[e.k16000Hz = 8] = "k16000Hz", e[e.k12000Hz = 9] = "k12000Hz", e[e.k11025Hz = 10] = "k11025Hz", e[e.k8000Hz = 11] = "k8000Hz", e[e.k7350Hz = 12] = "k7350Hz";
            }(I || (I = {}));
            const V = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350];
            class F {}
            class z extends F {}
            class H {
              constructor(e) {
                this.TAG = "AACADTSParser", this.data_ = e, this.current_syncword_offset_ = this.findNextSyncwordOffset(0), this.eof_flag_ && a.Z.e(this.TAG, "Could not found ADTS syncword until payload end");
              }
              findNextSyncwordOffset(e) {
                let t = e;
                const i = this.data_;
                for (;;) {
                  if (t + 7 >= i.byteLength) return this.eof_flag_ = !0, i.byteLength;
                  if (4095 === (i[t + 0] << 8 | i[t + 1]) >>> 4) return t;
                  t++;
                }
              }
              readNextAACFrame() {
                const e = this.data_;
                let t = null;
                for (; null == t && !this.eof_flag_;) {
                  let i = this.current_syncword_offset_;
                  const s = (8 & e[i + 1]) >>> 3,
                    a = (6 & e[i + 1]) >>> 1,
                    n = 1 & e[i + 1],
                    o = (192 & e[i + 2]) >>> 6,
                    r = (60 & e[i + 2]) >>> 2,
                    d = (1 & e[i + 2]) << 2 | (192 & e[i + 3]) >>> 6,
                    l = (3 & e[i + 3]) << 11 | e[i + 4] << 3 | (224 & e[i + 5]) >>> 5;
                  e[i + 6];
                  if (i + l > this.data_.byteLength) {
                    this.eof_flag_ = !0, this.has_last_incomplete_data = !0;
                    break;
                  }
                  const h = 1 === n ? 7 : 9,
                    _ = l - h;
                  i += h;
                  const c = this.findNextSyncwordOffset(i + _);
                  if (this.current_syncword_offset_ = c, 0 !== s && 1 !== s || 0 !== a) continue;
                  const u = e.subarray(i, i + _);
                  t = new F(), t.audio_object_type = o + 1, t.sampling_freq_index = r, t.sampling_frequency = V[r], t.channel_config = d, t.data = u;
                }
                return t;
              }
              hasIncompleteData() {
                return this.has_last_incomplete_data;
              }
              getIncompleteData() {
                return this.has_last_incomplete_data ? this.data_.subarray(this.current_syncword_offset_) : null;
              }
            }
            class q {
              constructor(e) {
                this.TAG = "AACLOASParser", this.data_ = e, this.current_syncword_offset_ = this.findNextSyncwordOffset(0), this.eof_flag_ && a.Z.e(this.TAG, "Could not found LOAS syncword until payload end");
              }
              findNextSyncwordOffset(e) {
                let t = e;
                const i = this.data_;
                for (;;) {
                  if (t + 1 >= i.byteLength) return this.eof_flag_ = !0, i.byteLength;
                  if (695 === (i[t + 0] << 3 | i[t + 1] >>> 5)) return t;
                  t++;
                }
              }
              getLATMValue(e) {
                const t = e.readBits(2);
                let i = 0;
                for (let s = 0; s <= t; s++) i <<= 8, i |= e.readByte();
                return i;
              }
              readNextAACFrame(e) {
                const t = this.data_;
                let i = null;
                for (; null == i && !this.eof_flag_;) {
                  const s = this.current_syncword_offset_,
                    n = (31 & t[s + 1]) << 8 | t[s + 2];
                  if (s + 3 + n >= this.data_.byteLength) {
                    this.eof_flag_ = !0, this.has_last_incomplete_data = !0;
                    break;
                  }
                  const o = new u(t.subarray(s + 3, s + 3 + n));
                  let r = null;
                  if (o.readBool()) {
                    if (null == e) {
                      a.Z.w(this.TAG, "StreamMuxConfig Missing"), this.current_syncword_offset_ = this.findNextSyncwordOffset(s + 3 + n), o.destroy();
                      continue;
                    }
                    r = e;
                  } else {
                    const e = o.readBool();
                    if (e && o.readBool()) {
                      a.Z.e(this.TAG, "audioMuxVersionA is Not Supported"), o.destroy();
                      break;
                    }
                    e && this.getLATMValue(o);
                    if (!o.readBool()) {
                      a.Z.e(this.TAG, "allStreamsSameTimeFraming zero is Not Supported"), o.destroy();
                      break;
                    }
                    if (0 !== o.readBits(6)) {
                      a.Z.e(this.TAG, "more than 2 numSubFrames Not Supported"), o.destroy();
                      break;
                    }
                    if (0 !== o.readBits(4)) {
                      a.Z.e(this.TAG, "more than 2 numProgram Not Supported"), o.destroy();
                      break;
                    }
                    if (0 !== o.readBits(3)) {
                      a.Z.e(this.TAG, "more than 2 numLayer Not Supported"), o.destroy();
                      break;
                    }
                    let t = e ? this.getLATMValue(o) : 0;
                    const i = o.readBits(5);
                    t -= 5;
                    const s = o.readBits(4);
                    t -= 4;
                    const n = o.readBits(4);
                    t -= 4, o.readBits(3), t -= 3, t > 0 && o.readBits(t);
                    const d = o.readBits(3);
                    if (0 !== d) {
                      a.Z.e(this.TAG, `frameLengthType = ${d}. Only frameLengthType = 0 Supported`), o.destroy();
                      break;
                    }
                    o.readByte();
                    const l = o.readBool();
                    if (l) if (e) this.getLATMValue(o);else {
                      let e = 0;
                      for (;;) {
                        e <<= 8;
                        const t = o.readBool();
                        if (e += o.readByte(), !t) break;
                      }
                      console.log(e);
                    }
                    o.readBool() && o.readByte(), r = new z(), r.audio_object_type = i, r.sampling_freq_index = s, r.sampling_frequency = V[r.sampling_freq_index], r.channel_config = n, r.other_data_present = l;
                  }
                  let d = 0;
                  for (;;) {
                    const e = o.readByte();
                    if (d += e, 255 !== e) break;
                  }
                  const l = new Uint8Array(d);
                  for (let e = 0; e < d; e++) l[e] = o.readByte();
                  i = new z(), i.audio_object_type = r.audio_object_type, i.sampling_freq_index = r.sampling_freq_index, i.sampling_frequency = V[r.sampling_freq_index], i.channel_config = r.channel_config, i.other_data_present = r.other_data_present, i.data = l, this.current_syncword_offset_ = this.findNextSyncwordOffset(s + 3 + n);
                }
                return i;
              }
              hasIncompleteData() {
                return this.has_last_incomplete_data;
              }
              getIncompleteData() {
                return this.has_last_incomplete_data ? this.data_.subarray(this.current_syncword_offset_) : null;
              }
            }
            class $ {
              constructor(e) {
                let t = [];
                const i = e.audio_object_type;
                let s = e.audio_object_type;
                const a = e.sampling_freq_index,
                  n = e.channel_config;
                let o = 0;
                const r = navigator.userAgent.toLowerCase();
                r.includes("firefox") ? a >= 6 ? (s = 5, t = new Array(4), o = a - 3) : (s = 2, t = new Array(2), o = a) : r.includes("android") ? (s = 2, t = new Array(2), o = a) : (s = 5, o = a, t = new Array(4), a >= 6 ? o = a - 3 : 1 === n && (s = 2, t = new Array(2), o = a)), t[0] = s << 3, t[0] |= (15 & a) >>> 1, t[1] = (15 & a) << 7, t[1] |= (15 & n) << 3, 5 === s && (t[1] |= (15 & o) >>> 1, t[2] = (1 & o) << 7, t[2] |= 8, t[3] = 0), this.config = t, this.sampling_rate = V[a], this.channel_count = n, this.codec_mimetype = "mp4a.40." + s.toString(), this.original_codec_mimetype = "mp4a.40." + i.toString();
              }
            }
            class j {}
            class W {}
            var K;
            !function (e) {
              e[e.kSpliceNull = 0] = "kSpliceNull", e[e.kSpliceSchedule = 4] = "kSpliceSchedule", e[e.kSpliceInsert = 5] = "kSpliceInsert", e[e.kTimeSignal = 6] = "kTimeSignal", e[e.kBandwidthReservation = 7] = "kBandwidthReservation", e[e.kPrivateCommand = 255] = "kPrivateCommand";
            }(K || (K = {}));
            const X = e => {
                const t = e.readBool();
                if (t) {
                  e.readBits(6);
                  return {
                    time_specified_flag: t,
                    pts_time: 4 * e.readBits(31) + e.readBits(2)
                  };
                }
                return e.readBits(7), {
                  time_specified_flag: t
                };
              },
              Y = e => {
                const t = e.readBool();
                e.readBits(6);
                return {
                  auto_return: t,
                  duration: 4 * e.readBits(31) + e.readBits(2)
                };
              },
              J = (e, t) => {
                const i = t.readBits(8);
                if (e) return {
                  component_tag: i
                };
                return {
                  component_tag: i,
                  splice_time: X(t)
                };
              },
              Q = e => ({
                component_tag: e.readBits(8),
                utc_splice_time: e.readBits(32)
              }),
              ee = e => {
                const t = e.readBits(32),
                  i = e.readBool();
                e.readBits(7);
                const s = {
                  splice_event_id: t,
                  splice_event_cancel_indicator: i
                };
                if (i) return s;
                if (s.out_of_network_indicator = e.readBool(), s.program_splice_flag = e.readBool(), s.duration_flag = e.readBool(), e.readBits(5), s.program_splice_flag) s.utc_splice_time = e.readBits(32);else {
                  s.component_count = e.readBits(8), s.components = [];
                  for (let t = 0; t < s.component_count; t++) s.components.push(Q(e));
                }
                return s.duration_flag && (s.break_duration = Y(e)), s.unique_program_id = e.readBits(16), s.avail_num = e.readBits(8), s.avails_expected = e.readBits(8), s;
              },
              te = (e, t, i, s) => ({
                descriptor_tag: e,
                descriptor_length: t,
                identifier: i,
                provider_avail_id: s.readBits(32)
              }),
              ie = (e, t, i, s) => {
                const a = s.readBits(8),
                  n = s.readBits(3);
                s.readBits(5);
                let o = "";
                for (let e = 0; e < n; e++) o += String.fromCharCode(s.readBits(8));
                return {
                  descriptor_tag: e,
                  descriptor_length: t,
                  identifier: i,
                  preroll: a,
                  dtmf_count: n,
                  DTMF_char: o
                };
              },
              se = e => {
                const t = e.readBits(8);
                e.readBits(7);
                return {
                  component_tag: t,
                  pts_offset: 4 * e.readBits(31) + e.readBits(2)
                };
              },
              ae = (e, t, i, s) => {
                const a = s.readBits(32),
                  n = s.readBool();
                s.readBits(7);
                const o = {
                  descriptor_tag: e,
                  descriptor_length: t,
                  identifier: i,
                  segmentation_event_id: a,
                  segmentation_event_cancel_indicator: n
                };
                if (n) return o;
                if (o.program_segmentation_flag = s.readBool(), o.segmentation_duration_flag = s.readBool(), o.delivery_not_restricted_flag = s.readBool(), o.delivery_not_restricted_flag ? s.readBits(5) : (o.web_delivery_allowed_flag = s.readBool(), o.no_regional_blackout_flag = s.readBool(), o.archive_allowed_flag = s.readBool(), o.device_restrictions = s.readBits(2)), !o.program_segmentation_flag) {
                  o.component_count = s.readBits(8), o.components = [];
                  for (let e = 0; e < o.component_count; e++) o.components.push(se(s));
                }
                o.segmentation_duration_flag && (o.segmentation_duration = s.readBits(40)), o.segmentation_upid_type = s.readBits(8), o.segmentation_upid_length = s.readBits(8);
                {
                  const e = new Uint8Array(o.segmentation_upid_length);
                  for (let t = 0; t < o.segmentation_upid_length; t++) e[t] = s.readBits(8);
                  o.segmentation_upid = e.buffer;
                }
                return o.segmentation_type_id = s.readBits(8), o.segment_num = s.readBits(8), o.segments_expected = s.readBits(8), 52 !== o.segmentation_type_id && 54 !== o.segmentation_type_id && 56 !== o.segmentation_type_id && 58 !== o.segmentation_type_id || (o.sub_segment_num = s.readBits(8), o.sub_segments_expected = s.readBits(8)), o;
              },
              ne = (e, t, i, s) => ({
                descriptor_tag: e,
                descriptor_length: t,
                identifier: i,
                TAI_seconds: s.readBits(48),
                TAI_ns: s.readBits(32),
                UTC_offset: s.readBits(16)
              }),
              oe = e => ({
                component_tag: e.readBits(8),
                ISO_code: String.fromCharCode(e.readBits(8), e.readBits(8), e.readBits(8)),
                Bit_Stream_Mode: e.readBits(3),
                Num_Channels: e.readBits(4),
                Full_Srvc_Audio: e.readBool()
              }),
              re = (e, t, i, s) => {
                const a = s.readBits(4),
                  n = [];
                for (let e = 0; e < a; e++) n.push(oe(s));
                return {
                  descriptor_tag: e,
                  descriptor_length: t,
                  identifier: i,
                  audio_count: a,
                  components: n
                };
              },
              de = e => {
                var t, i, s, a, n, o;
                const r = new u(e),
                  d = r.readBits(8),
                  l = r.readBool(),
                  h = r.readBool();
                r.readBits(2);
                const _ = r.readBits(12),
                  c = r.readBits(8),
                  m = r.readBool(),
                  f = r.readBits(6),
                  p = 4 * r.readBits(31) + r.readBits(2),
                  g = r.readBits(8),
                  v = r.readBits(12),
                  E = r.readBits(12),
                  S = r.readBits(8);
                let y = null;
                S === K.kSpliceNull ? y = {} : S === K.kSpliceSchedule ? y = (e => {
                  const t = e.readBits(8),
                    i = [];
                  for (let s = 0; s < t; s++) i.push(ee(e));
                  return {
                    splice_count: t,
                    events: i
                  };
                })(r) : S === K.kSpliceInsert ? y = (e => {
                  const t = e.readBits(32),
                    i = e.readBool();
                  e.readBits(7);
                  const s = {
                    splice_event_id: t,
                    splice_event_cancel_indicator: i
                  };
                  if (i) return s;
                  if (s.out_of_network_indicator = e.readBool(), s.program_splice_flag = e.readBool(), s.duration_flag = e.readBool(), s.splice_immediate_flag = e.readBool(), e.readBits(4), s.program_splice_flag && !s.splice_immediate_flag && (s.splice_time = X(e)), !s.program_splice_flag) {
                    s.component_count = e.readBits(8), s.components = [];
                    for (let t = 0; t < s.component_count; t++) s.components.push(J(s.splice_immediate_flag, e));
                  }
                  return s.duration_flag && (s.break_duration = Y(e)), s.unique_program_id = e.readBits(16), s.avail_num = e.readBits(8), s.avails_expected = e.readBits(8), s;
                })(r) : S === K.kTimeSignal ? y = (e => ({
                  splice_time: X(e)
                }))(r) : S === K.kBandwidthReservation ? y = {} : S === K.kPrivateCommand ? y = ((e, t) => {
                  const i = String.fromCharCode(t.readBits(8), t.readBits(8), t.readBits(8), t.readBits(8)),
                    s = new Uint8Array(e - 4);
                  for (let i = 0; i < e - 4; i++) s[i] = t.readBits(8);
                  return {
                    identifier: i,
                    private_data: s.buffer
                  };
                })(E, r) : r.readBits(8 * E);
                const A = [],
                  b = r.readBits(16);
                for (let e = 0; e < b;) {
                  const t = r.readBits(8),
                    i = r.readBits(8),
                    s = String.fromCharCode(r.readBits(8), r.readBits(8), r.readBits(8), r.readBits(8));
                  0 === t ? A.push(te(t, i, s, r)) : 1 === t ? A.push(ie(t, i, s, r)) : 2 === t ? A.push(ae(t, i, s, r)) : 3 === t ? A.push(ne(t, i, s, r)) : 4 === t ? A.push(re(t, i, s, r)) : r.readBits(8 * (i - 4)), e += 2 + i;
                }
                const R = {
                  table_id: d,
                  section_syntax_indicator: l,
                  private_indicator: h,
                  section_length: _,
                  protocol_version: c,
                  encrypted_packet: m,
                  encryption_algorithm: f,
                  pts_adjustment: p,
                  cw_index: g,
                  tier: v,
                  splice_command_length: E,
                  splice_command_type: S,
                  splice_command: y,
                  descriptor_loop_length: b,
                  splice_descriptors: A,
                  E_CRC32: m ? r.readBits(32) : void 0,
                  CRC32: r.readBits(32)
                };
                if (S === K.kSpliceInsert) {
                  const r = y;
                  if (r.splice_event_cancel_indicator) return {
                    splice_command_type: S,
                    detail: R,
                    data: e
                  };
                  if (r.program_splice_flag && !r.splice_immediate_flag) {
                    const n = r.duration_flag ? null === (t = null == r ? void 0 : r.break_duration) || void 0 === t ? void 0 : t.auto_return : void 0,
                      o = r.duration_flag ? ((null === (i = null == r ? void 0 : r.break_duration) || void 0 === i ? void 0 : i.duration) || 0) / 90 : void 0;
                    return (null === (s = r.splice_time) || void 0 === s ? void 0 : s.time_specified_flag) ? {
                      splice_command_type: S,
                      pts: (p + ((null === (a = null == r ? void 0 : r.splice_time) || void 0 === a ? void 0 : a.pts_time) || 0)) % Math.pow(2, 33),
                      auto_return: n,
                      duraiton: o,
                      detail: R,
                      data: e
                    } : {
                      splice_command_type: S,
                      auto_return: n,
                      duraiton: o,
                      detail: R,
                      data: e
                    };
                  }
                  return {
                    splice_command_type: S,
                    auto_return: r.duration_flag ? null === (n = r.break_duration) || void 0 === n ? void 0 : n.auto_return : void 0,
                    duraiton: r.duration_flag ? ((null === (o = r.break_duration) || void 0 === o ? void 0 : o.duration) || 0) / 90 : void 0,
                    detail: R,
                    data: e
                  };
                }
                if (S === K.kTimeSignal) {
                  const t = y;
                  return t.splice_time.time_specified_flag ? {
                    splice_command_type: S,
                    pts: (p + (t.splice_time.pts_time || 0)) % Math.pow(2, 33),
                    detail: R,
                    data: e
                  } : {
                    splice_command_type: S,
                    detail: R,
                    data: e
                  };
                }
                return {
                  splice_command_type: S,
                  detail: R,
                  data: e
                };
              };
            var le;
            !function (e) {
              e[e.kSliceIDR_W_RADL = 19] = "kSliceIDR_W_RADL", e[e.kSliceIDR_N_LP = 20] = "kSliceIDR_N_LP", e[e.kSliceCRA_NUT = 21] = "kSliceCRA_NUT", e[e.kSliceVPS = 32] = "kSliceVPS", e[e.kSliceSPS = 33] = "kSliceSPS", e[e.kSlicePPS = 34] = "kSlicePPS", e[e.kSliceAUD = 35] = "kSliceAUD";
            }(le || (le = {}));
            class he {}
            class _e {
              constructor(e) {
                const t = e.data.byteLength;
                this.type = e.type, this.data = new Uint8Array(4 + t);
                new DataView(this.data.buffer).setUint32(0, t), this.data.set(e.data, 4);
              }
            }
            class ce {
              constructor(e) {
                this.TAG = "H265AnnexBParser", this.current_startcode_offset_ = 0, this.eof_flag_ = !1, this.data_ = e, this.current_startcode_offset_ = this.findNextStartCodeOffset(0), this.eof_flag_ && a.Z.e(this.TAG, "Could not find H265 startcode until payload end!");
              }
              findNextStartCodeOffset(e) {
                let t = e;
                const i = this.data_;
                for (;;) {
                  if (t + 3 >= i.byteLength) return this.eof_flag_ = !0, i.byteLength;
                  const e = i[t + 0] << 24 | i[t + 1] << 16 | i[t + 2] << 8 | i[t + 3],
                    s = i[t + 0] << 16 | i[t + 1] << 8 | i[t + 2];
                  if (1 === e || 1 === s) return t;
                  t++;
                }
              }
              readNextNaluPayload() {
                const e = this.data_;
                let t = null;
                for (; null == t && !this.eof_flag_;) {
                  let i = this.current_startcode_offset_;
                  i += 1 === (e[i] << 24 | e[i + 1] << 16 | e[i + 2] << 8 | e[i + 3]) ? 4 : 3;
                  const s = e[i] >> 1 & 63,
                    a = (128 & e[i]) >>> 7,
                    n = this.findNextStartCodeOffset(i);
                  if (this.current_startcode_offset_ = n, 0 !== a) continue;
                  const o = e.subarray(i, n);
                  t = new he(), t.type = s, t.data = o;
                }
                return t;
              }
            }
            class ue {
              constructor(e, t, i, s) {
                const a = 23 + (5 + e.byteLength) + (5 + t.byteLength) + (5 + i.byteLength),
                  n = this.data = new Uint8Array(a);
                n[0] = 1, n[1] = (3 & s.general_profile_space) << 6 | (s.general_tier_flag ? 1 : 0) << 5 | 31 & s.general_profile_idc, n[2] = s.general_profile_compatibility_flags_1, n[3] = s.general_profile_compatibility_flags_2, n[4] = s.general_profile_compatibility_flags_3, n[5] = s.general_profile_compatibility_flags_4, n[6] = s.general_constraint_indicator_flags_1, n[7] = s.general_constraint_indicator_flags_2, n[8] = s.general_constraint_indicator_flags_3, n[9] = s.general_constraint_indicator_flags_4, n[10] = s.general_constraint_indicator_flags_5, n[11] = s.general_constraint_indicator_flags_6, n[12] = s.general_level_idc, n[13] = 240 | (3840 & s.min_spatial_segmentation_idc) >> 8, n[14] = 255 & s.min_spatial_segmentation_idc, n[15] = 252 | 3 & s.parallelismType, n[16] = 252 | 3 & s.chroma_format_idc, n[17] = 248 | 7 & s.bit_depth_luma_minus8, n[18] = 248 | 7 & s.bit_depth_chroma_minus8, n[19] = 0, n[20] = 0, n[21] = (3 & s.constant_frame_rate) << 6 | (7 & s.num_temporal_layers) << 3 | (s.temporal_id_nested ? 1 : 0) << 2 | 3, n[22] = 3, n[23] = 128 | le.kSliceVPS, n[24] = 0, n[25] = 1, n[26] = (65280 & e.byteLength) >> 8, n[27] = (255 & e.byteLength) >> 0, n.set(e, 28), n[23 + (5 + e.byteLength) + 0] = 128 | le.kSliceSPS, n[23 + (5 + e.byteLength) + 1] = 0, n[23 + (5 + e.byteLength) + 2] = 1, n[23 + (5 + e.byteLength) + 3] = (65280 & t.byteLength) >> 8, n[23 + (5 + e.byteLength) + 4] = (255 & t.byteLength) >> 0, n.set(t, 23 + (5 + e.byteLength) + 5), n[23 + (5 + e.byteLength + 5 + t.byteLength) + 0] = 128 | le.kSlicePPS, n[23 + (5 + e.byteLength + 5 + t.byteLength) + 1] = 0, n[23 + (5 + e.byteLength + 5 + t.byteLength) + 2] = 1, n[23 + (5 + e.byteLength + 5 + t.byteLength) + 3] = (65280 & i.byteLength) >> 8, n[23 + (5 + e.byteLength + 5 + t.byteLength) + 4] = (255 & i.byteLength) >> 0, n.set(i, 23 + (5 + e.byteLength + 5 + t.byteLength) + 5);
              }
              getData() {
                return this.data;
              }
            }
            class me {}
            class fe {}
            class pe {}
            const ge = [[64, 64, 80, 80, 96, 96, 112, 112, 128, 128, 160, 160, 192, 192, 224, 224, 256, 256, 320, 320, 384, 384, 448, 448, 512, 512, 640, 640, 768, 768, 896, 896, 1024, 1024, 1152, 1152, 1280, 1280], [69, 70, 87, 88, 104, 105, 121, 122, 139, 140, 174, 175, 208, 209, 243, 244, 278, 279, 348, 349, 417, 418, 487, 488, 557, 558, 696, 697, 835, 836, 975, 976, 1114, 1115, 1253, 1254, 1393, 1394], [96, 96, 120, 120, 144, 144, 168, 168, 192, 192, 240, 240, 288, 288, 336, 336, 384, 384, 480, 480, 576, 576, 672, 672, 768, 768, 960, 960, 1152, 1152, 1344, 1344, 1536, 1536, 1728, 1728, 1920, 1920]];
            class ve {
              constructor(e) {
                this.TAG = "AC3Parser", this.data_ = e, this.current_syncword_offset_ = this.findNextSyncwordOffset(0), this.eof_flag_ && a.Z.e(this.TAG, "Could not found AC3 syncword until payload end");
              }
              findNextSyncwordOffset(e) {
                let t = e;
                const i = this.data_;
                for (;;) {
                  if (t + 7 >= i.byteLength) return this.eof_flag_ = !0, i.byteLength;
                  if (2935 === (i[t + 0] << 8 | i[t + 1] << 0)) return t;
                  t++;
                }
              }
              readNextAC3Frame() {
                const e = this.data_;
                let t = null;
                for (; null == t && !this.eof_flag_;) {
                  const i = this.current_syncword_offset_,
                    s = e[i + 4] >> 6,
                    a = [48e3, 44200, 33e3][s],
                    n = 63 & e[i + 4],
                    o = 2 * ge[s][n];
                  if (i + o > this.data_.byteLength) {
                    this.eof_flag_ = !0, this.has_last_incomplete_data = !0;
                    break;
                  }
                  const r = this.findNextSyncwordOffset(i + o);
                  this.current_syncword_offset_ = r;
                  const d = e[i + 5] >> 3,
                    l = 7 & e[i + 5],
                    h = e[i + 6] >> 5;
                  let _ = 0;
                  0 != (1 & h) && 1 !== h && (_ += 2), 0 != (4 & h) && (_ += 2), 2 === h && (_ += 2);
                  const c = (e[i + 6] << 8 | e[i + 7] << 0) >> 12 - _ & 1,
                    u = [2, 1, 2, 3, 3, 4, 4, 5][h] + c;
                  t = new pe(), t.sampling_frequency = a, t.channel_count = u, t.channel_mode = h, t.bit_stream_identification = d, t.low_frequency_effects_channel_on = c, t.bit_stream_mode = l, t.frame_size_code = n, t.data = e.subarray(i, i + o);
                }
                return t;
              }
              hasIncompleteData() {
                return this.has_last_incomplete_data;
              }
              getIncompleteData() {
                return this.has_last_incomplete_data ? this.data_.subarray(this.current_syncword_offset_) : null;
              }
            }
            class Ee {
              constructor(e) {
                let t = [];
                t = [e.sampling_rate_code << 6 | e.bit_stream_identification << 1 | e.bit_stream_mode >> 2, (3 & e.bit_stream_mode) << 6 | e.channel_mode << 3 | e.low_frequency_effects_channel_on << 2 | e.frame_size_code >> 4, e.frame_size_code << 4 & 224], this.config = t, this.sampling_rate = e.sampling_frequency, this.bit_stream_identification = e.bit_stream_identification, this.bit_stream_mode = e.bit_stream_mode, this.low_frequency_effects_channel_on = e.low_frequency_effects_channel_on, this.channel_count = e.channel_count, this.channel_mode = e.channel_mode, this.codec_mimetype = "ac-3", this.original_codec_mimetype = "ac-3";
              }
            }
            class Se {}
            class ye {
              constructor(e) {
                this.TAG = "EAC3Parser", this.data_ = e, this.current_syncword_offset_ = this.findNextSyncwordOffset(0), this.eof_flag_ && a.Z.e(this.TAG, "Could not found AC3 syncword until payload end");
              }
              findNextSyncwordOffset(e) {
                let t = e;
                const i = this.data_;
                for (;;) {
                  if (t + 7 >= i.byteLength) return this.eof_flag_ = !0, i.byteLength;
                  if (2935 === (i[t + 0] << 8 | i[t + 1] << 0)) return t;
                  t++;
                }
              }
              readNextEAC3Frame() {
                const e = this.data_;
                let t = null;
                for (; null == t && !this.eof_flag_;) {
                  const i = this.current_syncword_offset_,
                    s = new u(e.subarray(i + 2)),
                    a = (s.readBits(2), s.readBits(3), s.readBits(11) + 1 << 1);
                  let n = s.readBits(2),
                    o = null,
                    r = null;
                  3 === n ? (n = s.readBits(2), o = [24e3, 22060, 16e3][n], r = 3) : (o = [48e3, 44100, 32e3][n], r = s.readBits(2));
                  const d = s.readBits(3),
                    l = s.readBits(1),
                    h = s.readBits(5);
                  if (i + a > this.data_.byteLength) {
                    this.eof_flag_ = !0, this.has_last_incomplete_data = !0;
                    break;
                  }
                  const _ = this.findNextSyncwordOffset(i + a);
                  this.current_syncword_offset_ = _;
                  const c = [2, 1, 2, 3, 3, 4, 4, 5][d] + l;
                  s.destroy(), t = new Se(), t.sampling_frequency = o, t.channel_count = c, t.channel_mode = d, t.bit_stream_identification = h, t.low_frequency_effects_channel_on = l, t.frame_size = a, t.num_blks = [1, 2, 3, 6][r], t.data = e.subarray(i, i + a);
                }
                return t;
              }
              hasIncompleteData() {
                return this.has_last_incomplete_data;
              }
              getIncompleteData() {
                return this.has_last_incomplete_data ? this.data_.subarray(this.current_syncword_offset_) : null;
              }
            }
            class Ae {
              constructor(e) {
                let t = [];
                const i = Math.floor(e.frame_size * e.sampling_frequency / (16 * e.num_blks));
                t = [255 & i, 248 & i, e.sampling_rate_code << 6 | e.bit_stream_identification << 1 | 0, 0 | e.channel_mode << 1 | e.low_frequency_effects_channel_on << 0, 0], this.config = t, this.sampling_rate = e.sampling_frequency, this.bit_stream_identification = e.bit_stream_identification, this.num_blks = e.num_blks, this.low_frequency_effects_channel_on = e.low_frequency_effects_channel_on, this.channel_count = e.channel_count, this.channel_mode = e.channel_mode, this.codec_mimetype = "ec-3", this.original_codec_mimetype = "ec-3";
              }
            }
            const be = class extends L {
                constructor(e, t) {
                  super(), this.TAG = "TSDemuxer", this.first_parse_ = !0, this.media_info_ = new o.Z(), this.timescale_ = 90, this.duration_ = 0, this.current_pmt_pid_ = -1, this.program_pmt_map_ = {}, this.pes_slice_queues_ = {}, this.section_slice_queues_ = {}, this.video_metadata_ = {
                    vps: void 0,
                    sps: void 0,
                    pps: void 0,
                    details: void 0
                  }, this.audio_metadata_ = {
                    codec: void 0,
                    audio_object_type: void 0,
                    sampling_freq_index: void 0,
                    sampling_frequency: void 0,
                    channel_config: void 0
                  }, this.aac_last_sample_pts_ = void 0, this.aac_last_incomplete_data_ = null, this.has_video_ = !1, this.has_audio_ = !1, this.video_init_segment_dispatched_ = !1, this.audio_init_segment_dispatched_ = !1, this.video_metadata_changed_ = !1, this.audio_metadata_changed_ = !1, this.loas_previous_frame = null, this.video_track_ = {
                    type: "video",
                    id: 1,
                    sequenceNumber: 0,
                    samples: [],
                    length: 0
                  }, this.audio_track_ = {
                    type: "audio",
                    id: 2,
                    sequenceNumber: 0,
                    samples: [],
                    length: 0
                  }, this.ts_packet_size_ = e.ts_packet_size, this.sync_offset_ = e.sync_offset, this.config_ = t;
                }
                destroy() {
                  this.media_info_ = null, this.pes_slice_queues_ = null, this.section_slice_queues_ = null, this.video_metadata_ = null, this.audio_metadata_ = null, this.aac_last_incomplete_data_ = null, this.video_track_ = null, this.audio_track_ = null, super.destroy();
                }
                static probe(e) {
                  const t = new Uint8Array(e);
                  let i = -1,
                    s = 188;
                  if (t.byteLength <= 3 * s) return {
                    needMoreData: !0
                  };
                  for (; -1 === i;) {
                    const e = Math.min(1e3, t.byteLength - 3 * s);
                    for (let a = 0; a < e;) {
                      if (71 === t[a] && 71 === t[a + s] && 71 === t[a + 2 * s]) {
                        i = a;
                        break;
                      }
                      a++;
                    }
                    if (-1 === i) if (188 === s) s = 192;else {
                      if (192 !== s) break;
                      s = 204;
                    }
                  }
                  return -1 === i ? {
                    match: !1
                  } : (192 === s && i >= 4 ? (a.Z.v("TSDemuxer", "ts_packet_size = 192, m2ts mode"), i -= 4) : 204 === s && a.Z.v("TSDemuxer", "ts_packet_size = 204, RS encoded MPEG2-TS stream"), {
                    match: !0,
                    consumed: 0,
                    ts_packet_size: s,
                    sync_offset: i
                  });
                }
                bindDataSource(e) {
                  return e.onDataArrival = this.parseChunks.bind(this), this;
                }
                resetMediaInfo() {
                  this.media_info_ = new o.Z();
                }
                parseChunks(e, t) {
                  var i;
                  if (!(this.onError && this.onMediaInfo && this.onTrackMetadata && this.onDataAvailable)) throw new l.rT("onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");
                  let s = 0;
                  for (this.first_parse_ && (this.first_parse_ = !1, s = this.sync_offset_); s + this.ts_packet_size_ <= e.byteLength;) {
                    const n = t + s;
                    192 === this.ts_packet_size_ && (s += 4);
                    const o = new Uint8Array(e, s, 188),
                      r = o[0];
                    if (71 !== r) {
                      a.Z.e(this.TAG, `sync_byte = ${r}, not 0x47`);
                      break;
                    }
                    const d = (64 & o[1]) >>> 6,
                      l = (o[1], (31 & o[1]) << 8 | o[2]),
                      h = (48 & o[3]) >>> 4,
                      _ = 15 & o[3];
                    let c = {},
                      u = 4;
                    if (2 === h || 3 === h) {
                      const t = o[4];
                      if (5 + t === 188) {
                        s += 188, 204 === this.ts_packet_size_ && (s += 16);
                        continue;
                      }
                      t > 0 && (c = this.parseAdaptationField(e, s + 4, 1 + t)), u = 5 + t;
                    }
                    if (1 === h || 3 === h) if (0 === l || l === this.current_pmt_pid_ || void 0 !== this.pmt_ && this.pmt_.pid_stream_type[l] === D.kSCTE35) {
                      const t = 188 - u;
                      this.handleSectionSlice(e, s + u, t, {
                        pid: l,
                        file_position: n,
                        payload_unit_start_indicator: d,
                        continuity_conunter: _,
                        random_access_indicator: c.random_access_indicator
                      });
                    } else if (void 0 !== (null === (i = this.pmt_) || void 0 === i ? void 0 : i.pid_stream_type[l])) {
                      const t = 188 - u,
                        i = this.pmt_.pid_stream_type[l];
                      (l === this.pmt_.common_pids.h264 || l === this.pmt_.common_pids.h265 || l === this.pmt_.common_pids.adts_aac || l === this.pmt_.common_pids.loas_aac || l === this.pmt_.common_pids.ac3 || l === this.pmt_.common_pids.eac3 || l === this.pmt_.common_pids.opus || l === this.pmt_.common_pids.mp3 || this.pmt_.pes_private_data_pids[l] || this.pmt_.timed_id3_pids[l]) && this.handlePESSlice(e, s + u, t, {
                        pid: l,
                        stream_type: i,
                        file_position: n,
                        payload_unit_start_indicator: d,
                        continuity_conunter: _,
                        random_access_indicator: c.random_access_indicator
                      });
                    }
                    s += 188, 204 === this.ts_packet_size_ && (s += 16);
                  }
                  return this.dispatchAudioVideoMediaSegment(), s;
                }
                parseAdaptationField(e, t, i) {
                  const s = new Uint8Array(e, t, i),
                    n = s[0];
                  if (n > 0) {
                    if (n > 183) return a.Z.w(this.TAG, `Illegal adaptation_field_length: ${n}`), {};
                    return {
                      discontinuity_indicator: (128 & s[1]) >>> 7,
                      random_access_indicator: (64 & s[1]) >>> 6,
                      elementary_stream_priority_indicator: (32 & s[1]) >>> 5
                    };
                  }
                  return {};
                }
                handleSectionSlice(e, t, i, s) {
                  const a = new Uint8Array(e, t, i);
                  let n = this.section_slice_queues_ ? this.section_slice_queues_[s.pid] : {};
                  if (s.payload_unit_start_indicator) {
                    const o = a[0];
                    if (void 0 !== n && 0 !== (null == n ? void 0 : n.total_length)) {
                      const a = new Uint8Array(e, t + 1, Math.min(i, o));
                      n.slices.push(a), n.total_length += a.byteLength, n.total_length === n.expected_length ? this.emitSectionSlices(n, s) : this.clearSlices(n, s);
                    }
                    for (let r = 1 + o; r < a.byteLength;) {
                      if (255 === a[r + 0]) break;
                      const o = (15 & a[r + 1]) << 8 | a[r + 2];
                      this.section_slice_queues_ && (this.section_slice_queues_[s.pid] = new x(), n = this.section_slice_queues_[s.pid]), n.expected_length = o + 3, n.file_position = s.file_position, n.random_access_indicator = s.random_access_indicator;
                      const d = new Uint8Array(e, t + r, Math.min(i - r, n.expected_length - n.total_length));
                      n.slices.push(d), n.total_length += d.byteLength, n.total_length === n.expected_length ? this.emitSectionSlices(n, s) : n.total_length >= n.expected_length && this.clearSlices(n, s), r += d.byteLength;
                    }
                  } else if (void 0 !== n && 0 !== n.total_length) {
                    const a = new Uint8Array(e, t, Math.min(i, n.expected_length - n.total_length));
                    n.slices.push(a), n.total_length += a.byteLength, n.total_length === n.expected_length ? this.emitSectionSlices(n, s) : n.total_length >= n.expected_length && this.clearSlices(n, s);
                  }
                }
                handlePESSlice(e, t, i, s) {
                  const n = new Uint8Array(e, t, i),
                    o = n[0] << 16 | n[1] << 8 | n[2],
                    r = (n[3], n[4] << 8 | n[5]);
                  if (s.payload_unit_start_indicator) {
                    if (1 !== o) return void a.Z.e(this.TAG, `handlePESSlice: packet_start_code_prefix should be 1 but with value ${o}`);
                    const e = this.pes_slice_queues_[s.pid];
                    e && (0 === e.expected_length || e.expected_length === e.total_length ? this.emitPESSlices(e, s) : this.clearSlices(e, s)), this.pes_slice_queues_ && (this.pes_slice_queues_[s.pid] = new x(), this.pes_slice_queues_[s.pid].file_position = s.file_position, this.pes_slice_queues_[s.pid].random_access_indicator = s.random_access_indicator);
                  }
                  if (void 0 === this.pes_slice_queues_[s.pid]) return;
                  const d = this.pes_slice_queues_[s.pid];
                  d.slices.push(n), s.payload_unit_start_indicator && (d.expected_length = 0 === r ? 0 : r + 6), d.total_length += n.byteLength, d.expected_length > 0 && d.expected_length === d.total_length ? this.emitPESSlices(d, s) : d.expected_length > 0 && d.expected_length < d.total_length && this.clearSlices(d, s);
                }
                emitSectionSlices(e, t) {
                  const i = new Uint8Array(e.total_length);
                  for (let t = 0, s = 0; t < e.slices.length; t++) {
                    const a = e.slices[t];
                    i.set(a, s), s += a.byteLength;
                  }
                  e.slices = [], e.expected_length = -1, e.total_length = 0;
                  const s = new P();
                  s.pid = t.pid, s.data = i, s.file_position = e.file_position, s.random_access_indicator = e.random_access_indicator, this.parseSection(s);
                }
                emitPESSlices(e, t) {
                  const i = new Uint8Array(e.total_length);
                  for (let t = 0, s = 0; t < e.slices.length; t++) {
                    const a = e.slices[t];
                    i.set(a, s), s += a.byteLength;
                  }
                  e.slices = [], e.expected_length = -1, e.total_length = 0;
                  const s = new O();
                  s.pid = t.pid, s.data = i, s.stream_type = t.stream_type, s.file_position = e.file_position, s.random_access_indicator = e.random_access_indicator, this.parsePES(s);
                }
                clearSlices(e, t) {
                  e.slices = [], e.expected_length = -1, e.total_length = 0;
                }
                parseSection(e) {
                  var t;
                  const i = e.data,
                    s = e.pid;
                  0 === s ? this.parsePAT(i) : s === this.current_pmt_pid_ ? this.parsePMT(i) : (null === (t = this.pmt_) || void 0 === t ? void 0 : t.scte_35_pids[s]) && this.parseSCTE35(i);
                }
                parsePES(e) {
                  const t = e.data,
                    i = t[0] << 16 | t[1] << 8 | t[2],
                    s = t[3],
                    n = t[4] << 8 | t[5];
                  if (1 === i) {
                    if (188 !== s && 190 !== s && 191 !== s && 240 !== s && 241 !== s && 255 !== s && 242 !== s && 248 !== s) {
                      t[6];
                      const i = (192 & t[7]) >>> 6,
                        o = t[8];
                      let r, d;
                      2 !== i && 3 !== i || (r = 536870912 * (14 & t[9]) + 4194304 * (255 & t[10]) + 16384 * (254 & t[11]) + 128 * (255 & t[12]) + (254 & t[13]) / 2, d = 3 === i ? 536870912 * (14 & t[14]) + 4194304 * (255 & t[15]) + 16384 * (254 & t[16]) + 128 * (255 & t[17]) + (254 & t[18]) / 2 : r);
                      const l = 9 + o;
                      let h;
                      if (0 !== n) {
                        if (n < 3 + o) return void a.Z.v(this.TAG, "Malformed PES: PES_packet_length < 3 + PES_header_data_length");
                        h = n - 3 - o;
                      } else h = t.byteLength - l;
                      const _ = t.subarray(l, l + h);
                      switch (e.stream_type) {
                        case D.kMPEG1Audio:
                        case D.kMPEG2Audio:
                          this.parseMP3Payload(_, r);
                          break;
                        case D.kPESPrivateData:
                          this.pmt_.common_pids.opus === e.pid ? this.parseOpusPayload(_, r) : this.pmt_.common_pids.ac3 === e.pid ? this.parseAC3Payload(_, r) : this.pmt_.common_pids.eac3 === e.pid ? this.parseEAC3Payload(_, r) : this.pmt_.smpte2038_pids[e.pid] ? this.parseSMPTE2038MetadataPayload(_, r, d, e.pid, s) : this.parsePESPrivateDataPayload(_, r, d, e.pid, s);
                          break;
                        case D.kADTSAAC:
                          this.parseADTSAACPayload(_, r);
                          break;
                        case D.kLOASAAC:
                          this.parseLOASAACPayload(_, r);
                          break;
                        case D.kAC3:
                          this.parseAC3Payload(_, r);
                          break;
                        case D.kEAC3:
                          this.parseEAC3Payload(_, r);
                          break;
                        case D.kID3:
                          this.parseTimedID3MetadataPayload(_, r, d, e.pid, s);
                          break;
                        case D.kH264:
                          this.parseH264Payload(_, r, d, e.file_position, e.random_access_indicator);
                          break;
                        case D.kH265:
                          this.parseH265Payload(_, r, d, e.file_position, e.random_access_indicator);
                      }
                    } else if ((188 === s || 191 === s || 240 === s || 241 === s || 255 === s || 242 === s || 248 === s) && e.stream_type === D.kPESPrivateData) {
                      const i = 6;
                      let a;
                      a = 0 !== n ? n : t.byteLength - i;
                      const o = t.subarray(i, i + a);
                      this.parsePESPrivateDataPayload(o, void 0, void 0, e.pid, s);
                    }
                  } else a.Z.e(this.TAG, `parsePES: packet_start_code_prefix should be 1 but with value ${i}`);
                }
                parsePAT(e) {
                  const t = e[0];
                  if (0 !== t) return void a.Z.e(this.TAG, `parsePAT: table_id ${t} is not corresponded to PAT!`);
                  const i = (15 & e[1]) << 8 | e[2],
                    s = (e[3], e[4], (62 & e[5]) >>> 1),
                    n = 1 & e[5],
                    o = e[6];
                  e[7];
                  let r = null;
                  if (1 === n && 0 === o) r = new w(), r.version_number = s;else if (r = this.pat_, null == r) return;
                  const d = i - 5 - 4;
                  let l = -1,
                    h = -1;
                  for (let t = 8; t < 8 + d; t += 4) {
                    const i = e[t] << 8 | e[t + 1],
                      s = (31 & e[t + 2]) << 8 | e[t + 3];
                    0 === i ? r.network_pid = s : (r.program_pmt_pid[i] = s, -1 === l && (l = i), -1 === h && (h = s));
                  }
                  1 === n && 0 === o && (void 0 === this.pat_ && a.Z.v(this.TAG, `Parsed first PAT: ${JSON.stringify(r)}`), this.pat_ = r, this.current_program_ = l, this.current_pmt_pid_ = h);
                }
                parsePMT(e) {
                  const t = e[0];
                  if (2 !== t) return void a.Z.e(this.TAG, `parsePMT: table_id ${t} is not corresponded to PMT!`);
                  const i = (15 & e[1]) << 8 | e[2],
                    s = e[3] << 8 | e[4],
                    n = (62 & e[5]) >>> 1,
                    o = 1 & e[5],
                    r = e[6];
                  e[7];
                  let d = null;
                  if (1 === o && 0 === r) d = new M(), d.program_number = s, d.version_number = n, this.program_pmt_map_[s] = d;else if (d = this.program_pmt_map_[s], null == d) return;
                  e[8], e[9];
                  const l = (15 & e[10]) << 8 | e[11],
                    h = 12 + l,
                    _ = i - 9 - l - 4;
                  for (let t = h; t < h + _;) {
                    const i = e[t],
                      s = (31 & e[t + 1]) << 8 | e[t + 2],
                      n = (15 & e[t + 3]) << 8 | e[t + 4];
                    d.pid_stream_type[s] = i;
                    const o = d.common_pids.h264 || d.common_pids.h265,
                      r = d.common_pids.adts_aac || d.common_pids.loas_aac || d.common_pids.ac3 || d.common_pids.eac3 || d.common_pids.opus || d.common_pids.mp3;
                    if (i !== D.kH264 || o) {
                      if (i !== D.kH265 || o) {
                        if (i !== D.kADTSAAC || r) {
                          if (i !== D.kLOASAAC || r) {
                            if (i !== D.kAC3 || r) {
                              if (i !== D.kEAC3 || r) {
                                if (i !== D.kMPEG1Audio && i !== D.kMPEG2Audio || r) {
                                  if (i === D.kPESPrivateData) {
                                    if (d.pes_private_data_pids[s] = !0, n > 0) {
                                      for (let i = t + 5; i < t + 5 + n;) {
                                        const t = e[i + 0],
                                          n = e[i + 1];
                                        if (5 === t) {
                                          const t = String.fromCharCode(...Array.from(e.subarray(i + 2, i + 2 + n)));
                                          "VANC" === t ? d.smpte2038_pids[s] = !0 : "Opus" === t && (d.common_pids.opus = s);
                                        } else if (127 === t && s === d.common_pids.opus) {
                                          let t = null;
                                          if (128 === e[i + 2] && (t = e[i + 3]), null == t) {
                                            a.Z.e(this.TAG, "Not Supported Opus channel count.");
                                            continue;
                                          }
                                          const s = {
                                              codec: "opus",
                                              channel_count: 0 == (15 & t) ? 2 : 15 & t,
                                              channel_config_code: t,
                                              sample_rate: 48e3
                                            },
                                            n = {
                                              codec: "opus",
                                              meta: s
                                            };
                                          this.audio_init_segment_dispatched_ ? this.detectAudioMetadataChange(n) && (this.dispatchAudioMediaSegment(), this.dispatchAudioInitSegment(n)) : (this.audio_metadata_ = s, this.dispatchAudioInitSegment(n));
                                        }
                                        i += 2 + n;
                                      }
                                      const o = e.subarray(t + 5, t + 5 + n);
                                      this.dispatchPESPrivateDataDescriptor(s, i, o);
                                    }
                                  } else i === D.kID3 ? d.timed_id3_pids[s] = !0 : i === D.kSCTE35 && (d.scte_35_pids[s] = !0);
                                } else d.common_pids.mp3 = s;
                              } else d.common_pids.eac3 = s;
                            } else d.common_pids.ac3 = s;
                          } else d.common_pids.loas_aac = s;
                        } else d.common_pids.adts_aac = s;
                      } else d.common_pids.h265 = s;
                    } else d.common_pids.h264 = s;
                    t += 5 + n;
                  }
                  s === this.current_program_ && (void 0 === this.pmt_ && a.Z.v(this.TAG, `Parsed first PMT: ${JSON.stringify(d)}`), this.pmt_ = d, (d.common_pids.h264 || d.common_pids.h265) && (this.has_video_ = !0), (d.common_pids.adts_aac || d.common_pids.loas_aac || d.common_pids.ac3 || d.common_pids.opus || d.common_pids.mp3) && (this.has_audio_ = !0));
                }
                parseSCTE35(e) {
                  const t = de(e);
                  if (void 0 !== t.pts) {
                    const e = Math.floor(t.pts / this.timescale_);
                    t.pts = e;
                  } else t.nearest_pts = this.aac_last_sample_pts_;
                  this.onSCTE35Metadata && this.onSCTE35Metadata(t);
                }
                parseH264Payload(e, t, i, s, n) {
                  var o, r;
                  const d = new N(e);
                  let l = null;
                  const h = [];
                  let _ = 0,
                    c = !1;
                  for (; null != (l = d.readNextNaluPayload());) {
                    const e = new Z(l);
                    if (e.type === C.kSliceSPS) {
                      const t = f.parseSPS(l.data);
                      this.video_init_segment_dispatched_ ? this.detectVideoMetadataChange(e, t) && (a.Z.v(this.TAG, "H264: Critical h264 metadata has been changed, attempt to re-generate InitSegment"), this.video_metadata_changed_ = !0, this.video_metadata_ = {
                        vps: void 0,
                        sps: e,
                        pps: void 0,
                        details: t
                      }) : this.video_metadata_ && (this.video_metadata_.sps = e, this.video_metadata_.details = t);
                    } else e.type === C.kSlicePPS ? this.video_init_segment_dispatched_ && !this.video_metadata_changed_ || (this.video_metadata_ && (this.video_metadata_.pps = e), (null === (o = this.video_metadata_) || void 0 === o ? void 0 : o.sps) && (null === (r = this.video_metadata_) || void 0 === r ? void 0 : r.pps) && (this.video_metadata_changed_ && this.dispatchVideoMediaSegment(), this.dispatchVideoInitSegment())) : (e.type === C.kSliceIDR || e.type === C.kSliceNonIDR && 1 === n) && (c = !0);
                    this.video_init_segment_dispatched_ && (h.push(e), _ += e.data.byteLength);
                  }
                  const u = Math.floor(t / this.timescale_),
                    m = Math.floor(i / this.timescale_);
                  if (h.length) {
                    const e = this.video_track_,
                      t = {
                        units: h,
                        length: _,
                        isKeyframe: c,
                        dts: m,
                        pts: u,
                        cts: u - m,
                        file_position: s
                      };
                    e && (e.samples.push(t), e.length += _);
                  }
                }
                parseH265Payload(e, t, i, s, n) {
                  var o, r, d, l, h, _, c;
                  const u = new ce(e);
                  let m = null;
                  const f = [];
                  let p = 0,
                    g = !1;
                  for (; null != (m = u.readNextNaluPayload());) {
                    const e = new _e(m);
                    if (e.type === le.kSliceVPS) {
                      if (!this.video_init_segment_dispatched_) {
                        const t = v.parseVPS(m.data);
                        this.video_metadata_ && (this.video_metadata_.vps = e, this.video_metadata_.details = Object.assign(Object.assign({}, null === (o = this.video_metadata_) || void 0 === o ? void 0 : o.details), t));
                      }
                    } else if (e.type === le.kSliceSPS) {
                      const t = v.parseSPS(m.data);
                      this.video_init_segment_dispatched_ ? this.detectVideoMetadataChange(e, t) && (a.Z.v(this.TAG, "H265: Critical h265 metadata has been changed, attempt to re-generate InitSegment"), this.video_metadata_changed_ = !0, this.video_metadata_ = {
                        vps: void 0,
                        sps: e,
                        pps: void 0,
                        details: t
                      }) : this.video_metadata_ && (this.video_metadata_.sps = e, this.video_metadata_.details = Object.assign(Object.assign({}, null === (r = this.video_metadata_) || void 0 === r ? void 0 : r.details), t));
                    } else if (e.type === le.kSlicePPS) {
                      if (!this.video_init_segment_dispatched_ || this.video_metadata_changed_) {
                        const t = v.parsePPS(m.data);
                        this.video_metadata_ && (this.video_metadata_.pps = e, this.video_metadata_.details = Object.assign(Object.assign({}, null === (d = this.video_metadata_) || void 0 === d ? void 0 : d.details), t)), (null === (l = this.video_metadata_) || void 0 === l ? void 0 : l.vps) && (null === (h = this.video_metadata_) || void 0 === h ? void 0 : h.sps) && (null === (_ = this.video_metadata_) || void 0 === _ ? void 0 : _.pps) && (this.video_metadata_changed_ && this.dispatchVideoMediaSegment(), this.dispatchVideoInitSegment());
                      }
                    } else e.type !== le.kSliceIDR_W_RADL && e.type !== le.kSliceIDR_N_LP && e.type !== le.kSliceCRA_NUT || (g = !0);
                    this.video_init_segment_dispatched_ && (f.push(e), p += e.data.byteLength);
                  }
                  const E = Math.floor(t / this.timescale_),
                    S = Math.floor(i / this.timescale_);
                  if (f.length) {
                    const e = this.video_track_,
                      t = {
                        units: f,
                        length: p,
                        isKeyframe: g,
                        dts: S,
                        pts: E,
                        cts: E - S,
                        file_position: s
                      };
                    e && (null === (c = e.samples) || void 0 === c || c.push(t), e.length += p);
                  }
                }
                detectVideoMetadataChange(e, t) {
                  var i, s, n, o, r, d, l, h, _, c;
                  if (t.codec_mimetype !== (null === (s = null === (i = this.video_metadata_) || void 0 === i ? void 0 : i.details) || void 0 === s ? void 0 : s.codec_mimetype)) return a.Z.v(this.TAG, `Video: Codec mimeType changed from ${null === (n = this.video_metadata_) || void 0 === n ? void 0 : n.details.codec_mimetype} to ${null == t ? void 0 : t.codec_mimetype}`), !0;
                  if (t.codec_size.width !== (null === (r = null === (o = this.video_metadata_) || void 0 === o ? void 0 : o.details) || void 0 === r ? void 0 : r.codec_size.width) || t.codec_size.height !== (null === (l = null === (d = this.video_metadata_) || void 0 === d ? void 0 : d.details) || void 0 === l ? void 0 : l.codec_size.height)) {
                    const e = null === (h = this.video_metadata_) || void 0 === h ? void 0 : h.details.codec_size,
                      i = t.codec_size;
                    return a.Z.v(this.TAG, `Video: Coded Resolution changed from ${e.width}x${e.height} to ${i.width}x${i.height}`), !0;
                  }
                  return t.present_size.width !== (null === (_ = this.video_metadata_) || void 0 === _ ? void 0 : _.details.present_size.width) && (a.Z.v(this.TAG, `Video: Present resolution width changed from ${null === (c = this.video_metadata_) || void 0 === c ? void 0 : c.details.present_size.width} to ${null == t ? void 0 : t.present_size.width}`), !0);
                }
                isInitSegmentDispatched() {
                  return this.has_video_ && this.has_audio_ ? this.video_init_segment_dispatched_ && this.audio_init_segment_dispatched_ : this.has_video_ && !this.has_audio_ ? this.video_init_segment_dispatched_ : !(this.has_video_ || !this.has_audio_) && this.audio_init_segment_dispatched_;
                }
                dispatchVideoInitSegment() {
                  var e, t, i, s, n, o, r, d, l, h, _, c;
                  const u = null === (e = this.video_metadata_) || void 0 === e ? void 0 : e.details,
                    m = {
                      type: "video"
                    };
                  m.id = null === (t = this.video_track_) || void 0 === t ? void 0 : t.id, m.timescale = 1e3, m.duration = this.duration_, m.codecWidth = u.codec_size.width, m.codecHeight = u.codec_size.height, m.presentWidth = u.present_size.width, m.presentHeight = u.present_size.height, m.profile = u.profile_string, m.level = u.level_string, m.bitDepth = u.bit_depth, m.chromaFormat = u.chroma_format, m.sarRatio = u.sar_ratio, m.frameRate = u.frame_rate;
                  const f = m.frameRate.fps_den,
                    p = m.frameRate.fps_num;
                  if (m.refSampleDuration = f / p * 1e3, m.codec = u.codec_mimetype, null === (i = this.video_metadata_) || void 0 === i ? void 0 : i.vps) {
                    const e = null === (s = this.video_metadata_) || void 0 === s ? void 0 : s.vps.data.subarray(4),
                      t = null === (o = null === (n = this.video_metadata_) || void 0 === n ? void 0 : n.sps) || void 0 === o ? void 0 : o.data.subarray(4),
                      i = null === (d = null === (r = this.video_metadata_) || void 0 === r ? void 0 : r.pps) || void 0 === d ? void 0 : d.data.subarray(4),
                      l = new ue(e, t, i, u);
                    m.hvcc = l.getData(), this.video_init_segment_dispatched_ || a.Z.v(this.TAG, `Generated first HEVCDecoderConfigurationRecord for mimeType: ${m.codec}`);
                  } else {
                    const e = null === (h = null === (l = this.video_metadata_) || void 0 === l ? void 0 : l.sps) || void 0 === h ? void 0 : h.data.subarray(4),
                      t = null === (c = null === (_ = this.video_metadata_) || void 0 === _ ? void 0 : _.pps) || void 0 === c ? void 0 : c.data.subarray(4),
                      i = new G(e, t, u);
                    m.avcc = i.getData(), this.video_init_segment_dispatched_ || a.Z.v(this.TAG, `Generated first AVCDecoderConfigurationRecord for mimeType: ${m.codec}`);
                  }
                  this.onTrackMetadata && this.onTrackMetadata("video", m), this.video_init_segment_dispatched_ = !0, this.video_metadata_changed_ = !1;
                  const g = this.media_info_;
                  g.hasVideo = !0, g.width = m.codecWidth, g.height = m.codecHeight, g.fps = m.frameRate.fps, g.profile = m.profile, g.level = m.level, g.refFrames = u.ref_frames, g.chromaFormat = u.chroma_format_string, g.sarNum = m.sarRatio.width, g.sarDen = m.sarRatio.height, g.videoCodec = m.codec, g.hasAudio && g.audioCodec ? g.mimeType = `video/mp2t; codecs="${g.videoCodec},${g.audioCodec}"` : g.mimeType = `video/mp2t; codecs="${g.videoCodec}"`, g.isComplete() && this.onMediaInfo && this.onMediaInfo(g);
                }
                dispatchVideoMediaSegment() {
                  var e;
                  this.isInitSegmentDispatched() && (null === (e = this.video_track_) || void 0 === e ? void 0 : e.length) && this.onDataAvailable && this.onDataAvailable(null, this.video_track_);
                }
                dispatchAudioMediaSegment() {
                  var e;
                  this.isInitSegmentDispatched() && (null === (e = this.audio_track_) || void 0 === e ? void 0 : e.length) && this.onDataAvailable && this.onDataAvailable(this.audio_track_, null);
                }
                dispatchAudioVideoMediaSegment() {
                  var e, t;
                  this.isInitSegmentDispatched() && ((null === (e = this.audio_track_) || void 0 === e ? void 0 : e.length) || (null === (t = this.video_track_) || void 0 === t ? void 0 : t.length)) && this.onDataAvailable && this.onDataAvailable(this.audio_track_, this.video_track_);
                }
                parseADTSAACPayload(e, t) {
                  var i, s, n;
                  if (this.has_video_ && !this.video_init_segment_dispatched_) return;
                  if (this.aac_last_incomplete_data_) {
                    const t = new Uint8Array(e.byteLength + this.aac_last_incomplete_data_.byteLength);
                    t.set(this.aac_last_incomplete_data_, 0), t.set(e, this.aac_last_incomplete_data_.byteLength), e = t;
                  }
                  let o,
                    r = 0;
                  if (void 0 !== t && (r = t / this.timescale_), "aac" === (null === (i = this.audio_metadata_) || void 0 === i ? void 0 : i.codec)) {
                    if (void 0 === t && void 0 !== this.aac_last_sample_pts_) o = 1024 / (null === (s = this.audio_metadata_) || void 0 === s ? void 0 : s.sampling_frequency) * 1e3, r = this.aac_last_sample_pts_ + o;else if (void 0 === t) return void a.Z.w(this.TAG, "AAC: Unknown pts");
                    if (this.aac_last_incomplete_data_ && this.aac_last_sample_pts_) {
                      o = 1024 / this.audio_metadata_.sampling_frequency * 1e3;
                      const e = this.aac_last_sample_pts_ + o;
                      Math.abs(e - r) > 1 && (a.Z.w(this.TAG, `AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${r}ms`), r = e);
                    }
                  }
                  const d = new H(e);
                  let l = null,
                    h = r,
                    _ = 0;
                  for (; null != (l = d.readNextAACFrame());) {
                    o = 1024 / l.sampling_frequency * 1e3;
                    const e = {
                      codec: "aac",
                      data: l
                    };
                    this.audio_init_segment_dispatched_ ? this.detectAudioMetadataChange(e) && (this.dispatchAudioMediaSegment(), this.dispatchAudioInitSegment(e)) : (this.audio_metadata_ = {
                      codec: "aac",
                      audio_object_type: l.audio_object_type,
                      sampling_freq_index: l.sampling_freq_index,
                      sampling_frequency: l.sampling_frequency,
                      channel_config: l.channel_config
                    }, this.dispatchAudioInitSegment(e)), _ = h;
                    const t = Math.floor(h),
                      i = {
                        unit: l.data,
                        length: l.data.byteLength,
                        pts: t,
                        dts: t
                      };
                    this.audio_track_ && (null === (n = this.audio_track_) || void 0 === n || n.samples.push(i), this.audio_track_.length += l.data.byteLength), h += o;
                  }
                  d.hasIncompleteData() && (this.aac_last_incomplete_data_ = d.getIncompleteData()), _ && (this.aac_last_sample_pts_ = _);
                }
                parseLOASAACPayload(e, t) {
                  var i, s, n;
                  if (this.has_video_ && !this.video_init_segment_dispatched_) return;
                  if (this.aac_last_incomplete_data_) {
                    const t = new Uint8Array(e.byteLength + this.aac_last_incomplete_data_.byteLength);
                    t.set(this.aac_last_incomplete_data_, 0), t.set(e, this.aac_last_incomplete_data_.byteLength), e = t;
                  }
                  let o,
                    r = 0;
                  if (void 0 !== t && (r = t / this.timescale_), "aac" === (null === (i = this.audio_metadata_) || void 0 === i ? void 0 : i.codec)) {
                    if (void 0 === t && void 0 !== this.aac_last_sample_pts_) o = 1024 / this.audio_metadata_.sampling_frequency * 1e3, r = this.aac_last_sample_pts_ + o;else if (void 0 === t) return void a.Z.w(this.TAG, "AAC: Unknown pts");
                    if (this.aac_last_incomplete_data_ && this.aac_last_sample_pts_) {
                      o = 1024 / this.audio_metadata_.sampling_frequency * 1e3;
                      const e = this.aac_last_sample_pts_ + o;
                      Math.abs(e - r) > 1 && (a.Z.w(this.TAG, `AAC: Detected pts overlapped, expected: ${e}ms, PES pts: ${r}ms`), r = e);
                    }
                  }
                  const d = new q(e);
                  let l = null,
                    h = r,
                    _ = 0;
                  for (; null != (l = d.readNextAACFrame(null !== (s = this.loas_previous_frame) && void 0 !== s ? s : void 0));) {
                    this.loas_previous_frame = l, o = 1024 / l.sampling_frequency * 1e3;
                    const e = {
                      codec: "aac",
                      data: l
                    };
                    this.audio_init_segment_dispatched_ ? this.detectAudioMetadataChange(e) && (this.dispatchAudioMediaSegment(), this.dispatchAudioInitSegment(e)) : (this.audio_metadata_ = {
                      codec: "aac",
                      audio_object_type: l.audio_object_type,
                      sampling_freq_index: l.sampling_freq_index,
                      sampling_frequency: l.sampling_frequency,
                      channel_config: l.channel_config
                    }, this.dispatchAudioInitSegment(e)), _ = h;
                    const t = Math.floor(h),
                      i = {
                        unit: l.data,
                        length: l.data.byteLength,
                        pts: t,
                        dts: t
                      };
                    this.audio_track_ && (null === (n = this.audio_track_) || void 0 === n || n.samples.push(i), this.audio_track_.length += l.data.byteLength), h += o;
                  }
                  d.hasIncompleteData() && (this.aac_last_incomplete_data_ = d.getIncompleteData()), _ && (this.aac_last_sample_pts_ = _);
                }
                parseAC3Payload(e, t) {
                  var i, s;
                  if (this.has_video_ && !this.video_init_segment_dispatched_) return;
                  let n,
                    o = 0;
                  if (void 0 !== t && (o = t / this.timescale_), "ac-3" === (null === (i = this.audio_metadata_) || void 0 === i ? void 0 : i.codec)) if (void 0 === t && void 0 !== this.aac_last_sample_pts_) n = 1536 / this.audio_metadata_.sampling_frequency * 1e3, o = this.aac_last_sample_pts_ + n;else if (void 0 === t) return void a.Z.w(this.TAG, "AC3: Unknown pts");
                  const r = new ve(e);
                  let d = null,
                    l = o,
                    h = 0;
                  for (; null != (d = r.readNextAC3Frame());) {
                    n = 1536 / d.sampling_frequency * 1e3;
                    const e = {
                      codec: "ac-3",
                      data: d
                    };
                    this.audio_init_segment_dispatched_ ? this.detectAudioMetadataChange(e) && (this.dispatchAudioMediaSegment(), this.dispatchAudioInitSegment(e)) : (this.audio_metadata_ = {
                      codec: "ac-3",
                      sampling_frequency: d.sampling_frequency,
                      bit_stream_identification: d.bit_stream_identification,
                      bit_stream_mode: d.bit_stream_mode,
                      low_frequency_effects_channel_on: d.low_frequency_effects_channel_on,
                      channel_mode: d.channel_mode
                    }, this.dispatchAudioInitSegment(e)), h = l;
                    const t = Math.floor(l),
                      i = {
                        unit: d.data,
                        length: d.data.byteLength,
                        pts: t,
                        dts: t
                      };
                    this.audio_track_ && (null === (s = this.audio_track_) || void 0 === s || s.samples.push(i), this.audio_track_.length += d.data.byteLength), l += n;
                  }
                  h && (this.aac_last_sample_pts_ = h);
                }
                parseEAC3Payload(e, t) {
                  var i, s;
                  if (this.has_video_ && !this.video_init_segment_dispatched_) return;
                  let n,
                    o = 0;
                  if (void 0 !== t && (o = t / this.timescale_), "ec-3" === (null === (i = this.audio_metadata_) || void 0 === i ? void 0 : i.codec)) if (void 0 === t && void 0 !== this.aac_last_sample_pts_) n = 256 * (this.audio_metadata_.num_blks || 0) / (this.audio_metadata_.sampling_frequency || 0) * 1e3, o = this.aac_last_sample_pts_ + n;else if (void 0 === t) return void a.Z.w(this.TAG, "EAC3: Unknown pts");
                  const r = new ye(e);
                  let d = null,
                    l = o,
                    h = 0;
                  for (; null != (d = r.readNextEAC3Frame());) {
                    n = 1536 / d.sampling_frequency * 1e3;
                    const e = {
                      codec: "ec-3",
                      data: d
                    };
                    this.audio_init_segment_dispatched_ ? this.detectAudioMetadataChange(e) && (this.dispatchAudioMediaSegment(), this.dispatchAudioInitSegment(e)) : (this.audio_metadata_ = {
                      codec: "ec-3",
                      sampling_frequency: d.sampling_frequency,
                      bit_stream_identification: d.bit_stream_identification,
                      low_frequency_effects_channel_on: d.low_frequency_effects_channel_on,
                      num_blks: d.num_blks,
                      channel_mode: d.channel_mode
                    }, this.dispatchAudioInitSegment(e)), h = l;
                    const t = Math.floor(l),
                      i = {
                        unit: d.data,
                        length: d.data.byteLength,
                        pts: t,
                        dts: t
                      };
                    this.audio_track_ && (null === (s = this.audio_track_) || void 0 === s || s.samples.push(i), this.audio_track_.length += d.data.byteLength), l += n;
                  }
                  h && (this.aac_last_sample_pts_ = h);
                }
                parseOpusPayload(e, t) {
                  var i, s;
                  if (this.has_video_ && !this.video_init_segment_dispatched_) return;
                  let n,
                    o = 0;
                  if (void 0 !== t && (o = t / this.timescale_), "opus" === (null === (i = this.audio_metadata_) || void 0 === i ? void 0 : i.codec)) if (void 0 === t && void 0 !== this.aac_last_sample_pts_) n = 20, o = this.aac_last_sample_pts_ + n;else if (void 0 === t) return void a.Z.w(this.TAG, "Opus: Unknown pts");
                  let r = o,
                    d = 0;
                  for (let t = 0; t < e.length;) {
                    n = 20;
                    const i = 0 != (16 & e[t + 1]),
                      a = 0 != (8 & e[t + 1]);
                    let o = t + 2,
                      l = 0;
                    for (; 255 === e[o];) l += 255, o += 1;
                    l += e[o], o += 1, o += i ? 2 : 0, o += a ? 2 : 0, d = r;
                    const h = Math.floor(r),
                      _ = e.slice(o, o + l),
                      c = {
                        unit: _,
                        length: _.byteLength,
                        pts: h,
                        dts: h
                      };
                    this.audio_track_ && (null === (s = this.audio_track_) || void 0 === s || s.samples.push(c), this.audio_track_.length += _.byteLength), r += n, t = o + l;
                  }
                  d && (this.aac_last_sample_pts_ = d);
                }
                parseMP3Payload(e, t) {
                  var i;
                  if (this.has_video_ && !this.video_init_segment_dispatched_) return;
                  const s = [44100, 48e3, 32e3, 0],
                    a = [22050, 24e3, 16e3, 0],
                    n = [11025, 12e3, 8e3, 0],
                    l = e[1] >>> 3 & 3,
                    h = (6 & e[1]) >> 1;
                    (240 & e[2]) >>> 4;
                    const c = (12 & e[2]) >>> 2,
                    u = 3 !== (e[3] >>> 6 & 3) ? 2 : 1;
                  let m = 0,
                    p = 34;
                  switch (l) {
                    case 0:
                      m = n[c];
                      break;
                    case 2:
                      m = a[c];
                      break;
                    case 3:
                      m = s[c];
                  }
                  switch (h) {
                    case 1:
                      p = 34;
                      break;
                    case 2:
                      p = 33;
                      break;
                    case 3:
                      p = 32;
                  }
                  const g = new fe();
                  g.object_type = p, g.sample_rate = m, g.channel_count = u, g.data = e;
                  const v = {
                    codec: "mp3",
                    data: g
                  };
                  this.audio_init_segment_dispatched_ ? this.detectAudioMetadataChange(v) && (this.dispatchAudioMediaSegment(), this.dispatchAudioInitSegment(v)) : (this.audio_metadata_ = {
                    codec: "mp3",
                    object_type: p,
                    sample_rate: m,
                    channel_count: u
                  }, this.dispatchAudioInitSegment(v));
                  const E = {
                    unit: e,
                    length: e.byteLength,
                    pts: t / this.timescale_,
                    dts: t / this.timescale_
                  };
                  this.audio_track_ && (null === (i = this.audio_track_) || void 0 === i || i.samples.push(E), this.audio_track_.length += e.byteLength);
                }
                detectAudioMetadataChange(e) {
                  var t, i, s, n;
                  if (e.codec !== (null === (t = this.audio_metadata_) || void 0 === t ? void 0 : t.codec)) return a.Z.v(this.TAG, `Audio: Audio Codecs changed from ${null === (i = this.audio_metadata_) || void 0 === i ? void 0 : i.codec} to ${e.codec}`), !0;
                  if ("aac" === e.codec && "aac" === this.audio_metadata_.codec) {
                    const t = e.data;
                    if (t.audio_object_type !== this.audio_metadata_.audio_object_type) return a.Z.v(this.TAG, `AAC: AudioObjectType changed from ${this.audio_metadata_.audio_object_type} to ${t.audio_object_type}`), !0;
                    if (t.sampling_freq_index !== this.audio_metadata_.sampling_freq_index) return a.Z.v(this.TAG, `AAC: SamplingFrequencyIndex changed from ${this.audio_metadata_.sampling_freq_index} to ${t.sampling_freq_index}`), !0;
                    if (t.channel_config !== this.audio_metadata_.channel_config) return a.Z.v(this.TAG, `AAC: Channel configuration changed from ${null === (s = this.audio_metadata_) || void 0 === s ? void 0 : s.channel_config} to ${t.channel_config}`), !0;
                  } else if ("ac-3" === e.codec && "ac-3" === this.audio_metadata_.codec) {
                    const t = e.data;
                    if (t.sampling_frequency !== this.audio_metadata_.sampling_frequency) return a.Z.v(this.TAG, `AC3: Sampling Frequency changed from ${null === (n = this.audio_metadata_) || void 0 === n ? void 0 : n.sampling_frequency} to ${t.sampling_frequency}`), !0;
                    if (t.bit_stream_identification !== this.audio_metadata_.bit_stream_identification) return a.Z.v(this.TAG, `AC3: Bit Stream Identification changed from ${this.audio_metadata_.bit_stream_identification} to ${t.bit_stream_identification}`), !0;
                    if (t.bit_stream_mode !== this.audio_metadata_.bit_stream_mode) return a.Z.v(this.TAG, `AC3: BitStream Mode changed from ${this.audio_metadata_.bit_stream_mode} to ${t.bit_stream_mode}`), !0;
                    if (t.channel_mode !== this.audio_metadata_.channel_mode) return a.Z.v(this.TAG, `AC3: Channel Mode changed from ${this.audio_metadata_.channel_mode} to ${t.channel_mode}`), !0;
                    if (t.low_frequency_effects_channel_on !== this.audio_metadata_.low_frequency_effects_channel_on) return a.Z.v(this.TAG, `AC3: Low Frequency Effects Channel On changed from ${this.audio_metadata_.low_frequency_effects_channel_on} to ${t.low_frequency_effects_channel_on}`), !0;
                  } else if ("opus" === e.codec && "opus" === this.audio_metadata_.codec) {
                    const t = e.meta;
                    if (t.sample_rate !== this.audio_metadata_.sample_rate) return a.Z.v(this.TAG, `Opus: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`), !0;
                    if (t.channel_count !== this.audio_metadata_.channel_count) return a.Z.v(this.TAG, `Opus: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`), !0;
                  } else if ("mp3" === e.codec && "mp3" === this.audio_metadata_.codec) {
                    const t = e.data;
                    if (t.object_type !== this.audio_metadata_.object_type) return a.Z.v(this.TAG, `MP3: AudioObjectType changed from ${this.audio_metadata_.object_type} to ${t.object_type}`), !0;
                    if (t.sample_rate !== this.audio_metadata_.sample_rate) return a.Z.v(this.TAG, `MP3: SamplingFrequencyIndex changed from ${this.audio_metadata_.sample_rate} to ${t.sample_rate}`), !0;
                    if (t.channel_count !== this.audio_metadata_.channel_count) return a.Z.v(this.TAG, `MP3: Channel count changed from ${this.audio_metadata_.channel_count} to ${t.channel_count}`), !0;
                  }
                  return !1;
                }
                dispatchAudioInitSegment(e) {
                  var t, i, s, n, o, r;
                  const d = {
                    type: "audio"
                  };
                  if (d.id = null === (t = this.audio_track_) || void 0 === t ? void 0 : t.id, d.timescale = 1e3, d.duration = this.duration_, "aac" === (null === (i = this.audio_metadata_) || void 0 === i ? void 0 : i.codec)) {
                    const t = "aac" === e.codec ? e.data : null,
                      i = new $(t);
                    d.audioSampleRate = i.sampling_rate, d.channelCount = i.channel_count, d.codec = i.codec_mimetype, d.originalCodec = i.original_codec_mimetype, d.config = i.config, d.refSampleDuration = 1024 / d.audioSampleRate * d.timescale;
                  } else if ("ac-3" === (null === (s = this.audio_metadata_) || void 0 === s ? void 0 : s.codec)) {
                    const t = "ac-3" === e.codec ? e.data : null,
                      i = new Ee(t);
                    d.audioSampleRate = i.sampling_rate, d.channelCount = i.channel_count, d.codec = i.codec_mimetype, d.originalCodec = i.original_codec_mimetype, d.config = i.config, d.refSampleDuration = 1536 / d.audioSampleRate * d.timescale;
                  } else if ("ec-3" === (null === (n = this.audio_metadata_) || void 0 === n ? void 0 : n.codec)) {
                    const t = "ec-3" === e.codec ? e.data : null,
                      i = new Ae(t);
                    d.audioSampleRate = i.sampling_rate, d.channelCount = i.channel_count, d.codec = i.codec_mimetype, d.originalCodec = i.original_codec_mimetype, d.config = i.config, d.refSampleDuration = 256 * i.num_blks / d.audioSampleRate * d.timescale;
                  } else "opus" === (null === (o = this.audio_metadata_) || void 0 === o ? void 0 : o.codec) ? (d.audioSampleRate = this.audio_metadata_.sample_rate, d.channelCount = this.audio_metadata_.channel_count, d.channelConfigCode = this.audio_metadata_.channel_config_code, d.codec = "opus", d.originalCodec = "opus", d.config = void 0, d.refSampleDuration = 20) : "mp3" === (null === (r = this.audio_metadata_) || void 0 === r ? void 0 : r.codec) && (d.audioSampleRate = this.audio_metadata_.sample_rate, d.channelCount = this.audio_metadata_.channel_count, d.codec = "mp3", d.originalCodec = "mp3", d.config = void 0);
                  this.audio_init_segment_dispatched_ || a.Z.v(this.TAG, `Generated first AudioSpecificConfig for mimeType: ${d.codec}`), this.onTrackMetadata && this.onTrackMetadata("audio", d), this.audio_init_segment_dispatched_ = !0, this.video_metadata_changed_ = !1;
                  const l = this.media_info_;
                  l.hasAudio = !0, l.audioCodec = d.originalCodec, l.audioSampleRate = d.audioSampleRate, l.audioChannelCount = d.channelCount, l.hasVideo && l.videoCodec ? l.mimeType = `video/mp2t; codecs="${l.videoCodec},${l.audioCodec}"` : l.mimeType = `video/mp2t; codecs="${l.audioCodec}"`, l.isComplete() && this.onMediaInfo && this.onMediaInfo(l);
                }
                dispatchPESPrivateDataDescriptor(e, t, i) {
                  const s = new W();
                  s.pid = e, s.stream_type = t, s.descriptor = i, this.onPESPrivateDataDescriptor && this.onPESPrivateDataDescriptor(s);
                }
                parsePESPrivateDataPayload(e, t, i, s, a) {
                  const n = new j();
                  if (n.pid = s, n.stream_id = a, n.len = e.byteLength, n.data = e, void 0 !== t) {
                    const e = Math.floor(t / this.timescale_);
                    n.pts = e;
                  } else n.nearest_pts = this.aac_last_sample_pts_;
                  if (void 0 !== i) {
                    const e = Math.floor(i / this.timescale_);
                    n.dts = e;
                  }
                  this.onPESPrivateData && this.onPESPrivateData(n);
                }
                parseTimedID3MetadataPayload(e, t, i, s, a) {
                  const n = new j();
                  if (n.pid = s, n.stream_id = a, n.len = e.byteLength, n.data = e, void 0 !== t) {
                    const e = Math.floor(t / this.timescale_);
                    n.pts = e;
                  }
                  if (void 0 !== i) {
                    const e = Math.floor(i / this.timescale_);
                    n.dts = e;
                  }
                  this.onTimedID3Metadata && this.onTimedID3Metadata(n);
                }
                parseSMPTE2038MetadataPayload(e, t, i, s, a) {
                  const n = new me();
                  if (n.pid = s, n.stream_id = a, n.len = e.byteLength, n.data = e, void 0 !== t) {
                    const e = Math.floor(t / this.timescale_);
                    n.pts = e;
                  }
                  if (n.nearest_pts = this.aac_last_sample_pts_, void 0 !== i) {
                    const e = Math.floor(i / this.timescale_);
                    n.dts = e;
                  }
                  n.ancillaries = (e => {
                    let t = new u(e),
                      i = 0;
                    const s = [];
                    for (; i += 6, 0 === t.readBits(6);) {
                      const e = t.readBool();
                      i += 1;
                      const a = t.readBits(11);
                      i += 11;
                      const n = t.readBits(12);
                      i += 12;
                      const o = 255 & t.readBits(10);
                      i += 10;
                      const r = 255 & t.readBits(10);
                      i += 10;
                      const d = 255 & t.readBits(10);
                      i += 10;
                      const l = new Uint8Array(d);
                      for (let e = 0; e < d; e++) {
                        const s = 255 & t.readBits(10);
                        i += 10, l[e] = s;
                      }
                      t.readBits(10), i += 10;
                      let h = "User Defined";
                      const _ = {};
                      65 === o ? 7 === r && (h = "SCTE-104") : 95 === o ? 220 === r ? h = "ARIB STD-B37 (1SEG)" : 221 === r ? h = "ARIB STD-B37 (ANALOG)" : 222 === r ? h = "ARIB STD-B37 (SD)" : 223 === r && (h = "ARIB STD-B37 (HD)") : 97 === o && (1 === r ? h = "EIA-708" : 2 === r && (h = "EIA-608")), s.push({
                        yc_indicator: e,
                        line_number: a,
                        horizontal_offset: n,
                        did: o,
                        sdid: r,
                        user_data: l,
                        description: h,
                        information: _
                      }), t.readBits(8 - (i - Math.floor(i / 8)) % 8), i += (8 - (i - Math.floor(i / 8))) % 8;
                    }
                    return t.destroy(), t = null, s;
                  })(e), this.onSMPTE2038Metadata && this.onSMPTE2038Metadata(n);
                }
              },
              Re = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]);
            class Te {
              static init() {
                Te.types = {
                  avc1: [],
                  avcC: [],
                  btrt: [],
                  dinf: [],
                  dref: [],
                  esds: [],
                  ftyp: [],
                  hdlr: [],
                  hvc1: [],
                  hvcC: [],
                  av01: [],
                  av1C: [],
                  mdat: [],
                  mdhd: [],
                  mdia: [],
                  mfhd: [],
                  minf: [],
                  moof: [],
                  moov: [],
                  mp4a: [],
                  mvex: [],
                  mvhd: [],
                  sdtp: [],
                  stbl: [],
                  stco: [],
                  stsc: [],
                  stsd: [],
                  stsz: [],
                  stts: [],
                  tfdt: [],
                  tfhd: [],
                  traf: [],
                  trak: [],
                  trun: [],
                  trex: [],
                  tkhd: [],
                  vmhd: [],
                  smhd: [],
                  ".mp3": [],
                  Opus: [],
                  dOps: [],
                  "ac-3": [],
                  dac3: [],
                  "ec-3": [],
                  dec3: []
                };
                for (const e in Te.types) Te.types.hasOwnProperty(e) && (Te.types[e] = [e.charCodeAt(0), e.charCodeAt(1), e.charCodeAt(2), e.charCodeAt(3)]);
              }
              static box(e, ...t) {
                let i = 8,
                  s = null;
                const a = Array.prototype.slice.call(arguments, 1),
                  n = a.length;
                for (let e = 0; e < n; e++) i += a[e].byteLength;
                s = new Uint8Array(i), s[0] = i >>> 24 & 255, s[1] = i >>> 16 & 255, s[2] = i >>> 8 & 255, s[3] = 255 & i, s.set(e, 4);
                let o = 8;
                for (let e = 0; e < n; e++) s.set(a[e], o), o += a[e].byteLength;
                return s;
              }
              static generateInitSegment(e) {
                const t = Te.box(Te.types.ftyp, Te.constants.FTYP),
                  i = Te.moov(e),
                  s = new Uint8Array(t.byteLength + i.byteLength);
                return s.set(t, 0), s.set(i, t.byteLength), s;
              }
              static moov(e) {
                const t = Te.mvhd(e.timescale, e.duration),
                  i = Te.trak(e),
                  s = Te.mvex(e);
                return Te.box(Te.types.moov, t, i, s);
              }
              static mvhd(e, t) {
                return Te.box(Te.types.mvhd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, e >>> 24 & 255, e >>> 16 & 255, e >>> 8 & 255, 255 & e, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, 255 & t, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255]));
              }
              static trak(e) {
                return Te.box(Te.types.trak, Te.tkhd(e), Te.mdia(e));
              }
              static tkhd(e) {
                const t = e.id,
                  i = e.duration,
                  s = e.presentWidth,
                  a = e.presentHeight;
                return Te.box(Te.types.tkhd, new Uint8Array([0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, 255 & t, 0, 0, 0, 0, i >>> 24 & 255, i >>> 16 & 255, i >>> 8 & 255, 255 & i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, 0, 0, 0, s >>> 8 & 255, 255 & s, 0, 0, a >>> 8 & 255, 255 & a, 0, 0]));
              }
              static mdia(e) {
                return Te.box(Te.types.mdia, Te.mdhd(e), Te.hdlr(e), Te.minf(e));
              }
              static mdhd(e) {
                const t = e.timescale,
                  i = e.duration;
                return Te.box(Te.types.mdhd, new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, 255 & t, i >>> 24 & 255, i >>> 16 & 255, i >>> 8 & 255, 255 & i, 85, 196, 0, 0]));
              }
              static hdlr(e) {
                let t = null;
                return t = "audio" === e.type ? Te.constants.HDLR_AUDIO : Te.constants.HDLR_VIDEO, Te.box(Te.types.hdlr, t);
              }
              static minf(e) {
                let t = null;
                return t = "audio" === e.type ? Te.box(Te.types.smhd, Te.constants.SMHD) : Te.box(Te.types.vmhd, Te.constants.VMHD), Te.box(Te.types.minf, t, Te.dinf(), Te.stbl(e));
              }
              static dinf() {
                return Te.box(Te.types.dinf, Te.box(Te.types.dref, Te.constants.DREF));
              }
              static stbl(e) {
                return Te.box(Te.types.stbl, Te.stsd(e), Te.box(Te.types.stts, Te.constants.STTS), Te.box(Te.types.stsc, Te.constants.STSC), Te.box(Te.types.stsz, Te.constants.STSZ), Te.box(Te.types.stco, Te.constants.STCO));
              }
              static stsd(e) {
                return "audio" === e.type ? "mp3" === e.codec ? Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.mp3(e)) : "ac-3" === e.codec ? Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.ac3(e)) : "ec-3" === e.codec ? Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.ec3(e)) : "opus" === e.codec ? Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.Opus(e)) : Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.mp4a(e)) : "video" === e.type && e.codec.startsWith("hvc1") ? Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.hvc1(e)) : "video" === e.type && e.codec.startsWith("av01") ? Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.av01(e)) : Te.box(Te.types.stsd, Te.constants.STSD_PREFIX, Te.avc1(e));
              }
              static mp3(e) {
                const t = e.channelCount,
                  i = e.audioSampleRate,
                  s = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, t, 0, 16, 0, 0, 0, 0, i >>> 8 & 255, 255 & i, 0, 0]);
                return Te.box(Te.types[".mp3"], s);
              }
              static mp4a(e) {
                const t = e.channelCount,
                  i = e.audioSampleRate,
                  s = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, t, 0, 16, 0, 0, 0, 0, i >>> 8 & 255, 255 & i, 0, 0]);
                return Te.box(Te.types.mp4a, s, Te.esds(e));
              }
              static ac3(e) {
                var t;
                const i = e.channelCount,
                  s = e.audioSampleRate,
                  a = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, i, 0, 16, 0, 0, 0, 0, s >>> 8 & 255, 255 & s, 0, 0]);
                return Te.box(Te.types["ac-3"], a, Te.box(Te.types.dac3, new Uint8Array(null !== (t = e.config) && void 0 !== t ? t : [])));
              }
              static ec3(e) {
                var t;
                const i = e.channelCount,
                  s = e.audioSampleRate,
                  a = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, i, 0, 16, 0, 0, 0, 0, s >>> 8 & 255, 255 & s, 0, 0]);
                return Te.box(Te.types["ec-3"], a, Te.box(Te.types.dec3, new Uint8Array(null !== (t = e.config) && void 0 !== t ? t : [])));
              }
              static esds(e) {
                var t;
                const i = null !== (t = e.config) && void 0 !== t ? t : [],
                  s = i.length,
                  a = new Uint8Array([0, 0, 0, 0, 3, 23 + s, 0, 1, 0, 4, 15 + s, 64, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5].concat([s]).concat(i).concat([6, 1, 2]));
                return Te.box(Te.types.esds, a);
              }
              static Opus(e) {
                const t = e.channelCount,
                  i = e.audioSampleRate,
                  s = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, t, 0, 16, 0, 0, 0, 0, i >>> 8 & 255, 255 & i, 0, 0]);
                return Te.box(Te.types.Opus, s, Te.dOps(e));
              }
              static dOps(e) {
                const t = e.channelCount,
                  i = e.channelConfigCode,
                  s = e.audioSampleRate;
                let a = [];
                switch (i) {
                  case 1:
                  case 2:
                    a = [0];
                    break;
                  case 0:
                    a = [255, 1, 1, 0, 1];
                    break;
                  case 128:
                    a = [255, 2, 0, 0, 1];
                    break;
                  case 3:
                    a = [1, 2, 1, 0, 2, 1];
                    break;
                  case 4:
                    a = [1, 2, 2, 0, 1, 2, 3];
                    break;
                  case 5:
                    a = [1, 3, 2, 0, 4, 1, 2, 3];
                    break;
                  case 6:
                    a = [1, 4, 2, 0, 4, 1, 2, 3, 5];
                    break;
                  case 7:
                    a = [1, 4, 2, 0, 4, 1, 2, 3, 5, 6];
                    break;
                  case 8:
                    a = [1, 5, 3, 0, 6, 1, 2, 3, 4, 5, 7];
                    break;
                  case 130:
                    a = [1, 1, 2, 0, 1];
                    break;
                  case 131:
                    a = [1, 1, 3, 0, 1, 2];
                    break;
                  case 132:
                    a = [1, 1, 4, 0, 1, 2, 3];
                    break;
                  case 133:
                    a = [1, 1, 5, 0, 1, 2, 3, 4];
                    break;
                  case 134:
                    a = [1, 1, 6, 0, 1, 2, 3, 4, 5];
                    break;
                  case 135:
                    a = [1, 1, 7, 0, 1, 2, 3, 4, 5, 6];
                    break;
                  case 136:
                    a = [1, 1, 8, 0, 1, 2, 3, 4, 5, 6, 7];
                }
                const n = new Uint8Array([0, t, 0, 0, s >>> 24 & 255, s >>> 17 & 255, s >>> 8 & 255, s >>> 0 & 255, 0, 0, ...a]);
                return Te.box(Te.types.dOps, n);
              }
              static avc1(e) {
                const t = e.avcc,
                  i = e.codecWidth,
                  s = e.codecHeight,
                  a = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, i >>> 8 & 255, 255 & i, s >>> 8 & 255, 255 & s, 0, 72, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 1, 10, 120, 113, 113, 47, 102, 108, 118, 46, 106, 115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 255, 255]);
                return Te.box(Te.types.avc1, a, Te.box(Te.types.avcC, t));
              }
              static hvc1(e) {
                const t = e.hvcc,
                  i = e.codecWidth,
                  s = e.codecHeight,
                  a = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, i >>> 8 & 255, 255 & i, s >>> 8 & 255, 255 & s, 0, 72, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 1, 10, 120, 113, 113, 47, 102, 108, 118, 46, 106, 115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 255, 255]);
                return Te.box(Te.types.hvc1, a, Te.box(Te.types.hvcC, t));
              }
              static av01(e) {
                var t, i;
                const s = e.av1c,
                  a = null !== (t = e.codecWidth) && void 0 !== t ? t : 192,
                  n = null !== (i = e.codecHeight) && void 0 !== i ? i : 108,
                  o = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, a >>> 8 & 255, 255 & a, n >>> 8 & 255, 255 & n, 0, 72, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 1, 10, 120, 113, 113, 47, 102, 108, 118, 46, 106, 115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 255, 255]);
                return Te.box(Te.types.av01, o, Te.box(Te.types.av1C, s));
              }
              static mvex(e) {
                return Te.box(Te.types.mvex, Te.trex(e));
              }
              static trex(e) {
                const t = e.id,
                  i = new Uint8Array([0, 0, 0, 0, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, 255 & t, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1]);
                return Te.box(Te.types.trex, i);
              }
              static moof(e, t) {
                return Te.box(Te.types.moof, Te.mfhd(e.sequenceNumber), Te.traf(e, t));
              }
              static mfhd(e) {
                const t = new Uint8Array([0, 0, 0, 0, e >>> 24 & 255, e >>> 16 & 255, e >>> 8 & 255, 255 & e]);
                return Te.box(Te.types.mfhd, t);
              }
              static traf(e, t) {
                const i = e.id,
                  s = Te.box(Te.types.tfhd, new Uint8Array([0, 0, 0, 0, i >>> 24 & 255, i >>> 16 & 255, i >>> 8 & 255, 255 & i])),
                  a = Te.box(Te.types.tfdt, new Uint8Array([0, 0, 0, 0, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, 255 & t])),
                  n = Te.sdtp(e),
                  o = Te.trun(e, n.byteLength + 16 + 16 + 8 + 16 + 8 + 8);
                return Te.box(Te.types.traf, s, a, o, n);
              }
              static sdtp(e) {
                const t = e.samples || [],
                  i = t.length,
                  s = new Uint8Array(4 + i);
                for (let e = 0; e < i; e++) {
                  const i = t[e].flags;
                  s[e + 4] = i.isLeading << 6 | i.dependsOn << 4 | i.isDependedOn << 2 | i.hasRedundancy;
                }
                return Te.box(Te.types.sdtp, s);
              }
              static trun(e, t) {
                const i = e.samples || [],
                  s = i.length,
                  a = 12 + 16 * s,
                  n = new Uint8Array(a);
                t += 8 + a, n.set([0, 0, 15, 1, s >>> 24 & 255, s >>> 16 & 255, s >>> 8 & 255, 255 & s, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, 255 & t], 0);
                for (let e = 0; e < s; e++) {
                  const t = i[e].duration,
                    s = i[e].size,
                    a = i[e].flags,
                    o = i[e].cts;
                  n.set([t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, 255 & t, s >>> 24 & 255, s >>> 16 & 255, s >>> 8 & 255, 255 & s, a.isLeading << 2 | a.dependsOn, a.isDependedOn << 6 | a.hasRedundancy << 4 | a.isNonSync, 0, 0, o >>> 24 & 255, o >>> 16 & 255, o >>> 8 & 255, 255 & o], 12 + 16 * e);
                }
                return Te.box(Te.types.trun, n);
              }
              static mdat(e) {
                return Te.box(Te.types.mdat, e);
              }
            }
            Te.constants = {
              FTYP: new Uint8Array([105, 115, 111, 109, 0, 0, 0, 1, 105, 115, 111, 109, 97, 118, 99, 49]),
              STSD_PREFIX: new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1]),
              STTS: Re,
              STSC: Re,
              STCO: Re,
              STSZ: new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
              HDLR_VIDEO: new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 118, 105, 100, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 86, 105, 100, 101, 111, 72, 97, 110, 100, 108, 101, 114, 0]),
              HDLR_AUDIO: new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 83, 111, 117, 110, 100, 72, 97, 110, 100, 108, 101, 114, 0]),
              DREF: new Uint8Array([0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 12, 117, 114, 108, 32, 0, 0, 0, 1]),
              SMHD: new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0]),
              VMHD: new Uint8Array([0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0])
            }, Te.init();
            const ke = Te;
            const Le = class {
              static getSilentFrame(e, t) {
                if ("mp4a.40.2" === e) {
                  if (1 === t) return new Uint8Array([0, 200, 0, 128, 35, 128]);
                  if (2 === t) return new Uint8Array([33, 0, 73, 144, 2, 25, 0, 35, 128]);
                  if (3 === t) return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 142]);
                  if (4 === t) return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 128, 44, 128, 8, 2, 56]);
                  if (5 === t) return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33, 144, 2, 56]);
                  if (6 === t) return new Uint8Array([0, 200, 0, 128, 32, 132, 1, 38, 64, 8, 100, 0, 130, 48, 4, 153, 0, 33, 144, 2, 0, 178, 0, 32, 8, 224]);
                } else {
                  if (1 === t) return new Uint8Array([1, 64, 34, 128, 163, 78, 230, 128, 186, 8, 0, 0, 0, 28, 6, 241, 193, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);
                  if (2 === t) return new Uint8Array([1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);
                  if (3 === t) return new Uint8Array([1, 64, 34, 128, 163, 94, 230, 128, 186, 8, 0, 0, 0, 0, 149, 0, 6, 241, 161, 10, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 90, 94]);
                }
                return null;
              }
            };
            var we = i(68);
            const De = class {
              constructor(e) {
                var t;
                this.TAG = "MP4Remuxer", this._fillSilentAfterSeek = !1, this._config = e, this._isLive = !!e.isLive, this._dtsBase = -1, this._dtsBaseInited = !1, this._audioDtsBase = 1 / 0, this._videoDtsBase = 1 / 0, this._audioNextDts = void 0, this._videoNextDts = void 0, this._audioStashedLastSample = null, this._videoStashedLastSample = null, this._audioMeta = null, this._videoMeta = null, this._audioSegmentInfoList = new we.J1("audio"), this._videoSegmentInfoList = new we.J1("video"), this._onInitSegment = null, this._onMediaSegment = null, this._forceFirstIDR = !(!n.Z.chrome || !(n.Z.version && n.Z.version.major < 50 || n.Z.version && 50 === n.Z.version.major && ((null === (t = n.Z.version) || void 0 === t ? void 0 : t.build) || 0) < 2661)), this._fillSilentAfterSeek = !(!n.Z.msedge && !n.Z.msie), this._mp3UseMpegAudio = !n.Z.firefox, this._fillAudioTimestampGap = this._config.fixAudioTimestampGap;
              }
              destroy() {
                this._dtsBase = -1, this._dtsBaseInited = !1, this._audioMeta = null, this._videoMeta = null, this._audioSegmentInfoList.clear(), this._audioSegmentInfoList = null, this._videoSegmentInfoList.clear(), this._videoSegmentInfoList = null, this._onInitSegment = null, this._onMediaSegment = null;
              }
              bindDataSource(e) {
                var t;
                return e.onDataAvailable = null === (t = this.remux) || void 0 === t ? void 0 : t.bind(this), e.onTrackMetadata = this._onTrackMetadataReceived.bind(this), this;
              }
              get onInitSegment() {
                return this._onInitSegment;
              }
              set onInitSegment(e) {
                this._onInitSegment = e;
              }
              get onMediaSegment() {
                return this._onMediaSegment;
              }
              set onMediaSegment(e) {
                this._onMediaSegment = e;
              }
              insertDiscontinuity() {
                this._audioNextDts = this._videoNextDts = void 0;
              }
              seek(e) {
                this._audioStashedLastSample = null, this._videoStashedLastSample = null, this._videoSegmentInfoList.clear(), this._audioSegmentInfoList.clear();
              }
              remux(e, t) {
                if (!this._onMediaSegment) throw new l.rT("MP4Remuxer: onMediaSegment callback must be specificed!");
                this._dtsBaseInited || this._calculateDtsBase(e, t), t && this._remuxVideo(t), e && this._remuxAudio(e);
              }
              _onTrackMetadataReceived(e, t) {
                let i = null,
                  s = "mp4",
                  a = t.codec;
                if ("audio" === e) this._audioMeta = t, "mp3" === t.codec && this._mp3UseMpegAudio ? (s = "mpeg", a = "", i = new Uint8Array()) : i = ke.generateInitSegment(t);else {
                  if ("video" !== e) return;
                  this._videoMeta = t, i = ke.generateInitSegment(t);
                }
                if (!this._onInitSegment) throw new l.rT("MP4Remuxer: onInitSegment callback must be specified!");
                this._onInitSegment(e, {
                  type: e,
                  data: i.buffer,
                  codec: a,
                  container: `${e}/${s}`,
                  mediaDuration: t.duration
                });
              }
              _calculateDtsBase(e, t) {
                var i, s;
                this._dtsBaseInited || ((null === (i = null == e ? void 0 : e.samples) || void 0 === i ? void 0 : i.length) && (this._audioDtsBase = e.samples[0].dts), (null === (s = null == t ? void 0 : t.samples) || void 0 === s ? void 0 : s.length) && (this._videoDtsBase = t.samples[0].dts), this._dtsBase = Math.min(this._audioDtsBase, this._videoDtsBase), this._dtsBaseInited = !0);
              }
              getTimestampBase() {
                if (this._dtsBaseInited) return this._dtsBase;
              }
              flushStashedSamples() {
                const e = this._videoStashedLastSample,
                  t = this._audioStashedLastSample,
                  i = {
                    type: "video",
                    id: 1,
                    sequenceNumber: 0,
                    samples: [],
                    length: 0
                  };
                null != e && (i.samples.push(e), i.length = null == e ? void 0 : e.length);
                const s = {
                  type: "audio",
                  id: 2,
                  sequenceNumber: 0,
                  samples: [],
                  length: 0
                };
                null != t && (s.samples.push(t), s.length = null == t ? void 0 : t.length), this._videoStashedLastSample = null, this._audioStashedLastSample = null, this._remuxVideo(i, !0), this._remuxAudio(s, !0);
              }
              _remuxAudio(e, t) {
                var i, s, o, r, d, l, h;
                if (null == this._audioMeta) return;
                const _ = e,
                  c = _.samples;
                let u,
                  m = -1,
                  f = -1;
                const p = this._audioMeta.refSampleDuration,
                  g = "mp3" === this._audioMeta.codec && this._mp3UseMpegAudio,
                  v = this._dtsBaseInited && void 0 === this._audioNextDts;
                let E = !1;
                if (!c || 0 === c.length) return;
                if (1 === c.length && !t) return;
                let S = 0,
                  y = null,
                  A = 0;
                g ? (S = 0, A = _.length) : (S = 8, A = 8 + _.length);
                let b = null;
                if (c.length > 1 && (b = c.pop(), A -= b.length), null != this._audioStashedLastSample) {
                  const e = this._audioStashedLastSample;
                  this._audioStashedLastSample = null, c.unshift(e), A += e.length;
                }
                null != b && (this._audioStashedLastSample = b);
                const R = c[0].dts - this._dtsBase;
                if (this._audioNextDts) u = R - this._audioNextDts;else if (this._audioSegmentInfoList.isEmpty()) u = 0, this._fillSilentAfterSeek && !this._videoSegmentInfoList.isEmpty() && "mp3" !== this._audioMeta.originalCodec && (E = !0);else {
                  const e = this._audioSegmentInfoList.getLastSampleBefore(R);
                  if (null != e) {
                    let t = R - (e.originalDts + e.duration);
                    t <= 3 && (t = 0);
                    u = R - (e.dts + e.duration + t);
                  } else u = 0;
                }
                if (E) {
                  const e = R - u,
                    t = this._videoSegmentInfoList.getLastSegmentBefore(R);
                  if (null != t && t.beginDts < e) {
                    const n = Le.getSilentFrame(null === (i = this._audioMeta) || void 0 === i ? void 0 : i.originalCodec, null === (s = this._audioMeta) || void 0 === s ? void 0 : s.channelCount);
                    if (n) {
                      const i = t.beginDts,
                        s = e - t.beginDts;
                      a.Z.v(this.TAG, `InsertPrefixSilentAudio: dts: ${i}, duration: ${s}`), c.unshift({
                        unit: n,
                        dts: i,
                        pts: i
                      }), A += n.byteLength;
                    }
                  } else E = !1;
                }
                const T = [];
                for (let e = 0; e < c.length; e++) {
                  const t = c[e],
                    i = t.unit,
                    s = t.dts - this._dtsBase;
                  let h = s,
                    _ = !1,
                    f = null,
                    g = 0;
                  if (!(s < -.001)) {
                    if ("mp3" !== this._audioMeta.codec) {
                      let e = s;
                      const t = 3;
                      if (this._audioNextDts && (e = this._audioNextDts), u = s - e, u <= -t * (p || 0)) {
                        a.Z.w(this.TAG, `Dropping 1 audio frame (originalDts: ${s} ms ,curRefDts: ${e} ms)  due to dtsCorrection: ${u} ms overlap.`);
                        continue;
                      }
                      if (u >= t * (p || 0) && this._fillAudioTimestampGap && !n.Z.safari) {
                        _ = !0;
                        const t = Math.floor(u / (p || 0));
                        a.Z.w(this.TAG, `Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.\noriginalDts: ${s} ms, curRefDts: ${e} ms, dtsCorrection: ${Math.round(u)} ms, generate: ${t} frames`), h = Math.floor(e), g = Math.floor(e + (p || 0)) - h;
                        let n = Le.getSilentFrame(null === (o = this._audioMeta) || void 0 === o ? void 0 : o.originalCodec, this._audioMeta.channelCount);
                        null == n && (a.Z.w(this.TAG, `Unable to generate silent frame for ${null === (r = this._audioMeta) || void 0 === r ? void 0 : r.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`), n = i), f = [];
                        for (let i = 0; i < t; i++) {
                          e += p || 0;
                          const t = Math.floor(e),
                            i = Math.floor(e + (p || 0)) - t,
                            a = {
                              dts: t,
                              pts: t,
                              cts: 0,
                              unit: n,
                              size: n.byteLength,
                              duration: i,
                              originalDts: s,
                              flags: {
                                isLeading: 0,
                                dependsOn: 1,
                                isDependedOn: 0,
                                hasRedundancy: 0
                              }
                            };
                          f.push(a), A += a.size;
                        }
                        this._audioNextDts = e + (p || 0);
                      } else h = Math.floor(e), g = Math.floor(e + (p || 0)) - h, this._audioNextDts = e + (p || 0);
                    } else {
                      if (h = s - u, e !== c.length - 1) {
                        g = c[e + 1].dts - this._dtsBase - u - h;
                      } else if (null != b) {
                        g = b.dts - this._dtsBase - u - h;
                      } else g = T.length >= 1 ? null === (d = T[T.length - 1]) || void 0 === d ? void 0 : d.duration : Math.floor(p || 0);
                      this._audioNextDts = h + g;
                    }
                    -1 === m && (m = h), T.push({
                      dts: h,
                      pts: h,
                      cts: 0,
                      unit: t.unit,
                      size: null === (l = t.unit) || void 0 === l ? void 0 : l.byteLength,
                      duration: g,
                      originalDts: s,
                      flags: {
                        isLeading: 0,
                        dependsOn: 1,
                        isDependedOn: 0,
                        hasRedundancy: 0
                      }
                    }), _ && T.push.apply(T, f);
                  }
                }
                if (0 === T.length) return _.samples = [], void (_.length = 0);
                g ? y = new Uint8Array(A) : (y = new Uint8Array(A), y[0] = A >>> 24 & 255, y[1] = A >>> 16 & 255, y[2] = A >>> 8 & 255, y[3] = 255 & A, y.set(ke.types.mdat, 4));
                for (let e = 0; e < T.length; e++) {
                  const t = T[e].unit;
                  y.set(t, S), S += t.byteLength || 0;
                }
                const k = T[T.length - 1];
                f = k.dts + k.duration;
                const L = new we.Yy();
                L.beginDts = m, L.endDts = f, L.beginPts = m, L.endPts = f, L.originalBeginDts = T[0].originalDts, L.originalEndDts = k.originalDts + k.duration, L.firstSample = new we.Wk(T[0].dts, T[0].pts, T[0].duration, T[0].originalDts, !1), L.lastSample = new we.Wk(k.dts, k.pts, k.duration, k.originalDts, !1), this._isLive || this._audioSegmentInfoList.append(L), _.samples = T, _.sequenceNumber++;
                let w = null;
                w = g ? new Uint8Array() : ke.moof(_, m), _.samples = [], _.length = 0;
                const D = {
                  type: "audio",
                  data: this._mergeBoxes(w, y).buffer,
                  sampleCount: T.length,
                  info: L
                };
                g && v && D && (D.timestampOffset = m), null === (h = this._onMediaSegment) || void 0 === h || h.call(this, "audio", D);
              }
              _remuxVideo(e, t) {
                var i, s;
                if (null == this._videoMeta) return;
                const a = e,
                  n = a.samples;
                let o,
                  r = -1,
                  d = -1,
                  l = -1,
                  h = -1;
                if (!n || 0 === n.length) return;
                if (1 === n.length && !t) return;
                let _ = 8,
                  c = null,
                  u = 8 + e.length,
                  m = null;
                if (n.length > 1 && (m = n.pop(), u -= m.length), null != this._videoStashedLastSample) {
                  const e = this._videoStashedLastSample;
                  this._videoStashedLastSample = null, n.unshift(e), u += (null == e ? void 0 : e.length) || 0;
                }
                null != m && (this._videoStashedLastSample = m);
                const f = n[0].dts - this._dtsBase;
                if (this._videoNextDts) o = f - this._videoNextDts;else if (this._videoSegmentInfoList.isEmpty()) o = 0;else {
                  const e = this._videoSegmentInfoList.getLastSampleBefore(f);
                  if (null != e) {
                    let t = f - (e.originalDts + e.duration);
                    t <= 3 && (t = 0);
                    o = f - (e.dts + e.duration + t);
                  } else o = 0;
                }
                const p = new we.Yy(),
                  g = [];
                for (let e = 0; e < n.length; e++) {
                  const t = n[e],
                    s = t.dts - this._dtsBase,
                    a = t.isKeyframe,
                    d = s - o,
                    h = t.cts,
                    _ = d + h;
                  -1 === r && (r = d, l = _);
                  let c = 0;
                  if (e !== n.length - 1) {
                    c = n[e + 1].dts - this._dtsBase - o - d;
                  } else if (null != m) {
                    c = m.dts - this._dtsBase - o - d;
                  } else c = g.length >= 1 ? g[g.length - 1].duration : Math.floor((null === (i = this._videoMeta) || void 0 === i ? void 0 : i.refSampleDuration) || 0);
                  if (a) {
                    const e = new we.Wk(d, _, c, t.dts, !0);
                    e.fileposition = t.fileposition, p.appendSyncPoint(e);
                  }
                  g.push({
                    dts: d,
                    pts: _,
                    cts: h,
                    units: t.units,
                    size: t.length,
                    isKeyframe: a,
                    duration: c,
                    originalDts: s,
                    flags: {
                      isLeading: 0,
                      dependsOn: a ? 2 : 1,
                      isDependedOn: a ? 1 : 0,
                      hasRedundancy: 0,
                      isNonSync: a ? 0 : 1
                    }
                  });
                }
                c = new Uint8Array(u), c[0] = u >>> 24 & 255, c[1] = u >>> 16 & 255, c[2] = u >>> 8 & 255, c[3] = 255 & u, c.set(ke.types.mdat, 4);
                for (let e = 0; e < g.length; e++) {
                  const t = g[e].units;
                  for (; null == t ? void 0 : t.length;) {
                    const e = t.shift(),
                      i = null == e ? void 0 : e.data;
                    c.set(i, _), _ += i.byteLength;
                  }
                }
                const v = g[g.length - 1];
                if (d = v.dts + v.duration, h = v.pts + v.duration, this._videoNextDts = d, p.beginDts = r, p.endDts = d, p.beginPts = l, p.endPts = h, p.originalBeginDts = g[0].originalDts, p.originalEndDts = v.originalDts + v.duration, p.firstSample = new we.Wk(g[0].dts, g[0].pts, g[0].duration, g[0].originalDts, !!g[0].isKeyframe), p.lastSample = new we.Wk(v.dts, v.pts, v.duration, v.originalDts, !!v.isKeyframe), this._isLive || this._videoSegmentInfoList.append(p), a.samples = g, a.sequenceNumber++, this._forceFirstIDR) {
                  const e = g[0].flags;
                  e.dependsOn = 2, e.isNonSync = 0;
                }
                const E = ke.moof(a, r);
                a.samples = [], a.length = 0, null === (s = this._onMediaSegment) || void 0 === s || s.call(this, "video", {
                  type: "video",
                  data: this._mergeBoxes(E, c).buffer,
                  sampleCount: g.length,
                  info: p
                });
              }
              _mergeBoxes(e, t) {
                const i = new Uint8Array(e.byteLength + t.byteLength);
                return i.set(e, 0), i.set(t, e.byteLength), i;
              }
            };
            var Ce = i(575),
              Be = i(473);
            const Ie = class {
              constructor(e, t) {
                var i;
                this.TAG = "TransmuxingController", this._emitter = new s.EventEmitter(), this._config = t, e.segments || (e.segments = [{
                  duration: e.duration,
                  filesize: e.filesize,
                  url: e.url
                }]), "boolean" != typeof e.cors && (e.cors = !0), "boolean" != typeof e.withCredentials && (e.withCredentials = !1), this._mediaDataSource = e, this._currentSegmentIndex = 0;
                let a = 0;
                null === (i = this._mediaDataSource.segments) || void 0 === i || i.forEach(i => {
                  i.timestampBase = a, a += i.duration, i.cors = e.cors, i.withCredentials = e.withCredentials, t.referrerPolicy && (i.referrerPolicy = t.referrerPolicy);
                }), isNaN(a) || this._mediaDataSource.duration === a || (this._mediaDataSource.duration = a), this._mediaInfo = null, this._demuxer = null, this._remuxer = null, this._ioctl = null, this._pendingSeekTime = null, this._pendingResolveSeekPoint = null, this._statisticsReporter = null;
              }
              destroy() {
                var e, t, i;
                this._mediaInfo = null, this._mediaDataSource = null, this._statisticsReporter && this._disableStatisticsReporter(), this._ioctl && (null === (e = this._ioctl) || void 0 === e || e.destroy(), this._ioctl = null), this._demuxer && (null === (t = this._demuxer) || void 0 === t || t.destroy(), this._demuxer = null), this._remuxer && (null === (i = this._remuxer) || void 0 === i || i.destroy(), this._remuxer = null), this._emitter.removeAllListeners(), this._emitter = null;
              }
              on(e, t) {
                this._emitter.addListener(e, t);
              }
              off(e, t) {
                this._emitter.removeListener(e, t);
              }
              start() {
                this._loadSegment(0), this._enableStatisticsReporter();
              }
              _loadSegment(e, t) {
                var i, s, a;
                if (this._currentSegmentIndex = e, null === (i = this._mediaDataSource) || void 0 === i ? void 0 : i.segments) {
                  const i = null === (s = this._mediaDataSource) || void 0 === s ? void 0 : s.segments[e],
                    n = this._ioctl = new Ce.Z(i, this._config, e);
                  n.onError = this._onIOException.bind(this), n.onSeeked = this._onIOSeeked.bind(this), n.onComplete = this._onIOComplete.bind(this), n.onRedirect = this._onIORedirect.bind(this), n.onRecoveredEarlyEof = this._onIORecoveredEarlyEof.bind(this), t ? null === (a = this._demuxer) || void 0 === a || a.bindDataSource(this._ioctl) : n.onDataArrival = this._onInitChunkArrival.bind(this), n.open(t);
                }
              }
              stop() {
                this._internalAbort(), this._disableStatisticsReporter();
              }
              _internalAbort() {
                this._ioctl && (this._ioctl.destroy(), this._ioctl = null);
              }
              pause() {
                var e;
                (null === (e = this._ioctl) || void 0 === e ? void 0 : e.isWorking()) && (this._ioctl.pause(), this._disableStatisticsReporter());
              }
              resume() {
                var e;
                (null === (e = this._ioctl) || void 0 === e ? void 0 : e.isPaused()) && (this._ioctl.resume(), this._enableStatisticsReporter());
              }
              seek(e) {
                var t, i, s, a, n, o, r, d, l, h, _, c, u, m;
                if (null == this._mediaInfo || !(null === (t = this._mediaInfo) || void 0 === t ? void 0 : t.isSeekable())) return;
                const f = this._searchSegmentIndexContains(e);
                if (f === this._currentSegmentIndex) {
                  const t = (null === (i = this._mediaInfo) || void 0 === i ? void 0 : i.segments) ? null === (s = this._mediaInfo) || void 0 === s ? void 0 : s.segments[f] : {};
                  if (void 0 === t) this._pendingSeekTime = e;else {
                    const i = null == t ? void 0 : t.getNearestKeyframe(e);
                    null === (a = this._remuxer) || void 0 === a || a.seek(null == i ? void 0 : i.milliseconds), null === (n = this._ioctl) || void 0 === n || n.seek(null == i ? void 0 : i.fileposition), this._pendingResolveSeekPoint = null == i ? void 0 : i.milliseconds;
                  }
                } else {
                  const t = (null === (o = this._mediaInfo) || void 0 === o ? void 0 : o.segments) ? null === (r = this._mediaInfo) || void 0 === r ? void 0 : r.segments[f] : {};
                  if (void 0 === t) this._pendingSeekTime = e, this._internalAbort(), null === (d = this._remuxer) || void 0 === d || d.seek(), null === (l = this._remuxer) || void 0 === l || l.insertDiscontinuity(), this._loadSegment(f);else {
                    const i = t.getNearestKeyframe(e);
                    this._internalAbort(), null === (h = this._remuxer) || void 0 === h || h.seek(e), null === (_ = this._remuxer) || void 0 === _ || _.insertDiscontinuity(), this._demuxer && (null === (c = this._demuxer) || void 0 === c || c.resetMediaInfo(), this._demuxer.timestampBase = (null === (u = this._mediaDataSource) || void 0 === u ? void 0 : u.segments) ? null === (m = this._mediaDataSource) || void 0 === m ? void 0 : m.segments[f].timestampBase : 0), this._loadSegment(f, null == i ? void 0 : i.fileposition), this._pendingResolveSeekPoint = null == i ? void 0 : i.milliseconds, this._reportSegmentMediaInfo(f);
                  }
                }
                this._enableStatisticsReporter();
              }
              _searchSegmentIndexContains(e) {
                var t;
                const i = this._mediaDataSource.segments;
                let s = ((null == i ? void 0 : i.length) || 0) - 1;
                if (0 === ((null == i ? void 0 : i.length) || 0)) return s;
                for (let a = 0; a < ((null == i ? void 0 : i.length) || 0); a++) if (i && e < ((null === (t = i[a]) || void 0 === t ? void 0 : t.timestampBase) || 0)) {
                  s = a - 1;
                  break;
                }
                return s;
              }
              _onInitChunkArrival(e, t) {
                var i, s, n, o, r;
                let d = 0;
                if (t > 0) null === (i = this._demuxer) || void 0 === i || i.bindDataSource(this._ioctl), this._demuxer.timestampBase = this._mediaDataSource.segments ? null === (s = this._mediaDataSource.segments[this._currentSegmentIndex]) || void 0 === s ? void 0 : s.timestampBase : 0, d = (null === (n = this._demuxer) || void 0 === n ? void 0 : n.parseChunks(e, t)) || 0;else {
                  let i = null;
                  i = k.probe(e), i.match && (this._setupFLVDemuxerRemuxer(i), d = (null === (o = this._demuxer) || void 0 === o ? void 0 : o.parseChunks(e, t)) || 0), i.match || (null == i ? void 0 : i.needMoreData) || (i = be.probe(e), i.match && (this._setupTSDemuxerRemuxer(i), d = (null === (r = this._demuxer) || void 0 === r ? void 0 : r.parseChunks(e, t)) || 0)), i.match || (null == i ? void 0 : i.needMoreData) || (i = null, a.Z.e(this.TAG, "Non MPEG-TS/FLV, Unsupported media type!"), Promise.resolve().then(() => {
                    this._internalAbort();
                  }), this._emitter.emit(Be.Z.DEMUX_ERROR, p.Z.FORMAT_UNSUPPORTED, "Non MPEG-TS/FLV, Unsupported media type!"));
                }
                return d;
              }
              _setupFLVDemuxerRemuxer(e) {
                var t;
                this._demuxer = new k(e, this._config), this._remuxer || (this._remuxer = new De(this._config));
                const i = this._mediaDataSource;
                void 0 === i.duration || isNaN(i.duration) || (this._demuxer.overridedDuration = i.duration), "boolean" == typeof i.hasAudio && (this._demuxer.overridedHasAudio = i.hasAudio), "boolean" == typeof i.hasVideo && (this._demuxer.overridedHasVideo = i.hasVideo), i.segments && this._demuxer && this._remuxer && (this._demuxer.timestampBase = null === (t = null == i ? void 0 : i.segments[this._currentSegmentIndex]) || void 0 === t ? void 0 : t.timestampBase, this._demuxer.onError = this._onDemuxException.bind(this), this._demuxer.onMediaInfo = this._onMediaInfo.bind(this), this._demuxer.onMetaDataArrived = this._onMetaDataArrived.bind(this), this._demuxer.onScriptDataArrived = this._onScriptDataArrived.bind(this), this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)), this._remuxer.onInitSegment = this._onRemuxerInitSegmentArrival.bind(this), this._remuxer.onMediaSegment = this._onRemuxerMediaSegmentArrival.bind(this));
              }
              _setupTSDemuxerRemuxer(e) {
                const t = this._demuxer = new be(e, this._config);
                this._remuxer || (this._remuxer = new De(this._config)), t.onError = this._onDemuxException.bind(this), t.onMediaInfo = this._onMediaInfo.bind(this), t.onMetaDataArrived = this._onMetaDataArrived.bind(this), t.onTimedID3Metadata = this._onTimedID3Metadata.bind(this), t.onSMPTE2038Metadata = this._onSMPTE2038Metadata.bind(this), t.onSCTE35Metadata = this._onSCTE35Metadata.bind(this), t.onPESPrivateDataDescriptor = this._onPESPrivateDataDescriptor.bind(this), t.onPESPrivateData = this._onPESPrivateData.bind(this), this._remuxer.bindDataSource(this._demuxer), this._demuxer.bindDataSource(this._ioctl), this._remuxer.onInitSegment = this._onRemuxerInitSegmentArrival.bind(this), this._remuxer.onMediaSegment = this._onRemuxerMediaSegmentArrival.bind(this);
              }
              _onMediaInfo(e) {
                var t, i;
                null == this._mediaInfo && (this._mediaInfo = Object.assign({}, e), this._mediaInfo.keyframesIndex = null, this._mediaInfo.segments = [], this._mediaInfo.segmentCount = (null === (i = null === (t = this._mediaDataSource) || void 0 === t ? void 0 : t.segments) || void 0 === i ? void 0 : i.length) || 0, Object.setPrototypeOf(this._mediaInfo, o.Z.prototype));
                const s = Object.assign({}, e);
                Object.setPrototypeOf(s, o.Z.prototype), this._mediaInfo.segments && (this._mediaInfo.segments[this._currentSegmentIndex] = s), this._reportSegmentMediaInfo(this._currentSegmentIndex), null != this._pendingSeekTime && Promise.resolve().then(() => {
                  const e = this._pendingSeekTime;
                  this._pendingSeekTime = null, this.seek(e);
                });
              }
              _onMetaDataArrived(e) {
                this._emitter.emit(Be.Z.METADATA_ARRIVED, e);
              }
              _onScriptDataArrived(e) {
                this._emitter.emit(Be.Z.SCRIPTDATA_ARRIVED, e);
              }
              _onTimedID3Metadata(e) {
                var t;
                const i = null === (t = this._remuxer) || void 0 === t ? void 0 : t.getTimestampBase();
                void 0 !== i && (void 0 !== e.pts && (e.pts -= i), void 0 !== e.dts && (e.dts -= i), this._emitter.emit(Be.Z.TIMED_ID3_METADATA_ARRIVED, e));
              }
              _onSMPTE2038Metadata(e) {
                var t;
                const i = null === (t = this._remuxer) || void 0 === t ? void 0 : t.getTimestampBase();
                void 0 !== i && (void 0 !== e.pts && (e.pts -= i), void 0 !== e.dts && (e.dts -= i), void 0 !== e.nearest_pts && (e.nearest_pts -= i), this._emitter.emit(Be.Z.SMPTE2038_METADATA_ARRIVED, e));
              }
              _onSCTE35Metadata(e) {
                var t;
                const i = null === (t = this._remuxer) || void 0 === t ? void 0 : t.getTimestampBase();
                void 0 !== i && (void 0 !== e.pts && (e.pts -= i), void 0 !== e.nearest_pts && (e.nearest_pts -= i), this._emitter.emit(Be.Z.SCTE35_METADATA_ARRIVED, e));
              }
              _onPESPrivateDataDescriptor(e) {
                this._emitter.emit(Be.Z.PES_PRIVATE_DATA_DESCRIPTOR, e);
              }
              _onPESPrivateData(e) {
                var t;
                const i = null === (t = this._remuxer) || void 0 === t ? void 0 : t.getTimestampBase();
                void 0 !== i && (void 0 !== e.pts && (e.pts -= i), void 0 !== e.nearest_pts && (e.nearest_pts -= i), void 0 !== e.dts && (e.dts -= i), this._emitter.emit(Be.Z.PES_PRIVATE_DATA_ARRIVED, e));
              }
              _onIOSeeked() {
                var e;
                null === (e = this._remuxer) || void 0 === e || e.insertDiscontinuity();
              }
              _onIOComplete(e) {
                var t, i;
                const s = e + 1;
                s < ((null === (i = null === (t = this._mediaDataSource) || void 0 === t ? void 0 : t.segments) || void 0 === i ? void 0 : i.length) || 0) ? (this._internalAbort(), this._remuxer && this._remuxer.flushStashedSamples(), this._loadSegment(s)) : (this._remuxer && this._remuxer.flushStashedSamples(), this._emitter.emit(Be.Z.LOADING_COMPLETE), this._disableStatisticsReporter());
              }
              _onIORedirect(e) {
                var t;
                const i = null === (t = this._ioctl) || void 0 === t ? void 0 : t.extraData;
                this._mediaDataSource.segments && (this._mediaDataSource.segments[i].redirectedURL = e);
              }
              _onIORecoveredEarlyEof() {
                this._emitter.emit(Be.Z.RECOVERED_EARLY_EOF);
              }
              _onIOException(e, t) {
                a.Z.e(this.TAG, `IOException: type = ${e}, code = ${t.code}, msg = ${t.msg}`), this._emitter.emit(Be.Z.IO_ERROR, e, t), this._disableStatisticsReporter();
              }
              _onDemuxException(e, t) {
                a.Z.e(this.TAG, `DemuxException: type = ${e}, info = ${t}`), this._emitter.emit(Be.Z.DEMUX_ERROR, e, t);
              }
              _onRemuxerInitSegmentArrival(e, t) {
                this._emitter.emit(Be.Z.INIT_SEGMENT, e, t);
              }
              _onRemuxerMediaSegmentArrival(e, t) {
                if (null == this._pendingSeekTime && (this._emitter.emit(Be.Z.MEDIA_SEGMENT, e, t), null != this._pendingResolveSeekPoint && "video" === e)) {
                  const e = t.info.syncPoints;
                  let i = this._pendingResolveSeekPoint;
                  this._pendingResolveSeekPoint = null, n.Z.safari && e.length > 0 && e[0].originalDts === i && (i = e[0].pts), this._emitter.emit(Be.Z.RECOMMEND_SEEKPOINT, i);
                }
              }
              _enableStatisticsReporter() {
                null == this._statisticsReporter && this._reportStatisticsInfo && (this._statisticsReporter = self.setInterval(this._reportStatisticsInfo.bind(this), this._config.statisticsInfoReportInterval));
              }
              _disableStatisticsReporter() {
                this._statisticsReporter && (self.clearInterval(this._statisticsReporter), this._statisticsReporter = null);
              }
              _reportSegmentMediaInfo(e) {
                var t, i, s, a;
                const n = (null === (t = this._mediaInfo) || void 0 === t ? void 0 : t.segments) ? null === (i = this._mediaInfo) || void 0 === i ? void 0 : i.segments[e] : {},
                  o = Object.assign({}, n);
                o.duration = null === (s = this._mediaInfo) || void 0 === s ? void 0 : s.duration, o.segmentCount = null === (a = this._mediaInfo) || void 0 === a ? void 0 : a.segmentCount, delete o.segments, delete o.keyframesIndex, this._emitter.emit(Be.Z.MEDIA_INFO, o);
              }
              _reportStatisticsInfo() {
                var e, t, i, s, a, n;
                const o = {};
                o.url = null === (e = this._ioctl) || void 0 === e ? void 0 : e.currentURL, o.hasRedirect = null === (t = this._ioctl) || void 0 === t ? void 0 : t.hasRedirect, o.hasRedirect && (o.redirectedURL = null === (i = this._ioctl) || void 0 === i ? void 0 : i.currentRedirectedURL), o.speed = null === (s = this._ioctl) || void 0 === s ? void 0 : s.currentSpeed, o.loaderType = null === (a = this._ioctl) || void 0 === a ? void 0 : a.loaderType, o.currentSegmentIndex = this._currentSegmentIndex, o.totalSegmentCount = null === (n = this._mediaDataSource.segments) || void 0 === n ? void 0 : n.length, this._emitter.emit(Be.Z.STATISTICS_INFO, o);
              }
            };
          },
          473: (e, t, i) => {

            i.d(t, {
              Z: () => s
            });
            const s = {
              IO_ERROR: "io_error",
              DEMUX_ERROR: "demux_error",
              INIT_SEGMENT: "init_segment",
              MEDIA_SEGMENT: "media_segment",
              LOADING_COMPLETE: "loading_complete",
              RECOVERED_EARLY_EOF: "recovered_early_eof",
              MEDIA_INFO: "media_info",
              METADATA_ARRIVED: "metadata_arrived",
              SCRIPTDATA_ARRIVED: "scriptdata_arrived",
              TIMED_ID3_METADATA_ARRIVED: "timed_id3_metadata_arrived",
              SMPTE2038_METADATA_ARRIVED: "smpte2038_metadata_arrived",
              SCTE35_METADATA_ARRIVED: "scte35_metadata_arrived",
              PES_PRIVATE_DATA_DESCRIPTOR: "pes_private_data_descriptor",
              PES_PRIVATE_DATA_ARRIVED: "pes_private_data_arrived",
              STATISTICS_INFO: "statistics_info",
              RECOMMEND_SEEKPOINT: "recommend_seekpoint"
            };
          },
          638: (e, t, i) => {

            var s = i(278),
              a = i(943),
              n = i(473);
            let o = null;
            const r = function (e, t) {
              self.postMessage({
                msg: "logcat_callback",
                data: {
                  type: e,
                  logcat: t
                }
              });
            };
            function d(e, t) {
              const i = {
                msg: n.Z.INIT_SEGMENT,
                data: {
                  type: e,
                  data: t
                }
              };
              self.postMessage(i, [t.data]);
            }
            function l(e, t) {
              const i = {
                msg: n.Z.MEDIA_SEGMENT,
                data: {
                  type: e,
                  data: t
                }
              };
              self.postMessage(i, [t.data]);
            }
            function h() {
              const e = {
                msg: n.Z.LOADING_COMPLETE
              };
              self.postMessage(e);
            }
            function _() {
              const e = {
                msg: n.Z.RECOVERED_EARLY_EOF
              };
              self.postMessage(e);
            }
            function c(e) {
              const t = {
                msg: n.Z.MEDIA_INFO,
                data: e
              };
              self.postMessage(t);
            }
            function u(e) {
              const t = {
                msg: n.Z.METADATA_ARRIVED,
                data: e
              };
              self.postMessage(t);
            }
            function m(e) {
              const t = {
                msg: n.Z.SCRIPTDATA_ARRIVED,
                data: e
              };
              self.postMessage(t);
            }
            function f(e) {
              const t = {
                msg: n.Z.TIMED_ID3_METADATA_ARRIVED,
                data: e
              };
              self.postMessage(t);
            }
            function p(e) {
              const t = {
                msg: n.Z.SMPTE2038_METADATA_ARRIVED,
                data: e
              };
              self.postMessage(t);
            }
            function g(e) {
              const t = {
                msg: n.Z.SCTE35_METADATA_ARRIVED,
                data: e
              };
              self.postMessage(t);
            }
            function v(e) {
              const t = {
                msg: n.Z.PES_PRIVATE_DATA_DESCRIPTOR,
                data: e
              };
              self.postMessage(t);
            }
            function E(e) {
              const t = {
                msg: n.Z.PES_PRIVATE_DATA_ARRIVED,
                data: e
              };
              self.postMessage(t);
            }
            function S(e) {
              const t = {
                msg: n.Z.STATISTICS_INFO,
                data: e
              };
              self.postMessage(t);
            }
            function y(e, t) {
              self.postMessage({
                msg: n.Z.IO_ERROR,
                data: {
                  type: e,
                  info: t
                }
              });
            }
            function A(e, t) {
              self.postMessage({
                msg: n.Z.DEMUX_ERROR,
                data: {
                  type: e,
                  info: t
                }
              });
            }
            function b(e) {
              self.postMessage({
                msg: n.Z.RECOMMEND_SEEKPOINT,
                data: e
              });
            }
            self.addEventListener("message", function (e) {
              switch (e.data.cmd) {
                case "init":
                  o = new a.Z(e.data.param[0], e.data.param[1]), o.on(n.Z.IO_ERROR, y), o.on(n.Z.DEMUX_ERROR, A), o.on(n.Z.INIT_SEGMENT, d), o.on(n.Z.MEDIA_SEGMENT, l), o.on(n.Z.LOADING_COMPLETE, h), o.on(n.Z.RECOVERED_EARLY_EOF, _), o.on(n.Z.MEDIA_INFO, c), o.on(n.Z.METADATA_ARRIVED, u), o.on(n.Z.SCRIPTDATA_ARRIVED, m), o.on(n.Z.TIMED_ID3_METADATA_ARRIVED, f), o.on(n.Z.SMPTE2038_METADATA_ARRIVED, p), o.on(n.Z.SCTE35_METADATA_ARRIVED, g), o.on(n.Z.PES_PRIVATE_DATA_DESCRIPTOR, v), o.on(n.Z.PES_PRIVATE_DATA_ARRIVED, E), o.on(n.Z.STATISTICS_INFO, S), o.on(n.Z.RECOMMEND_SEEKPOINT, b);
                  break;
                case "destroy":
                  o && (o.destroy(), o = null), self.postMessage({
                    msg: "destroyed"
                  });
                  break;
                case "start":
                  null == o || o.start();
                  break;
                case "stop":
                  null == o || o.stop();
                  break;
                case "seek":
                  null == o || o.seek(e.data.param);
                  break;
                case "pause":
                  null == o || o.pause();
                  break;
                case "resume":
                  null == o || o.resume();
                  break;
                case "logging_config":
                  {
                    const t = e.data.param;
                    s.Z.applyConfig(t), !0 === t.enableCallback ? s.Z.addLogListener(r) : s.Z.removeLogListener(r);
                    break;
                  }
              }
            });
          },
          898: (e, t, i) => {

            i.d(t, {
              Z: () => s
            });
            const s = {
              OK: "OK",
              FORMAT_ERROR: "FormatError",
              FORMAT_UNSUPPORTED: "FormatUnsupported",
              CODEC_UNSUPPORTED: "CodecUnsupported"
            };
          },
          578: (e, t, i) => {

            i.d(t, {
              default: () => V
            });
            var s = i(575);
            const a = {
              enableWorker: !1,
              enableStashBuffer: !0,
              stashInitialSize: void 0,
              isLive: !1,
              liveBufferLatencyChasing: !1,
              liveBufferLatencyMaxLatency: 1.5,
              liveBufferLatencyMinRemain: .5,
              lazyLoad: !0,
              lazyLoadMaxDuration: 180,
              lazyLoadRecoverDuration: 30,
              deferLoadAfterSourceOpen: !0,
              autoCleanupMaxBackwardDuration: 180,
              autoCleanupMinBackwardDuration: 120,
              statisticsInfoReportInterval: 600,
              fixAudioTimestampGap: !0,
              accurateSeek: !1,
              seekType: "range",
              seekParamStart: "bstart",
              seekParamEnd: "bend",
              rangeLoadZeroStart: !1,
              customSeekHandler: void 0,
              reuseRedirectedURL: !1,
              headers: void 0,
              customLoader: void 0,
              url: void 0,
              redirectedURL: void 0,
              cors: !1
            };
            function n() {
              return Object.assign({}, a);
            }
            class o {
              static supportMSEH264Playback() {
                var e;
                return null === (e = window.MediaSource) || void 0 === e ? void 0 : e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"');
              }
              static supportMSEH265Playback() {
                var e;
                return null === (e = window.MediaSource) || void 0 === e ? void 0 : e.isTypeSupported('video/mp4; codecs="hvc1.1.6.L93.B0"');
              }
              static supportNetworkStreamIO() {
                const e = new s.Z({}, n()),
                  t = e.loaderType;
                return e.destroy(), "fetch-stream-loader" === t || "xhr-moz-chunked-loader" === t;
              }
              static getNetworkLoaderTypeName() {
                const e = new s.Z({}, n()),
                  t = e.loaderType;
                return e.destroy(), t;
              }
              static supportNativeMediaPlayback(e) {
                void 0 === o.videoElement && (o.videoElement = window.document.createElement("video"));
                const t = o.videoElement.canPlayType(e);
                return "probably" === t || "maybe" === t;
              }
              static getFeatureList() {
                const e = {
                  msePlayback: !1,
                  mseLivePlayback: !1,
                  mseH265Playback: !1,
                  networkStreamIO: !1,
                  networkLoaderName: "",
                  nativeMP4H264Playback: !1,
                  nativeMP4H265Playback: !1,
                  nativeWebmVP8Playback: !1,
                  nativeWebmVP9Playback: !1
                };
                return e.msePlayback = o.supportMSEH264Playback(), e.networkStreamIO = o.supportNetworkStreamIO(), e.networkLoaderName = o.getNetworkLoaderTypeName() || "", e.mseLivePlayback = e.msePlayback && e.networkStreamIO, e.mseH265Playback = o.supportMSEH265Playback(), e.nativeMP4H264Playback = o.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'), e.nativeMP4H265Playback = o.supportNativeMediaPlayback('video/mp4; codecs="hvc1.1.6.L93.B0"'), e.nativeWebmVP8Playback = o.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'), e.nativeWebmVP9Playback = o.supportNativeMediaPlayback('video/webm; codecs="vp9"'), e;
              }
            }
            const r = o;
            var d = i(108),
              l = i(99),
              h = i(645),
              _ = i(479);
            const c = {
                ERROR: "error",
                LOADING_COMPLETE: "loading_complete",
                RECOVERED_EARLY_EOF: "recovered_early_eof",
                MEDIA_INFO: "media_info",
                METADATA_ARRIVED: "metadata_arrived",
                SCRIPTDATA_ARRIVED: "scriptdata_arrived",
                TIMED_ID3_METADATA_ARRIVED: "timed_id3_metadata_arrived",
                SMPTE2038_METADATA_ARRIVED: "smpte2038_metadata_arrived",
                SCTE35_METADATA_ARRIVED: "scte35_metadata_arrived",
                PES_PRIVATE_DATA_DESCRIPTOR: "pes_private_data_descriptor",
                PES_PRIVATE_DATA_ARRIVED: "pes_private_data_arrived",
                STATISTICS_INFO: "statistics_info"
              },
              u = function () {
                const e = ENTRY_MODULE,
                  t = {};
                function i(s) {
                  if (t[s]) return t[s].exports;
                  const a = t[s] = {
                    exports: {}
                  };
                  return e[s](a, a.exports, i), a.exports;
                }
                i.m = e, i.n = e => {
                  const t = e && e.__esModule ? () => e.default : () => e;
                  return i.d(t, {
                    a: t
                  }), t;
                }, i.d = (e, t) => {
                  for (const s in t) i.o(t, s) && !i.o(e, s) && Object.defineProperty(e, s, {
                    enumerable: !0,
                    get: t[s]
                  });
                }, i.g = function () {
                  if ("[object Object]" === Object.prototype.toString.call(globalThis)) return globalThis;
                  try {
                    return this || new Function("return this")();
                  } catch (e) {
                    if ("[object Object]" === Object.prototype.toString.call(window)) return window;
                  }
                }(), i.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), i.r = e => {
                  "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
                    value: "Module"
                  }), Object.defineProperty(e, "__esModule", {
                    value: !0
                  });
                };
                const s = i(ENTRY_MODULE);
                return s.default || s;
              };
            u.toString();
            const m = "[\\.|\\-|\\+|\\w|/|@]+",
              f = "\\(\\s*(/\\*.*?\\*/)?\\s*.*?(" + m + ").*?\\)";
            function p(e) {
              return (e + "").replace(/[.?*+^$[\]\\(){}|-]/g, "\\$&");
            }
            function g(e, t, s) {
              const a = {};
              a[s] = [];
              const n = t.toString(),
                o = n.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/) || n.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);
              if (!o) return a;
              const r = o[1];
              let d,
                l = new RegExp("(\\\\n|\\W)" + p(r) + f, "g");
              for (; d = l.exec(n);) "dll-reference" !== d[3] && a[s].push(d[3]);
              for (l = new RegExp("\\(" + p(r) + '\\("(dll-reference\\s(' + m + '))"\\)\\)' + f, "g"); d = l.exec(n);) e[d[2]] || (a[s].push(d[1]), e[d[2]] = i(d[1]).m), a[d[2]] = a[d[2]] || [], a[d[2]].push(d[4]);
              const h = Object.keys(a);
              for (let e = 0; e < h.length; e++) for (let t = 0; t < a[h[e]].length; t++) _ = a[h[e]][t], isNaN(1 * _) || (a[h[e]][t] = 1 * a[h[e]][t]);
              var _;
              return a;
            }
            function v(e) {
              return Object.keys(e).reduce((t, i) => t || e[i].length > 0, !1);
            }
            function E(e, t, i, s) {
              const a = e[s].map(e => `"${e}": ${t[s][e].toString()}`).join(","),
                n = u.toString().split("ENTRY_MODULE");
              return `${n[0]}{${a}}${n[1]}"${i}"${n[2]}`;
            }
            function S(e, t) {
              t = t || {};
              const s = {
                  main: i.m
                },
                a = t.all ? {
                  main: Object.keys(s.main)
                } : function (e, t) {
                  const i = {
                      main: [t]
                    },
                    s = {
                      main: []
                    },
                    a = {
                      main: {}
                    };
                  for (; v(i);) {
                    const t = Object.keys(i);
                    for (let n = 0; n < t.length; n++) {
                      const o = t[n],
                        r = i[o].pop();
                      if (a[o] = a[o] || {}, a[o][r] || !e[o][r]) continue;
                      a[o][r] = !0, s[o] = s[o] || [], s[o].push(r);
                      const d = g(e, e[o][r], o),
                        l = Object.keys(d);
                      for (let e = 0; e < l.length; e++) i[l[e]] = i[l[e]] || [], i[l[e]] = i[l[e]].concat(d[l[e]]);
                    }
                  }
                  return s;
                }(s, e);
              let n = "";
              Object.keys(a).filter(e => "main" !== e).forEach(e => {
                let t = 0;
                for (; a[e][t];) t++;
                a[e].push(t), s[e][t] = "(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })", n += `var ${e} = (${E(a, s, t, modules)})();\n`;
              }), n += `(${E(a, s, e, "main")})();`;
              const o = new window.Blob([n], {
                type: "text/javascript"
              });
              if (t.bare) return o;
              const r = (window.URL || window.webkitURL || window.mozURL || window.msURL).createObjectURL(o),
                d = new window.Worker(r);
              return d.objectURL = r, d;
            }
            var y = i(278),
              A = i(943),
              b = i(473),
              R = i(994);
            const T = class {
                constructor(e, t) {
                  if (this.TAG = "Transmuxer", this._workerDestroying = !1, this._controller = null, this._emitter = new l.EventEmitter(), t.enableWorker && "undefined" != typeof Worker) try {
                    this._worker = this._worker = S(638), this._workerDestroying = !1, this._worker.addEventListener("message", this._onWorkerMessage.bind(this)), this._worker.postMessage({
                      cmd: "init",
                      param: [e, t]
                    }), this.e = {
                      onLoggingConfigChanged: this._onLoggingConfigChanged.bind(this)
                    }, y.Z.registerListener(this.e.onLoggingConfigChanged), this._worker.postMessage({
                      cmd: "logging_config",
                      param: y.Z.getConfig()
                    });
                  } catch (i) {
                    h.Z.e(this.TAG, "Error while initialize transmuxing worker, fallback to inline transmuxing"), this._worker = null, this._controller = new A.Z(e, t);
                  } else this._controller = new A.Z(e, t);
                  if (this._controller) {
                    const e = this._controller;
                    null == e || e.on(b.Z.IO_ERROR, this._onIOError.bind(this)), null == e || e.on(b.Z.DEMUX_ERROR, this._onDemuxError.bind(this)), null == e || e.on(b.Z.INIT_SEGMENT, this._onInitSegment.bind(this)), null == e || e.on(b.Z.MEDIA_SEGMENT, this._onMediaSegment.bind(this)), null == e || e.on(b.Z.LOADING_COMPLETE, this._onLoadingComplete.bind(this)), null == e || e.on(b.Z.RECOVERED_EARLY_EOF, this._onRecoveredEarlyEof.bind(this)), null == e || e.on(b.Z.MEDIA_INFO, this._onMediaInfo.bind(this)), null == e || e.on(b.Z.METADATA_ARRIVED, this._onMetaDataArrived.bind(this)), null == e || e.on(b.Z.SCRIPTDATA_ARRIVED, this._onScriptDataArrived.bind(this)), null == e || e.on(b.Z.TIMED_ID3_METADATA_ARRIVED, this._onTimedID3MetadataArrived.bind(this)), null == e || e.on(b.Z.SMPTE2038_METADATA_ARRIVED, this._onSMPTE2038MetadataArrived.bind(this)), null == e || e.on(b.Z.SCTE35_METADATA_ARRIVED, this._onSCTE35MetadataArrived.bind(this)), null == e || e.on(b.Z.PES_PRIVATE_DATA_DESCRIPTOR, this._onPESPrivateDataDescriptor.bind(this)), null == e || e.on(b.Z.PES_PRIVATE_DATA_ARRIVED, this._onPESPrivateDataArrived.bind(this)), null == e || e.on(b.Z.STATISTICS_INFO, this._onStatisticsInfo.bind(this)), null == e || e.on(b.Z.RECOMMEND_SEEKPOINT, this._onRecommendSeekpoint.bind(this));
                  }
                }
                destroy() {
                  var e;
                  this._worker ? this._workerDestroying || (this._workerDestroying = !0, this._worker.postMessage({
                    cmd: "destroy"
                  }), y.Z.removeListener(this.e.onLoggingConfigChanged), this.e = null) : (null === (e = this._controller) || void 0 === e || e.destroy(), this._controller = null), this._emitter.removeAllListeners(), this._emitter = null;
                }
                on(e, t) {
                  this._emitter.addListener(e, t);
                }
                off(e, t) {
                  this._emitter.removeListener(e, t);
                }
                hasWorker() {
                  return null != this._worker;
                }
                open() {
                  var e;
                  this._worker ? this._worker.postMessage({
                    cmd: "start"
                  }) : null === (e = this._controller) || void 0 === e || e.start();
                }
                close() {
                  var e;
                  this._worker ? this._worker.postMessage({
                    cmd: "stop"
                  }) : null === (e = this._controller) || void 0 === e || e.stop();
                }
                seek(e) {
                  var t;
                  this._worker ? this._worker.postMessage({
                    cmd: "seek",
                    param: e
                  }) : null === (t = this._controller) || void 0 === t || t.seek(e);
                }
                pause() {
                  var e;
                  this._worker ? this._worker.postMessage({
                    cmd: "pause"
                  }) : null === (e = this._controller) || void 0 === e || e.pause();
                }
                resume() {
                  var e;
                  this._worker ? this._worker.postMessage({
                    cmd: "resume"
                  }) : null === (e = this._controller) || void 0 === e || e.resume();
                }
                _onInitSegment(e, t) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.INIT_SEGMENT, e, t);
                  });
                }
                _onMediaSegment(e, t) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.MEDIA_SEGMENT, e, t);
                  });
                }
                _onLoadingComplete() {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.LOADING_COMPLETE);
                  });
                }
                _onRecoveredEarlyEof() {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.RECOVERED_EARLY_EOF);
                  });
                }
                _onMediaInfo(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.MEDIA_INFO, e);
                  });
                }
                _onMetaDataArrived(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.METADATA_ARRIVED, e);
                  });
                }
                _onScriptDataArrived(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.SCRIPTDATA_ARRIVED, e);
                  });
                }
                _onTimedID3MetadataArrived(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.TIMED_ID3_METADATA_ARRIVED, e);
                  });
                }
                _onSMPTE2038MetadataArrived(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.SMPTE2038_METADATA_ARRIVED, e);
                  });
                }
                _onSCTE35MetadataArrived(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.SCTE35_METADATA_ARRIVED, e);
                  });
                }
                _onPESPrivateDataDescriptor(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.PES_PRIVATE_DATA_DESCRIPTOR, e);
                  });
                }
                _onPESPrivateDataArrived(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.PES_PRIVATE_DATA_ARRIVED, e);
                  });
                }
                _onStatisticsInfo(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.STATISTICS_INFO, e);
                  });
                }
                _onIOError(e, t) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.IO_ERROR, e, t);
                  });
                }
                _onDemuxError(e, t) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.DEMUX_ERROR, e, t);
                  });
                }
                _onRecommendSeekpoint(e) {
                  Promise.resolve().then(() => {
                    this._emitter.emit(b.Z.RECOMMEND_SEEKPOINT, e);
                  });
                }
                _onLoggingConfigChanged(e) {
                  this._worker && this._worker.postMessage({
                    cmd: "logging_config",
                    param: e
                  });
                }
                _onWorkerMessage(e) {
                  const t = e.data,
                    i = null == t ? void 0 : t.data;
                  if ("destroyed" === t.msg || this._workerDestroying) return this._workerDestroying = !1, this._worker.terminate(), void (this._worker = null);
                  switch (t.msg) {
                    case b.Z.INIT_SEGMENT:
                    case b.Z.MEDIA_SEGMENT:
                      this._emitter.emit(t.msg, i.type, i.data);
                      break;
                    case b.Z.LOADING_COMPLETE:
                    case b.Z.RECOVERED_EARLY_EOF:
                      this._emitter.emit(t.msg);
                      break;
                    case b.Z.MEDIA_INFO:
                      Object.setPrototypeOf(i, R.Z.prototype), this._emitter.emit(t.msg, i);
                      break;
                    case b.Z.METADATA_ARRIVED:
                    case b.Z.SCRIPTDATA_ARRIVED:
                    case b.Z.TIMED_ID3_METADATA_ARRIVED:
                    case b.Z.SMPTE2038_METADATA_ARRIVED:
                    case b.Z.SCTE35_METADATA_ARRIVED:
                    case b.Z.PES_PRIVATE_DATA_DESCRIPTOR:
                    case b.Z.PES_PRIVATE_DATA_ARRIVED:
                    case b.Z.STATISTICS_INFO:
                      this._emitter.emit(t.msg, i);
                      break;
                    case b.Z.IO_ERROR:
                    case b.Z.DEMUX_ERROR:
                      this._emitter.emit(t.msg, i.type, i.info);
                      break;
                    case b.Z.RECOMMEND_SEEKPOINT:
                      this._emitter.emit(t.msg, i);
                      break;
                    case "logcat_callback":
                      h.Z.emitter.emit("log", i.type, i.logcat);
                  }
                }
              },
              k = {
                ERROR: "error",
                SOURCE_OPEN: "source_open",
                UPDATE_END: "update_end",
                BUFFER_FULL: "buffer_full"
              };
            var L = i(68),
              w = i(411);
            const D = class {
              constructor(e) {
                this.TAG = "MSEController", this._config = e, this._emitter = new l.EventEmitter(), this._config.isLive && void 0 === this._config.autoCleanupSourceBuffer && (this._config.autoCleanupSourceBuffer = !0), this.e = {
                  onSourceOpen: this._onSourceOpen.bind(this),
                  onSourceEnded: this._onSourceEnded.bind(this),
                  onSourceClose: this._onSourceClose.bind(this),
                  onSourceBufferError: this._onSourceBufferError.bind(this),
                  onSourceBufferUpdateEnd: this._onSourceBufferUpdateEnd.bind(this)
                }, this._mediaSource = null, this._mediaSourceObjectURL = null, this._mediaElement = null, this._isBufferFull = !1, this._hasPendingEos = !1, this._requireSetMediaDuration = !1, this._pendingMediaDuration = 0, this._pendingSourceBufferInit = [], this._mimeTypes = {
                  video: null,
                  audio: null
                }, this._sourceBuffers = {
                  video: null,
                  audio: null
                }, this._lastInitSegments = {
                  video: null,
                  audio: null
                }, this._pendingSegments = {
                  video: [],
                  audio: []
                }, this._pendingRemoveRanges = {
                  video: [],
                  audio: []
                }, this._idrList = new L.Vn();
              }
              destroy() {
                (this._mediaElement || this._mediaSource) && this.detachMediaElement(), this.e = null, this._emitter.removeAllListeners(), this._emitter = null;
              }
              on(e, t) {
                this._emitter.addListener(e, t);
              }
              off(e, t) {
                this._emitter.removeListener(e, t);
              }
              attachMediaElement(e) {
                if (this._mediaSource) throw new w.rT("MediaSource has been attached to an HTMLMediaElement!");
                const t = this._mediaSource = new window.MediaSource();
                t.addEventListener("sourceopen", this.e.onSourceOpen), t.addEventListener("sourceended", this.e.onSourceEnded), t.addEventListener("sourceclose", this.e.onSourceClose), this._mediaElement = e, this._mediaSourceObjectURL = window.URL.createObjectURL(this._mediaSource), e.src = this._mediaSourceObjectURL;
              }
              detachMediaElement() {
                if (this._mediaSource) {
                  const e = this._mediaSource;
                  for (const t in this._sourceBuffers) {
                    const i = this._pendingSegments[t];
                    i.splice(0, i.length), this._pendingSegments[t] = null, this._pendingRemoveRanges[t] = null, this._lastInitSegments[t] = null;
                    const s = this._sourceBuffers[t];
                    if (s) {
                      if ("closed" !== e.readyState) {
                        try {
                          e.removeSourceBuffer(s);
                        } catch (e) {
                          h.Z.e(this.TAG, e.message);
                        }
                        null == s || s.removeEventListener("error", this.e.onSourceBufferError), null == s || s.removeEventListener("updateend", this.e.onSourceBufferUpdateEnd);
                      }
                      this._mimeTypes[t] = null, this._sourceBuffers[t] = null;
                    }
                  }
                  if ("open" === e.readyState) try {
                    e.endOfStream();
                  } catch (e) {
                    h.Z.e(this.TAG, e.message);
                  }
                  e.removeEventListener("sourceopen", this.e.onSourceOpen), e.removeEventListener("sourceended", this.e.onSourceEnded), e.removeEventListener("sourceclose", this.e.onSourceClose), this._pendingSourceBufferInit = [], this._isBufferFull = !1, this._idrList.clear(), this._mediaSource = null;
                }
                this._mediaElement && (this._mediaElement.src = "", this._mediaElement.removeAttribute("src"), this._mediaElement = null), this._mediaSourceObjectURL && (window.URL.revokeObjectURL(this._mediaSourceObjectURL), this._mediaSourceObjectURL = null);
              }
              appendInitSegment(e, t) {
                var i;
                if (!this._mediaSource || "open" !== this._mediaSource.readyState) return this._pendingSourceBufferInit.push(e), void this._pendingSegments[e.type].push(e);
                const s = e;
                let a = `${s.container}`;
                s.codec && s.codec.length > 0 && (a += `;codecs=${s.codec}`);
                let n = !1;
                if (h.Z.v(this.TAG, "Received Initialization Segment, mimeType: " + a), this._lastInitSegments[s.type] = s, a !== this._mimeTypes[s.type]) {
                  if (this._mimeTypes[s.type]) h.Z.v(this.TAG, `Notice: ${s.type} mimeType changed, origin: ${this._mimeTypes[s.type] || ""}, target: ${a}`);else {
                    n = !0;
                    try {
                      const e = this._sourceBuffers[s.type] = this._mediaSource.addSourceBuffer(a);
                      e.addEventListener("error", this.e.onSourceBufferError), e.addEventListener("updateend", this.e.onSourceBufferUpdateEnd);
                    } catch (e) {
                      return h.Z.e(this.TAG, e.message), void this._emitter.emit(k.ERROR, {
                        code: e.code,
                        msg: e.message
                      });
                    }
                  }
                  this._mimeTypes[s.type] = a;
                }
                t || this._pendingSegments[s.type].push(s), n || this._sourceBuffers[s.type] && !(null === (i = this._sourceBuffers[s.type]) || void 0 === i ? void 0 : i.updating) && this._doAppendSegments(), _.Z.safari && "audio/mpeg" === s.container && s.mediaDuration > 0 && (this._requireSetMediaDuration = !0, this._pendingMediaDuration = s.mediaDuration / 1e3, this._updateMediaSourceDuration());
              }
              appendMediaSegment(e) {
                const t = e;
                this._pendingSegments[t.type].push(t), this._config.autoCleanupSourceBuffer && this._needCleanupSourceBuffer() && this._doCleanupSourceBuffer();
                const i = this._sourceBuffers[t.type];
                !i || i.updating || this._hasPendingRemoveRanges() || this._doAppendSegments();
              }
              seek(e) {
                var t, i;
                for (const e in this._sourceBuffers) {
                  if (!this._sourceBuffers[e]) continue;
                  const s = this._sourceBuffers[e];
                  if ("open" === (null === (t = this._mediaSource) || void 0 === t ? void 0 : t.readyState)) try {
                    null == s || s.abort();
                  } catch (e) {
                    h.Z.e(this.TAG, e.message);
                  }
                  this._idrList.clear();
                  const a = this._pendingSegments[e];
                  if (a.splice(0, a.length), "closed" !== (null === (i = this._mediaSource) || void 0 === i ? void 0 : i.readyState)) {
                    if (s) {
                      for (let t = 0; t < s.buffered.length; t++) {
                        const i = s.buffered.start(t),
                          a = s.buffered.end(t);
                        this._pendingRemoveRanges[e].push({
                          start: i,
                          end: a
                        });
                      }
                      (null == s ? void 0 : s.updating) || this._doRemoveRanges();
                    }
                    if (_.Z.safari) {
                      const t = this._lastInitSegments[e];
                      t && (this._pendingSegments[e].push(t), (null == s ? void 0 : s.updating) || this._doAppendSegments());
                    }
                  }
                }
              }
              endOfStream() {
                var e, t;
                const i = this._mediaSource,
                  s = this._sourceBuffers;
                i && "open" === i.readyState ? (null === (e = s.video) || void 0 === e ? void 0 : e.updating) || (null === (t = s.audio) || void 0 === t ? void 0 : t.updating) ? this._hasPendingEos = !0 : (this._hasPendingEos = !1, i.endOfStream()) : i && "closed" === i.readyState && this._hasPendingSegments() && (this._hasPendingEos = !0);
              }
              getNearestKeyframe(e) {
                return this._idrList.getLastSyncPointBeforeDts(e);
              }
              _needCleanupSourceBuffer() {
                var e, t;
                if (!this._config.autoCleanupSourceBuffer) return !1;
                const i = null === (e = this._mediaElement) || void 0 === e ? void 0 : e.currentTime;
                for (const e in this._sourceBuffers) {
                  const s = this._sourceBuffers[e];
                  if (s) {
                    const e = s.buffered;
                    if (e.length >= 1 && i - e.start(0) >= ((null === (t = this._config) || void 0 === t ? void 0 : t.autoCleanupMaxBackwardDuration) || 0)) return !0;
                  }
                }
                return !1;
              }
              _doCleanupSourceBuffer() {
                var e, t, i;
                const s = null === (e = this._mediaElement) || void 0 === e ? void 0 : e.currentTime;
                for (const e in this._sourceBuffers) {
                  const a = this._sourceBuffers[e];
                  if (a) {
                    const n = a.buffered;
                    let o = !1;
                    for (let a = 0; a < n.length; a++) {
                      const r = n.start(a),
                        d = n.end(a);
                      if (r <= s && s < d + 3) {
                        if (s - r >= ((null === (t = this._config) || void 0 === t ? void 0 : t.autoCleanupMaxBackwardDuration) || 0)) {
                          o = !0;
                          const t = s - ((null === (i = this._config) || void 0 === i ? void 0 : i.autoCleanupMinBackwardDuration) || 0);
                          this._pendingRemoveRanges[e].push({
                            start: r,
                            end: t
                          });
                        }
                      } else d < s && (o = !0, this._pendingRemoveRanges[e].push({
                        start: r,
                        end: d
                      }));
                    }
                    o && !a.updating && this._doRemoveRanges();
                  }
                }
              }
              _updateMediaSourceDuration() {
                var e, t, i, s;
                const a = this._sourceBuffers;
                if (0 === (null === (e = this._mediaElement) || void 0 === e ? void 0 : e.readyState) || "open" !== (null === (t = this._mediaSource) || void 0 === t ? void 0 : t.readyState)) return;
                if ((null === (i = a.video) || void 0 === i ? void 0 : i.updating) || (null === (s = a.audio) || void 0 === s ? void 0 : s.updating)) return;
                const n = this._mediaSource.duration,
                  o = this._pendingMediaDuration;
                o > 0 && (isNaN(n) || o > n) && (h.Z.v(this.TAG, `Update MediaSource duration from ${n} to ${o}`), this._mediaSource.duration = o), this._requireSetMediaDuration = !1, this._pendingMediaDuration = 0;
              }
              _doRemoveRanges() {
                var e;
                for (const t in this._pendingRemoveRanges) {
                  if (!this._sourceBuffers[t] || (null === (e = this._sourceBuffers[t]) || void 0 === e ? void 0 : e.updating)) continue;
                  const i = this._sourceBuffers[t],
                    s = this._pendingRemoveRanges[t];
                  for (; s.length && !(null == i ? void 0 : i.updating);) {
                    const e = s.shift();
                    null == i || i.remove(e.start, e.end);
                  }
                }
              }
              _doAppendSegments() {
                var e, t, i;
                const s = this._pendingSegments;
                for (const a in s) if (this._sourceBuffers[a] && !(null === (e = this._sourceBuffers[a]) || void 0 === e ? void 0 : e.updating) && s[a].length > 0) {
                  const e = s[a].shift();
                  if (null == e ? void 0 : e.timestampOffset) {
                    const i = (null === (t = this._sourceBuffers[a]) || void 0 === t ? void 0 : t.timestampOffset) || 0,
                      s = e.timestampOffset / 1e3;
                    Math.abs(i - s) > .1 && (h.Z.v(this.TAG, `Update MPEG audio timestampOffset from ${i} to ${s}`), this._sourceBuffers[a] && (this._sourceBuffers[a].timestampOffset = s)), delete e.timestampOffset;
                  }
                  if (!e.data || 0 === e.data.byteLength) continue;
                  try {
                    null === (i = this._sourceBuffers[a]) || void 0 === i || i.appendBuffer(e.data), this._isBufferFull = !1, "video" === a && e.hasOwnProperty("info") && this._idrList.appendArray(e.info.syncPoints);
                  } catch (t) {
                    this._pendingSegments[a].unshift(e), 22 === t.code ? (this._isBufferFull || this._emitter.emit(k.BUFFER_FULL), this._isBufferFull = !0) : (h.Z.e(this.TAG, t.message), this._emitter.emit(k.ERROR, {
                      code: t.code,
                      msg: t.message
                    }));
                  }
                }
              }
              _onSourceOpen() {
                var e;
                if (h.Z.v(this.TAG, "MediaSource onSourceOpen"), null === (e = this._mediaSource) || void 0 === e || e.removeEventListener("sourceopen", this.e.onSourceOpen), this._pendingSourceBufferInit.length > 0) {
                  const e = this._pendingSourceBufferInit;
                  for (; e.length;) {
                    const t = e.shift();
                    this.appendInitSegment(t, !0);
                  }
                }
                this._hasPendingSegments() && this._doAppendSegments(), this._emitter.emit(k.SOURCE_OPEN);
              }
              _onSourceEnded() {
                h.Z.v(this.TAG, "MediaSource onSourceEnded");
              }
              _onSourceClose() {
                h.Z.v(this.TAG, "MediaSource onSourceClose"), this._mediaSource && null != this.e && (this._mediaSource.removeEventListener("sourceopen", this.e.onSourceOpen), this._mediaSource.removeEventListener("sourceended", this.e.onSourceEnded), this._mediaSource.removeEventListener("sourceclose", this.e.onSourceClose));
              }
              _hasPendingSegments() {
                const e = this._pendingSegments;
                return e.video.length > 0 || e.audio.length > 0;
              }
              _hasPendingRemoveRanges() {
                const e = this._pendingRemoveRanges;
                return e.video.length > 0 || e.audio.length > 0;
              }
              _onSourceBufferUpdateEnd() {
                this._requireSetMediaDuration ? this._updateMediaSourceDuration() : this._hasPendingRemoveRanges() ? this._doRemoveRanges() : this._hasPendingSegments() ? this._doAppendSegments() : this._hasPendingEos && this.endOfStream(), this._emitter.emit(k.UPDATE_END);
              }
              _onSourceBufferError(e) {
                h.Z.e(this.TAG, `SourceBuffer Error: ${e}`);
              }
            };
            var C = i(898);
            const B = {
                NETWORK_ERROR: "NetworkError",
                MEDIA_ERROR: "MediaError",
                OTHER_ERROR: "OtherError"
              },
              I = {
                NETWORK_EXCEPTION: d.nm.EXCEPTION,
                NETWORK_STATUS_CODE_INVALID: d.nm.HTTP_STATUS_CODE_INVALID,
                NETWORK_TIMEOUT: d.nm.CONNECTING_TIMEOUT,
                NETWORK_UNRECOVERABLE_EARLY_EOF: d.nm.UNRECOVERABLE_EARLY_EOF,
                MEDIA_MSE_ERROR: "MediaMSEError",
                MEDIA_FORMAT_ERROR: C.Z.FORMAT_ERROR,
                MEDIA_FORMAT_UNSUPPORTED: C.Z.FORMAT_UNSUPPORTED,
                MEDIA_CODEC_UNSUPPORTED: C.Z.CODEC_UNSUPPORTED
              };
            var M = function (e, t, i, s) {
              return new (i || (i = Promise))(function (a, n) {
                function o(e) {
                  try {
                    d(s.next(e));
                  } catch (e) {
                    n(e);
                  }
                }
                function r(e) {
                  try {
                    d(s.throw(e));
                  } catch (e) {
                    n(e);
                  }
                }
                function d(e) {
                  var t;
                  e.done ? a(e.value) : (t = e.value, t instanceof i ? t : new i(function (e) {
                    e(t);
                  })).then(o, r);
                }
                d((s = s.apply(e, t || [])).next());
              });
            };
            const O = class {
              constructor(e, t) {
                var i, s, a;
                this.TAG = "MSEPlayer", this._type = "MSEPlayer", this._emitter = new l.EventEmitter(), this._config = n(), "object" == typeof t && Object.assign(this._config, t);
                const o = e.type.toLowerCase();
                if ("mse" !== o && "mpegts" !== o && "m2ts" !== o && "flv" !== o) throw new w.OC("MSEPlayer requires an mpegts/m2ts/flv MediaDataSource input!");
                e.isLive && (this._config.isLive = !0), this.e = {
                  onvLoadedMetadata: this._onvLoadedMetadata.bind(this),
                  onvSeeking: this._onvSeeking.bind(this),
                  onvCanPlay: this._onvCanPlay.bind(this),
                  onvStalled: this._onvStalled.bind(this),
                  onvProgress: this._onvProgress.bind(this)
                }, self.performance && self.performance.now ? this._now = self.performance.now.bind(self.performance) : this._now = Date.now, this._pendingSeekTime = null, this._requestSetTime = !1, this._seekpointRecord = null, this._progressChecker = null, this._mediaDataSource = e, this._mediaElement = null, this._msectl = null, this._transmuxer = null, this._mseSourceOpened = !1, this._hasPendingLoad = !1, this._receivedCanPlay = !1, this._mediaInfo = null, this._statisticsInfo = null;
                const r = _.Z.chrome && (_.Z.version && (null === (i = _.Z.version) || void 0 === i ? void 0 : i.major) < 50 || _.Z.version && 50 === (null === (s = null === _.Z || void 0 === _.Z ? void 0 : _.Z.version) || void 0 === s ? void 0 : s.major) && ((null === (a = null === _.Z || void 0 === _.Z ? void 0 : _.Z.version) || void 0 === a ? void 0 : a.build) || -1) < 2661);
                this._alwaysSeekKeyframe = !!(r || _.Z.msedge || _.Z.msie), this._alwaysSeekKeyframe && (this._config.accurateSeek = !1);
              }
              destroy() {
                null != this._progressChecker && (window.clearInterval(this._progressChecker), this._progressChecker = null), this._transmuxer && this.unload(), this._mediaElement && this.detachMediaElement(), this.e = null, this._mediaDataSource = null, this._emitter.removeAllListeners(), this._emitter = null;
              }
              on(e, t) {
                e === c.MEDIA_INFO ? null != this._mediaInfo && Promise.resolve().then(() => {
                  this._emitter.emit(c.MEDIA_INFO, this.mediaInfo);
                }) : e === c.STATISTICS_INFO && null != this._statisticsInfo && Promise.resolve().then(() => {
                  this._emitter.emit(c.STATISTICS_INFO, this.statisticsInfo);
                }), this._emitter.addListener(e, t);
              }
              off(e, t) {
                this._emitter.removeListener(e, t);
              }
              attachMediaElement(e) {
                var t, i, s, a, n;
                if (this._mediaElement = e, e.addEventListener("loadedmetadata", this.e.onvLoadedMetadata), e.addEventListener("seeking", this.e.onvSeeking), e.addEventListener("canplay", this.e.onvCanPlay), e.addEventListener("stalled", this.e.onvStalled), e.addEventListener("progress", this.e.onvProgress), this._msectl = new D(this._config), null === (t = this._msectl) || void 0 === t || t.on(k.UPDATE_END, this._onmseUpdateEnd.bind(this)), null === (i = this._msectl) || void 0 === i || i.on(k.BUFFER_FULL, this._onmseBufferFull.bind(this)), null === (s = this._msectl) || void 0 === s || s.on(k.SOURCE_OPEN, () => {
                  this._mseSourceOpened = !0, this._hasPendingLoad && (this._hasPendingLoad = !1, this.load());
                }), null === (a = this._msectl) || void 0 === a || a.on(k.ERROR, e => {
                  this._emitter.emit(c.ERROR, B.MEDIA_ERROR, I.MEDIA_MSE_ERROR, e);
                }), null === (n = this._msectl) || void 0 === n || n.attachMediaElement(e), null != this._pendingSeekTime) try {
                  e.currentTime = this._pendingSeekTime, this._pendingSeekTime = null;
                } catch (e) {}
              }
              detachMediaElement() {
                var e;
                this._mediaElement && (null === (e = this._msectl) || void 0 === e || e.detachMediaElement(), this._mediaElement.removeEventListener("loadedmetadata", this.e.onvLoadedMetadata), this._mediaElement.removeEventListener("seeking", this.e.onvSeeking), this._mediaElement.removeEventListener("canplay", this.e.onvCanPlay), this._mediaElement.removeEventListener("stalled", this.e.onvStalled), this._mediaElement.removeEventListener("progress", this.e.onvProgress), this._mediaElement = null), this._msectl && (this._msectl.destroy(), this._msectl = null);
              }
              load() {
                if (!this._mediaElement) throw new w.rT("HTMLMediaElement must be attached before load()!");
                if (this._transmuxer) throw new w.rT("MSEPlayer.load() has been called, please call unload() first!");
                this._hasPendingLoad || (!this._config.deferLoadAfterSourceOpen || this._mseSourceOpened ? (this._mediaElement.readyState > 0 && (this._requestSetTime = !0, this._mediaElement.currentTime = 0), this._transmuxer = new T(this._mediaDataSource, this._config), this._transmuxer.on(b.Z.INIT_SEGMENT, (e, t) => {
                  var i;
                  null === (i = this._msectl) || void 0 === i || i.appendInitSegment(t);
                }), this._transmuxer.on(b.Z.MEDIA_SEGMENT, (e, t) => {
                  var i, s, a;
                  if (null === (i = this._msectl) || void 0 === i || i.appendMediaSegment(t), this._config.lazyLoad && !this._config.isLive) {
                    const e = null === (s = this._mediaElement) || void 0 === s ? void 0 : s.currentTime;
                    t.info.endDts >= 1e3 * (e + ((null === (a = this._config) || void 0 === a ? void 0 : a.lazyLoadMaxDuration) || 0)) && null == this._progressChecker && (h.Z.v(this.TAG, "Maximum buffering duration exceeded, suspend transmuxing task"), this._suspendTransmuxer());
                  }
                }), this._transmuxer.on(b.Z.LOADING_COMPLETE, () => {
                  var e;
                  null === (e = this._msectl) || void 0 === e || e.endOfStream(), this._emitter.emit(c.LOADING_COMPLETE);
                }), this._transmuxer.on(b.Z.RECOVERED_EARLY_EOF, () => {
                  this._emitter.emit(c.RECOVERED_EARLY_EOF);
                }), this._transmuxer.on(b.Z.IO_ERROR, (e, t) => {
                  this._emitter.emit(c.ERROR, B.NETWORK_ERROR, e, t);
                }), this._transmuxer.on(b.Z.DEMUX_ERROR, (e, t) => {
                  this._emitter.emit(c.ERROR, B.MEDIA_ERROR, e, {
                    code: -1,
                    msg: t
                  });
                }), this._transmuxer.on(b.Z.MEDIA_INFO, e => {
                  this._mediaInfo = e, this._emitter.emit(c.MEDIA_INFO, Object.assign({}, e));
                }), this._transmuxer.on(b.Z.METADATA_ARRIVED, e => {
                  this._emitter.emit(c.METADATA_ARRIVED, e);
                }), this._transmuxer.on(b.Z.SCRIPTDATA_ARRIVED, e => {
                  this._emitter.emit(c.SCRIPTDATA_ARRIVED, e);
                }), this._transmuxer.on(b.Z.TIMED_ID3_METADATA_ARRIVED, e => {
                  this._emitter.emit(c.TIMED_ID3_METADATA_ARRIVED, e);
                }), this._transmuxer.on(b.Z.SMPTE2038_METADATA_ARRIVED, e => {
                  this._emitter.emit(c.SMPTE2038_METADATA_ARRIVED, e);
                }), this._transmuxer.on(b.Z.SCTE35_METADATA_ARRIVED, e => {
                  this._emitter.emit(c.SCTE35_METADATA_ARRIVED, e);
                }), this._transmuxer.on(b.Z.PES_PRIVATE_DATA_DESCRIPTOR, e => {
                  this._emitter.emit(c.PES_PRIVATE_DATA_DESCRIPTOR, e);
                }), this._transmuxer.on(b.Z.PES_PRIVATE_DATA_ARRIVED, e => {
                  this._emitter.emit(c.PES_PRIVATE_DATA_ARRIVED, e);
                }), this._transmuxer.on(b.Z.STATISTICS_INFO, e => {
                  this._statisticsInfo = this._fillStatisticsInfo(e), this._emitter.emit(c.STATISTICS_INFO, Object.assign({}, this._statisticsInfo));
                }), this._transmuxer.on(b.Z.RECOMMEND_SEEKPOINT, e => {
                  this._mediaElement && !this._config.accurateSeek && (this._requestSetTime = !0, this._mediaElement.currentTime = e / 1e3);
                }), this._transmuxer.open()) : this._hasPendingLoad = !0);
              }
              unload() {
                this._mediaElement && this._mediaElement.pause(), this._msectl && this._msectl.seek(0), this._transmuxer && (this._transmuxer.close(), this._transmuxer.destroy(), this._transmuxer = null);
              }
              play() {
                var e;
                return M(this, void 0, void 0, function* () {
                  return yield null === (e = this._mediaElement) || void 0 === e ? void 0 : e.play();
                });
              }
              pause() {
                var e;
                null === (e = this._mediaElement) || void 0 === e || e.pause();
              }
              get type() {
                return this._type;
              }
              get buffered() {
                var e;
                return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.buffered;
              }
              get duration() {
                var e;
                return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.duration;
              }
              get volume() {
                var e;
                return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.volume;
              }
              set volume(e) {
                this._mediaElement && (this._mediaElement.volume = e);
              }
              get muted() {
                var e;
                return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.muted;
              }
              set muted(e) {
                this._mediaElement && (this._mediaElement.muted = e);
              }
              get currentTime() {
                return this._mediaElement ? this._mediaElement.currentTime : 0;
              }
              set currentTime(e) {
                this._mediaElement ? this._internalSeek(e) : this._pendingSeekTime = e;
              }
              get mediaInfo() {
                return Object.assign({}, this._mediaInfo);
              }
              get statisticsInfo() {
                return null == this._statisticsInfo && (this._statisticsInfo = {}), this._statisticsInfo = this._fillStatisticsInfo(this._statisticsInfo), Object.assign({}, this._statisticsInfo);
              }
              _fillStatisticsInfo(e) {
                if (e.playerType = this._type, !(this._mediaElement instanceof HTMLVideoElement)) return e;
                let t = !0,
                  i = 0,
                  s = 0;
                if (this._mediaElement.getVideoPlaybackQuality) {
                  const e = this._mediaElement.getVideoPlaybackQuality();
                  i = e.totalVideoFrames, s = e.droppedVideoFrames;
                } else void 0 !== this._mediaElement.webkitDecodedFrameCount ? (i = this._mediaElement.webkitDecodedFrameCount, s = this._mediaElement.webkitDroppedFrameCount) : t = !1;
                return t && (e.decodedFrames = i, e.droppedFrames = s), e;
              }
              _onmseUpdateEnd() {
                var e, t, i, s;
                const a = null === (e = this._mediaElement) || void 0 === e ? void 0 : e.buffered,
                  n = (null === (t = this._mediaElement) || void 0 === t ? void 0 : t.currentTime) || 0;
                if (this._config.isLive && this._config.liveBufferLatencyChasing && (null == a ? void 0 : a.length) > 0 && !(null === (i = this._mediaElement) || void 0 === i ? void 0 : i.paused)) {
                  const e = a.end(a.length - 1);
                  if (e > ((null === (s = this._config) || void 0 === s ? void 0 : s.liveBufferLatencyMaxLatency) || 0) && e - n > (this._config.liveBufferLatencyMaxLatency || 0)) {
                    const t = e - (this._config.liveBufferLatencyMinRemain || 0);
                    this.currentTime = t;
                  }
                }
                if (!this._config.lazyLoad || this._config.isLive) return;
                let r = 0;
                for (let e = 0; e < a.length; e++) {
                  const t = a.start(e),
                    i = a.end(e);
                  if (t <= n && n < i) {
                    r = i;
                    break;
                  }
                }
                r >= n + (this._config.lazyLoadMaxDuration || 0) && null == this._progressChecker && (h.Z.v(this.TAG, "Maximum buffering duration exceeded, suspend transmuxing task"), this._suspendTransmuxer());
              }
              _onmseBufferFull() {
                h.Z.v(this.TAG, "MSE SourceBuffer is full, suspend transmuxing task"), null == this._progressChecker && this._suspendTransmuxer();
              }
              _suspendTransmuxer() {
                this._transmuxer && (this._transmuxer.pause(), null == this._progressChecker && (this._progressChecker = window.setInterval(this._checkProgressAndResume.bind(this), 1e3)));
              }
              _checkProgressAndResume() {
                var e, t, i;
                const s = (null === (e = this._mediaElement) || void 0 === e ? void 0 : e.currentTime) || 0,
                  a = null === (t = this._mediaElement) || void 0 === t ? void 0 : t.buffered;
                let n = !1;
                for (let e = 0; e < a.length; e++) {
                  const t = a.start(e),
                    i = a.end(e);
                  if (s >= t && s < i) {
                    s >= i - (this._config.lazyLoadRecoverDuration || 0) && (n = !0);
                    break;
                  }
                }
                n && (window.clearInterval(this._progressChecker), this._progressChecker = null, n && (h.Z.v(this.TAG, "Continue loading from paused position"), null === (i = this._transmuxer) || void 0 === i || i.resume()));
              }
              _isTimepointBuffered(e) {
                var t;
                const i = null === (t = this._mediaElement) || void 0 === t ? void 0 : t.buffered;
                for (let t = 0; t < i.length; t++) {
                  const s = i.start(t),
                    a = i.end(t);
                  if (e >= s && e < a) return !0;
                }
                return !1;
              }
              _internalSeek(e) {
                var t, i, s, a, n;
                const o = this._isTimepointBuffered(e);
                let r = !1,
                  d = 0;
                if (e < 1 && (null === (t = this._mediaElement) || void 0 === t ? void 0 : t.buffered).length > 0) {
                  const t = (null === (i = this._mediaElement) || void 0 === i ? void 0 : i.buffered).start(0);
                  (t < 1 && e < t || _.Z.safari) && (r = !0, d = _.Z.safari ? .1 : t);
                }
                if (r) this._requestSetTime = !0, this._mediaElement && (this._mediaElement.currentTime = d);else if (o) {
                  if (this._alwaysSeekKeyframe) {
                    const t = null === (s = this._msectl) || void 0 === s ? void 0 : s.getNearestKeyframe(Math.floor(1e3 * e));
                    this._requestSetTime = !0, this._mediaElement && (this._mediaElement.currentTime = null != t ? t.dts / 1e3 : e);
                  } else this._requestSetTime = !0, this._mediaElement && (this._mediaElement.currentTime = e);
                  null != this._progressChecker && this._checkProgressAndResume();
                } else null != this._progressChecker && (window.clearInterval(this._progressChecker), this._progressChecker = null), null === (a = this._msectl) || void 0 === a || a.seek(e), null === (n = this._transmuxer) || void 0 === n || n.seek(Math.floor(1e3 * e)), this._config.accurateSeek && (this._requestSetTime = !0, this._mediaElement && (this._mediaElement.currentTime = e));
              }
              _checkAndApplyUnbufferedSeekpoint() {
                var e, t, i, s;
                if (this._seekpointRecord) if (((null === (e = this._seekpointRecord) || void 0 === e ? void 0 : e.recordTime) || 0) <= this._now() - 100) {
                  const e = null === (t = this._mediaElement) || void 0 === t ? void 0 : t.currentTime;
                  this._seekpointRecord = null, this._isTimepointBuffered(e) || (null != this._progressChecker && (window.clearTimeout(this._progressChecker), this._progressChecker = null), null === (i = this._msectl) || void 0 === i || i.seek(e), null === (s = this._transmuxer) || void 0 === s || s.seek(Math.floor(1e3 * e)), this._config.accurateSeek && (this._requestSetTime = !0, this._mediaElement && (this._mediaElement.currentTime = e)));
                } else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);
              }
              _checkAndResumeStuckPlayback(e) {
                const t = this._mediaElement;
                if (e || !this._receivedCanPlay || t.readyState < 2) {
                  const e = t.buffered;
                  e.length > 0 && t.currentTime < e.start(0) && (h.Z.w(this.TAG, `Playback seems stuck at ${t.currentTime}, seek to ${e.start(0)}`), this._requestSetTime = !0, this._mediaElement && (this._mediaElement.currentTime = e.start(0), this._mediaElement.removeEventListener("progress", this.e.onvProgress)));
                } else this._mediaElement && this._mediaElement.removeEventListener("progress", this.e.onvProgress);
              }
              _onvLoadedMetadata(e) {
                null != this._pendingSeekTime && (this._mediaElement && (this._mediaElement.currentTime = this._pendingSeekTime), this._pendingSeekTime = null);
              }
              _onvSeeking(e) {
                var t, i, s;
                const a = null === (t = this._mediaElement) || void 0 === t ? void 0 : t.currentTime,
                  n = null === (i = this._mediaElement) || void 0 === i ? void 0 : i.buffered;
                if (this._requestSetTime) this._requestSetTime = !1;else {
                  if (a < 1 && n.length > 0) {
                    const e = n.start(0);
                    if (e < 1 && a < e || _.Z.safari) return this._requestSetTime = !0, void (this._mediaElement && (this._mediaElement.currentTime = _.Z.safari ? .1 : e));
                  }
                  if (this._isTimepointBuffered(a)) {
                    if (this._alwaysSeekKeyframe) {
                      const e = null === (s = this._msectl) || void 0 === s ? void 0 : s.getNearestKeyframe(Math.floor(1e3 * a));
                      null != e && (this._requestSetTime = !0, this._mediaElement && (this._mediaElement.currentTime = e.dts / 1e3));
                    }
                    null != this._progressChecker && this._checkProgressAndResume();
                  } else this._seekpointRecord = {
                    seekPoint: a,
                    recordTime: this._now()
                  }, window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this), 50);
                }
              }
              _onvCanPlay(e) {
                var t;
                this._receivedCanPlay = !0, null === (t = this._mediaElement) || void 0 === t || t.removeEventListener("canplay", this.e.onvCanPlay);
              }
              _onvStalled(e) {
                this._checkAndResumeStuckPlayback(!0);
              }
              _onvProgress(e) {
                this._checkAndResumeStuckPlayback();
              }
            };
            var P = function (e, t, i, s) {
              return new (i || (i = Promise))(function (a, n) {
                function o(e) {
                  try {
                    d(s.next(e));
                  } catch (e) {
                    n(e);
                  }
                }
                function r(e) {
                  try {
                    d(s.throw(e));
                  } catch (e) {
                    n(e);
                  }
                }
                function d(e) {
                  var t;
                  e.done ? a(e.value) : (t = e.value, t instanceof i ? t : new i(function (e) {
                    e(t);
                  })).then(o, r);
                }
                d((s = s.apply(e, t || [])).next());
              });
            };
            const x = class {
                constructor(e, t) {
                  this.TAG = "NativePlayer", this._type = "NativePlayer", this._emitter = new l.EventEmitter(), this._config = n(), "object" == typeof t && Object.assign(this._config, t);
                  const i = e.type.toLowerCase();
                  if ("mse" === i || "mpegts" === i || "m2ts" === i || "flv" === i) throw new w.OC("NativePlayer does't support mse/mpegts/m2ts/flv MediaDataSource input!");
                  if (e.hasOwnProperty("segments")) throw new w.OC(`NativePlayer(${e.type}) doesn't support multipart playback!`);
                  this.e = {
                    onvLoadedMetadata: this._onvLoadedMetadata.bind(this)
                  }, this._pendingSeekTime = null, this._statisticsReporter = null, this._mediaDataSource = e, this._mediaElement = null;
                }
                destroy() {
                  var e;
                  this._mediaElement && (this.unload(), this.detachMediaElement()), this.e = null, this._mediaDataSource = null, null === (e = this._emitter) || void 0 === e || e.removeAllListeners(), this._emitter = null;
                }
                on(e, t) {
                  e === c.MEDIA_INFO ? null != this._mediaElement && 0 !== this._mediaElement.readyState && Promise.resolve().then(() => {
                    this._emitter.emit(c.MEDIA_INFO, this.mediaInfo);
                  }) : e === c.STATISTICS_INFO && null != this._mediaElement && 0 !== this._mediaElement.readyState && Promise.resolve().then(() => {
                    this._emitter.emit(c.STATISTICS_INFO, this.statisticsInfo);
                  }), this._emitter.addListener(e, t);
                }
                off(e, t) {
                  this._emitter.removeListener(e, t);
                }
                attachMediaElement(e) {
                  if (this._mediaElement = e, e.addEventListener("loadedmetadata", this.e.onvLoadedMetadata), null != this._pendingSeekTime) try {
                    e.currentTime = this._pendingSeekTime, this._pendingSeekTime = null;
                  } catch (e) {}
                }
                detachMediaElement() {
                  this._mediaElement && (this._mediaElement.src = "", this._mediaElement.removeAttribute("src"), this._mediaElement.removeEventListener("loadedmetadata", this.e.onvLoadedMetadata), this._mediaElement = null), null != this._statisticsReporter && (window.clearInterval(this._statisticsReporter), this._statisticsReporter = null);
                }
                load() {
                  var e;
                  if (!this._mediaElement) throw new w.rT("HTMLMediaElement must be attached before load()!");
                  this._mediaElement.src = (null === (e = this._mediaDataSource) || void 0 === e ? void 0 : e.url) || "", this._mediaElement.readyState > 0 && (this._mediaElement.currentTime = 0), this._mediaElement.preload = "auto", this._mediaElement.load(), this._statisticsReporter = window.setInterval(this._reportStatisticsInfo.bind(this), this._config.statisticsInfoReportInterval);
                }
                unload() {
                  this._mediaElement && (this._mediaElement.src = "", this._mediaElement.removeAttribute("src")), null != this._statisticsReporter && (window.clearInterval(this._statisticsReporter), this._statisticsReporter = null);
                }
                play() {
                  var e;
                  return P(this, void 0, void 0, function* () {
                    return yield null === (e = this._mediaElement) || void 0 === e ? void 0 : e.play();
                  });
                }
                pause() {
                  var e;
                  null === (e = this._mediaElement) || void 0 === e || e.pause();
                }
                get type() {
                  return this._type;
                }
                get buffered() {
                  var e;
                  return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.buffered;
                }
                get duration() {
                  var e;
                  return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.duration;
                }
                get volume() {
                  var e;
                  return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.volume;
                }
                set volume(e) {
                  this._mediaElement && (this._mediaElement.volume = e);
                }
                get muted() {
                  var e;
                  return null === (e = this._mediaElement) || void 0 === e ? void 0 : e.muted;
                }
                set muted(e) {
                  this._mediaElement && (this._mediaElement.muted = e);
                }
                get currentTime() {
                  return this._mediaElement ? this._mediaElement.currentTime : 0;
                }
                set currentTime(e) {
                  this._mediaElement ? this._mediaElement.currentTime = e : this._pendingSeekTime = e;
                }
                get mediaInfo() {
                  const e = {
                    mimeType: (this._mediaElement instanceof HTMLAudioElement ? "audio/" : "video/") + this._mediaDataSource.type
                  };
                  return this._mediaElement && (e.duration = Math.floor(1e3 * this._mediaElement.duration), this._mediaElement instanceof HTMLVideoElement && (e.width = this._mediaElement.videoWidth, e.height = this._mediaElement.videoHeight)), e;
                }
                get statisticsInfo() {
                  const e = {
                    playerType: this._type,
                    url: this._mediaDataSource.url
                  };
                  if (!(this._mediaElement instanceof HTMLVideoElement)) return e;
                  let t = !0,
                    i = 0,
                    s = 0;
                  if (this._mediaElement.getVideoPlaybackQuality) {
                    const e = this._mediaElement.getVideoPlaybackQuality();
                    i = e.totalVideoFrames, s = e.droppedVideoFrames;
                  } else void 0 !== this._mediaElement.webkitDecodedFrameCount ? (i = this._mediaElement.webkitDecodedFrameCount, s = this._mediaElement.webkitDroppedFrameCount) : t = !1;
                  return t && (e.decodedFrames = i, e.droppedFrames = s), e;
                }
                _onvLoadedMetadata(e) {
                  null != this._pendingSeekTime && (this._mediaElement && (this._mediaElement.currentTime = this._pendingSeekTime), this._pendingSeekTime = null), this._emitter.emit(c.MEDIA_INFO, this.mediaInfo);
                }
                _reportStatisticsInfo() {
                  this._emitter.emit(c.STATISTICS_INFO, this.statisticsInfo);
                }
              },
              U = {
                h264: 1,
                h265: 2,
                h266: 4,
                vp8: 8,
                vp9: 16,
                av1: 32
              },
              Z = ["h264", "h265"],
              N = e => {
                const t = e.split("?"),
                  i = new URLSearchParams(t[1]);
                return i.delete("vc"), i.set("vc", Z.reduce((e, t) => e + (U[t] || 0), 0).toString()), t[0] + "?" + i.toString();
              };
            const G = {
              createPlayer: function (e, t) {
                (null == e ? void 0 : e.url) && (e.url = N(e.url));
                const i = e;
                if (null == i || "object" != typeof i) throw new w.OC("MediaDataSource must be an javascript object!");
                if (!Object.prototype.hasOwnProperty.call(i, "type")) throw new w.OC("MediaDataSource must has type field to indicate video file type!");
                switch (i.type) {
                  case "mse":
                  case "mpegts":
                  case "m2ts":
                  case "flv":
                    return new O(i, t);
                  default:
                    return new x(i, t);
                }
              },
              isSupported: function () {
                return r.supportMSEH264Playback();
              },
              getFeatureList: function () {
                return r.getFeatureList();
              },
              BaseLoader: d.fp,
              LoaderStatus: d.GM,
              LoaderErrors: d.nm,
              version: "",
              Events: c,
              ErrorTypes: B,
              ErrorDetails: I,
              MSEPlayer: O,
              NativePlayer: x,
              LoggingControl: y.Z
            };
            Object.defineProperty(G, "version", {
              enumerable: !0,
              get: function () {
                return "2.0.0";
              }
            });
            const V = G;
          },
          607: (e, t, i) => {
            e.exports = i(578).default;
          },
          575: (e, t, i) => {

            i.d(t, {
              Z: () => v
            });
            var s = i(645);
            const a = class {
              constructor() {
                var e;
                this._firstCheckpoint = 0, this._lastCheckpoint = 0, this._intervalBytes = 0, this._totalBytes = 0, this._lastSecondBytes = 0, (null === (e = self.performance) || void 0 === e ? void 0 : e.now) ? this._now = self.performance.now.bind(self.performance) : this._now = Date.now;
              }
              reset() {
                this._firstCheckpoint = this._lastCheckpoint = 0, this._totalBytes = this._intervalBytes = 0, this._lastSecondBytes = 0;
              }
              addBytes(e) {
                0 === this._firstCheckpoint ? (this._firstCheckpoint = this._now(), this._lastCheckpoint = this._firstCheckpoint, this._intervalBytes += e, this._totalBytes += e) : this._now() - this._lastCheckpoint < 1e3 ? (this._intervalBytes += e, this._totalBytes += e) : (this._lastSecondBytes = this._intervalBytes, this._intervalBytes = e, this._totalBytes += e, this._lastCheckpoint = this._now());
              }
              get currentKBps() {
                this.addBytes(0);
                let e = (this._now() - this._lastCheckpoint) / 1e3;
                return 0 === e && (e = 1), this._intervalBytes / e / 1024;
              }
              get lastSecondKBps() {
                return this.addBytes(0), 0 !== this._lastSecondBytes ? this._lastSecondBytes / 1024 : this._now() - this._lastCheckpoint >= 500 ? this.currentKBps : 0;
              }
              get averageKBps() {
                const e = (this._now() - this._firstCheckpoint) / 1e3;
                return this._totalBytes / e / 1024;
              }
            };
            var n = i(108),
              o = i(479),
              r = i(411);
            class d extends n.fp {
              static isSupported() {
                var e;
                try {
                  const t = o.Z.msedge && ((null === (e = null === o.Z || void 0 === o.Z ? void 0 : o.Z.version) || void 0 === e ? void 0 : e.minor) || 0) >= 15048 && !o.Z.webkit,
                    i = !o.Z.msedge || t;
                  return self.fetch && self.ReadableStream && i;
                } catch (e) {
                  return !1;
                }
              }
              constructor(e, t) {
                super("fetch-stream-loader"), this.TAG = "FetchStreamLoader", this._seekHandler = e, this._config = t, this._needStash = !0, this._requestAbort = !1, this._abortController = null, this._contentLength = null, this._receivedLength = 0;
              }
              destroy() {
                this.isWorking() && this.abort(), super.destroy();
              }
              open(e, t) {
                this._dataSource = e, this._range = t;
                let i = e.url;
                this._config.reuseRedirectedURL && void 0 !== e.redirectedURL && (i = e.redirectedURL);
                const s = this._seekHandler.getConfig(i, t),
                  a = new self.Headers();
                if ("object" == typeof s.headers) {
                  const e = s.headers;
                  for (const t in e) e.hasOwnProperty(t) && a.append(t, e[t]);
                }
                const o = {
                  method: "GET",
                  headers: a,
                  mode: "cors",
                  cache: "default",
                  referrerPolicy: "no-referrer-when-downgrade"
                };
                if ("object" == typeof this._config.headers) for (const e in this._config.headers) a.append(e, this._config.headers[e]);
                e.cors || (o.mode = "same-origin"), e.withCredentials && (o.credentials = "include"), (null == e ? void 0 : e.referrerPolicy) && (o.referrerPolicy = e.referrerPolicy), self.AbortController && (this._abortController = new self.AbortController(), this._abortController && (o.signal = this._abortController.signal)), this._status = n.GM.kConnecting, self.fetch(s.url, o).then(e => {
                  var t, i;
                  if (this._requestAbort) return this._status = n.GM.kIdle, void (null === (t = e.body) || void 0 === t || t.cancel());
                  if (e.ok && e.status >= 200 && e.status <= 299) {
                    if (e.url !== s.url && this._onURLRedirect) {
                      const t = this._seekHandler.removeURLParameters(e.url);
                      this._onURLRedirect(t);
                    }
                    const t = e.headers.get("Content-Length");
                    return null != t && (this._contentLength = parseInt(t), 0 !== this._contentLength && this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength)), this._pump.call(this, null === (i = e.body) || void 0 === i ? void 0 : i.getReader());
                  }
                  if (this._status = n.GM.kError, !this._onError) throw new r.OZ("FetchStreamLoader: Http code invalid, " + e.status + " " + e.statusText);
                  this._onError(n.nm.HTTP_STATUS_CODE_INVALID, {
                    code: e.status,
                    msg: e.statusText
                  });
                }).catch(e => {
                  var t;
                  if (!(null === (t = this._abortController) || void 0 === t ? void 0 : t.signal.aborted)) {
                    if (this._status = n.GM.kError, !this._onError) throw e;
                    this._onError(n.nm.EXCEPTION, {
                      code: -1,
                      msg: e.message
                    });
                  }
                });
              }
              abort() {
                var e;
                if (this._requestAbort = !0, (this._status !== n.GM.kBuffering || !o.Z.chrome) && this._abortController) try {
                  null === (e = this._abortController) || void 0 === e || e.abort();
                } catch (e) {}
              }
              _pump(e) {
                return e.read().then(t => {
                  var i, s, a, o;
                  if (t.done) {
                    if (null !== this._contentLength && this._receivedLength < this._contentLength) {
                      this._status = n.GM.kError;
                      const e = n.nm.EARLY_EOF,
                        t = {
                          code: -1,
                          msg: "Fetch stream meet Early-EOF"
                        };
                      if (!this._onError) throw new r.OZ(t.msg);
                      this._onError(e, t);
                    } else this._status = n.GM.kComplete, this._onComplete && this._onComplete((null === (i = this._range) || void 0 === i ? void 0 : i.from) || 0, ((null === (s = this._range) || void 0 === s ? void 0 : s.from) || 0) + this._receivedLength - 1);
                  } else {
                    if (null === (a = this._abortController) || void 0 === a ? void 0 : a.signal.aborted) return void (this._status = n.GM.kComplete);
                    if (this._requestAbort) return this._status = n.GM.kComplete, e.cancel();
                    this._status = n.GM.kBuffering;
                    const i = t.value.buffer,
                      s = ((null === (o = this._range) || void 0 === o ? void 0 : o.from) || 0) + this._receivedLength;
                    this._receivedLength += i.byteLength, this._onDataArrival && this._onDataArrival(i, s, this._receivedLength), this._pump(e);
                  }
                }).catch(e => {
                  var t, i;
                  if (null === (i = null === (t = this._abortController) || void 0 === t ? void 0 : t.signal) || void 0 === i ? void 0 : i.aborted) return void (this._status = n.GM.kComplete);
                  if (11 === e.code && o.Z.msedge) return;
                  this._status = n.GM.kError;
                  let s = 0,
                    a = null;
                  if (19 !== e.code && "network error" !== e.message || !(null === this._contentLength || null !== this._contentLength && this._receivedLength < this._contentLength) ? (s = n.nm.EXCEPTION, a = {
                    code: e.code,
                    msg: e.message
                  }) : (s = n.nm.EARLY_EOF, a = {
                    code: e.code,
                    msg: "Fetch stream meet Early-EOF"
                  }), !this._onError) throw new r.OZ(a.msg);
                  this._onError(s, a);
                });
              }
            }
            const l = d;
            class h extends n.fp {
              static isSupported() {
                try {
                  const e = new XMLHttpRequest();
                  return e.open("GET", "https://example.com", !0), e.responseType = "moz-chunked-arraybuffer", "moz-chunked-arraybuffer" === e.responseType;
                } catch (e) {
                  return s.Z.w("MozChunkedLoader", e.message), !1;
                }
              }
              constructor(e, t) {
                super("xhr-moz-chunked-loader"), this.TAG = "MozChunkedLoader", this._seekHandler = e, this._config = t, this._needStash = !0, this._xhr = null, this._requestAbort = !1, this._contentLength = null, this._receivedLength = 0;
              }
              destroy() {
                this.isWorking() && this.abort(), this._xhr && (this._xhr.onreadystatechange = null, this._xhr.onprogress = null, this._xhr.onloadend = null, this._xhr.onerror = null, this._xhr = null), super.destroy();
              }
              open(e, t) {
                this._dataSource = e, this._range = t;
                let i = e.url;
                this._config.reuseRedirectedURL && void 0 !== e.redirectedURL && (i = e.redirectedURL);
                const s = this._seekHandler.getConfig(i, t);
                this._requestURL = s.url;
                const a = this._xhr = new XMLHttpRequest();
                if (a.open("GET", s.url, !0), a.responseType = "moz-chunked-arraybuffer", a.onreadystatechange = this._onReadyStateChange.bind(this), a.onprogress = this._onProgress.bind(this), a.onloadend = this._onLoadEnd.bind(this), a.onerror = this._onXhrError.bind(this), e.withCredentials && (a.withCredentials = !0), "object" == typeof s.headers) {
                  const e = s.headers;
                  for (const t in e) e.hasOwnProperty(t) && a.setRequestHeader(t, e[t]);
                }
                if ("object" == typeof this._config.headers) {
                  const e = this._config.headers;
                  for (const t in e) e.hasOwnProperty(t) && a.setRequestHeader(t, e[t]);
                }
                this._status = n.GM.kConnecting, a.send();
              }
              abort() {
                this._requestAbort = !0, this._xhr && this._xhr.abort(), this._status = n.GM.kComplete;
              }
              _onReadyStateChange(e) {
                const t = e.target;
                if (2 === t.readyState) {
                  if (void 0 !== t.responseURL && t.responseURL !== this._requestURL && this._onURLRedirect) {
                    const e = this._seekHandler.removeURLParameters(t.responseURL);
                    this._onURLRedirect(e);
                  }
                  if (0 !== t.status && (t.status < 200 || t.status > 299)) {
                    if (this._status = n.GM.kError, !this._onError) throw new r.OZ("MozChunkedLoader: Http code invalid, " + t.status + " " + t.statusText);
                    this._onError(n.nm.HTTP_STATUS_CODE_INVALID, {
                      code: t.status,
                      msg: t.statusText
                    });
                  } else this._status = n.GM.kBuffering;
                }
              }
              _onProgress(e) {
                var t;
                if (this._status === n.GM.kError) return;
                null === this._contentLength && null !== e.total && 0 !== e.total && (this._contentLength = e.total, this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength));
                const i = e.target.response,
                  s = ((null === (t = this._range) || void 0 === t ? void 0 : t.from) || 0) + this._receivedLength;
                this._receivedLength += i.byteLength, this._onDataArrival && this._onDataArrival(i, s, this._receivedLength);
              }
              _onLoadEnd(e) {
                this._requestAbort ? this._requestAbort = !1 : this._status !== n.GM.kError && (this._status = n.GM.kComplete, this._onComplete && this._onComplete(this._range.from, this._range.from + this._receivedLength - 1));
              }
              _onXhrError(e) {
                this._status = n.GM.kError;
                let t = 0,
                  i = null;
                if (this._contentLength && e.loaded < this._contentLength ? (t = n.nm.EARLY_EOF, i = {
                  code: -1,
                  msg: "Moz-Chunked stream meet Early-Eof"
                }) : (t = n.nm.EXCEPTION, i = {
                  code: -1,
                  msg: e.constructor.name + " " + e.type
                }), !this._onError) throw new r.OZ(i.msg);
                this._onError(t, i);
              }
            }
            const _ = h;
            class c extends n.fp {
              static isSupported() {
                try {
                  const e = new XMLHttpRequest();
                  return e.open("GET", "https://example.com", !0), e.responseType = "arraybuffer", "arraybuffer" === e.responseType;
                } catch (e) {
                  return s.Z.w("RangeLoader", e.message), !1;
                }
              }
              constructor(e, t) {
                super("xhr-range-loader"), this.TAG = "RangeLoader", this._seekHandler = e, this._config = t, this._needStash = !1, this._chunkSizeKBList = [128, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 5120, 6144, 7168, 8192], this._currentChunkSizeKB = 384, this._currentSpeedNormalized = 0, this._zeroSpeedChunkCount = 0, this._xhr = null, this._speedSampler = new a(), this._requestAbort = !1, this._waitForTotalLength = !1, this._totalLengthReceived = !1, this._currentRequestURL = null, this._currentRedirectedURL = null, this._currentRequestRange = null, this._totalLength = null, this._contentLength = null, this._receivedLength = 0, this._lastTimeLoaded = 0;
              }
              destroy() {
                this.isWorking() && this.abort(), this._xhr && (this._xhr.onreadystatechange = null, this._xhr.onprogress = null, this._xhr.onload = null, this._xhr.onerror = null, this._xhr = null), super.destroy();
              }
              get currentSpeed() {
                return this._speedSampler.lastSecondKBps;
              }
              open(e, t) {
                this._dataSource = e, this._range = t, this._status = n.GM.kConnecting;
                let i = !1;
                null != this._dataSource.filesize && 0 !== this._dataSource.filesize && (i = !0, this._totalLength = this._dataSource.filesize), this._totalLengthReceived || i ? this._openSubRange() : (this._waitForTotalLength = !0, this._internalOpen(this._dataSource, {
                  from: 0,
                  to: -1
                }));
              }
              _openSubRange() {
                var e, t;
                const i = 1024 * this._currentChunkSizeKB,
                  s = ((null === (e = this._range) || void 0 === e ? void 0 : e.from) || 0) + this._receivedLength;
                let a = s + i;
                null != this._contentLength && a - this._range.from >= this._contentLength && (a = ((null === (t = this._range) || void 0 === t ? void 0 : t.from) || 0) + this._contentLength - 1), this._currentRequestRange = {
                  from: s,
                  to: a
                }, this._internalOpen(this._dataSource, this._currentRequestRange);
              }
              _internalOpen(e, t) {
                this._lastTimeLoaded = 0;
                let i = e.url;
                this._config.reuseRedirectedURL && (null != this._currentRedirectedURL ? i = this._currentRedirectedURL : null != e.redirectedURL && (i = e.redirectedURL));
                const s = this._seekHandler.getConfig(i, t);
                this._currentRequestURL = s.url;
                const a = this._xhr = new XMLHttpRequest();
                if (a.open("GET", s.url, !0), a.responseType = "arraybuffer", a.onreadystatechange = this._onReadyStateChange.bind(this), a.onprogress = this._onProgress.bind(this), a.onload = this._onLoad.bind(this), a.onerror = this._onXhrError.bind(this), e.withCredentials && (a.withCredentials = !0), "object" == typeof s.headers) {
                  const e = s.headers;
                  for (const t in e) e.hasOwnProperty(t) && a.setRequestHeader(t, e[t]);
                }
                if ("object" == typeof this._config.headers) {
                  const e = this._config.headers;
                  for (const t in e) e.hasOwnProperty(t) && a.setRequestHeader(t, e[t]);
                }
                a.send();
              }
              abort() {
                this._requestAbort = !0, this._internalAbort(), this._status = n.GM.kComplete;
              }
              _internalAbort() {
                this._xhr && (this._xhr.onreadystatechange = null, this._xhr.onprogress = null, this._xhr.onload = null, this._xhr.onerror = null, this._xhr.abort(), this._xhr = null);
              }
              _onReadyStateChange(e) {
                const t = e.target;
                if (2 === t.readyState) {
                  if (null != t.responseURL) {
                    const e = this._seekHandler.removeURLParameters(t.responseURL);
                    t.responseURL !== this._currentRequestURL && e !== this._currentRedirectedURL && (this._currentRedirectedURL = e, this._onURLRedirect && this._onURLRedirect(e));
                  }
                  if (t.status >= 200 && t.status <= 299) {
                    if (this._waitForTotalLength) return;
                    this._status = n.GM.kBuffering;
                  } else {
                    if (this._status = n.GM.kError, !this._onError) throw new r.OZ("RangeLoader: Http code invalid, " + t.status + " " + t.statusText);
                    this._onError(n.nm.HTTP_STATUS_CODE_INVALID, {
                      code: t.status,
                      msg: t.statusText
                    });
                  }
                }
              }
              _onProgress(e) {
                if (this._status === n.GM.kError) return;
                if (null === this._contentLength) {
                  let t = !1;
                  if (this._waitForTotalLength) {
                    this._waitForTotalLength = !1, this._totalLengthReceived = !0, t = !0;
                    const i = e.total;
                    this._internalAbort(), null != i && 0 !== i && (this._totalLength = i);
                  }
                  if (-1 === this._range.to ? this._contentLength = (this._totalLength || 0) - this._range.from : this._contentLength = this._range.to - this._range.from + 1, t) return void this._openSubRange();
                  this._onContentLengthKnown && this._onContentLengthKnown(this._contentLength);
                }
                const t = e.loaded - this._lastTimeLoaded;
                this._lastTimeLoaded = e.loaded, this._speedSampler.addBytes(t);
              }
              _normalizeSpeed(e) {
                const t = this._chunkSizeKBList,
                  i = t.length - 1;
                let s = 0,
                  a = 0,
                  n = i;
                if (e < t[0]) return t[0];
                for (; a <= n;) {
                  if (s = a + Math.floor((n - a) / 2), s === i || e >= t[s] && e < t[s + 1]) return t[s];
                  t[s] < e ? a = s + 1 : n = s - 1;
                }
              }
              _onLoad(e) {
                if (this._status === n.GM.kError) return;
                if (this._waitForTotalLength) return void (this._waitForTotalLength = !1);
                this._lastTimeLoaded = 0;
                let t = this._speedSampler.lastSecondKBps;
                if (0 === t && (this._zeroSpeedChunkCount++, this._zeroSpeedChunkCount >= 3 && (t = this._speedSampler.currentKBps)), 0 !== t) {
                  const e = this._normalizeSpeed(t);
                  this._currentSpeedNormalized !== e && (this._currentSpeedNormalized = e, this._currentChunkSizeKB = e);
                }
                const i = e.target.response,
                  s = this._range.from + this._receivedLength;
                this._receivedLength += i.byteLength;
                let a = !1;
                null != this._contentLength && this._receivedLength < this._contentLength ? this._openSubRange() : a = !0, this._onDataArrival && this._onDataArrival(i, s, this._receivedLength), a && (this._status = n.GM.kComplete, this._onComplete && this._onComplete(this._range.from, this._range.from + this._receivedLength - 1));
              }
              _onXhrError(e) {
                this._status = n.GM.kError;
                let t = 0,
                  i = null;
                if (this._contentLength && this._receivedLength > 0 && this._receivedLength < this._contentLength ? (t = n.nm.EARLY_EOF, i = {
                  code: -1,
                  msg: "RangeLoader meet Early-Eof"
                }) : (t = n.nm.EXCEPTION, i = {
                  code: -1,
                  msg: e.constructor.name + " " + e.type
                }), !this._onError) throw new r.OZ(i.msg);
                this._onError(t, i);
              }
            }
            const u = c;
            class m extends n.fp {
              static isSupported() {
                try {
                  return void 0 !== self.WebSocket;
                } catch (e) {
                  return !1;
                }
              }
              constructor(e, t) {
                super("websocket-loader"), this.TAG = "WebSocketLoader", this._needStash = !0, this._ws = null, this._requestAbort = !1, this._receivedLength = 0;
              }
              destroy() {
                this._ws && this.abort(), super.destroy();
              }
              open(e) {
                try {
                  const t = this._ws = new self.WebSocket(e.url);
                  t.binaryType = "arraybuffer", t.onopen = this._onWebSocketOpen.bind(this), t.onclose = this._onWebSocketClose.bind(this), t.onmessage = this._onWebSocketMessage.bind(this), t.onerror = this._onWebSocketError.bind(this), this._status = n.GM.kConnecting;
                } catch (e) {
                  this._status = n.GM.kError;
                  const t = {
                    code: e.code,
                    msg: e.message
                  };
                  if (!this._onError) throw new r.OZ(t.msg);
                  this._onError(n.nm.EXCEPTION, t);
                }
              }
              abort() {
                const e = this._ws;
                !e || 0 !== e.readyState && 1 !== e.readyState || (this._requestAbort = !0, e.close()), this._ws = null, this._status = n.GM.kComplete;
              }
              _onWebSocketOpen(e) {
                this._status = n.GM.kBuffering;
              }
              _onWebSocketClose(e) {
                this._requestAbort ? this._requestAbort = !1 : (this._status = n.GM.kComplete, this._onComplete && this._onComplete(0, this._receivedLength - 1));
              }
              _onWebSocketMessage(e) {
                if (e.data instanceof ArrayBuffer) this._dispatchArrayBuffer(e.data);else if (e.data instanceof Blob) {
                  const t = new FileReader();
                  t.onload = () => {
                    this._dispatchArrayBuffer(null == t ? void 0 : t.result);
                  }, t.readAsArrayBuffer(e.data);
                } else {
                  this._status = n.GM.kError;
                  const t = {
                    code: -1,
                    msg: "Unsupported WebSocket message type: " + e.data.constructor.name
                  };
                  if (!this._onError) throw new r.OZ(t.msg);
                  this._onError(n.nm.EXCEPTION, t);
                }
              }
              _dispatchArrayBuffer(e) {
                const t = e,
                  i = this._receivedLength;
                this._receivedLength += t.byteLength, this._onDataArrival && this._onDataArrival(t, i, this._receivedLength);
              }
              _onWebSocketError(e) {
                this._status = n.GM.kError;
                const t = {
                  code: e.code,
                  msg: e.message
                };
                if (!this._onError) throw new r.OZ(t.msg);
                this._onError(n.nm.EXCEPTION, t);
              }
            }
            const f = m;
            const p = class {
              constructor(e) {
                this._zeroStart = e || !1;
              }
              getConfig(e, t) {
                const i = {};
                if (0 !== t.from || -1 !== t.to) {
                  let e;
                  e = -1 !== t.to ? `bytes=${t.from.toString()}-${t.to.toString()}` : `bytes=${t.from.toString()}-`, i.Range = e;
                } else this._zeroStart && (i.Range = "bytes=0-");
                return {
                  url: e,
                  headers: i
                };
              }
              removeURLParameters(e) {
                return e;
              }
            };
            const g = class {
              constructor(e, t) {
                this._startName = e, this._endName = t;
              }
              getConfig(e, t) {
                let i = e;
                if (0 !== t.from || -1 !== t.to) {
                  let e = !0;
                  i.includes("?") || (i += "?", e = !1), e && (i += "&"), i += `${this._startName}=${t.from.toString()}`, -1 !== t.to && (i += `&${this._endName}=${t.to.toString()}`);
                }
                return {
                  url: i,
                  headers: {}
                };
              }
              removeURLParameters(e) {
                const t = e.split("?")[0];
                let i;
                const s = e.indexOf("?");
                -1 !== s && (i = e.substring(s + 1));
                let a = "";
                if (void 0 !== i && i.length > 0) {
                  const e = i.split("&");
                  for (let t = 0; t < e.length; t++) {
                    const i = e[t].split("="),
                      s = t > 0;
                    i[0] !== this._startName && i[0] !== this._endName && (s && (a += "&"), a += e[t]);
                  }
                }
                return 0 === a.length ? t : t + "?" + a;
              }
            };
            const v = class {
              constructor(e, t, i) {
                this.TAG = "IOController", this._config = t, this._extraData = i, this._stashInitialSize = 65536, void 0 !== t.stashInitialSize && t.stashInitialSize > 0 && (this._stashInitialSize = t.stashInitialSize), this._stashUsed = 0, this._stashSize = this._stashInitialSize, this._bufferSize = 3145728, this._stashBuffer = new ArrayBuffer(this._bufferSize), this._stashByteStart = 0, this._enableStash = !0, t.enableStashBuffer || (this._enableStash = !1), this._loader = null, this._loaderClass = null, this._seekHandler = null, this._dataSource = e, this._isWebSocketURL = /wss?:\/\/(.+?)/.test(e.url || ""), this._refTotalLength = e.filesize ? e.filesize : null, this._totalLength = this._refTotalLength, this._fullRequestFlag = !1, this._currentRange = null, this._redirectedURL = null, this._speedNormalized = 0, this._speedSampler = new a(), this._speedNormalizeList = [32, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096], this._isEarlyEofReconnecting = !1, this._paused = !1, this._resumeFrom = 0, this._onDataArrival = null, this._onSeeked = null, this._onError = null, this._onComplete = null, this._onRedirect = null, this._onRecoveredEarlyEof = null, this._selectSeekHandler(), this._selectLoader(), this._createLoader();
              }
              destroy() {
                var e, t, i;
                (null === (e = this._loader) || void 0 === e ? void 0 : e.isWorking()) && (null === (t = this._loader) || void 0 === t || t.abort()), null === (i = this._loader) || void 0 === i || i.destroy(), this._loader = null, this._loaderClass = null, this._dataSource = null, this._stashBuffer = null, this._stashUsed = this._stashSize = this._bufferSize = this._stashByteStart = 0, this._currentRange = null, this._speedSampler = null, this._isEarlyEofReconnecting = !1, this._onDataArrival = null, this._onSeeked = null, this._onError = null, this._onComplete = null, this._onRedirect = null, this._onRecoveredEarlyEof = null, this._extraData = null;
              }
              isWorking() {
                var e;
                return (null === (e = this._loader) || void 0 === e ? void 0 : e.isWorking()) && !this._paused;
              }
              isPaused() {
                return this._paused;
              }
              get status() {
                var e;
                return null === (e = this._loader) || void 0 === e ? void 0 : e.status;
              }
              get extraData() {
                return this._extraData;
              }
              set extraData(e) {
                this._extraData = e;
              }
              get onDataArrival() {
                return this._onDataArrival;
              }
              set onDataArrival(e) {
                this._onDataArrival = e;
              }
              get onSeeked() {
                return this._onSeeked;
              }
              set onSeeked(e) {
                this._onSeeked = e;
              }
              get onError() {
                return this._onError;
              }
              set onError(e) {
                this._onError = e;
              }
              get onComplete() {
                return this._onComplete;
              }
              set onComplete(e) {
                this._onComplete = e;
              }
              get onRedirect() {
                return this._onRedirect;
              }
              set onRedirect(e) {
                this._onRedirect = e;
              }
              get onRecoveredEarlyEof() {
                return this._onRecoveredEarlyEof;
              }
              set onRecoveredEarlyEof(e) {
                this._onRecoveredEarlyEof = e;
              }
              get currentURL() {
                var e;
                return null === (e = this._dataSource) || void 0 === e ? void 0 : e.url;
              }
              get hasRedirect() {
                var e;
                return null != this._redirectedURL || void 0 !== (null === (e = this._dataSource) || void 0 === e ? void 0 : e.redirectedURL);
              }
              get currentRedirectedURL() {
                var e;
                return this._redirectedURL || (null === (e = this._dataSource) || void 0 === e ? void 0 : e.redirectedURL);
              }
              get currentSpeed() {
                var e, t;
                return this._loaderClass === u ? null === (e = this._loader) || void 0 === e ? void 0 : e.currentSpeed : null === (t = this._speedSampler) || void 0 === t ? void 0 : t.lastSecondKBps;
              }
              get loaderType() {
                var e;
                return null === (e = this._loader) || void 0 === e ? void 0 : e.type;
              }
              _selectSeekHandler() {
                const e = this._config;
                if ("range" === e.seekType) this._seekHandler = new p(!!this._config.rangeLoadZeroStart);else if ("param" === e.seekType) {
                  const t = e.seekParamStart || "bstart",
                    i = e.seekParamEnd || "bend";
                  this._seekHandler = new g(t, i);
                } else {
                  if ("custom" !== e.seekType) throw new r.OC(`Invalid seekType in config: ${(null == e ? void 0 : e.seekType) || ""}`);
                  if ("function" != typeof e.customSeekHandler) throw new r.OC("Custom seekType specified in config but invalid customSeekHandler!");
                  this._seekHandler = new e.customSeekHandler();
                }
              }
              _selectLoader() {
                var e;
                if (null != this._config.customLoader) this._loaderClass = (null === (e = this._config) || void 0 === e ? void 0 : e.customLoader) || null;else if (this._isWebSocketURL) this._loaderClass = f;else if (l.isSupported()) this._loaderClass = l;else if (_.isSupported()) this._loaderClass = _;else {
                  if (!u.isSupported()) throw new r.OZ("Your browser doesn't support xhr with arraybuffer responseType!");
                  this._loaderClass = u;
                }
              }
              _createLoader() {
                var e;
                this._loaderClass && (this._loader = new this._loaderClass(this._seekHandler, this._config), (null === (e = this._loader) || void 0 === e ? void 0 : e.needStashBuffer) || (this._enableStash = !1), this._loader && (this._loader.onContentLengthKnown = this._onContentLengthKnown.bind(this), this._loader.onURLRedirect = this._onURLRedirect.bind(this), this._loader.onDataArrival = this._onLoaderChunkArrival.bind(this), this._loader.onComplete = this._onLoaderComplete.bind(this), this._loader.onError = this._onLoaderError.bind(this)));
              }
              open(e) {
                var t, i;
                this._currentRange = {
                  from: 0,
                  to: -1
                }, e && (this._currentRange.from = e), null === (t = this._speedSampler) || void 0 === t || t.reset(), e || (this._fullRequestFlag = !0), null === (i = this._loader) || void 0 === i || i.open(this._dataSource, Object.assign({}, this._currentRange));
              }
              abort() {
                var e;
                null === (e = this._loader) || void 0 === e || e.abort(), this._paused && (this._paused = !1, this._resumeFrom = 0);
              }
              pause() {
                var e, t;
                this.isWorking() && (null === (e = this._loader) || void 0 === e || e.abort(), 0 !== this._stashUsed ? (this._resumeFrom = this._stashByteStart, this._currentRange && (this._currentRange.to = this._stashByteStart - 1)) : this._resumeFrom = ((null === (t = this._currentRange) || void 0 === t ? void 0 : t.to) || 0) + 1, this._stashUsed = 0, this._stashByteStart = 0, this._paused = !0);
              }
              resume() {
                if (this._paused) {
                  this._paused = !1;
                  const e = this._resumeFrom;
                  this._resumeFrom = 0, this._internalSeek(e, !0);
                }
              }
              seek(e) {
                this._paused = !1, this._stashUsed = 0, this._stashByteStart = 0, this._internalSeek(e, !0);
              }
              _internalSeek(e, t) {
                var i, s, a, n;
                (null === (i = this._loader) || void 0 === i ? void 0 : i.isWorking()) && (null === (s = this._loader) || void 0 === s || s.abort()), this._flushStashBuffer(t), null === (a = this._loader) || void 0 === a || a.destroy(), this._loader = null;
                const o = {
                  from: e,
                  to: -1
                };
                this._currentRange = {
                  from: o.from,
                  to: -1
                }, null === (n = this._speedSampler) || void 0 === n || n.reset(), this._stashSize = this._stashInitialSize, this._createLoader(), this._loader.open(this._dataSource, o), this._onSeeked && this._onSeeked();
              }
              updateUrl(e) {
                if (!e || "string" != typeof e || 0 === e.length) throw new r.OC("Url must be a non-empty string!");
                this._dataSource.url = e;
              }
              _expandBuffer(e) {
                let t = this._stashSize;
                for (; t + 1048576 < e;) t *= 2;
                if (t += 1048576, t === this._bufferSize) return;
                const i = new ArrayBuffer(t);
                if (this._stashUsed > 0) {
                  const e = new Uint8Array(this._stashBuffer, 0, this._stashUsed);
                  new Uint8Array(i, 0, t).set(e, 0);
                }
                this._stashBuffer = i, this._bufferSize = t;
              }
              _normalizeSpeed(e) {
                const t = this._speedNormalizeList,
                  i = t.length - 1;
                let s = 0,
                  a = 0,
                  n = i;
                if (e < t[0]) return t[0];
                for (; a <= n;) {
                  if (s = a + Math.floor((n - a) / 2), s === i || e >= t[s] && e < t[s + 1]) return t[s];
                  t[s] < e ? a = s + 1 : n = s - 1;
                }
              }
              _adjustStashSize(e) {
                let t = 0;
                t = this._config.isLive ? e / 8 : e < 512 ? e : e >= 512 && e <= 1024 ? Math.floor(1.5 * e) : 2 * e, t > 8192 && (t = 8192);
                const i = 1024 * t + 1048576;
                this._bufferSize < i && this._expandBuffer(i), this._stashSize = 1024 * t;
              }
              _dispatchChunks(e, t) {
                return this._currentRange && (this._currentRange.to = t + e.byteLength - 1), this._onDataArrival ? this._onDataArrival(e, t) : 0;
              }
              _onURLRedirect(e) {
                this._redirectedURL = e, this._onRedirect && this._onRedirect(e);
              }
              _onContentLengthKnown(e) {
                e && this._fullRequestFlag && (this._totalLength = e, this._fullRequestFlag = !1);
              }
              _onLoaderChunkArrival(e, t, i) {
                var s, a;
                if (!this._onDataArrival) throw new r.rT("IOController: No existing consumer (onDataArrival) callback!");
                if (this._paused) return;
                this._isEarlyEofReconnecting && (this._isEarlyEofReconnecting = !1, this._onRecoveredEarlyEof && this._onRecoveredEarlyEof()), null === (s = this._speedSampler) || void 0 === s || s.addBytes(e.byteLength);
                const n = null === (a = this._speedSampler) || void 0 === a ? void 0 : a.lastSecondKBps;
                if (0 !== n) {
                  const e = this._normalizeSpeed(n);
                  this._speedNormalized !== e && (this._speedNormalized = e, this._adjustStashSize(e));
                }
                if (this._enableStash) {
                  if (0 === this._stashUsed && 0 === this._stashByteStart && (this._stashByteStart = t), this._stashUsed + e.byteLength <= this._stashSize) {
                    new Uint8Array(this._stashBuffer, 0, this._stashSize).set(new Uint8Array(e), this._stashUsed), this._stashUsed += e.byteLength;
                  } else {
                    let i = new Uint8Array(this._stashBuffer, 0, this._bufferSize);
                    if (this._stashUsed > 0) {
                      const t = this._stashBuffer.slice(0, this._stashUsed),
                        s = this._dispatchChunks(t, this._stashByteStart);
                      if (s < t.byteLength) {
                        if (s > 0) {
                          const e = new Uint8Array(t, s);
                          i.set(e, 0), this._stashUsed = e.byteLength, this._stashByteStart += s;
                        }
                      } else this._stashUsed = 0, this._stashByteStart += s;
                      this._stashUsed + e.byteLength > this._bufferSize && (this._expandBuffer(this._stashUsed + e.byteLength), i = new Uint8Array(this._stashBuffer, 0, this._bufferSize)), i.set(new Uint8Array(e), this._stashUsed), this._stashUsed += e.byteLength;
                    } else {
                      const s = this._dispatchChunks(e, t);
                      if (s < e.byteLength) {
                        const a = e.byteLength - s;
                        a > this._bufferSize && (this._expandBuffer(a), i = new Uint8Array(this._stashBuffer, 0, this._bufferSize)), i.set(new Uint8Array(e, s), 0), this._stashUsed += a, this._stashByteStart = t + s;
                      }
                    }
                  }
                } else if (0 === this._stashUsed) {
                  const i = this._dispatchChunks(e, t);
                  if (i < e.byteLength) {
                    const s = e.byteLength - i;
                    s > this._bufferSize && this._expandBuffer(s);
                    new Uint8Array(this._stashBuffer, 0, this._bufferSize).set(new Uint8Array(e, i), 0), this._stashUsed += s, this._stashByteStart = t + i;
                  }
                } else {
                  this._stashUsed + e.byteLength > this._bufferSize && this._expandBuffer(this._stashUsed + e.byteLength);
                  const t = new Uint8Array(this._stashBuffer, 0, this._bufferSize);
                  t.set(new Uint8Array(e), this._stashUsed), this._stashUsed += e.byteLength;
                  const i = this._dispatchChunks(this._stashBuffer.slice(0, this._stashUsed), this._stashByteStart);
                  if (i < this._stashUsed && i > 0) {
                    const e = new Uint8Array(this._stashBuffer, i);
                    t.set(e, 0);
                  }
                  this._stashUsed -= i, this._stashByteStart += i;
                }
              }
              _flushStashBuffer(e) {
                if (this._stashUsed > 0) {
                  const t = this._stashBuffer.slice(0, this._stashUsed),
                    i = this._dispatchChunks(t, this._stashByteStart),
                    a = t.byteLength - i;
                  if (i < t.byteLength) {
                    if (!e) {
                      if (i > 0) {
                        const e = new Uint8Array(this._stashBuffer, 0, this._bufferSize),
                          s = new Uint8Array(t, i);
                        e.set(s, 0), this._stashUsed = s.byteLength, this._stashByteStart += i;
                      }
                      return 0;
                    }
                    s.Z.w(this.TAG, `${a} bytes unconsumed data remain when flush buffer, dropped`);
                  }
                  return this._stashUsed = 0, this._stashByteStart = 0, a;
                }
                return 0;
              }
              _onLoaderComplete(e, t) {
                this._flushStashBuffer(!0), this._onComplete && this._onComplete(this._extraData);
              }
              _onLoaderError(e, t) {
                var i;
                switch (s.Z.e(this.TAG, `Loader error, code = ${t.code}, msg = ${t.msg}`), this._flushStashBuffer(!1), this._isEarlyEofReconnecting && (this._isEarlyEofReconnecting = !1, e = n.nm.UNRECOVERABLE_EARLY_EOF), e) {
                  case n.nm.EARLY_EOF:
                    if (!this._config.isLive && this._totalLength) {
                      const e = ((null === (i = this._currentRange) || void 0 === i ? void 0 : i.to) || 0) + 1;
                      return void (e < this._totalLength && (s.Z.w(this.TAG, "Connection lost, trying reconnect..."), this._isEarlyEofReconnecting = !0, this._internalSeek(e, !1)));
                    }
                    e = n.nm.UNRECOVERABLE_EARLY_EOF;
                  case n.nm.UNRECOVERABLE_EARLY_EOF:
                  case n.nm.CONNECTING_TIMEOUT:
                  case n.nm.HTTP_STATUS_CODE_INVALID:
                  case n.nm.EXCEPTION:
                }
                if (!this._onError) throw new r.OZ("IOException: " + t.msg);
                this._onError(e, t);
              }
            };
          },
          108: (e, t, i) => {

            i.d(t, {
              GM: () => a,
              fp: () => o,
              nm: () => n
            });
            var s = i(411);
            const a = {
                kIdle: 0,
                kConnecting: 1,
                kBuffering: 2,
                kError: 3,
                kComplete: 4
              },
              n = {
                OK: "OK",
                EXCEPTION: "Exception",
                HTTP_STATUS_CODE_INVALID: "HttpStatusCodeInvalid",
                CONNECTING_TIMEOUT: "ConnectingTimeout",
                EARLY_EOF: "EarlyEof",
                UNRECOVERABLE_EARLY_EOF: "UnrecoverableEarlyEof"
              };
            class o {
              constructor(e) {
                this._type = e || "undefined", this._status = a.kIdle, this._needStash = !1, this._onContentLengthKnown = null, this._onURLRedirect = null, this._onDataArrival = null, this._onError = null, this._onComplete = null;
              }
              destroy() {
                this._status = a.kIdle, this._onContentLengthKnown = null, this._onURLRedirect = null, this._onDataArrival = null, this._onError = null, this._onComplete = null;
              }
              isWorking() {
                return this._status === a.kConnecting || this._status === a.kBuffering;
              }
              get type() {
                return this._type;
              }
              get status() {
                return this._status;
              }
              get needStashBuffer() {
                return this._needStash;
              }
              get onContentLengthKnown() {
                return this._onContentLengthKnown;
              }
              set onContentLengthKnown(e) {
                this._onContentLengthKnown = e;
              }
              get onURLRedirect() {
                return this._onURLRedirect;
              }
              set onURLRedirect(e) {
                this._onURLRedirect = e;
              }
              get onDataArrival() {
                return this._onDataArrival;
              }
              set onDataArrival(e) {
                this._onDataArrival = e;
              }
              get onError() {
                return this._onError;
              }
              set onError(e) {
                this._onError = e;
              }
              get onComplete() {
                return this._onComplete;
              }
              set onComplete(e) {
                this._onComplete = e;
              }
              open(e, t) {
                throw new s.do("Unimplemented abstract function!");
              }
              abort() {
                throw new s.do("Unimplemented abstract function!");
              }
            }
          },
          479: (e, t, i) => {

            i.d(t, {
              Z: () => a
            });
            const s = {};
            !function () {
              const e = self.navigator.userAgent.toLowerCase(),
                t = /(edge)\/([\w.]+)/.exec(e) || /(opr)[\/]([\w.]+)/.exec(e) || /(chrome)[ \/]([\w.]+)/.exec(e) || /(iemobile)[\/]([\w.]+)/.exec(e) || /(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e) || /(webkit)[ \/]([\w.]+)/.exec(e) || /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e) || /(msie) ([\w.]+)/.exec(e) || e.includes("trident") && /(rv)(?::| )([\w.]+)/.exec(e) || !e.includes("compatible") && /(firefox)[ \/]([\w.]+)/.exec(e) || [],
                i = /(ipad)/.exec(e) || /(ipod)/.exec(e) || /(windows phone)/.exec(e) || /(iphone)/.exec(e) || /(kindle)/.exec(e) || /(android)/.exec(e) || /(windows)/.exec(e) || /(mac)/.exec(e) || /(linux)/.exec(e) || /(cros)/.exec(e) || [],
                a = {
                  browser: t[5] || t[3] || t[1] || "",
                  version: t[2] || t[4] || "0",
                  majorVersion: t[4] || t[2] || "0",
                  platform: i[0] || ""
                },
                n = {};
              if (a.browser) {
                n[a.browser] = !0;
                const e = a.majorVersion.split(".");
                n.version = {
                  major: parseInt(a.majorVersion, 10),
                  string: a.version
                }, e.length > 1 && (n.version.minor = parseInt(e[1], 10)), e.length > 2 && (n.version.build = parseInt(e[2], 10));
              }
              if (a.platform && (n[a.platform] = !0), (n.chrome || n.opr || n.safari) && (n.webkit = !0), n.rv || n.iemobile) {
                n.rv && delete n.rv;
                const e = "msie";
                a.browser = e, n[e] = !0;
              }
              if (n.edge) {
                delete n.edge;
                const e = "msedge";
                a.browser = e, n[e] = !0;
              }
              if (n.opr) {
                const e = "opera";
                a.browser = e, n[e] = !0;
              }
              if (n.safari && n.android) {
                const e = "android";
                a.browser = e, n[e] = !0;
              }
              n.name = a.browser, n.platform = a.platform;
              for (const e in s) Object.prototype.hasOwnProperty.call(s, e) && delete s[e];
              Object.assign(s, n);
            }();
            const a = s;
          },
          411: (e, t, i) => {

            i.d(t, {
              OC: () => n,
              OZ: () => s,
              do: () => o,
              rT: () => a
            });
            class s {
              constructor(e) {
                this.name = "RuntimeException", this._message = e;
              }
              get message() {
                return this._message;
              }
              toString() {
                return this.name + ": " + this.message;
              }
            }
            class a extends s {
              constructor(e) {
                super(e), this.name = "IllegalStateException";
              }
            }
            class n extends s {
              constructor(e) {
                super(e), this.name = "InvalidArgumentException";
              }
            }
            class o extends s {
              constructor(e) {
                super(e), this.name = "NotImplementedException";
              }
            }
          },
          645: (e, t, i) => {

            i.d(t, {
              Z: () => n
            });
            var s = i(99);
            class a {
              static e(e, t) {
                var i;
                e && !a.FORCE_GLOBAL_TAG || (e = a.GLOBAL_TAG);
                const s = `[${e}] > ${t}`;
                a.ENABLE_CALLBACK && (null === (i = a.emitter) || void 0 === i || i.emit("log", "error", s)), a.ENABLE_ERROR && (console.error ? console.error(s) : console.warn ? console.warn(s) : console.log(s));
              }
              static i(e, t) {
                e && !a.FORCE_GLOBAL_TAG || (e = a.GLOBAL_TAG);
                const i = `[${e}] > ${t}`;
                a.ENABLE_CALLBACK && a.emitter.emit("log", "info", i), a.ENABLE_INFO && (console.info ? console.info(i) : console.log(i));
              }
              static w(e, t) {
                e && !a.FORCE_GLOBAL_TAG || (e = a.GLOBAL_TAG);
                const i = `[${e}] > ${t}`;
                a.ENABLE_CALLBACK && a.emitter.emit("log", "warn", i), a.ENABLE_WARN && (console.warn ? console.warn(i) : console.log(i));
              }
              static d(e, t) {
                var i;
                e && !a.FORCE_GLOBAL_TAG || (e = a.GLOBAL_TAG);
                const s = `[${e}] > ${t}`;
                a.ENABLE_CALLBACK && (null === (i = a.emitter) || void 0 === i || i.emit("log", "debug", s)), a.ENABLE_DEBUG && (console.debug ? console.debug(s) : console.log(s));
              }
              static v(e, t) {
                var i;
                e && !a.FORCE_GLOBAL_TAG || (e = a.GLOBAL_TAG);
                const s = `[${e}] > ${t}`;
                a.ENABLE_CALLBACK && (null === (i = a.emitter) || void 0 === i || i.emit("log", "verbose", s)), a.ENABLE_VERBOSE && console.log(s);
              }
            }
            a.FORCE_GLOBAL_TAG = !1, a.GLOBAL_TAG = "mpegts.js", a.ENABLE_CALLBACK = !1, a.emitter = new s.EventEmitter(), a.ENABLE_ERROR = !0, a.ENABLE_INFO = !0, a.ENABLE_WARN = !0, a.ENABLE_DEBUG = !0, a.ENABLE_VERBOSE = !0;
            const n = a;
          },
          278: (e, t, i) => {

            i.d(t, {
              Z: () => o
            });
            var s = i(99),
              a = i(645);
            class n {
              static get forceGlobalTag() {
                return a.Z.FORCE_GLOBAL_TAG;
              }
              static set forceGlobalTag(e) {
                a.Z.FORCE_GLOBAL_TAG = e, n._notifyChange();
              }
              static get globalTag() {
                return a.Z.GLOBAL_TAG;
              }
              static set globalTag(e) {
                a.Z.GLOBAL_TAG = e, n._notifyChange();
              }
              static get enableAll() {
                return a.Z.ENABLE_VERBOSE && a.Z.ENABLE_DEBUG && a.Z.ENABLE_INFO && a.Z.ENABLE_WARN && a.Z.ENABLE_ERROR;
              }
              static set enableAll(e) {
                a.Z.ENABLE_VERBOSE = e, a.Z.ENABLE_DEBUG = e, a.Z.ENABLE_INFO = e, a.Z.ENABLE_WARN = e, a.Z.ENABLE_ERROR = e, n._notifyChange();
              }
              static get enableDebug() {
                return a.Z.ENABLE_DEBUG;
              }
              static set enableDebug(e) {
                a.Z.ENABLE_DEBUG = e, n._notifyChange();
              }
              static get enableVerbose() {
                return a.Z.ENABLE_VERBOSE;
              }
              static set enableVerbose(e) {
                a.Z.ENABLE_VERBOSE = e, n._notifyChange();
              }
              static get enableInfo() {
                return a.Z.ENABLE_INFO;
              }
              static set enableInfo(e) {
                a.Z.ENABLE_INFO = e, n._notifyChange();
              }
              static get enableWarn() {
                return a.Z.ENABLE_WARN;
              }
              static set enableWarn(e) {
                a.Z.ENABLE_WARN = e, n._notifyChange();
              }
              static get enableError() {
                return a.Z.ENABLE_ERROR;
              }
              static set enableError(e) {
                a.Z.ENABLE_ERROR = e, n._notifyChange();
              }
              static getConfig() {
                return {
                  globalTag: a.Z.GLOBAL_TAG,
                  forceGlobalTag: a.Z.FORCE_GLOBAL_TAG,
                  enableVerbose: a.Z.ENABLE_VERBOSE,
                  enableDebug: a.Z.ENABLE_DEBUG,
                  enableInfo: a.Z.ENABLE_INFO,
                  enableWarn: a.Z.ENABLE_WARN,
                  enableError: a.Z.ENABLE_ERROR,
                  enableCallback: a.Z.ENABLE_CALLBACK
                };
              }
              static applyConfig(e) {
                a.Z.GLOBAL_TAG = e.globalTag, a.Z.FORCE_GLOBAL_TAG = e.forceGlobalTag, a.Z.ENABLE_VERBOSE = e.enableVerbose, a.Z.ENABLE_DEBUG = e.enableDebug, a.Z.ENABLE_INFO = e.enableInfo, a.Z.ENABLE_WARN = e.enableWarn, a.Z.ENABLE_ERROR = e.enableError, a.Z.ENABLE_CALLBACK = !!e.enableCallback;
              }
              static _notifyChange() {
                const e = n.emitter;
                if (e.listenerCount("change") > 0) {
                  const t = n.getConfig();
                  e.emit("change", t);
                }
              }
              static registerListener(e) {
                n.emitter.addListener("change", e);
              }
              static removeListener(e) {
                n.emitter.removeListener("change", e);
              }
              static addLogListener(e) {
                a.Z.emitter.addListener("log", e), a.Z.emitter.listenerCount("log") > 0 && (a.Z.ENABLE_CALLBACK = !0, n._notifyChange());
              }
              static removeLogListener(e) {
                a.Z.emitter.removeListener("log", e), 0 === a.Z.emitter.listenerCount("log") && (a.Z.ENABLE_CALLBACK = !1, n._notifyChange());
              }
            }
            n.emitter = new s.EventEmitter();
            const o = n;
          }
        },
        t = {};
      function i(s) {
        var a = t[s];
        if (void 0 !== a) return a.exports;
        var n = t[s] = {
          exports: {}
        };
        return e[s](n, n.exports, i), n.exports;
      }
      return i.m = e, i.n = e => {
        var t = e && e.__esModule ? () => e.default : () => e;
        return i.d(t, {
          a: t
        }), t;
      }, i.d = (e, t) => {
        for (var s in t) i.o(t, s) && !i.o(e, s) && Object.defineProperty(e, s, {
          enumerable: !0,
          get: t[s]
        });
      }, i.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), i(607);
    })());
  })(flv_min);

  class FLV {
    constructor(videoId, url) {
      // addJs("https://open.ys7.com/assets/ezuikit_v3.4/js/flv.min.js", () => {
      // console.log("加载flv.min.js成功", window.flvjs);
      console.log("isSupportFlv", window.flvjs.isSupported());
      if (window.flvjs.isSupported()) {
        this.initFLV(videoId, url);
      }
      // })
    }

    toString() {
      return `Flv ${this.coreX}-${this.coreY}`;
    }
    initFLV(videoId, flvUrl) {
      const {
        deviceSerial,
        channelNo,
        hd,
        type
      } = matchUrl(flvUrl);
      window.ezuikitMonitor.report({
        protocol: 'flv',
        url: flvUrl,
        serial: deviceSerial,
        no: channelNo,
        action: 1,
        logInfo: {
          type: type
        }
      });
      var video = document.getElementById(videoId);
      var hasControls = video.getAttribute('controls');
      if (!hasControls) {
        video.setAttribute('controls', true);
      }
      var flvPlayer = window.flvjs.createPlayer({
        type: 'flv',
        url: flvUrl,
        isLive: true
      }, {
        enableStashBuffer: true,
        stashInitialSize: 128,
        enableWorker: true
      });
      flvPlayer.attachMediaElement(video);
      flvPlayer.load();
      flvPlayer.play();
      this.flvUrl = flvUrl;
      this.flv = flvPlayer;
      this.video = video;
      this.video.addEventListener('oncanplaythrough', function () {
        console.log('oncanplaythrough');
      }, false);
      this.video.addEventListener('onerror', function () {
        console.log('onerror');
      }, false);
    }
    play() {
      console.log("执行flv播放", this.video);
      this.video.play();
    }
    stop() {
      // 通过暂停停止播放
      // this.video.pause();
      // this.video.src = "";
      this.video.pause();
      // 停止取流
      this.flv.unload();
      // this.hls.destroy();
    }

    destroy() {
      if (this.flv === undefined || this.flv === null) {
        return;
      }
      this.flv.pause();
      this.flv.unload();
      this.flv.detachMediaElement();
      this.flv.destroy();
      this.flv = null;
    }
  }

  var lodash = {exports: {}};

  lodash.exports;(function(module,exports){(function(){/** Used as a safe reference for `undefined` in pre-ES5 environments. */var undefined$1;/** Used as the semantic version number. */var VERSION='4.17.21';/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Error message constants. */var CORE_ERROR_TEXT='Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',FUNC_ERROR_TEXT='Expected a function',INVALID_TEMPL_VAR_ERROR_TEXT='Invalid `variable` option passed into `_.template`';/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as the maximum memoize cache size. */var MAX_MEMOIZE_SIZE=500;/** Used as the internal argument placeholder. */var PLACEHOLDER='__lodash_placeholder__';/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;/** Used to compose bitmasks for function metadata. */var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512;/** Used as default options for `_.truncate`. */var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION='...';/** Used to detect hot functions by number of calls within a span of milliseconds. */var HOT_COUNT=800,HOT_SPAN=16;/** Used to indicate the type of lazy iteratees. */var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3;/** Used as references for various `Number` constants. */var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e+308,NAN=0/0;/** Used as references for the maximum length and index of an array. */var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;/** Used to associate wrap methods with their bit flags. */var wrapFlags=[['ary',WRAP_ARY_FLAG],['bind',WRAP_BIND_FLAG],['bindKey',WRAP_BIND_KEY_FLAG],['curry',WRAP_CURRY_FLAG],['curryRight',WRAP_CURRY_RIGHT_FLAG],['flip',WRAP_FLIP_FLAG],['partial',WRAP_PARTIAL_FLAG],['partialRight',WRAP_PARTIAL_RIGHT_FLAG],['rearg',WRAP_REARG_FLAG]];/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',asyncTag='[object AsyncFunction]',boolTag='[object Boolean]',dateTag='[object Date]',domExcTag='[object DOMException]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',nullTag='[object Null]',objectTag='[object Object]',promiseTag='[object Promise]',proxyTag='[object Proxy]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',undefinedTag='[object Undefined]',weakMapTag='[object WeakMap]',weakSetTag='[object WeakSet]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',float32Tag='[object Float32Array]',float64Tag='[object Float64Array]',int8Tag='[object Int8Array]',int16Tag='[object Int16Array]',int32Tag='[object Int32Array]',uint8Tag='[object Uint8Array]',uint8ClampedTag='[object Uint8ClampedArray]',uint16Tag='[object Uint16Array]',uint32Tag='[object Uint32Array]';/** Used to match empty string literals in compiled template source. */var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;/** Used to match HTML entities and HTML characters. */var reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);/** Used to match template delimiters. */var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;/** Used to match property names within property paths. */var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;/**
  	   * Used to match `RegExp`
  	   * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  	   */var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);/** Used to match leading whitespace. */var reTrimStart=/^\s+/;/** Used to match a single whitespace character. */var reWhitespace=/\s/;/** Used to match wrap detail comments. */var reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;/** Used to match words composed of alphanumeric characters. */var reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;/**
  	   * Used to validate the `validate` option in `_.template` variable.
  	   *
  	   * Forbids characters which could potentially change the meaning of the function argument definition:
  	   * - "()," (modification of function parameters)
  	   * - "=" (default value)
  	   * - "[]{}" (destructuring of function parameters)
  	   * - "/" (beginning of a comment)
  	   * - whitespace
  	   */var reForbiddenIdentifierChars=/[()=,{}\[\]\/\s]/;/** Used to match backslashes in property paths. */var reEscapeChar=/\\(\\)?/g;/**
  	   * Used to match
  	   * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
  	   */var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;/** Used to match `RegExp` flags from their coerced string values. */var reFlags=/\w*$/;/** Used to detect bad signed hexadecimal string values. */var reIsBadHex=/^[-+]0x[0-9a-f]+$/i;/** Used to detect binary string values. */var reIsBinary=/^0b[01]+$/i;/** Used to detect host constructors (Safari). */var reIsHostCtor=/^\[object .+?Constructor\]$/;/** Used to detect octal string values. */var reIsOctal=/^0o[0-7]+$/i;/** Used to detect unsigned integer values. */var reIsUint=/^(?:0|[1-9]\d*)$/;/** Used to match Latin Unicode letters (excluding mathematical operators). */var reLatin=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;/** Used to ensure capturing order of template delimiters. */var reNoMatch=/($^)/;/** Used to match unescaped characters in compiled string literals. */var reUnescapedString=/['\n\r\u2028\u2029\\]/g;/** Used to compose unicode character classes. */var rsAstralRange='\\ud800-\\udfff',rsComboMarksRange='\\u0300-\\u036f',reComboHalfMarksRange='\\ufe20-\\ufe2f',rsComboSymbolsRange='\\u20d0-\\u20ff',rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsDingbatRange='\\u2700-\\u27bf',rsLowerRange='a-z\\xdf-\\xf6\\xf8-\\xff',rsMathOpRange='\\xac\\xb1\\xd7\\xf7',rsNonCharRange='\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',rsPunctuationRange='\\u2000-\\u206f',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',rsUpperRange='A-Z\\xc0-\\xd6\\xd8-\\xde',rsVarRange='\\ufe0e\\ufe0f',rsBreakRange=rsMathOpRange+rsNonCharRange+rsPunctuationRange+rsSpaceRange;/** Used to compose unicode capture groups. */var rsApos="['\u2019]",rsAstral='['+rsAstralRange+']',rsBreak='['+rsBreakRange+']',rsCombo='['+rsComboRange+']',rsDigits='\\d+',rsDingbat='['+rsDingbatRange+']',rsLower='['+rsLowerRange+']',rsMisc='[^'+rsAstralRange+rsBreakRange+rsDigits+rsDingbatRange+rsLowerRange+rsUpperRange+']',rsFitz='\\ud83c[\\udffb-\\udfff]',rsModifier='(?:'+rsCombo+'|'+rsFitz+')',rsNonAstral='[^'+rsAstralRange+']',rsRegional='(?:\\ud83c[\\udde6-\\uddff]){2}',rsSurrPair='[\\ud800-\\udbff][\\udc00-\\udfff]',rsUpper='['+rsUpperRange+']',rsZWJ='\\u200d';/** Used to compose unicode regexes. */var rsMiscLower='(?:'+rsLower+'|'+rsMisc+')',rsMiscUpper='(?:'+rsUpper+'|'+rsMisc+')',rsOptContrLower='(?:'+rsApos+'(?:d|ll|m|re|s|t|ve))?',rsOptContrUpper='(?:'+rsApos+'(?:D|LL|M|RE|S|T|VE))?',reOptMod=rsModifier+'?',rsOptVar='['+rsVarRange+']?',rsOptJoin='(?:'+rsZWJ+'(?:'+[rsNonAstral,rsRegional,rsSurrPair].join('|')+')'+rsOptVar+reOptMod+')*',rsOrdLower='\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',rsOrdUpper='\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',rsSeq=rsOptVar+reOptMod+rsOptJoin,rsEmoji='(?:'+[rsDingbat,rsRegional,rsSurrPair].join('|')+')'+rsSeq,rsSymbol='(?:'+[rsNonAstral+rsCombo+'?',rsCombo,rsRegional,rsSurrPair,rsAstral].join('|')+')';/** Used to match apostrophes. */var reApos=RegExp(rsApos,'g');/**
  	   * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
  	   * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
  	   */var reComboMark=RegExp(rsCombo,'g');/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */var reUnicode=RegExp(rsFitz+'(?='+rsFitz+')|'+rsSymbol+rsSeq,'g');/** Used to match complex or compound words. */var reUnicodeWord=RegExp([rsUpper+'?'+rsLower+'+'+rsOptContrLower+'(?='+[rsBreak,rsUpper,'$'].join('|')+')',rsMiscUpper+'+'+rsOptContrUpper+'(?='+[rsBreak,rsUpper+rsMiscLower,'$'].join('|')+')',rsUpper+'?'+rsMiscLower+'+'+rsOptContrLower,rsUpper+'+'+rsOptContrUpper,rsOrdUpper,rsOrdLower,rsDigits,rsEmoji].join('|'),'g');/** 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/). */var reHasUnicode=RegExp('['+rsZWJ+rsAstralRange+rsComboRange+rsVarRange+']');/** Used to detect strings that need a more robust regexp to match words. */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 ]/;/** Used to assign default `context` object properties. */var contextProps=['Array','Buffer','DataView','Date','Error','Float32Array','Float64Array','Function','Int8Array','Int16Array','Int32Array','Map','Math','Object','Promise','RegExp','Set','String','Symbol','TypeError','Uint8Array','Uint8ClampedArray','Uint16Array','Uint32Array','WeakMap','_','clearTimeout','isFinite','parseInt','setTimeout'];/** Used to make template sourceURLs easier to identify. */var templateCounter=-1;/** Used to identify `toStringTag` values of typed arrays. */var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dataViewTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;/** Used to identify `toStringTag` values supported by `_.clone`. */var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[dataViewTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[setTag]=cloneableTags[stringTag]=cloneableTags[symbolTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=false;/** Used to map Latin Unicode letters to basic Latin letters. */var deburredLetters={// Latin-1 Supplement block.
  '\xc0':'A','\xc1':'A','\xc2':'A','\xc3':'A','\xc4':'A','\xc5':'A','\xe0':'a','\xe1':'a','\xe2':'a','\xe3':'a','\xe4':'a','\xe5':'a','\xc7':'C','\xe7':'c','\xd0':'D','\xf0':'d','\xc8':'E','\xc9':'E','\xca':'E','\xcb':'E','\xe8':'e','\xe9':'e','\xea':'e','\xeb':'e','\xcc':'I','\xcd':'I','\xce':'I','\xcf':'I','\xec':'i','\xed':'i','\xee':'i','\xef':'i','\xd1':'N','\xf1':'n','\xd2':'O','\xd3':'O','\xd4':'O','\xd5':'O','\xd6':'O','\xd8':'O','\xf2':'o','\xf3':'o','\xf4':'o','\xf5':'o','\xf6':'o','\xf8':'o','\xd9':'U','\xda':'U','\xdb':'U','\xdc':'U','\xf9':'u','\xfa':'u','\xfb':'u','\xfc':'u','\xdd':'Y','\xfd':'y','\xff':'y','\xc6':'Ae','\xe6':'ae','\xde':'Th','\xfe':'th','\xdf':'ss',// Latin Extended-A block.
  '\u0100':'A','\u0102':'A','\u0104':'A','\u0101':'a','\u0103':'a','\u0105':'a','\u0106':'C','\u0108':'C','\u010a':'C','\u010c':'C','\u0107':'c','\u0109':'c','\u010b':'c','\u010d':'c','\u010e':'D','\u0110':'D','\u010f':'d','\u0111':'d','\u0112':'E','\u0114':'E','\u0116':'E','\u0118':'E','\u011a':'E','\u0113':'e','\u0115':'e','\u0117':'e','\u0119':'e','\u011b':'e','\u011c':'G','\u011e':'G','\u0120':'G','\u0122':'G','\u011d':'g','\u011f':'g','\u0121':'g','\u0123':'g','\u0124':'H','\u0126':'H','\u0125':'h','\u0127':'h','\u0128':'I','\u012a':'I','\u012c':'I','\u012e':'I','\u0130':'I','\u0129':'i','\u012b':'i','\u012d':'i','\u012f':'i','\u0131':'i','\u0134':'J','\u0135':'j','\u0136':'K','\u0137':'k','\u0138':'k','\u0139':'L','\u013b':'L','\u013d':'L','\u013f':'L','\u0141':'L','\u013a':'l','\u013c':'l','\u013e':'l','\u0140':'l','\u0142':'l','\u0143':'N','\u0145':'N','\u0147':'N','\u014a':'N','\u0144':'n','\u0146':'n','\u0148':'n','\u014b':'n','\u014c':'O','\u014e':'O','\u0150':'O','\u014d':'o','\u014f':'o','\u0151':'o','\u0154':'R','\u0156':'R','\u0158':'R','\u0155':'r','\u0157':'r','\u0159':'r','\u015a':'S','\u015c':'S','\u015e':'S','\u0160':'S','\u015b':'s','\u015d':'s','\u015f':'s','\u0161':'s','\u0162':'T','\u0164':'T','\u0166':'T','\u0163':'t','\u0165':'t','\u0167':'t','\u0168':'U','\u016a':'U','\u016c':'U','\u016e':'U','\u0170':'U','\u0172':'U','\u0169':'u','\u016b':'u','\u016d':'u','\u016f':'u','\u0171':'u','\u0173':'u','\u0174':'W','\u0175':'w','\u0176':'Y','\u0177':'y','\u0178':'Y','\u0179':'Z','\u017b':'Z','\u017d':'Z','\u017a':'z','\u017c':'z','\u017e':'z','\u0132':'IJ','\u0133':'ij','\u0152':'Oe','\u0153':'oe','\u0149':"'n",'\u017f':'s'};/** Used to map characters to HTML entities. */var htmlEscapes={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#39;'};/** Used to map HTML entities to characters. */var htmlUnescapes={'&amp;':'&','&lt;':'<','&gt;':'>','&quot;':'"','&#39;':"'"};/** Used to escape characters for inclusion in compiled string literals. */var stringEscapes={'\\':'\\',"'":"'",'\n':'n','\r':'r','\u2028':'u2028','\u2029':'u2029'};/** Built-in method references without a dependency on `root`. */var freeParseFloat=parseFloat,freeParseInt=parseInt;/** Detect free variable `global` from Node.js. */var freeGlobal=typeof commonjsGlobal=='object'&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;/** Detect free variable `self`. */var freeSelf=typeof self=='object'&&self&&self.Object===Object&&self;/** Used as a reference to the global object. */var root=freeGlobal||freeSelf||Function('return this')();/** Detect free variable `exports`. */var freeExports=exports&&!exports.nodeType&&exports;/** Detect free variable `module`. */var freeModule=freeExports&&'object'=='object'&&module&&!module.nodeType&&module;/** Detect the popular CommonJS extension `module.exports`. */var moduleExports=freeModule&&freeModule.exports===freeExports;/** Detect free variable `process` from Node.js. */var freeProcess=moduleExports&&freeGlobal.process;/** Used to access faster Node.js helpers. */var nodeUtil=function(){try{// Use `util.types` for Node.js 10+.
  var types=freeModule&&freeModule.require&&freeModule.require('util').types;if(types){return types;}// Legacy `process.binding('util')` for Node.js < 10.
  return freeProcess&&freeProcess.binding&&freeProcess.binding('util');}catch(e){}}();/* Node.js helper references. */var nodeIsArrayBuffer=nodeUtil&&nodeUtil.isArrayBuffer,nodeIsDate=nodeUtil&&nodeUtil.isDate,nodeIsMap=nodeUtil&&nodeUtil.isMap,nodeIsRegExp=nodeUtil&&nodeUtil.isRegExp,nodeIsSet=nodeUtil&&nodeUtil.isSet,nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray;/*--------------------------------------------------------------------------*/ /**
  	   * A faster alternative to `Function#apply`, this function invokes `func`
  	   * with the `this` binding of `thisArg` and the arguments of `args`.
  	   *
  	   * @private
  	   * @param {Function} func The function to invoke.
  	   * @param {*} thisArg The `this` binding of `func`.
  	   * @param {Array} args The arguments to invoke `func` with.
  	   * @returns {*} Returns the result of `func`.
  	   */function apply(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2]);}return func.apply(thisArg,args);}/**
  	   * A specialized version of `baseAggregator` for arrays.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} setter The function to set `accumulator` values.
  	   * @param {Function} iteratee The iteratee to transform keys.
  	   * @param {Object} accumulator The initial aggregated object.
  	   * @returns {Function} Returns `accumulator`.
  	   */function arrayAggregator(array,setter,iteratee,accumulator){var index=-1,length=array==null?0:array.length;while(++index<length){var value=array[index];setter(accumulator,value,iteratee(value),array);}return accumulator;}/**
  	   * A specialized version of `_.forEach` for arrays without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @returns {Array} Returns `array`.
  	   */function arrayEach(array,iteratee){var index=-1,length=array==null?0:array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break;}}return array;}/**
  	   * A specialized version of `_.forEachRight` for arrays without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @returns {Array} Returns `array`.
  	   */function arrayEachRight(array,iteratee){var length=array==null?0:array.length;while(length--){if(iteratee(array[length],length,array)===false){break;}}return array;}/**
  	   * A specialized version of `_.every` for arrays without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} predicate The function invoked per iteration.
  	   * @returns {boolean} Returns `true` if all elements pass the predicate check,
  	   *  else `false`.
  	   */function arrayEvery(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(!predicate(array[index],index,array)){return false;}}return true;}/**
  	   * A specialized version of `_.filter` for arrays without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} predicate The function invoked per iteration.
  	   * @returns {Array} Returns the new filtered array.
  	   */function arrayFilter(array,predicate){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[resIndex++]=value;}}return result;}/**
  	   * A specialized version of `_.includes` for arrays without support for
  	   * specifying an index to search from.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to inspect.
  	   * @param {*} target The value to search for.
  	   * @returns {boolean} Returns `true` if `target` is found, else `false`.
  	   */function arrayIncludes(array,value){var length=array==null?0:array.length;return !!length&&baseIndexOf(array,value,0)>-1;}/**
  	   * This function is like `arrayIncludes` except that it accepts a comparator.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to inspect.
  	   * @param {*} target The value to search for.
  	   * @param {Function} comparator The comparator invoked per element.
  	   * @returns {boolean} Returns `true` if `target` is found, else `false`.
  	   */function arrayIncludesWith(array,value,comparator){var index=-1,length=array==null?0:array.length;while(++index<length){if(comparator(value,array[index])){return true;}}return false;}/**
  	   * A specialized version of `_.map` for arrays without support for iteratee
  	   * shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @returns {Array} Returns the new mapped array.
  	   */function arrayMap(array,iteratee){var index=-1,length=array==null?0:array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array);}return result;}/**
  	   * Appends the elements of `values` to `array`.
  	   *
  	   * @private
  	   * @param {Array} array The array to modify.
  	   * @param {Array} values The values to append.
  	   * @returns {Array} Returns `array`.
  	   */function arrayPush(array,values){var index=-1,length=values.length,offset=array.length;while(++index<length){array[offset+index]=values[index];}return array;}/**
  	   * A specialized version of `_.reduce` for arrays without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @param {*} [accumulator] The initial value.
  	   * @param {boolean} [initAccum] Specify using the first element of `array` as
  	   *  the initial value.
  	   * @returns {*} Returns the accumulated value.
  	   */function arrayReduce(array,iteratee,accumulator,initAccum){var index=-1,length=array==null?0:array.length;if(initAccum&&length){accumulator=array[++index];}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array);}return accumulator;}/**
  	   * A specialized version of `_.reduceRight` for arrays without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @param {*} [accumulator] The initial value.
  	   * @param {boolean} [initAccum] Specify using the last element of `array` as
  	   *  the initial value.
  	   * @returns {*} Returns the accumulated value.
  	   */function arrayReduceRight(array,iteratee,accumulator,initAccum){var length=array==null?0:array.length;if(initAccum&&length){accumulator=array[--length];}while(length--){accumulator=iteratee(accumulator,array[length],length,array);}return accumulator;}/**
  	   * A specialized version of `_.some` for arrays without support for iteratee
  	   * shorthands.
  	   *
  	   * @private
  	   * @param {Array} [array] The array to iterate over.
  	   * @param {Function} predicate The function invoked per iteration.
  	   * @returns {boolean} Returns `true` if any element passes the predicate check,
  	   *  else `false`.
  	   */function arraySome(array,predicate){var index=-1,length=array==null?0:array.length;while(++index<length){if(predicate(array[index],index,array)){return true;}}return false;}/**
  	   * Gets the size of an ASCII `string`.
  	   *
  	   * @private
  	   * @param {string} string The string inspect.
  	   * @returns {number} Returns the string size.
  	   */var asciiSize=baseProperty('length');/**
  	   * Converts an ASCII `string` to an array.
  	   *
  	   * @private
  	   * @param {string} string The string to convert.
  	   * @returns {Array} Returns the converted array.
  	   */function asciiToArray(string){return string.split('');}/**
  	   * Splits an ASCII `string` into an array of its words.
  	   *
  	   * @private
  	   * @param {string} The string to inspect.
  	   * @returns {Array} Returns the words of `string`.
  	   */function asciiWords(string){return string.match(reAsciiWord)||[];}/**
  	   * The base implementation of methods like `_.findKey` and `_.findLastKey`,
  	   * without support for iteratee shorthands, which iterates over `collection`
  	   * using `eachFunc`.
  	   *
  	   * @private
  	   * @param {Array|Object} collection The collection to inspect.
  	   * @param {Function} predicate The function invoked per iteration.
  	   * @param {Function} eachFunc The function to iterate over `collection`.
  	   * @returns {*} Returns the found element or its key, else `undefined`.
  	   */function baseFindKey(collection,predicate,eachFunc){var result;eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection)){result=key;return false;}});return result;}/**
  	   * The base implementation of `_.findIndex` and `_.findLastIndex` without
  	   * support for iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} array The array to inspect.
  	   * @param {Function} predicate The function invoked per iteration.
  	   * @param {number} fromIndex The index to search from.
  	   * @param {boolean} [fromRight] Specify iterating from right to left.
  	   * @returns {number} Returns the index of the matched value, else `-1`.
  	   */function baseFindIndex(array,predicate,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?1:-1);while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index;}}return -1;}/**
  	   * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  	   *
  	   * @private
  	   * @param {Array} array The array to inspect.
  	   * @param {*} value The value to search for.
  	   * @param {number} fromIndex The index to search from.
  	   * @returns {number} Returns the index of the matched value, else `-1`.
  	   */function baseIndexOf(array,value,fromIndex){return value===value?strictIndexOf(array,value,fromIndex):baseFindIndex(array,baseIsNaN,fromIndex);}/**
  	   * This function is like `baseIndexOf` except that it accepts a comparator.
  	   *
  	   * @private
  	   * @param {Array} array The array to inspect.
  	   * @param {*} value The value to search for.
  	   * @param {number} fromIndex The index to search from.
  	   * @param {Function} comparator The comparator invoked per element.
  	   * @returns {number} Returns the index of the matched value, else `-1`.
  	   */function baseIndexOfWith(array,value,fromIndex,comparator){var index=fromIndex-1,length=array.length;while(++index<length){if(comparator(array[index],value)){return index;}}return -1;}/**
  	   * The base implementation of `_.isNaN` without support for number objects.
  	   *
  	   * @private
  	   * @param {*} value The value to check.
  	   * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  	   */function baseIsNaN(value){return value!==value;}/**
  	   * The base implementation of `_.mean` and `_.meanBy` without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} array The array to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @returns {number} Returns the mean.
  	   */function baseMean(array,iteratee){var length=array==null?0:array.length;return length?baseSum(array,iteratee)/length:NAN;}/**
  	   * The base implementation of `_.property` without support for deep paths.
  	   *
  	   * @private
  	   * @param {string} key The key of the property to get.
  	   * @returns {Function} Returns the new accessor function.
  	   */function baseProperty(key){return function(object){return object==null?undefined$1:object[key];};}/**
  	   * The base implementation of `_.propertyOf` without support for deep paths.
  	   *
  	   * @private
  	   * @param {Object} object The object to query.
  	   * @returns {Function} Returns the new accessor function.
  	   */function basePropertyOf(object){return function(key){return object==null?undefined$1:object[key];};}/**
  	   * The base implementation of `_.reduce` and `_.reduceRight`, without support
  	   * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
  	   *
  	   * @private
  	   * @param {Array|Object} collection The collection to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @param {*} accumulator The initial value.
  	   * @param {boolean} initAccum Specify using the first or last element of
  	   *  `collection` as the initial value.
  	   * @param {Function} eachFunc The function to iterate over `collection`.
  	   * @returns {*} Returns the accumulated value.
  	   */function baseReduce(collection,iteratee,accumulator,initAccum,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initAccum?(initAccum=false,value):iteratee(accumulator,value,index,collection);});return accumulator;}/**
  	   * The base implementation of `_.sortBy` which uses `comparer` to define the
  	   * sort order of `array` and replaces criteria objects with their corresponding
  	   * values.
  	   *
  	   * @private
  	   * @param {Array} array The array to sort.
  	   * @param {Function} comparer The function to define sort order.
  	   * @returns {Array} Returns `array`.
  	   */function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value;}return array;}/**
  	   * The base implementation of `_.sum` and `_.sumBy` without support for
  	   * iteratee shorthands.
  	   *
  	   * @private
  	   * @param {Array} array The array to iterate over.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @returns {number} Returns the sum.
  	   */function baseSum(array,iteratee){var result,index=-1,length=array.length;while(++index<length){var current=iteratee(array[index]);if(current!==undefined$1){result=result===undefined$1?current:result+current;}}return result;}/**
  	   * The base implementation of `_.times` without support for iteratee shorthands
  	   * or max array length checks.
  	   *
  	   * @private
  	   * @param {number} n The number of times to invoke `iteratee`.
  	   * @param {Function} iteratee The function invoked per iteration.
  	   * @returns {Array} Returns the array of results.
  	   */function baseTimes(n,iteratee){var index=-1,result=Array(n);while(++index<n){result[index]=iteratee(index);}return result;}/**
  	   * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
  	   * of key-value pairs for `object` corresponding to the property names of `props`.
  	   *
  	   * @private
  	   * @param {Object} object The object to query.
  	   * @param {Array} props The property names to get values for.
  	   * @returns {Object} Returns the key-value pairs.
  	   */function baseToPairs(object,props){return arrayMap(props,function(key){return [key,object[key]];});}/**
  	   * The base implementation of `_.trim`.
  	   *
  	   * @private
  	   * @param {string} string The string to trim.
  	   * @returns {string} Returns the trimmed string.
  	   */function baseTrim(string){return string?string.slice(0,trimmedEndIndex(string)+1).replace(reTrimStart,''):string;}/**
  	   * The base implementation of `_.unary` without support for storing metadata.
  	   *
  	   * @private
  	   * @param {Function} func The function to cap arguments for.
  	   * @returns {Function} Returns the new capped function.
  	   */function baseUnary(func){return function(value){return func(value);};}/**
  	   * The base implementation of `_.values` and `_.valuesIn` which creates an
  	   * array of `object` property values corresponding to the property names
  	   * of `props`.
  	   *
  	   * @private
  	   * @param {Object} object The object to query.
  	   * @param {Array} props The property names to get values for.
  	   * @returns {Object} Returns the array of property values.
  	   */function baseValues(object,props){return arrayMap(props,function(key){return object[key];});}/**
  	   * Checks if a `cache` value for `key` exists.
  	   *
  	   * @private
  	   * @param {Object} cache The cache to query.
  	   * @param {string} key The key of the entry to check.
  	   * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  	   */function cacheHas(cache,key){return cache.has(key);}/**
  	   * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
  	   * that is not found in the character symbols.
  	   *
  	   * @private
  	   * @param {Array} strSymbols The string symbols to inspect.
  	   * @param {Array} chrSymbols The character symbols to find.
  	   * @returns {number} Returns the index of the first unmatched string symbol.
  	   */function charsStartIndex(strSymbols,chrSymbols){var index=-1,length=strSymbols.length;while(++index<length&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1){}return index;}/**
  	   * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
  	   * that is not found in the character symbols.
  	   *
  	   * @private
  	   * @param {Array} strSymbols The string symbols to inspect.
  	   * @param {Array} chrSymbols The character symbols to find.
  	   * @returns {number} Returns the index of the last unmatched string symbol.
  	   */function charsEndIndex(strSymbols,chrSymbols){var index=strSymbols.length;while(index--&&baseIndexOf(chrSymbols,strSymbols[index],0)>-1){}return index;}/**
  	   * Gets the number of `placeholder` occurrences in `array`.
  	   *
  	   * @private
  	   * @param {Array} array The array to inspect.
  	   * @param {*} placeholder The placeholder to search for.
  	   * @returns {number} Returns the placeholder count.
  	   */function countHolders(array,placeholder){var length=array.length,result=0;while(length--){if(array[length]===placeholder){++result;}}return result;}/**
  	   * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
  	   * letters to basic Latin letters.
  	   *
  	   * @private
  	   * @param {string} letter The matched letter to deburr.
  	   * @returns {string} Returns the deburred letter.
  	   */var deburrLetter=basePropertyOf(deburredLetters);/**
  	   * Used by `_.escape` to convert characters to HTML entities.
  	   *
  	   * @private
  	   * @param {string} chr The matched character to escape.
  	   * @returns {string} Returns the escaped character.
  	   */var escapeHtmlChar=basePropertyOf(htmlEscapes);/**
  	   * Used by `_.template` to escape characters for inclusion in compiled string literals.
  	   *
  	   * @private
  	   * @param {string} chr The matched character to escape.
  	   * @returns {string} Returns the escaped character.
  	   */function escapeStringChar(chr){return '\\'+stringEscapes[chr];}/**
  	   * Gets the value at `key` of `object`.
  	   *
  	   * @private
  	   * @param {Object} [object] The object to query.
  	   * @param {string} key The key of the property to get.
  	   * @returns {*} Returns the property value.
  	   */function getValue(object,key){return object==null?undefined$1:object[key];}/**
  	   * Checks if `string` contains Unicode symbols.
  	   *
  	   * @private
  	   * @param {string} string The string to inspect.
  	   * @returns {boolean} Returns `true` if a symbol is found, else `false`.
  	   */function hasUnicode(string){return reHasUnicode.test(string);}/**
  	   * Checks if `string` contains a word composed of Unicode symbols.
  	   *
  	   * @private
  	   * @param {string} string The string to inspect.
  	   * @returns {boolean} Returns `true` if a word is found, else `false`.
  	   */function hasUnicodeWord(string){return reHasUnicodeWord.test(string);}/**
  	   * Converts `iterator` to an array.
  	   *
  	   * @private
  	   * @param {Object} iterator The iterator to convert.
  	   * @returns {Array} Returns the converted array.
  	   */function iteratorToArray(iterator){var data,result=[];while(!(data=iterator.next()).done){result.push(data.value);}return result;}/**
  	   * Converts `map` to its key-value pairs.
  	   *
  	   * @private
  	   * @param {Object} map The map to convert.
  	   * @returns {Array} Returns the key-value pairs.
  	   */function mapToArray(map){var index=-1,result=Array(map.size);map.forEach(function(value,key){result[++index]=[key,value];});return result;}/**
  	   * Creates a unary function that invokes `func` with its argument transformed.
  	   *
  	   * @private
  	   * @param {Function} func The function to wrap.
  	   * @param {Function} transform The argument transform.
  	   * @returns {Function} Returns the new function.
  	   */function overArg(func,transform){return function(arg){return func(transform(arg));};}/**
  	   * Replaces all `placeholder` elements in `array` with an internal placeholder
  	   * and returns an array of their indexes.
  	   *
  	   * @private
  	   * @param {Array} array The array to modify.
  	   * @param {*} placeholder The placeholder to replace.
  	   * @returns {Array} Returns the new array of placeholder indexes.
  	   */function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value===placeholder||value===PLACEHOLDER){array[index]=PLACEHOLDER;result[resIndex++]=index;}}return result;}/**
  	   * Converts `set` to an array of its values.
  	   *
  	   * @private
  	   * @param {Object} set The set to convert.
  	   * @returns {Array} Returns the values.
  	   */function setToArray(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=value;});return result;}/**
  	   * Converts `set` to its value-value pairs.
  	   *
  	   * @private
  	   * @param {Object} set The set to convert.
  	   * @returns {Array} Returns the value-value pairs.
  	   */function setToPairs(set){var index=-1,result=Array(set.size);set.forEach(function(value){result[++index]=[value,value];});return result;}/**
  	   * A specialized version of `_.indexOf` which performs strict equality
  	   * comparisons of values, i.e. `===`.
  	   *
  	   * @private
  	   * @param {Array} array The array to inspect.
  	   * @param {*} value The value to search for.
  	   * @param {number} fromIndex The index to search from.
  	   * @returns {number} Returns the index of the matched value, else `-1`.
  	   */function strictIndexOf(array,value,fromIndex){var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index;}}return -1;}/**
  	   * A specialized version of `_.lastIndexOf` which performs strict equality
  	   * comparisons of values, i.e. `===`.
  	   *
  	   * @private
  	   * @param {Array} array The array to inspect.
  	   * @param {*} value The value to search for.
  	   * @param {number} fromIndex The index to search from.
  	   * @returns {number} Returns the index of the matched value, else `-1`.
  	   */function strictLastIndexOf(array,value,fromIndex){var index=fromIndex+1;while(index--){if(array[index]===value){return index;}}return index;}/**
  	   * Gets the number of symbols in `string`.
  	   *
  	   * @private
  	   * @param {string} string The string to inspect.
  	   * @returns {number} Returns the string size.
  	   */function stringSize(string){return hasUnicode(string)?unicodeSize(string):asciiSize(string);}/**
  	   * Converts `string` to an array.
  	   *
  	   * @private
  	   * @param {string} string The string to convert.
  	   * @returns {Array} Returns the converted array.
  	   */function stringToArray(string){return hasUnicode(string)?unicodeToArray(string):asciiToArray(string);}/**
  	   * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
  	   * character of `string`.
  	   *
  	   * @private
  	   * @param {string} string The string to inspect.
  	   * @returns {number} Returns the index of the last non-whitespace character.
  	   */function trimmedEndIndex(string){var index=string.length;while(index--&&reWhitespace.test(string.charAt(index))){}return index;}/**
  	   * Used by `_.unescape` to convert HTML entities to characters.
  	   *
  	   * @private
  	   * @param {string} chr The matched character to unescape.
  	   * @returns {string} Returns the unescaped character.
  	   */var unescapeHtmlChar=basePropertyOf(htmlUnescapes);/**
  	   * Gets the size of a Unicode `string`.
  	   *
  	   * @private
  	   * @param {string} string The string inspect.
  	   * @returns {number} Returns the string size.
  	   */function unicodeSize(string){var result=reUnicode.lastIndex=0;while(reUnicode.test(string)){++result;}return result;}/**
  	   * Converts a Unicode `string` to an array.
  	   *
  	   * @private
  	   * @param {string} string The string to convert.
  	   * @returns {Array} Returns the converted array.
  	   */function unicodeToArray(string){return string.match(reUnicode)||[];}/**
  	   * Splits a Unicode `string` into an array of its words.
  	   *
  	   * @private
  	   * @param {string} The string to inspect.
  	   * @returns {Array} Returns the words of `string`.
  	   */function unicodeWords(string){return string.match(reUnicodeWord)||[];}/*--------------------------------------------------------------------------*/ /**
  	   * Create a new pristine `lodash` function using the `context` object.
  	   *
  	   * @static
  	   * @memberOf _
  	   * @since 1.1.0
  	   * @category Util
  	   * @param {Object} [context=root] The context object.
  	   * @returns {Function} Returns a new `lodash` function.
  	   * @example
  	   *
  	   * _.mixin({ 'foo': _.constant('foo') });
  	   *
  	   * var lodash = _.runInContext();
  	   * lodash.mixin({ 'bar': lodash.constant('bar') });
  	   *
  	   * _.isFunction(_.foo);
  	   * // => true
  	   * _.isFunction(_.bar);
  	   * // => false
  	   *
  	   * lodash.isFunction(lodash.foo);
  	   * // => false
  	   * lodash.isFunction(lodash.bar);
  	   * // => true
  	   *
  	   * // Create a suped-up `defer` in Node.js.
  	   * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
  	   */var runInContext=function runInContext(context){context=context==null?root:_.defaults(root.Object(),context,_.pick(root,contextProps));/** Built-in constructor references. */var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;/** Used for built-in method references. */var arrayProto=Array.prototype,funcProto=Function.prototype,objectProto=Object.prototype;/** Used to detect overreaching core-js shims. */var coreJsData=context['__core-js_shared__'];/** Used to resolve the decompiled source of functions. */var funcToString=funcProto.toString;/** Used to check objects for own properties. */var hasOwnProperty=objectProto.hasOwnProperty;/** Used to generate unique IDs. */var idCounter=0;/** Used to detect methods masquerading as native. */var maskSrcKey=function(){var uid=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||'');return uid?'Symbol(src)_1.'+uid:'';}();/**
  	     * Used to resolve the
  	     * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  	     * of values.
  	     */var nativeObjectToString=objectProto.toString;/** Used to infer the `Object` constructor. */var objectCtorString=funcToString.call(Object);/** Used to restore the original `_` reference in `_.noConflict`. */var oldDash=root._;/** Used to detect if a method is native. */var reIsNative=RegExp('^'+funcToString.call(hasOwnProperty).replace(reRegExpChar,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');/** Built-in value references. */var Buffer=moduleExports?context.Buffer:undefined$1,Symbol=context.Symbol,Uint8Array=context.Uint8Array,allocUnsafe=Buffer?Buffer.allocUnsafe:undefined$1,getPrototype=overArg(Object.getPrototypeOf,Object),objectCreate=Object.create,propertyIsEnumerable=objectProto.propertyIsEnumerable,splice=arrayProto.splice,spreadableSymbol=Symbol?Symbol.isConcatSpreadable:undefined$1,symIterator=Symbol?Symbol.iterator:undefined$1,symToStringTag=Symbol?Symbol.toStringTag:undefined$1;var defineProperty=function(){try{var func=getNative(Object,'defineProperty');func({},'',{});return func;}catch(e){}}();/** Mocked built-ins. */var ctxClearTimeout=context.clearTimeout!==root.clearTimeout&&context.clearTimeout,ctxNow=Date&&Date.now!==root.Date.now&&Date.now,ctxSetTimeout=context.setTimeout!==root.setTimeout&&context.setTimeout;/* Built-in method references for those with the same name as other `lodash` methods. */var nativeCeil=Math.ceil,nativeFloor=Math.floor,nativeGetSymbols=Object.getOwnPropertySymbols,nativeIsBuffer=Buffer?Buffer.isBuffer:undefined$1,nativeIsFinite=context.isFinite,nativeJoin=arrayProto.join,nativeKeys=overArg(Object.keys,Object),nativeMax=Math.max,nativeMin=Math.min,nativeNow=Date.now,nativeParseInt=context.parseInt,nativeRandom=Math.random,nativeReverse=arrayProto.reverse;/* Built-in method references that are verified to be native. */var DataView=getNative(context,'DataView'),Map=getNative(context,'Map'),Promise=getNative(context,'Promise'),Set=getNative(context,'Set'),WeakMap=getNative(context,'WeakMap'),nativeCreate=getNative(Object,'create');/** Used to store function metadata. */var metaMap=WeakMap&&new WeakMap();/** Used to lookup unminified function names. */var realNames={};/** Used to detect maps, sets, and weakmaps. */var dataViewCtorString=toSource(DataView),mapCtorString=toSource(Map),promiseCtorString=toSource(Promise),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap);/** Used to convert symbols to primitives and strings. */var symbolProto=Symbol?Symbol.prototype:undefined$1,symbolValueOf=symbolProto?symbolProto.valueOf:undefined$1,symbolToString=symbolProto?symbolProto.toString:undefined$1;/*------------------------------------------------------------------------*/ /**
  	     * Creates a `lodash` object which wraps `value` to enable implicit method
  	     * chain sequences. Methods that operate on and return arrays, collections,
  	     * and functions can be chained together. Methods that retrieve a single value
  	     * or may return a primitive value will automatically end the chain sequence
  	     * and return the unwrapped value. Otherwise, the value must be unwrapped
  	     * with `_#value`.
  	     *
  	     * Explicit chain sequences, which must be unwrapped with `_#value`, may be
  	     * enabled using `_.chain`.
  	     *
  	     * The execution of chained methods is lazy, that is, it's deferred until
  	     * `_#value` is implicitly or explicitly called.
  	     *
  	     * Lazy evaluation allows several methods to support shortcut fusion.
  	     * Shortcut fusion is an optimization to merge iteratee calls; this avoids
  	     * the creation of intermediate arrays and can greatly reduce the number of
  	     * iteratee executions. Sections of a chain sequence qualify for shortcut
  	     * fusion if the section is applied to an array and iteratees accept only
  	     * one argument. The heuristic for whether a section qualifies for shortcut
  	     * fusion is subject to change.
  	     *
  	     * Chaining is supported in custom builds as long as the `_#value` method is
  	     * directly or indirectly included in the build.
  	     *
  	     * In addition to lodash methods, wrappers have `Array` and `String` methods.
  	     *
  	     * The wrapper `Array` methods are:
  	     * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
  	     *
  	     * The wrapper `String` methods are:
  	     * `replace` and `split`
  	     *
  	     * The wrapper methods that support shortcut fusion are:
  	     * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
  	     * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
  	     * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
  	     *
  	     * The chainable wrapper methods are:
  	     * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
  	     * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
  	     * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
  	     * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
  	     * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
  	     * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
  	     * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
  	     * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
  	     * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
  	     * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
  	     * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
  	     * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
  	     * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
  	     * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
  	     * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
  	     * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
  	     * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
  	     * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
  	     * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
  	     * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
  	     * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
  	     * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
  	     * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
  	     * `zipObject`, `zipObjectDeep`, and `zipWith`
  	     *
  	     * The wrapper methods that are **not** chainable by default are:
  	     * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
  	     * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
  	     * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
  	     * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
  	     * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
  	     * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
  	     * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
  	     * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
  	     * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
  	     * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
  	     * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
  	     * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
  	     * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
  	     * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
  	     * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
  	     * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
  	     * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
  	     * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
  	     * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
  	     * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
  	     * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
  	     * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
  	     * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
  	     * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
  	     * `upperFirst`, `value`, and `words`
  	     *
  	     * @name _
  	     * @constructor
  	     * @category Seq
  	     * @param {*} value The value to wrap in a `lodash` instance.
  	     * @returns {Object} Returns the new `lodash` wrapper instance.
  	     * @example
  	     *
  	     * function square(n) {
  	     *   return n * n;
  	     * }
  	     *
  	     * var wrapped = _([1, 2, 3]);
  	     *
  	     * // Returns an unwrapped value.
  	     * wrapped.reduce(_.add);
  	     * // => 6
  	     *
  	     * // Returns a wrapped value.
  	     * var squares = wrapped.map(square);
  	     *
  	     * _.isArray(squares);
  	     * // => false
  	     *
  	     * _.isArray(squares.value());
  	     * // => true
  	     */function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value;}if(hasOwnProperty.call(value,'__wrapped__')){return wrapperClone(value);}}return new LodashWrapper(value);}/**
  	     * The base implementation of `_.create` without support for assigning
  	     * properties to the created object.
  	     *
  	     * @private
  	     * @param {Object} proto The object to inherit from.
  	     * @returns {Object} Returns the new object.
  	     */var baseCreate=function(){function object(){}return function(proto){if(!isObject(proto)){return {};}if(objectCreate){return objectCreate(proto);}object.prototype=proto;var result=new object();object.prototype=undefined$1;return result;};}();/**
  	     * The function whose prototype chain sequence wrappers inherit from.
  	     *
  	     * @private
  	     */function baseLodash(){// No operation performed.
  }/**
  	     * The base constructor for creating `lodash` wrapper objects.
  	     *
  	     * @private
  	     * @param {*} value The value to wrap.
  	     * @param {boolean} [chainAll] Enable explicit method chain sequences.
  	     */function LodashWrapper(value,chainAll){this.__wrapped__=value;this.__actions__=[];this.__chain__=!!chainAll;this.__index__=0;this.__values__=undefined$1;}/**
  	     * By default, the template delimiters used by lodash are like those in
  	     * embedded Ruby (ERB) as well as ES2015 template strings. Change the
  	     * following template settings to use alternative delimiters.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @type {Object}
  	     */lodash.templateSettings={/**
  	       * Used to detect `data` property values to be HTML-escaped.
  	       *
  	       * @memberOf _.templateSettings
  	       * @type {RegExp}
  	       */'escape':reEscape,/**
  	       * Used to detect code to be evaluated.
  	       *
  	       * @memberOf _.templateSettings
  	       * @type {RegExp}
  	       */'evaluate':reEvaluate,/**
  	       * Used to detect `data` property values to inject.
  	       *
  	       * @memberOf _.templateSettings
  	       * @type {RegExp}
  	       */'interpolate':reInterpolate,/**
  	       * Used to reference the data object in the template text.
  	       *
  	       * @memberOf _.templateSettings
  	       * @type {string}
  	       */'variable':'',/**
  	       * Used to import variables into the compiled template.
  	       *
  	       * @memberOf _.templateSettings
  	       * @type {Object}
  	       */'imports':{/**
  	         * A reference to the `lodash` function.
  	         *
  	         * @memberOf _.templateSettings.imports
  	         * @type {Function}
  	         */'_':lodash}};// Ensure wrappers are instances of `baseLodash`.
  lodash.prototype=baseLodash.prototype;lodash.prototype.constructor=lodash;LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;/*------------------------------------------------------------------------*/ /**
  	     * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
  	     *
  	     * @private
  	     * @constructor
  	     * @param {*} value The value to wrap.
  	     */function LazyWrapper(value){this.__wrapped__=value;this.__actions__=[];this.__dir__=1;this.__filtered__=false;this.__iteratees__=[];this.__takeCount__=MAX_ARRAY_LENGTH;this.__views__=[];}/**
  	     * Creates a clone of the lazy wrapper object.
  	     *
  	     * @private
  	     * @name clone
  	     * @memberOf LazyWrapper
  	     * @returns {Object} Returns the cloned `LazyWrapper` object.
  	     */function lazyClone(){var result=new LazyWrapper(this.__wrapped__);result.__actions__=copyArray(this.__actions__);result.__dir__=this.__dir__;result.__filtered__=this.__filtered__;result.__iteratees__=copyArray(this.__iteratees__);result.__takeCount__=this.__takeCount__;result.__views__=copyArray(this.__views__);return result;}/**
  	     * Reverses the direction of lazy iteration.
  	     *
  	     * @private
  	     * @name reverse
  	     * @memberOf LazyWrapper
  	     * @returns {Object} Returns the new reversed `LazyWrapper` object.
  	     */function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1;result.__filtered__=true;}else {result=this.clone();result.__dir__*=-1;}return result;}/**
  	     * Extracts the unwrapped value from its lazy wrapper.
  	     *
  	     * @private
  	     * @name value
  	     * @memberOf LazyWrapper
  	     * @returns {*} Returns the unwrapped value.
  	     */function lazyValue(){var array=this.__wrapped__.value(),dir=this.__dir__,isArr=isArray(array),isRight=dir<0,arrLength=isArr?array.length:0,view=getView(0,arrLength,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,iteratees=this.__iteratees__,iterLength=iteratees.length,resIndex=0,takeCount=nativeMin(length,this.__takeCount__);if(!isArr||!isRight&&arrLength==length&&takeCount==length){return baseWrapperValue(array,this.__actions__);}var result=[];outer:while(length--&&resIndex<takeCount){index+=dir;var iterIndex=-1,value=array[index];while(++iterIndex<iterLength){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type,computed=iteratee(value);if(type==LAZY_MAP_FLAG){value=computed;}else if(!computed){if(type==LAZY_FILTER_FLAG){continue outer;}else {break outer;}}}result[resIndex++]=value;}return result;}// Ensure `LazyWrapper` is an instance of `baseLodash`.
  LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;/*------------------------------------------------------------------------*/ /**
  	     * Creates a hash object.
  	     *
  	     * @private
  	     * @constructor
  	     * @param {Array} [entries] The key-value pairs to cache.
  	     */function Hash(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
  	     * Removes all key-value entries from the hash.
  	     *
  	     * @private
  	     * @name clear
  	     * @memberOf Hash
  	     */function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{};this.size=0;}/**
  	     * Removes `key` and its value from the hash.
  	     *
  	     * @private
  	     * @name delete
  	     * @memberOf Hash
  	     * @param {Object} hash The hash to modify.
  	     * @param {string} key The key of the value to remove.
  	     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  	     */function hashDelete(key){var result=this.has(key)&&delete this.__data__[key];this.size-=result?1:0;return result;}/**
  	     * Gets the hash value for `key`.
  	     *
  	     * @private
  	     * @name get
  	     * @memberOf Hash
  	     * @param {string} key The key of the value to get.
  	     * @returns {*} Returns the entry value.
  	     */function hashGet(key){var data=this.__data__;if(nativeCreate){var result=data[key];return result===HASH_UNDEFINED?undefined$1:result;}return hasOwnProperty.call(data,key)?data[key]:undefined$1;}/**
  	     * Checks if a hash value for `key` exists.
  	     *
  	     * @private
  	     * @name has
  	     * @memberOf Hash
  	     * @param {string} key The key of the entry to check.
  	     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  	     */function hashHas(key){var data=this.__data__;return nativeCreate?data[key]!==undefined$1:hasOwnProperty.call(data,key);}/**
  	     * Sets the hash `key` to `value`.
  	     *
  	     * @private
  	     * @name set
  	     * @memberOf Hash
  	     * @param {string} key The key of the value to set.
  	     * @param {*} value The value to set.
  	     * @returns {Object} Returns the hash instance.
  	     */function hashSet(key,value){var data=this.__data__;this.size+=this.has(key)?0:1;data[key]=nativeCreate&&value===undefined$1?HASH_UNDEFINED:value;return this;}// Add methods to `Hash`.
  Hash.prototype.clear=hashClear;Hash.prototype['delete']=hashDelete;Hash.prototype.get=hashGet;Hash.prototype.has=hashHas;Hash.prototype.set=hashSet;/*------------------------------------------------------------------------*/ /**
  	     * Creates an list cache object.
  	     *
  	     * @private
  	     * @constructor
  	     * @param {Array} [entries] The key-value pairs to cache.
  	     */function ListCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
  	     * Removes all key-value entries from the list cache.
  	     *
  	     * @private
  	     * @name clear
  	     * @memberOf ListCache
  	     */function listCacheClear(){this.__data__=[];this.size=0;}/**
  	     * Removes `key` and its value from the list cache.
  	     *
  	     * @private
  	     * @name delete
  	     * @memberOf ListCache
  	     * @param {string} key The key of the value to remove.
  	     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  	     */function listCacheDelete(key){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){return false;}var lastIndex=data.length-1;if(index==lastIndex){data.pop();}else {splice.call(data,index,1);}--this.size;return true;}/**
  	     * Gets the list cache value for `key`.
  	     *
  	     * @private
  	     * @name get
  	     * @memberOf ListCache
  	     * @param {string} key The key of the value to get.
  	     * @returns {*} Returns the entry value.
  	     */function listCacheGet(key){var data=this.__data__,index=assocIndexOf(data,key);return index<0?undefined$1:data[index][1];}/**
  	     * Checks if a list cache value for `key` exists.
  	     *
  	     * @private
  	     * @name has
  	     * @memberOf ListCache
  	     * @param {string} key The key of the entry to check.
  	     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  	     */function listCacheHas(key){return assocIndexOf(this.__data__,key)>-1;}/**
  	     * Sets the list cache `key` to `value`.
  	     *
  	     * @private
  	     * @name set
  	     * @memberOf ListCache
  	     * @param {string} key The key of the value to set.
  	     * @param {*} value The value to set.
  	     * @returns {Object} Returns the list cache instance.
  	     */function listCacheSet(key,value){var data=this.__data__,index=assocIndexOf(data,key);if(index<0){++this.size;data.push([key,value]);}else {data[index][1]=value;}return this;}// Add methods to `ListCache`.
  ListCache.prototype.clear=listCacheClear;ListCache.prototype['delete']=listCacheDelete;ListCache.prototype.get=listCacheGet;ListCache.prototype.has=listCacheHas;ListCache.prototype.set=listCacheSet;/*------------------------------------------------------------------------*/ /**
  	     * Creates a map cache object to store key-value pairs.
  	     *
  	     * @private
  	     * @constructor
  	     * @param {Array} [entries] The key-value pairs to cache.
  	     */function MapCache(entries){var index=-1,length=entries==null?0:entries.length;this.clear();while(++index<length){var entry=entries[index];this.set(entry[0],entry[1]);}}/**
  	     * Removes all key-value entries from the map.
  	     *
  	     * @private
  	     * @name clear
  	     * @memberOf MapCache
  	     */function mapCacheClear(){this.size=0;this.__data__={'hash':new Hash(),'map':new(Map||ListCache)(),'string':new Hash()};}/**
  	     * Removes `key` and its value from the map.
  	     *
  	     * @private
  	     * @name delete
  	     * @memberOf MapCache
  	     * @param {string} key The key of the value to remove.
  	     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  	     */function mapCacheDelete(key){var result=getMapData(this,key)['delete'](key);this.size-=result?1:0;return result;}/**
  	     * Gets the map value for `key`.
  	     *
  	     * @private
  	     * @name get
  	     * @memberOf MapCache
  	     * @param {string} key The key of the value to get.
  	     * @returns {*} Returns the entry value.
  	     */function mapCacheGet(key){return getMapData(this,key).get(key);}/**
  	     * Checks if a map value for `key` exists.
  	     *
  	     * @private
  	     * @name has
  	     * @memberOf MapCache
  	     * @param {string} key The key of the entry to check.
  	     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  	     */function mapCacheHas(key){return getMapData(this,key).has(key);}/**
  	     * Sets the map `key` to `value`.
  	     *
  	     * @private
  	     * @name set
  	     * @memberOf MapCache
  	     * @param {string} key The key of the value to set.
  	     * @param {*} value The value to set.
  	     * @returns {Object} Returns the map cache instance.
  	     */function mapCacheSet(key,value){var data=getMapData(this,key),size=data.size;data.set(key,value);this.size+=data.size==size?0:1;return this;}// Add methods to `MapCache`.
  MapCache.prototype.clear=mapCacheClear;MapCache.prototype['delete']=mapCacheDelete;MapCache.prototype.get=mapCacheGet;MapCache.prototype.has=mapCacheHas;MapCache.prototype.set=mapCacheSet;/*------------------------------------------------------------------------*/ /**
  	     *
  	     * Creates an array cache object to store unique values.
  	     *
  	     * @private
  	     * @constructor
  	     * @param {Array} [values] The values to cache.
  	     */function SetCache(values){var index=-1,length=values==null?0:values.length;this.__data__=new MapCache();while(++index<length){this.add(values[index]);}}/**
  	     * Adds `value` to the array cache.
  	     *
  	     * @private
  	     * @name add
  	     * @memberOf SetCache
  	     * @alias push
  	     * @param {*} value The value to cache.
  	     * @returns {Object} Returns the cache instance.
  	     */function setCacheAdd(value){this.__data__.set(value,HASH_UNDEFINED);return this;}/**
  	     * Checks if `value` is in the array cache.
  	     *
  	     * @private
  	     * @name has
  	     * @memberOf SetCache
  	     * @param {*} value The value to search for.
  	     * @returns {number} Returns `true` if `value` is found, else `false`.
  	     */function setCacheHas(value){return this.__data__.has(value);}// Add methods to `SetCache`.
  SetCache.prototype.add=SetCache.prototype.push=setCacheAdd;SetCache.prototype.has=setCacheHas;/*------------------------------------------------------------------------*/ /**
  	     * Creates a stack cache object to store key-value pairs.
  	     *
  	     * @private
  	     * @constructor
  	     * @param {Array} [entries] The key-value pairs to cache.
  	     */function Stack(entries){var data=this.__data__=new ListCache(entries);this.size=data.size;}/**
  	     * Removes all key-value entries from the stack.
  	     *
  	     * @private
  	     * @name clear
  	     * @memberOf Stack
  	     */function stackClear(){this.__data__=new ListCache();this.size=0;}/**
  	     * Removes `key` and its value from the stack.
  	     *
  	     * @private
  	     * @name delete
  	     * @memberOf Stack
  	     * @param {string} key The key of the value to remove.
  	     * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  	     */function stackDelete(key){var data=this.__data__,result=data['delete'](key);this.size=data.size;return result;}/**
  	     * Gets the stack value for `key`.
  	     *
  	     * @private
  	     * @name get
  	     * @memberOf Stack
  	     * @param {string} key The key of the value to get.
  	     * @returns {*} Returns the entry value.
  	     */function stackGet(key){return this.__data__.get(key);}/**
  	     * Checks if a stack value for `key` exists.
  	     *
  	     * @private
  	     * @name has
  	     * @memberOf Stack
  	     * @param {string} key The key of the entry to check.
  	     * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  	     */function stackHas(key){return this.__data__.has(key);}/**
  	     * Sets the stack `key` to `value`.
  	     *
  	     * @private
  	     * @name set
  	     * @memberOf Stack
  	     * @param {string} key The key of the value to set.
  	     * @param {*} value The value to set.
  	     * @returns {Object} Returns the stack cache instance.
  	     */function stackSet(key,value){var data=this.__data__;if(data instanceof ListCache){var pairs=data.__data__;if(!Map||pairs.length<LARGE_ARRAY_SIZE-1){pairs.push([key,value]);this.size=++data.size;return this;}data=this.__data__=new MapCache(pairs);}data.set(key,value);this.size=data.size;return this;}// Add methods to `Stack`.
  Stack.prototype.clear=stackClear;Stack.prototype['delete']=stackDelete;Stack.prototype.get=stackGet;Stack.prototype.has=stackHas;Stack.prototype.set=stackSet;/*------------------------------------------------------------------------*/ /**
  	     * Creates an array of the enumerable property names of the array-like `value`.
  	     *
  	     * @private
  	     * @param {*} value The value to query.
  	     * @param {boolean} inherited Specify returning inherited property names.
  	     * @returns {Array} Returns the array of property names.
  	     */function arrayLikeKeys(value,inherited){var isArr=isArray(value),isArg=!isArr&&isArguments(value),isBuff=!isArr&&!isArg&&isBuffer(value),isType=!isArr&&!isArg&&!isBuff&&isTypedArray(value),skipIndexes=isArr||isArg||isBuff||isType,result=skipIndexes?baseTimes(value.length,String):[],length=result.length;for(var key in value){if((inherited||hasOwnProperty.call(value,key))&&!(skipIndexes&&(// Safari 9 has enumerable `arguments.length` in strict mode.
  key=='length'||// Node.js 0.10 has enumerable non-index properties on buffers.
  isBuff&&(key=='offset'||key=='parent')||// PhantomJS 2 has enumerable non-index properties on typed arrays.
  isType&&(key=='buffer'||key=='byteLength'||key=='byteOffset')||// Skip index properties.
  isIndex(key,length)))){result.push(key);}}return result;}/**
  	     * A specialized version of `_.sample` for arrays.
  	     *
  	     * @private
  	     * @param {Array} array The array to sample.
  	     * @returns {*} Returns the random element.
  	     */function arraySample(array){var length=array.length;return length?array[baseRandom(0,length-1)]:undefined$1;}/**
  	     * A specialized version of `_.sampleSize` for arrays.
  	     *
  	     * @private
  	     * @param {Array} array The array to sample.
  	     * @param {number} n The number of elements to sample.
  	     * @returns {Array} Returns the random elements.
  	     */function arraySampleSize(array,n){return shuffleSelf(copyArray(array),baseClamp(n,0,array.length));}/**
  	     * A specialized version of `_.shuffle` for arrays.
  	     *
  	     * @private
  	     * @param {Array} array The array to shuffle.
  	     * @returns {Array} Returns the new shuffled array.
  	     */function arrayShuffle(array){return shuffleSelf(copyArray(array));}/**
  	     * This function is like `assignValue` except that it doesn't assign
  	     * `undefined` values.
  	     *
  	     * @private
  	     * @param {Object} object The object to modify.
  	     * @param {string} key The key of the property to assign.
  	     * @param {*} value The value to assign.
  	     */function assignMergeValue(object,key,value){if(value!==undefined$1&&!eq(object[key],value)||value===undefined$1&&!(key in object)){baseAssignValue(object,key,value);}}/**
  	     * Assigns `value` to `key` of `object` if the existing value is not equivalent
  	     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons.
  	     *
  	     * @private
  	     * @param {Object} object The object to modify.
  	     * @param {string} key The key of the property to assign.
  	     * @param {*} value The value to assign.
  	     */function assignValue(object,key,value){var objValue=object[key];if(!(hasOwnProperty.call(object,key)&&eq(objValue,value))||value===undefined$1&&!(key in object)){baseAssignValue(object,key,value);}}/**
  	     * Gets the index at which the `key` is found in `array` of key-value pairs.
  	     *
  	     * @private
  	     * @param {Array} array The array to inspect.
  	     * @param {*} key The key to search for.
  	     * @returns {number} Returns the index of the matched value, else `-1`.
  	     */function assocIndexOf(array,key){var length=array.length;while(length--){if(eq(array[length][0],key)){return length;}}return -1;}/**
  	     * Aggregates elements of `collection` on `accumulator` with keys transformed
  	     * by `iteratee` and values set by `setter`.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} setter The function to set `accumulator` values.
  	     * @param {Function} iteratee The iteratee to transform keys.
  	     * @param {Object} accumulator The initial aggregated object.
  	     * @returns {Function} Returns `accumulator`.
  	     */function baseAggregator(collection,setter,iteratee,accumulator){baseEach(collection,function(value,key,collection){setter(accumulator,value,iteratee(value),collection);});return accumulator;}/**
  	     * The base implementation of `_.assign` without support for multiple sources
  	     * or `customizer` functions.
  	     *
  	     * @private
  	     * @param {Object} object The destination object.
  	     * @param {Object} source The source object.
  	     * @returns {Object} Returns `object`.
  	     */function baseAssign(object,source){return object&&copyObject(source,keys(source),object);}/**
  	     * The base implementation of `_.assignIn` without support for multiple sources
  	     * or `customizer` functions.
  	     *
  	     * @private
  	     * @param {Object} object The destination object.
  	     * @param {Object} source The source object.
  	     * @returns {Object} Returns `object`.
  	     */function baseAssignIn(object,source){return object&&copyObject(source,keysIn(source),object);}/**
  	     * The base implementation of `assignValue` and `assignMergeValue` without
  	     * value checks.
  	     *
  	     * @private
  	     * @param {Object} object The object to modify.
  	     * @param {string} key The key of the property to assign.
  	     * @param {*} value The value to assign.
  	     */function baseAssignValue(object,key,value){if(key=='__proto__'&&defineProperty){defineProperty(object,key,{'configurable':true,'enumerable':true,'value':value,'writable':true});}else {object[key]=value;}}/**
  	     * The base implementation of `_.at` without support for individual paths.
  	     *
  	     * @private
  	     * @param {Object} object The object to iterate over.
  	     * @param {string[]} paths The property paths to pick.
  	     * @returns {Array} Returns the picked elements.
  	     */function baseAt(object,paths){var index=-1,length=paths.length,result=Array(length),skip=object==null;while(++index<length){result[index]=skip?undefined$1:get(object,paths[index]);}return result;}/**
  	     * The base implementation of `_.clamp` which doesn't coerce arguments.
  	     *
  	     * @private
  	     * @param {number} number The number to clamp.
  	     * @param {number} [lower] The lower bound.
  	     * @param {number} upper The upper bound.
  	     * @returns {number} Returns the clamped number.
  	     */function baseClamp(number,lower,upper){if(number===number){if(upper!==undefined$1){number=number<=upper?number:upper;}if(lower!==undefined$1){number=number>=lower?number:lower;}}return number;}/**
  	     * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  	     * traversed objects.
  	     *
  	     * @private
  	     * @param {*} value The value to clone.
  	     * @param {boolean} bitmask The bitmask flags.
  	     *  1 - Deep clone
  	     *  2 - Flatten inherited properties
  	     *  4 - Clone symbols
  	     * @param {Function} [customizer] The function to customize cloning.
  	     * @param {string} [key] The key of `value`.
  	     * @param {Object} [object] The parent object of `value`.
  	     * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  	     * @returns {*} Returns the cloned value.
  	     */function baseClone(value,bitmask,customizer,key,object,stack){var result,isDeep=bitmask&CLONE_DEEP_FLAG,isFlat=bitmask&CLONE_FLAT_FLAG,isFull=bitmask&CLONE_SYMBOLS_FLAG;if(customizer){result=object?customizer(value,key,object,stack):customizer(value);}if(result!==undefined$1){return result;}if(!isObject(value)){return value;}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return copyArray(value,result);}}else {var tag=getTag(value),isFunc=tag==funcTag||tag==genTag;if(isBuffer(value)){return cloneBuffer(value,isDeep);}if(tag==objectTag||tag==argsTag||isFunc&&!object){result=isFlat||isFunc?{}:initCloneObject(value);if(!isDeep){return isFlat?copySymbolsIn(value,baseAssignIn(result,value)):copySymbols(value,baseAssign(result,value));}}else {if(!cloneableTags[tag]){return object?value:{};}result=initCloneByTag(value,tag,isDeep);}}// Check for circular references and return its corresponding clone.
  stack||(stack=new Stack());var stacked=stack.get(value);if(stacked){return stacked;}stack.set(value,result);if(isSet(value)){value.forEach(function(subValue){result.add(baseClone(subValue,bitmask,customizer,subValue,value,stack));});}else if(isMap(value)){value.forEach(function(subValue,key){result.set(key,baseClone(subValue,bitmask,customizer,key,value,stack));});}var keysFunc=isFull?isFlat?getAllKeysIn:getAllKeys:isFlat?keysIn:keys;var props=isArr?undefined$1:keysFunc(value);arrayEach(props||value,function(subValue,key){if(props){key=subValue;subValue=value[key];}// Recursively populate clone (susceptible to call stack limits).
  assignValue(result,key,baseClone(subValue,bitmask,customizer,key,value,stack));});return result;}/**
  	     * The base implementation of `_.conforms` which doesn't clone `source`.
  	     *
  	     * @private
  	     * @param {Object} source The object of property predicates to conform to.
  	     * @returns {Function} Returns the new spec function.
  	     */function baseConforms(source){var props=keys(source);return function(object){return baseConformsTo(object,source,props);};}/**
  	     * The base implementation of `_.conformsTo` which accepts `props` to check.
  	     *
  	     * @private
  	     * @param {Object} object The object to inspect.
  	     * @param {Object} source The object of property predicates to conform to.
  	     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  	     */function baseConformsTo(object,source,props){var length=props.length;if(object==null){return !length;}object=Object(object);while(length--){var key=props[length],predicate=source[key],value=object[key];if(value===undefined$1&&!(key in object)||!predicate(value)){return false;}}return true;}/**
  	     * The base implementation of `_.delay` and `_.defer` which accepts `args`
  	     * to provide to `func`.
  	     *
  	     * @private
  	     * @param {Function} func The function to delay.
  	     * @param {number} wait The number of milliseconds to delay invocation.
  	     * @param {Array} args The arguments to provide to `func`.
  	     * @returns {number|Object} Returns the timer id or timeout object.
  	     */function baseDelay(func,wait,args){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return setTimeout(function(){func.apply(undefined$1,args);},wait);}/**
  	     * The base implementation of methods like `_.difference` without support
  	     * for excluding multiple arrays or iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array} array The array to inspect.
  	     * @param {Array} values The values to exclude.
  	     * @param {Function} [iteratee] The iteratee invoked per element.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new array of filtered values.
  	     */function baseDifference(array,values,iteratee,comparator){var index=-1,includes=arrayIncludes,isCommon=true,length=array.length,result=[],valuesLength=values.length;if(!length){return result;}if(iteratee){values=arrayMap(values,baseUnary(iteratee));}if(comparator){includes=arrayIncludesWith;isCommon=false;}else if(values.length>=LARGE_ARRAY_SIZE){includes=cacheHas;isCommon=false;values=new SetCache(values);}outer:while(++index<length){var value=array[index],computed=iteratee==null?value:iteratee(value);value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var valuesIndex=valuesLength;while(valuesIndex--){if(values[valuesIndex]===computed){continue outer;}}result.push(value);}else if(!includes(values,computed,comparator)){result.push(value);}}return result;}/**
  	     * The base implementation of `_.forEach` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} iteratee The function invoked per iteration.
  	     * @returns {Array|Object} Returns `collection`.
  	     */var baseEach=createBaseEach(baseForOwn);/**
  	     * The base implementation of `_.forEachRight` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} iteratee The function invoked per iteration.
  	     * @returns {Array|Object} Returns `collection`.
  	     */var baseEachRight=createBaseEach(baseForOwnRight,true);/**
  	     * The base implementation of `_.every` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} predicate The function invoked per iteration.
  	     * @returns {boolean} Returns `true` if all elements pass the predicate check,
  	     *  else `false`
  	     */function baseEvery(collection,predicate){var result=true;baseEach(collection,function(value,index,collection){result=!!predicate(value,index,collection);return result;});return result;}/**
  	     * The base implementation of methods like `_.max` and `_.min` which accepts a
  	     * `comparator` to determine the extremum value.
  	     *
  	     * @private
  	     * @param {Array} array The array to iterate over.
  	     * @param {Function} iteratee The iteratee invoked per iteration.
  	     * @param {Function} comparator The comparator used to compare values.
  	     * @returns {*} Returns the extremum value.
  	     */function baseExtremum(array,iteratee,comparator){var index=-1,length=array.length;while(++index<length){var value=array[index],current=iteratee(value);if(current!=null&&(computed===undefined$1?current===current&&!isSymbol(current):comparator(current,computed))){var computed=current,result=value;}}return result;}/**
  	     * The base implementation of `_.fill` without an iteratee call guard.
  	     *
  	     * @private
  	     * @param {Array} array The array to fill.
  	     * @param {*} value The value to fill `array` with.
  	     * @param {number} [start=0] The start position.
  	     * @param {number} [end=array.length] The end position.
  	     * @returns {Array} Returns `array`.
  	     */function baseFill(array,value,start,end){var length=array.length;start=toInteger(start);if(start<0){start=-start>length?0:length+start;}end=end===undefined$1||end>length?length:toInteger(end);if(end<0){end+=length;}end=start>end?0:toLength(end);while(start<end){array[start++]=value;}return array;}/**
  	     * The base implementation of `_.filter` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} predicate The function invoked per iteration.
  	     * @returns {Array} Returns the new filtered array.
  	     */function baseFilter(collection,predicate){var result=[];baseEach(collection,function(value,index,collection){if(predicate(value,index,collection)){result.push(value);}});return result;}/**
  	     * The base implementation of `_.flatten` with support for restricting flattening.
  	     *
  	     * @private
  	     * @param {Array} array The array to flatten.
  	     * @param {number} depth The maximum recursion depth.
  	     * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
  	     * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
  	     * @param {Array} [result=[]] The initial result value.
  	     * @returns {Array} Returns the new flattened array.
  	     */function baseFlatten(array,depth,predicate,isStrict,result){var index=-1,length=array.length;predicate||(predicate=isFlattenable);result||(result=[]);while(++index<length){var value=array[index];if(depth>0&&predicate(value)){if(depth>1){// Recursively flatten arrays (susceptible to call stack limits).
  baseFlatten(value,depth-1,predicate,isStrict,result);}else {arrayPush(result,value);}}else if(!isStrict){result[result.length]=value;}}return result;}/**
  	     * The base implementation of `baseForOwn` which iterates over `object`
  	     * properties returned by `keysFunc` and invokes `iteratee` for each property.
  	     * Iteratee functions may exit iteration early by explicitly returning `false`.
  	     *
  	     * @private
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} iteratee The function invoked per iteration.
  	     * @param {Function} keysFunc The function to get the keys of `object`.
  	     * @returns {Object} Returns `object`.
  	     */var baseFor=createBaseFor();/**
  	     * This function is like `baseFor` except that it iterates over properties
  	     * in the opposite order.
  	     *
  	     * @private
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} iteratee The function invoked per iteration.
  	     * @param {Function} keysFunc The function to get the keys of `object`.
  	     * @returns {Object} Returns `object`.
  	     */var baseForRight=createBaseFor(true);/**
  	     * The base implementation of `_.forOwn` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} iteratee The function invoked per iteration.
  	     * @returns {Object} Returns `object`.
  	     */function baseForOwn(object,iteratee){return object&&baseFor(object,iteratee,keys);}/**
  	     * The base implementation of `_.forOwnRight` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} iteratee The function invoked per iteration.
  	     * @returns {Object} Returns `object`.
  	     */function baseForOwnRight(object,iteratee){return object&&baseForRight(object,iteratee,keys);}/**
  	     * The base implementation of `_.functions` which creates an array of
  	     * `object` function property names filtered from `props`.
  	     *
  	     * @private
  	     * @param {Object} object The object to inspect.
  	     * @param {Array} props The property names to filter.
  	     * @returns {Array} Returns the function names.
  	     */function baseFunctions(object,props){return arrayFilter(props,function(key){return isFunction(object[key]);});}/**
  	     * The base implementation of `_.get` without support for default values.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path of the property to get.
  	     * @returns {*} Returns the resolved value.
  	     */function baseGet(object,path){path=castPath(path,object);var index=0,length=path.length;while(object!=null&&index<length){object=object[toKey(path[index++])];}return index&&index==length?object:undefined$1;}/**
  	     * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  	     * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  	     * symbols of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @param {Function} keysFunc The function to get the keys of `object`.
  	     * @param {Function} symbolsFunc The function to get the symbols of `object`.
  	     * @returns {Array} Returns the array of property names and symbols.
  	     */function baseGetAllKeys(object,keysFunc,symbolsFunc){var result=keysFunc(object);return isArray(object)?result:arrayPush(result,symbolsFunc(object));}/**
  	     * The base implementation of `getTag` without fallbacks for buggy environments.
  	     *
  	     * @private
  	     * @param {*} value The value to query.
  	     * @returns {string} Returns the `toStringTag`.
  	     */function baseGetTag(value){if(value==null){return value===undefined$1?undefinedTag:nullTag;}return symToStringTag&&symToStringTag in Object(value)?getRawTag(value):objectToString(value);}/**
  	     * The base implementation of `_.gt` which doesn't coerce arguments.
  	     *
  	     * @private
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if `value` is greater than `other`,
  	     *  else `false`.
  	     */function baseGt(value,other){return value>other;}/**
  	     * The base implementation of `_.has` without support for deep paths.
  	     *
  	     * @private
  	     * @param {Object} [object] The object to query.
  	     * @param {Array|string} key The key to check.
  	     * @returns {boolean} Returns `true` if `key` exists, else `false`.
  	     */function baseHas(object,key){return object!=null&&hasOwnProperty.call(object,key);}/**
  	     * The base implementation of `_.hasIn` without support for deep paths.
  	     *
  	     * @private
  	     * @param {Object} [object] The object to query.
  	     * @param {Array|string} key The key to check.
  	     * @returns {boolean} Returns `true` if `key` exists, else `false`.
  	     */function baseHasIn(object,key){return object!=null&&key in Object(object);}/**
  	     * The base implementation of `_.inRange` which doesn't coerce arguments.
  	     *
  	     * @private
  	     * @param {number} number The number to check.
  	     * @param {number} start The start of the range.
  	     * @param {number} end The end of the range.
  	     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  	     */function baseInRange(number,start,end){return number>=nativeMin(start,end)&&number<nativeMax(start,end);}/**
  	     * The base implementation of methods like `_.intersection`, without support
  	     * for iteratee shorthands, that accepts an array of arrays to inspect.
  	     *
  	     * @private
  	     * @param {Array} arrays The arrays to inspect.
  	     * @param {Function} [iteratee] The iteratee invoked per element.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new array of shared values.
  	     */function baseIntersection(arrays,iteratee,comparator){var includes=comparator?arrayIncludesWith:arrayIncludes,length=arrays[0].length,othLength=arrays.length,othIndex=othLength,caches=Array(othLength),maxLength=Infinity,result=[];while(othIndex--){var array=arrays[othIndex];if(othIndex&&iteratee){array=arrayMap(array,baseUnary(iteratee));}maxLength=nativeMin(array.length,maxLength);caches[othIndex]=!comparator&&(iteratee||length>=120&&array.length>=120)?new SetCache(othIndex&&array):undefined$1;}array=arrays[0];var index=-1,seen=caches[0];outer:while(++index<length&&result.length<maxLength){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(!(seen?cacheHas(seen,computed):includes(result,computed,comparator))){othIndex=othLength;while(--othIndex){var cache=caches[othIndex];if(!(cache?cacheHas(cache,computed):includes(arrays[othIndex],computed,comparator))){continue outer;}}if(seen){seen.push(computed);}result.push(value);}}return result;}/**
  	     * The base implementation of `_.invert` and `_.invertBy` which inverts
  	     * `object` with values transformed by `iteratee` and set by `setter`.
  	     *
  	     * @private
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} setter The function to set `accumulator` values.
  	     * @param {Function} iteratee The iteratee to transform values.
  	     * @param {Object} accumulator The initial inverted object.
  	     * @returns {Function} Returns `accumulator`.
  	     */function baseInverter(object,setter,iteratee,accumulator){baseForOwn(object,function(value,key,object){setter(accumulator,iteratee(value),key,object);});return accumulator;}/**
  	     * The base implementation of `_.invoke` without support for individual
  	     * method arguments.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path of the method to invoke.
  	     * @param {Array} args The arguments to invoke the method with.
  	     * @returns {*} Returns the result of the invoked method.
  	     */function baseInvoke(object,path,args){path=castPath(path,object);object=parent(object,path);var func=object==null?object:object[toKey(last(path))];return func==null?undefined$1:apply(func,object,args);}/**
  	     * The base implementation of `_.isArguments`.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  	     */function baseIsArguments(value){return isObjectLike(value)&&baseGetTag(value)==argsTag;}/**
  	     * The base implementation of `_.isArrayBuffer` without Node.js optimizations.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  	     */function baseIsArrayBuffer(value){return isObjectLike(value)&&baseGetTag(value)==arrayBufferTag;}/**
  	     * The base implementation of `_.isDate` without Node.js optimizations.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  	     */function baseIsDate(value){return isObjectLike(value)&&baseGetTag(value)==dateTag;}/**
  	     * The base implementation of `_.isEqual` which supports partial comparisons
  	     * and tracks traversed objects.
  	     *
  	     * @private
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @param {boolean} bitmask The bitmask flags.
  	     *  1 - Unordered comparison
  	     *  2 - Partial comparison
  	     * @param {Function} [customizer] The function to customize comparisons.
  	     * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  	     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  	     */function baseIsEqual(value,other,bitmask,customizer,stack){if(value===other){return true;}if(value==null||other==null||!isObjectLike(value)&&!isObjectLike(other)){return value!==value&&other!==other;}return baseIsEqualDeep(value,other,bitmask,customizer,baseIsEqual,stack);}/**
  	     * A specialized version of `baseIsEqual` for arrays and objects which performs
  	     * deep comparisons and tracks traversed objects enabling objects with circular
  	     * references to be compared.
  	     *
  	     * @private
  	     * @param {Object} object The object to compare.
  	     * @param {Object} other The other object to compare.
  	     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  	     * @param {Function} customizer The function to customize comparisons.
  	     * @param {Function} equalFunc The function to determine equivalents of values.
  	     * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  	     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  	     */function baseIsEqualDeep(object,other,bitmask,customizer,equalFunc,stack){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=objIsArr?arrayTag:getTag(object),othTag=othIsArr?arrayTag:getTag(other);objTag=objTag==argsTag?objectTag:objTag;othTag=othTag==argsTag?objectTag:othTag;var objIsObj=objTag==objectTag,othIsObj=othTag==objectTag,isSameTag=objTag==othTag;if(isSameTag&&isBuffer(object)){if(!isBuffer(other)){return false;}objIsArr=true;objIsObj=false;}if(isSameTag&&!objIsObj){stack||(stack=new Stack());return objIsArr||isTypedArray(object)?equalArrays(object,other,bitmask,customizer,equalFunc,stack):equalByTag(object,other,objTag,bitmask,customizer,equalFunc,stack);}if(!(bitmask&COMPARE_PARTIAL_FLAG)){var objIsWrapped=objIsObj&&hasOwnProperty.call(object,'__wrapped__'),othIsWrapped=othIsObj&&hasOwnProperty.call(other,'__wrapped__');if(objIsWrapped||othIsWrapped){var objUnwrapped=objIsWrapped?object.value():object,othUnwrapped=othIsWrapped?other.value():other;stack||(stack=new Stack());return equalFunc(objUnwrapped,othUnwrapped,bitmask,customizer,stack);}}if(!isSameTag){return false;}stack||(stack=new Stack());return equalObjects(object,other,bitmask,customizer,equalFunc,stack);}/**
  	     * The base implementation of `_.isMap` without Node.js optimizations.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  	     */function baseIsMap(value){return isObjectLike(value)&&getTag(value)==mapTag;}/**
  	     * The base implementation of `_.isMatch` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Object} object The object to inspect.
  	     * @param {Object} source The object of property values to match.
  	     * @param {Array} matchData The property names, values, and compare flags to match.
  	     * @param {Function} [customizer] The function to customize comparisons.
  	     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  	     */function baseIsMatch(object,source,matchData,customizer){var index=matchData.length,length=index,noCustomizer=!customizer;if(object==null){return !length;}object=Object(object);while(index--){var data=matchData[index];if(noCustomizer&&data[2]?data[1]!==object[data[0]]:!(data[0]in object)){return false;}}while(++index<length){data=matchData[index];var key=data[0],objValue=object[key],srcValue=data[1];if(noCustomizer&&data[2]){if(objValue===undefined$1&&!(key in object)){return false;}}else {var stack=new Stack();if(customizer){var result=customizer(objValue,srcValue,key,object,source,stack);}if(!(result===undefined$1?baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG,customizer,stack):result)){return false;}}}return true;}/**
  	     * The base implementation of `_.isNative` without bad shim checks.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a native function,
  	     *  else `false`.
  	     */function baseIsNative(value){if(!isObject(value)||isMasked(value)){return false;}var pattern=isFunction(value)?reIsNative:reIsHostCtor;return pattern.test(toSource(value));}/**
  	     * The base implementation of `_.isRegExp` without Node.js optimizations.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  	     */function baseIsRegExp(value){return isObjectLike(value)&&baseGetTag(value)==regexpTag;}/**
  	     * The base implementation of `_.isSet` without Node.js optimizations.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  	     */function baseIsSet(value){return isObjectLike(value)&&getTag(value)==setTag;}/**
  	     * The base implementation of `_.isTypedArray` without Node.js optimizations.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  	     */function baseIsTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[baseGetTag(value)];}/**
  	     * The base implementation of `_.iteratee`.
  	     *
  	     * @private
  	     * @param {*} [value=_.identity] The value to convert to an iteratee.
  	     * @returns {Function} Returns the iteratee.
  	     */function baseIteratee(value){// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
  if(typeof value=='function'){return value;}if(value==null){return identity;}if(typeof value=='object'){return isArray(value)?baseMatchesProperty(value[0],value[1]):baseMatches(value);}return property(value);}/**
  	     * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property names.
  	     */function baseKeys(object){if(!isPrototype(object)){return nativeKeys(object);}var result=[];for(var key in Object(object)){if(hasOwnProperty.call(object,key)&&key!='constructor'){result.push(key);}}return result;}/**
  	     * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property names.
  	     */function baseKeysIn(object){if(!isObject(object)){return nativeKeysIn(object);}var isProto=isPrototype(object),result=[];for(var key in object){if(!(key=='constructor'&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key);}}return result;}/**
  	     * The base implementation of `_.lt` which doesn't coerce arguments.
  	     *
  	     * @private
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if `value` is less than `other`,
  	     *  else `false`.
  	     */function baseLt(value,other){return value<other;}/**
  	     * The base implementation of `_.map` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} iteratee The function invoked per iteration.
  	     * @returns {Array} Returns the new mapped array.
  	     */function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value,key,collection){result[++index]=iteratee(value,key,collection);});return result;}/**
  	     * The base implementation of `_.matches` which doesn't clone `source`.
  	     *
  	     * @private
  	     * @param {Object} source The object of property values to match.
  	     * @returns {Function} Returns the new spec function.
  	     */function baseMatches(source){var matchData=getMatchData(source);if(matchData.length==1&&matchData[0][2]){return matchesStrictComparable(matchData[0][0],matchData[0][1]);}return function(object){return object===source||baseIsMatch(object,source,matchData);};}/**
  	     * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
  	     *
  	     * @private
  	     * @param {string} path The path of the property to get.
  	     * @param {*} srcValue The value to match.
  	     * @returns {Function} Returns the new spec function.
  	     */function baseMatchesProperty(path,srcValue){if(isKey(path)&&isStrictComparable(srcValue)){return matchesStrictComparable(toKey(path),srcValue);}return function(object){var objValue=get(object,path);return objValue===undefined$1&&objValue===srcValue?hasIn(object,path):baseIsEqual(srcValue,objValue,COMPARE_PARTIAL_FLAG|COMPARE_UNORDERED_FLAG);};}/**
  	     * The base implementation of `_.merge` without support for multiple sources.
  	     *
  	     * @private
  	     * @param {Object} object The destination object.
  	     * @param {Object} source The source object.
  	     * @param {number} srcIndex The index of `source`.
  	     * @param {Function} [customizer] The function to customize merged values.
  	     * @param {Object} [stack] Tracks traversed source values and their merged
  	     *  counterparts.
  	     */function baseMerge(object,source,srcIndex,customizer,stack){if(object===source){return;}baseFor(source,function(srcValue,key){stack||(stack=new Stack());if(isObject(srcValue)){baseMergeDeep(object,source,key,srcIndex,baseMerge,customizer,stack);}else {var newValue=customizer?customizer(safeGet(object,key),srcValue,key+'',object,source,stack):undefined$1;if(newValue===undefined$1){newValue=srcValue;}assignMergeValue(object,key,newValue);}},keysIn);}/**
  	     * A specialized version of `baseMerge` for arrays and objects which performs
  	     * deep merges and tracks traversed objects enabling objects with circular
  	     * references to be merged.
  	     *
  	     * @private
  	     * @param {Object} object The destination object.
  	     * @param {Object} source The source object.
  	     * @param {string} key The key of the value to merge.
  	     * @param {number} srcIndex The index of `source`.
  	     * @param {Function} mergeFunc The function to merge values.
  	     * @param {Function} [customizer] The function to customize assigned values.
  	     * @param {Object} [stack] Tracks traversed source values and their merged
  	     *  counterparts.
  	     */function baseMergeDeep(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet(object,key),srcValue=safeGet(source,key),stacked=stack.get(srcValue);if(stacked){assignMergeValue(object,key,stacked);return;}var newValue=customizer?customizer(objValue,srcValue,key+'',object,source,stack):undefined$1;var isCommon=newValue===undefined$1;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue;if(isArr||isBuff||isTyped){if(isArray(objValue)){newValue=objValue;}else if(isArrayLikeObject(objValue)){newValue=copyArray(objValue);}else if(isBuff){isCommon=false;newValue=cloneBuffer(srcValue,true);}else if(isTyped){isCommon=false;newValue=cloneTypedArray(srcValue,true);}else {newValue=[];}}else if(isPlainObject(srcValue)||isArguments(srcValue)){newValue=objValue;if(isArguments(objValue)){newValue=toPlainObject(objValue);}else if(!isObject(objValue)||isFunction(objValue)){newValue=initCloneObject(srcValue);}}else {isCommon=false;}}if(isCommon){// Recursively merge objects and arrays (susceptible to call stack limits).
  stack.set(srcValue,newValue);mergeFunc(newValue,srcValue,srcIndex,customizer,stack);stack['delete'](srcValue);}assignMergeValue(object,key,newValue);}/**
  	     * The base implementation of `_.nth` which doesn't coerce arguments.
  	     *
  	     * @private
  	     * @param {Array} array The array to query.
  	     * @param {number} n The index of the element to return.
  	     * @returns {*} Returns the nth element of `array`.
  	     */function baseNth(array,n){var length=array.length;if(!length){return;}n+=n<0?length:0;return isIndex(n,length)?array[n]:undefined$1;}/**
  	     * The base implementation of `_.orderBy` without param guards.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
  	     * @param {string[]} orders The sort orders of `iteratees`.
  	     * @returns {Array} Returns the new sorted array.
  	     */function baseOrderBy(collection,iteratees,orders){if(iteratees.length){iteratees=arrayMap(iteratees,function(iteratee){if(isArray(iteratee)){return function(value){return baseGet(value,iteratee.length===1?iteratee[0]:iteratee);};}return iteratee;});}else {iteratees=[identity];}var index=-1;iteratees=arrayMap(iteratees,baseUnary(getIteratee()));var result=baseMap(collection,function(value,key,collection){var criteria=arrayMap(iteratees,function(iteratee){return iteratee(value);});return {'criteria':criteria,'index':++index,'value':value};});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders);});}/**
  	     * The base implementation of `_.pick` without support for individual
  	     * property identifiers.
  	     *
  	     * @private
  	     * @param {Object} object The source object.
  	     * @param {string[]} paths The property paths to pick.
  	     * @returns {Object} Returns the new object.
  	     */function basePick(object,paths){return basePickBy(object,paths,function(value,path){return hasIn(object,path);});}/**
  	     * The base implementation of  `_.pickBy` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Object} object The source object.
  	     * @param {string[]} paths The property paths to pick.
  	     * @param {Function} predicate The function invoked per property.
  	     * @returns {Object} Returns the new object.
  	     */function basePickBy(object,paths,predicate){var index=-1,length=paths.length,result={};while(++index<length){var path=paths[index],value=baseGet(object,path);if(predicate(value,path)){baseSet(result,castPath(path,object),value);}}return result;}/**
  	     * A specialized version of `baseProperty` which supports deep paths.
  	     *
  	     * @private
  	     * @param {Array|string} path The path of the property to get.
  	     * @returns {Function} Returns the new accessor function.
  	     */function basePropertyDeep(path){return function(object){return baseGet(object,path);};}/**
  	     * The base implementation of `_.pullAllBy` without support for iteratee
  	     * shorthands.
  	     *
  	     * @private
  	     * @param {Array} array The array to modify.
  	     * @param {Array} values The values to remove.
  	     * @param {Function} [iteratee] The iteratee invoked per element.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns `array`.
  	     */function basePullAll(array,values,iteratee,comparator){var indexOf=comparator?baseIndexOfWith:baseIndexOf,index=-1,length=values.length,seen=array;if(array===values){values=copyArray(values);}if(iteratee){seen=arrayMap(array,baseUnary(iteratee));}while(++index<length){var fromIndex=0,value=values[index],computed=iteratee?iteratee(value):value;while((fromIndex=indexOf(seen,computed,fromIndex,comparator))>-1){if(seen!==array){splice.call(seen,fromIndex,1);}splice.call(array,fromIndex,1);}}return array;}/**
  	     * The base implementation of `_.pullAt` without support for individual
  	     * indexes or capturing the removed elements.
  	     *
  	     * @private
  	     * @param {Array} array The array to modify.
  	     * @param {number[]} indexes The indexes of elements to remove.
  	     * @returns {Array} Returns `array`.
  	     */function basePullAt(array,indexes){var length=array?indexes.length:0,lastIndex=length-1;while(length--){var index=indexes[length];if(length==lastIndex||index!==previous){var previous=index;if(isIndex(index)){splice.call(array,index,1);}else {baseUnset(array,index);}}}return array;}/**
  	     * The base implementation of `_.random` without support for returning
  	     * floating-point numbers.
  	     *
  	     * @private
  	     * @param {number} lower The lower bound.
  	     * @param {number} upper The upper bound.
  	     * @returns {number} Returns the random number.
  	     */function baseRandom(lower,upper){return lower+nativeFloor(nativeRandom()*(upper-lower+1));}/**
  	     * The base implementation of `_.range` and `_.rangeRight` which doesn't
  	     * coerce arguments.
  	     *
  	     * @private
  	     * @param {number} start The start of the range.
  	     * @param {number} end The end of the range.
  	     * @param {number} step The value to increment or decrement by.
  	     * @param {boolean} [fromRight] Specify iterating from right to left.
  	     * @returns {Array} Returns the range of numbers.
  	     */function baseRange(start,end,step,fromRight){var index=-1,length=nativeMax(nativeCeil((end-start)/(step||1)),0),result=Array(length);while(length--){result[fromRight?length:++index]=start;start+=step;}return result;}/**
  	     * The base implementation of `_.repeat` which doesn't coerce arguments.
  	     *
  	     * @private
  	     * @param {string} string The string to repeat.
  	     * @param {number} n The number of times to repeat the string.
  	     * @returns {string} Returns the repeated string.
  	     */function baseRepeat(string,n){var result='';if(!string||n<1||n>MAX_SAFE_INTEGER){return result;}// Leverage the exponentiation by squaring algorithm for a faster repeat.
  // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
  do{if(n%2){result+=string;}n=nativeFloor(n/2);if(n){string+=string;}}while(n);return result;}/**
  	     * The base implementation of `_.rest` which doesn't validate or coerce arguments.
  	     *
  	     * @private
  	     * @param {Function} func The function to apply a rest parameter to.
  	     * @param {number} [start=func.length-1] The start position of the rest parameter.
  	     * @returns {Function} Returns the new function.
  	     */function baseRest(func,start){return setToString(overRest(func,start,identity),func+'');}/**
  	     * The base implementation of `_.sample`.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to sample.
  	     * @returns {*} Returns the random element.
  	     */function baseSample(collection){return arraySample(values(collection));}/**
  	     * The base implementation of `_.sampleSize` without param guards.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to sample.
  	     * @param {number} n The number of elements to sample.
  	     * @returns {Array} Returns the random elements.
  	     */function baseSampleSize(collection,n){var array=values(collection);return shuffleSelf(array,baseClamp(n,0,array.length));}/**
  	     * The base implementation of `_.set`.
  	     *
  	     * @private
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The path of the property to set.
  	     * @param {*} value The value to set.
  	     * @param {Function} [customizer] The function to customize path creation.
  	     * @returns {Object} Returns `object`.
  	     */function baseSet(object,path,value,customizer){if(!isObject(object)){return object;}path=castPath(path,object);var index=-1,length=path.length,lastIndex=length-1,nested=object;while(nested!=null&&++index<length){var key=toKey(path[index]),newValue=value;if(key==='__proto__'||key==='constructor'||key==='prototype'){return object;}if(index!=lastIndex){var objValue=nested[key];newValue=customizer?customizer(objValue,key,nested):undefined$1;if(newValue===undefined$1){newValue=isObject(objValue)?objValue:isIndex(path[index+1])?[]:{};}}assignValue(nested,key,newValue);nested=nested[key];}return object;}/**
  	     * The base implementation of `setData` without support for hot loop shorting.
  	     *
  	     * @private
  	     * @param {Function} func The function to associate metadata with.
  	     * @param {*} data The metadata.
  	     * @returns {Function} Returns `func`.
  	     */var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func;};/**
  	     * The base implementation of `setToString` without support for hot loop shorting.
  	     *
  	     * @private
  	     * @param {Function} func The function to modify.
  	     * @param {Function} string The `toString` result.
  	     * @returns {Function} Returns `func`.
  	     */var baseSetToString=!defineProperty?identity:function(func,string){return defineProperty(func,'toString',{'configurable':true,'enumerable':false,'value':constant(string),'writable':true});};/**
  	     * The base implementation of `_.shuffle`.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to shuffle.
  	     * @returns {Array} Returns the new shuffled array.
  	     */function baseShuffle(collection){return shuffleSelf(values(collection));}/**
  	     * The base implementation of `_.slice` without an iteratee call guard.
  	     *
  	     * @private
  	     * @param {Array} array The array to slice.
  	     * @param {number} [start=0] The start position.
  	     * @param {number} [end=array.length] The end position.
  	     * @returns {Array} Returns the slice of `array`.
  	     */function baseSlice(array,start,end){var index=-1,length=array.length;if(start<0){start=-start>length?0:length+start;}end=end>length?length:end;if(end<0){end+=length;}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start];}return result;}/**
  	     * The base implementation of `_.some` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} predicate The function invoked per iteration.
  	     * @returns {boolean} Returns `true` if any element passes the predicate check,
  	     *  else `false`.
  	     */function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return !result;});return !!result;}/**
  	     * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
  	     * performs a binary search of `array` to determine the index at which `value`
  	     * should be inserted into `array` in order to maintain its sort order.
  	     *
  	     * @private
  	     * @param {Array} array The sorted array to inspect.
  	     * @param {*} value The value to evaluate.
  	     * @param {boolean} [retHighest] Specify returning the highest qualified index.
  	     * @returns {number} Returns the index at which `value` should be inserted
  	     *  into `array`.
  	     */function baseSortedIndex(array,value,retHighest){var low=0,high=array==null?low:array.length;if(typeof value=='number'&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){while(low<high){var mid=low+high>>>1,computed=array[mid];if(computed!==null&&!isSymbol(computed)&&(retHighest?computed<=value:computed<value)){low=mid+1;}else {high=mid;}}return high;}return baseSortedIndexBy(array,value,identity,retHighest);}/**
  	     * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
  	     * which invokes `iteratee` for `value` and each element of `array` to compute
  	     * their sort ranking. The iteratee is invoked with one argument; (value).
  	     *
  	     * @private
  	     * @param {Array} array The sorted array to inspect.
  	     * @param {*} value The value to evaluate.
  	     * @param {Function} iteratee The iteratee invoked per element.
  	     * @param {boolean} [retHighest] Specify returning the highest qualified index.
  	     * @returns {number} Returns the index at which `value` should be inserted
  	     *  into `array`.
  	     */function baseSortedIndexBy(array,value,iteratee,retHighest){var low=0,high=array==null?0:array.length;if(high===0){return 0;}value=iteratee(value);var valIsNaN=value!==value,valIsNull=value===null,valIsSymbol=isSymbol(value),valIsUndefined=value===undefined$1;while(low<high){var mid=nativeFloor((low+high)/2),computed=iteratee(array[mid]),othIsDefined=computed!==undefined$1,othIsNull=computed===null,othIsReflexive=computed===computed,othIsSymbol=isSymbol(computed);if(valIsNaN){var setLow=retHighest||othIsReflexive;}else if(valIsUndefined){setLow=othIsReflexive&&(retHighest||othIsDefined);}else if(valIsNull){setLow=othIsReflexive&&othIsDefined&&(retHighest||!othIsNull);}else if(valIsSymbol){setLow=othIsReflexive&&othIsDefined&&!othIsNull&&(retHighest||!othIsSymbol);}else if(othIsNull||othIsSymbol){setLow=false;}else {setLow=retHighest?computed<=value:computed<value;}if(setLow){low=mid+1;}else {high=mid;}}return nativeMin(high,MAX_ARRAY_INDEX);}/**
  	     * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
  	     * support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array} array The array to inspect.
  	     * @param {Function} [iteratee] The iteratee invoked per element.
  	     * @returns {Array} Returns the new duplicate free array.
  	     */function baseSortedUniq(array,iteratee){var index=-1,length=array.length,resIndex=0,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;if(!index||!eq(computed,seen)){var seen=computed;result[resIndex++]=value===0?0:value;}}return result;}/**
  	     * The base implementation of `_.toNumber` which doesn't ensure correct
  	     * conversions of binary, hexadecimal, or octal string values.
  	     *
  	     * @private
  	     * @param {*} value The value to process.
  	     * @returns {number} Returns the number.
  	     */function baseToNumber(value){if(typeof value=='number'){return value;}if(isSymbol(value)){return NAN;}return +value;}/**
  	     * The base implementation of `_.toString` which doesn't convert nullish
  	     * values to empty strings.
  	     *
  	     * @private
  	     * @param {*} value The value to process.
  	     * @returns {string} Returns the string.
  	     */function baseToString(value){// Exit early for strings to avoid a performance hit in some environments.
  if(typeof value=='string'){return value;}if(isArray(value)){// Recursively convert values (susceptible to call stack limits).
  return arrayMap(value,baseToString)+'';}if(isSymbol(value)){return symbolToString?symbolToString.call(value):'';}var result=value+'';return result=='0'&&1/value==-INFINITY?'-0':result;}/**
  	     * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array} array The array to inspect.
  	     * @param {Function} [iteratee] The iteratee invoked per element.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new duplicate free array.
  	     */function baseUniq(array,iteratee,comparator){var index=-1,includes=arrayIncludes,length=array.length,isCommon=true,result=[],seen=result;if(comparator){isCommon=false;includes=arrayIncludesWith;}else if(length>=LARGE_ARRAY_SIZE){var set=iteratee?null:createSet(array);if(set){return setToArray(set);}isCommon=false;includes=cacheHas;seen=new SetCache();}else {seen=iteratee?[]:result;}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value):value;value=comparator||value!==0?value:0;if(isCommon&&computed===computed){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer;}}if(iteratee){seen.push(computed);}result.push(value);}else if(!includes(seen,computed,comparator)){if(seen!==result){seen.push(computed);}result.push(value);}}return result;}/**
  	     * The base implementation of `_.unset`.
  	     *
  	     * @private
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The property path to unset.
  	     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  	     */function baseUnset(object,path){path=castPath(path,object);object=parent(object,path);return object==null||delete object[toKey(last(path))];}/**
  	     * The base implementation of `_.update`.
  	     *
  	     * @private
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The path of the property to update.
  	     * @param {Function} updater The function to produce the updated value.
  	     * @param {Function} [customizer] The function to customize path creation.
  	     * @returns {Object} Returns `object`.
  	     */function baseUpdate(object,path,updater,customizer){return baseSet(object,path,updater(baseGet(object,path)),customizer);}/**
  	     * The base implementation of methods like `_.dropWhile` and `_.takeWhile`
  	     * without support for iteratee shorthands.
  	     *
  	     * @private
  	     * @param {Array} array The array to query.
  	     * @param {Function} predicate The function invoked per iteration.
  	     * @param {boolean} [isDrop] Specify dropping elements instead of taking them.
  	     * @param {boolean} [fromRight] Specify iterating from right to left.
  	     * @returns {Array} Returns the slice of `array`.
  	     */function baseWhile(array,predicate,isDrop,fromRight){var length=array.length,index=fromRight?length:-1;while((fromRight?index--:++index<length)&&predicate(array[index],index,array)){}return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index);}/**
  	     * The base implementation of `wrapperValue` which returns the result of
  	     * performing a sequence of actions on the unwrapped `value`, where each
  	     * successive action is supplied the return value of the previous.
  	     *
  	     * @private
  	     * @param {*} value The unwrapped value.
  	     * @param {Array} actions Actions to perform to resolve the unwrapped value.
  	     * @returns {*} Returns the resolved value.
  	     */function baseWrapperValue(value,actions){var result=value;if(result instanceof LazyWrapper){result=result.value();}return arrayReduce(actions,function(result,action){return action.func.apply(action.thisArg,arrayPush([result],action.args));},result);}/**
  	     * The base implementation of methods like `_.xor`, without support for
  	     * iteratee shorthands, that accepts an array of arrays to inspect.
  	     *
  	     * @private
  	     * @param {Array} arrays The arrays to inspect.
  	     * @param {Function} [iteratee] The iteratee invoked per element.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new array of values.
  	     */function baseXor(arrays,iteratee,comparator){var length=arrays.length;if(length<2){return length?baseUniq(arrays[0]):[];}var index=-1,result=Array(length);while(++index<length){var array=arrays[index],othIndex=-1;while(++othIndex<length){if(othIndex!=index){result[index]=baseDifference(result[index]||array,arrays[othIndex],iteratee,comparator);}}}return baseUniq(baseFlatten(result,1),iteratee,comparator);}/**
  	     * This base implementation of `_.zipObject` which assigns values using `assignFunc`.
  	     *
  	     * @private
  	     * @param {Array} props The property identifiers.
  	     * @param {Array} values The property values.
  	     * @param {Function} assignFunc The function to assign values.
  	     * @returns {Object} Returns the new object.
  	     */function baseZipObject(props,values,assignFunc){var index=-1,length=props.length,valsLength=values.length,result={};while(++index<length){var value=index<valsLength?values[index]:undefined$1;assignFunc(result,props[index],value);}return result;}/**
  	     * Casts `value` to an empty array if it's not an array like object.
  	     *
  	     * @private
  	     * @param {*} value The value to inspect.
  	     * @returns {Array|Object} Returns the cast array-like object.
  	     */function castArrayLikeObject(value){return isArrayLikeObject(value)?value:[];}/**
  	     * Casts `value` to `identity` if it's not a function.
  	     *
  	     * @private
  	     * @param {*} value The value to inspect.
  	     * @returns {Function} Returns cast function.
  	     */function castFunction(value){return typeof value=='function'?value:identity;}/**
  	     * Casts `value` to a path array if it's not one.
  	     *
  	     * @private
  	     * @param {*} value The value to inspect.
  	     * @param {Object} [object] The object to query keys on.
  	     * @returns {Array} Returns the cast property path array.
  	     */function castPath(value,object){if(isArray(value)){return value;}return isKey(value,object)?[value]:stringToPath(toString(value));}/**
  	     * A `baseRest` alias which can be replaced with `identity` by module
  	     * replacement plugins.
  	     *
  	     * @private
  	     * @type {Function}
  	     * @param {Function} func The function to apply a rest parameter to.
  	     * @returns {Function} Returns the new function.
  	     */var castRest=baseRest;/**
  	     * Casts `array` to a slice if it's needed.
  	     *
  	     * @private
  	     * @param {Array} array The array to inspect.
  	     * @param {number} start The start position.
  	     * @param {number} [end=array.length] The end position.
  	     * @returns {Array} Returns the cast slice.
  	     */function castSlice(array,start,end){var length=array.length;end=end===undefined$1?length:end;return !start&&end>=length?array:baseSlice(array,start,end);}/**
  	     * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
  	     *
  	     * @private
  	     * @param {number|Object} id The timer id or timeout object of the timer to clear.
  	     */var clearTimeout=ctxClearTimeout||function(id){return root.clearTimeout(id);};/**
  	     * Creates a clone of  `buffer`.
  	     *
  	     * @private
  	     * @param {Buffer} buffer The buffer to clone.
  	     * @param {boolean} [isDeep] Specify a deep clone.
  	     * @returns {Buffer} Returns the cloned buffer.
  	     */function cloneBuffer(buffer,isDeep){if(isDeep){return buffer.slice();}var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);buffer.copy(result);return result;}/**
  	     * Creates a clone of `arrayBuffer`.
  	     *
  	     * @private
  	     * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  	     * @returns {ArrayBuffer} Returns the cloned array buffer.
  	     */function cloneArrayBuffer(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);new Uint8Array(result).set(new Uint8Array(arrayBuffer));return result;}/**
  	     * Creates a clone of `dataView`.
  	     *
  	     * @private
  	     * @param {Object} dataView The data view to clone.
  	     * @param {boolean} [isDeep] Specify a deep clone.
  	     * @returns {Object} Returns the cloned data view.
  	     */function cloneDataView(dataView,isDeep){var buffer=isDeep?cloneArrayBuffer(dataView.buffer):dataView.buffer;return new dataView.constructor(buffer,dataView.byteOffset,dataView.byteLength);}/**
  	     * Creates a clone of `regexp`.
  	     *
  	     * @private
  	     * @param {Object} regexp The regexp to clone.
  	     * @returns {Object} Returns the cloned regexp.
  	     */function cloneRegExp(regexp){var result=new regexp.constructor(regexp.source,reFlags.exec(regexp));result.lastIndex=regexp.lastIndex;return result;}/**
  	     * Creates a clone of the `symbol` object.
  	     *
  	     * @private
  	     * @param {Object} symbol The symbol object to clone.
  	     * @returns {Object} Returns the cloned symbol object.
  	     */function cloneSymbol(symbol){return symbolValueOf?Object(symbolValueOf.call(symbol)):{};}/**
  	     * Creates a clone of `typedArray`.
  	     *
  	     * @private
  	     * @param {Object} typedArray The typed array to clone.
  	     * @param {boolean} [isDeep] Specify a deep clone.
  	     * @returns {Object} Returns the cloned typed array.
  	     */function cloneTypedArray(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length);}/**
  	     * Compares values to sort them in ascending order.
  	     *
  	     * @private
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {number} Returns the sort order indicator for `value`.
  	     */function compareAscending(value,other){if(value!==other){var valIsDefined=value!==undefined$1,valIsNull=value===null,valIsReflexive=value===value,valIsSymbol=isSymbol(value);var othIsDefined=other!==undefined$1,othIsNull=other===null,othIsReflexive=other===other,othIsSymbol=isSymbol(other);if(!othIsNull&&!othIsSymbol&&!valIsSymbol&&value>other||valIsSymbol&&othIsDefined&&othIsReflexive&&!othIsNull&&!othIsSymbol||valIsNull&&othIsDefined&&othIsReflexive||!valIsDefined&&othIsReflexive||!valIsReflexive){return 1;}if(!valIsNull&&!valIsSymbol&&!othIsSymbol&&value<other||othIsSymbol&&valIsDefined&&valIsReflexive&&!valIsNull&&!valIsSymbol||othIsNull&&valIsDefined&&valIsReflexive||!othIsDefined&&valIsReflexive||!othIsReflexive){return -1;}}return 0;}/**
  	     * Used by `_.orderBy` to compare multiple properties of a value to another
  	     * and stable sort them.
  	     *
  	     * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
  	     * specify an order of "desc" for descending or "asc" for ascending sort order
  	     * of corresponding values.
  	     *
  	     * @private
  	     * @param {Object} object The object to compare.
  	     * @param {Object} other The other object to compare.
  	     * @param {boolean[]|string[]} orders The order to sort by for each property.
  	     * @returns {number} Returns the sort order indicator for `object`.
  	     */function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;while(++index<length){var result=compareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength){return result;}var order=orders[index];return result*(order=='desc'?-1:1);}}// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
  // that causes it, under certain circumstances, to provide the same value for
  // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
  // for more details.
  //
  // This also ensures a stable sort in V8 and other engines.
  // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
  return object.index-other.index;}/**
  	     * Creates an array that is the composition of partially applied arguments,
  	     * placeholders, and provided arguments into a single array of arguments.
  	     *
  	     * @private
  	     * @param {Array} args The provided arguments.
  	     * @param {Array} partials The arguments to prepend to those provided.
  	     * @param {Array} holders The `partials` placeholder indexes.
  	     * @params {boolean} [isCurried] Specify composing for a curried function.
  	     * @returns {Array} Returns the new array of composed arguments.
  	     */function composeArgs(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersLength=holders.length,leftIndex=-1,leftLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(leftLength+rangeLength),isUncurried=!isCurried;while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex];}while(++argsIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[holders[argsIndex]]=args[argsIndex];}}while(rangeLength--){result[leftIndex++]=args[argsIndex++];}return result;}/**
  	     * This function is like `composeArgs` except that the arguments composition
  	     * is tailored for `_.partialRight`.
  	     *
  	     * @private
  	     * @param {Array} args The provided arguments.
  	     * @param {Array} partials The arguments to append to those provided.
  	     * @param {Array} holders The `partials` placeholder indexes.
  	     * @params {boolean} [isCurried] Specify composing for a curried function.
  	     * @returns {Array} Returns the new array of composed arguments.
  	     */function composeArgsRight(args,partials,holders,isCurried){var argsIndex=-1,argsLength=args.length,holdersIndex=-1,holdersLength=holders.length,rightIndex=-1,rightLength=partials.length,rangeLength=nativeMax(argsLength-holdersLength,0),result=Array(rangeLength+rightLength),isUncurried=!isCurried;while(++argsIndex<rangeLength){result[argsIndex]=args[argsIndex];}var offset=argsIndex;while(++rightIndex<rightLength){result[offset+rightIndex]=partials[rightIndex];}while(++holdersIndex<holdersLength){if(isUncurried||argsIndex<argsLength){result[offset+holders[holdersIndex]]=args[argsIndex++];}}return result;}/**
  	     * Copies the values of `source` to `array`.
  	     *
  	     * @private
  	     * @param {Array} source The array to copy values from.
  	     * @param {Array} [array=[]] The array to copy values to.
  	     * @returns {Array} Returns `array`.
  	     */function copyArray(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index];}return array;}/**
  	     * Copies properties of `source` to `object`.
  	     *
  	     * @private
  	     * @param {Object} source The object to copy properties from.
  	     * @param {Array} props The property identifiers to copy.
  	     * @param {Object} [object={}] The object to copy properties to.
  	     * @param {Function} [customizer] The function to customize copied values.
  	     * @returns {Object} Returns `object`.
  	     */function copyObject(source,props,object,customizer){var isNew=!object;object||(object={});var index=-1,length=props.length;while(++index<length){var key=props[index];var newValue=customizer?customizer(object[key],source[key],key,object,source):undefined$1;if(newValue===undefined$1){newValue=source[key];}if(isNew){baseAssignValue(object,key,newValue);}else {assignValue(object,key,newValue);}}return object;}/**
  	     * Copies own symbols of `source` to `object`.
  	     *
  	     * @private
  	     * @param {Object} source The object to copy symbols from.
  	     * @param {Object} [object={}] The object to copy symbols to.
  	     * @returns {Object} Returns `object`.
  	     */function copySymbols(source,object){return copyObject(source,getSymbols(source),object);}/**
  	     * Copies own and inherited symbols of `source` to `object`.
  	     *
  	     * @private
  	     * @param {Object} source The object to copy symbols from.
  	     * @param {Object} [object={}] The object to copy symbols to.
  	     * @returns {Object} Returns `object`.
  	     */function copySymbolsIn(source,object){return copyObject(source,getSymbolsIn(source),object);}/**
  	     * Creates a function like `_.groupBy`.
  	     *
  	     * @private
  	     * @param {Function} setter The function to set accumulator values.
  	     * @param {Function} [initializer] The accumulator object initializer.
  	     * @returns {Function} Returns the new aggregator function.
  	     */function createAggregator(setter,initializer){return function(collection,iteratee){var func=isArray(collection)?arrayAggregator:baseAggregator,accumulator=initializer?initializer():{};return func(collection,setter,getIteratee(iteratee,2),accumulator);};}/**
  	     * Creates a function like `_.assign`.
  	     *
  	     * @private
  	     * @param {Function} assigner The function to assign values.
  	     * @returns {Function} Returns the new assigner function.
  	     */function createAssigner(assigner){return baseRest(function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:undefined$1,guard=length>2?sources[2]:undefined$1;customizer=assigner.length>3&&typeof customizer=='function'?(length--,customizer):undefined$1;if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined$1:customizer;length=1;}object=Object(object);while(++index<length){var source=sources[index];if(source){assigner(object,source,index,customizer);}}return object;});}/**
  	     * Creates a `baseEach` or `baseEachRight` function.
  	     *
  	     * @private
  	     * @param {Function} eachFunc The function to iterate over a collection.
  	     * @param {boolean} [fromRight] Specify iterating from right to left.
  	     * @returns {Function} Returns the new base function.
  	     */function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){if(collection==null){return collection;}if(!isArrayLike(collection)){return eachFunc(collection,iteratee);}var length=collection.length,index=fromRight?length:-1,iterable=Object(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break;}}return collection;};}/**
  	     * Creates a base function for methods like `_.forIn` and `_.forOwn`.
  	     *
  	     * @private
  	     * @param {boolean} [fromRight] Specify iterating from right to left.
  	     * @returns {Function} Returns the new base function.
  	     */function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var index=-1,iterable=Object(object),props=keysFunc(object),length=props.length;while(length--){var key=props[fromRight?length:++index];if(iteratee(iterable[key],key,iterable)===false){break;}}return object;};}/**
  	     * Creates a function that wraps `func` to invoke it with the optional `this`
  	     * binding of `thisArg`.
  	     *
  	     * @private
  	     * @param {Function} func The function to wrap.
  	     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  	     * @param {*} [thisArg] The `this` binding of `func`.
  	     * @returns {Function} Returns the new wrapped function.
  	     */function createBind(func,bitmask,thisArg){var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,arguments);}return wrapper;}/**
  	     * Creates a function like `_.lowerFirst`.
  	     *
  	     * @private
  	     * @param {string} methodName The name of the `String` case method to use.
  	     * @returns {Function} Returns the new case function.
  	     */function createCaseFirst(methodName){return function(string){string=toString(string);var strSymbols=hasUnicode(string)?stringToArray(string):undefined$1;var chr=strSymbols?strSymbols[0]:string.charAt(0);var trailing=strSymbols?castSlice(strSymbols,1).join(''):string.slice(1);return chr[methodName]()+trailing;};}/**
  	     * Creates a function like `_.camelCase`.
  	     *
  	     * @private
  	     * @param {Function} callback The function to combine each word.
  	     * @returns {Function} Returns the new compounder function.
  	     */function createCompounder(callback){return function(string){return arrayReduce(words(deburr(string).replace(reApos,'')),callback,'');};}/**
  	     * Creates a function that produces an instance of `Ctor` regardless of
  	     * whether it was invoked as part of a `new` expression or by `call` or `apply`.
  	     *
  	     * @private
  	     * @param {Function} Ctor The constructor to wrap.
  	     * @returns {Function} Returns the new wrapped function.
  	     */function createCtor(Ctor){return function(){// Use a `switch` statement to work with class constructors. See
  // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
  // for more details.
  var args=arguments;switch(args.length){case 0:return new Ctor();case 1:return new Ctor(args[0]);case 2:return new Ctor(args[0],args[1]);case 3:return new Ctor(args[0],args[1],args[2]);case 4:return new Ctor(args[0],args[1],args[2],args[3]);case 5:return new Ctor(args[0],args[1],args[2],args[3],args[4]);case 6:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5]);case 7:return new Ctor(args[0],args[1],args[2],args[3],args[4],args[5],args[6]);}var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,args);// Mimic the constructor's `return` behavior.
  // See https://es5.github.io/#x13.2.2 for more details.
  return isObject(result)?result:thisBinding;};}/**
  	     * Creates a function that wraps `func` to enable currying.
  	     *
  	     * @private
  	     * @param {Function} func The function to wrap.
  	     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  	     * @param {number} arity The arity of `func`.
  	     * @returns {Function} Returns the new wrapped function.
  	     */function createCurry(func,bitmask,arity){var Ctor=createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length,placeholder=getHolder(wrapper);while(index--){args[index]=arguments[index];}var holders=length<3&&args[0]!==placeholder&&args[length-1]!==placeholder?[]:replaceHolders(args,placeholder);length-=holders.length;if(length<arity){return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,undefined$1,args,holders,undefined$1,undefined$1,arity-length);}var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return apply(fn,this,args);}return wrapper;}/**
  	     * Creates a `_.find` or `_.findLast` function.
  	     *
  	     * @private
  	     * @param {Function} findIndexFunc The function to find the collection index.
  	     * @returns {Function} Returns the new find function.
  	     */function createFind(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike(collection)){var iteratee=getIteratee(predicate,3);collection=keys(collection);predicate=function(key){return iteratee(iterable[key],key,iterable);};}var index=findIndexFunc(collection,predicate,fromIndex);return index>-1?iterable[iteratee?collection[index]:index]:undefined$1;};}/**
  	     * Creates a `_.flow` or `_.flowRight` function.
  	     *
  	     * @private
  	     * @param {boolean} [fromRight] Specify iterating from right to left.
  	     * @returns {Function} Returns the new flow function.
  	     */function createFlow(fromRight){return flatRest(function(funcs){var length=funcs.length,index=length,prereq=LodashWrapper.prototype.thru;if(fromRight){funcs.reverse();}while(index--){var func=funcs[index];if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}if(prereq&&!wrapper&&getFuncName(func)=='wrapper'){var wrapper=new LodashWrapper([],true);}}index=wrapper?index:length;while(++index<length){func=funcs[index];var funcName=getFuncName(func),data=funcName=='wrapper'?getData(func):undefined$1;if(data&&isLaziable(data[0])&&data[1]==(WRAP_ARY_FLAG|WRAP_CURRY_FLAG|WRAP_PARTIAL_FLAG|WRAP_REARG_FLAG)&&!data[4].length&&data[9]==1){wrapper=wrapper[getFuncName(data[0])].apply(wrapper,data[3]);}else {wrapper=func.length==1&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func);}}return function(){var args=arguments,value=args[0];if(wrapper&&args.length==1&&isArray(value)){return wrapper.plant(value).value();}var index=0,result=length?funcs[index].apply(this,args):value;while(++index<length){result=funcs[index].call(this,result);}return result;};});}/**
  	     * Creates a function that wraps `func` to invoke it with optional `this`
  	     * binding of `thisArg`, partial application, and currying.
  	     *
  	     * @private
  	     * @param {Function|string} func The function or method name to wrap.
  	     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  	     * @param {*} [thisArg] The `this` binding of `func`.
  	     * @param {Array} [partials] The arguments to prepend to those provided to
  	     *  the new function.
  	     * @param {Array} [holders] The `partials` placeholder indexes.
  	     * @param {Array} [partialsRight] The arguments to append to those provided
  	     *  to the new function.
  	     * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
  	     * @param {Array} [argPos] The argument positions of the new function.
  	     * @param {number} [ary] The arity cap of `func`.
  	     * @param {number} [arity] The arity of `func`.
  	     * @returns {Function} Returns the new wrapped function.
  	     */function createHybrid(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&WRAP_ARY_FLAG,isBind=bitmask&WRAP_BIND_FLAG,isBindKey=bitmask&WRAP_BIND_KEY_FLAG,isCurried=bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG),isFlip=bitmask&WRAP_FLIP_FLAG,Ctor=isBindKey?undefined$1:createCtor(func);function wrapper(){var length=arguments.length,args=Array(length),index=length;while(index--){args[index]=arguments[index];}if(isCurried){var placeholder=getHolder(wrapper),holdersCount=countHolders(args,placeholder);}if(partials){args=composeArgs(args,partials,holders,isCurried);}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight,isCurried);}length-=holdersCount;if(isCurried&&length<arity){var newHolders=replaceHolders(args,placeholder);return createRecurry(func,bitmask,createHybrid,wrapper.placeholder,thisArg,args,newHolders,argPos,ary,arity-length);}var thisBinding=isBind?thisArg:this,fn=isBindKey?thisBinding[func]:func;length=args.length;if(argPos){args=reorder(args,argPos);}else if(isFlip&&length>1){args.reverse();}if(isAry&&ary<length){args.length=ary;}if(this&&this!==root&&this instanceof wrapper){fn=Ctor||createCtor(fn);}return fn.apply(thisBinding,args);}return wrapper;}/**
  	     * Creates a function like `_.invertBy`.
  	     *
  	     * @private
  	     * @param {Function} setter The function to set accumulator values.
  	     * @param {Function} toIteratee The function to resolve iteratees.
  	     * @returns {Function} Returns the new inverter function.
  	     */function createInverter(setter,toIteratee){return function(object,iteratee){return baseInverter(object,setter,toIteratee(iteratee),{});};}/**
  	     * Creates a function that performs a mathematical operation on two values.
  	     *
  	     * @private
  	     * @param {Function} operator The function to perform the operation.
  	     * @param {number} [defaultValue] The value used for `undefined` arguments.
  	     * @returns {Function} Returns the new mathematical operation function.
  	     */function createMathOperation(operator,defaultValue){return function(value,other){var result;if(value===undefined$1&&other===undefined$1){return defaultValue;}if(value!==undefined$1){result=value;}if(other!==undefined$1){if(result===undefined$1){return other;}if(typeof value=='string'||typeof other=='string'){value=baseToString(value);other=baseToString(other);}else {value=baseToNumber(value);other=baseToNumber(other);}result=operator(value,other);}return result;};}/**
  	     * Creates a function like `_.over`.
  	     *
  	     * @private
  	     * @param {Function} arrayFunc The function to iterate over iteratees.
  	     * @returns {Function} Returns the new over function.
  	     */function createOver(arrayFunc){return flatRest(function(iteratees){iteratees=arrayMap(iteratees,baseUnary(getIteratee()));return baseRest(function(args){var thisArg=this;return arrayFunc(iteratees,function(iteratee){return apply(iteratee,thisArg,args);});});});}/**
  	     * Creates the padding for `string` based on `length`. The `chars` string
  	     * is truncated if the number of characters exceeds `length`.
  	     *
  	     * @private
  	     * @param {number} length The padding length.
  	     * @param {string} [chars=' '] The string used as padding.
  	     * @returns {string} Returns the padding for `string`.
  	     */function createPadding(length,chars){chars=chars===undefined$1?' ':baseToString(chars);var charsLength=chars.length;if(charsLength<2){return charsLength?baseRepeat(chars,length):chars;}var result=baseRepeat(chars,nativeCeil(length/stringSize(chars)));return hasUnicode(chars)?castSlice(stringToArray(result),0,length).join(''):result.slice(0,length);}/**
  	     * Creates a function that wraps `func` to invoke it with the `this` binding
  	     * of `thisArg` and `partials` prepended to the arguments it receives.
  	     *
  	     * @private
  	     * @param {Function} func The function to wrap.
  	     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  	     * @param {*} thisArg The `this` binding of `func`.
  	     * @param {Array} partials The arguments to prepend to those provided to
  	     *  the new function.
  	     * @returns {Function} Returns the new wrapped function.
  	     */function createPartial(func,bitmask,thisArg,partials){var isBind=bitmask&WRAP_BIND_FLAG,Ctor=createCtor(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(leftLength+argsLength),fn=this&&this!==root&&this instanceof wrapper?Ctor:func;while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex];}while(argsLength--){args[leftIndex++]=arguments[++argsIndex];}return apply(fn,isBind?thisArg:this,args);}return wrapper;}/**
  	     * Creates a `_.range` or `_.rangeRight` function.
  	     *
  	     * @private
  	     * @param {boolean} [fromRight] Specify iterating from right to left.
  	     * @returns {Function} Returns the new range function.
  	     */function createRange(fromRight){return function(start,end,step){if(step&&typeof step!='number'&&isIterateeCall(start,end,step)){end=step=undefined$1;}// Ensure the sign of `-0` is preserved.
  start=toFinite(start);if(end===undefined$1){end=start;start=0;}else {end=toFinite(end);}step=step===undefined$1?start<end?1:-1:toFinite(step);return baseRange(start,end,step,fromRight);};}/**
  	     * Creates a function that performs a relational operation on two values.
  	     *
  	     * @private
  	     * @param {Function} operator The function to perform the operation.
  	     * @returns {Function} Returns the new relational operation function.
  	     */function createRelationalOperation(operator){return function(value,other){if(!(typeof value=='string'&&typeof other=='string')){value=toNumber(value);other=toNumber(other);}return operator(value,other);};}/**
  	     * Creates a function that wraps `func` to continue currying.
  	     *
  	     * @private
  	     * @param {Function} func The function to wrap.
  	     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  	     * @param {Function} wrapFunc The function to create the `func` wrapper.
  	     * @param {*} placeholder The placeholder value.
  	     * @param {*} [thisArg] The `this` binding of `func`.
  	     * @param {Array} [partials] The arguments to prepend to those provided to
  	     *  the new function.
  	     * @param {Array} [holders] The `partials` placeholder indexes.
  	     * @param {Array} [argPos] The argument positions of the new function.
  	     * @param {number} [ary] The arity cap of `func`.
  	     * @param {number} [arity] The arity of `func`.
  	     * @returns {Function} Returns the new wrapped function.
  	     */function createRecurry(func,bitmask,wrapFunc,placeholder,thisArg,partials,holders,argPos,ary,arity){var isCurry=bitmask&WRAP_CURRY_FLAG,newHolders=isCurry?holders:undefined$1,newHoldersRight=isCurry?undefined$1:holders,newPartials=isCurry?partials:undefined$1,newPartialsRight=isCurry?undefined$1:partials;bitmask|=isCurry?WRAP_PARTIAL_FLAG:WRAP_PARTIAL_RIGHT_FLAG;bitmask&=~(isCurry?WRAP_PARTIAL_RIGHT_FLAG:WRAP_PARTIAL_FLAG);if(!(bitmask&WRAP_CURRY_BOUND_FLAG)){bitmask&=~(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG);}var newData=[func,bitmask,thisArg,newPartials,newHolders,newPartialsRight,newHoldersRight,argPos,ary,arity];var result=wrapFunc.apply(undefined$1,newData);if(isLaziable(func)){setData(result,newData);}result.placeholder=placeholder;return setWrapToString(result,func,bitmask);}/**
  	     * Creates a function like `_.round`.
  	     *
  	     * @private
  	     * @param {string} methodName The name of the `Math` method to use when rounding.
  	     * @returns {Function} Returns the new round function.
  	     */function createRound(methodName){var func=Math[methodName];return function(number,precision){number=toNumber(number);precision=precision==null?0:nativeMin(toInteger(precision),292);if(precision&&nativeIsFinite(number)){// Shift with exponential notation to avoid floating-point issues.
  // See [MDN](https://mdn.io/round#Examples) for more details.
  var pair=(toString(number)+'e').split('e'),value=func(pair[0]+'e'+(+pair[1]+precision));pair=(toString(value)+'e').split('e');return +(pair[0]+'e'+(+pair[1]-precision));}return func(number);};}/**
  	     * Creates a set object of `values`.
  	     *
  	     * @private
  	     * @param {Array} values The values to add to the set.
  	     * @returns {Object} Returns the new set.
  	     */var createSet=!(Set&&1/setToArray(new Set([,-0]))[1]==INFINITY)?noop:function(values){return new Set(values);};/**
  	     * Creates a `_.toPairs` or `_.toPairsIn` function.
  	     *
  	     * @private
  	     * @param {Function} keysFunc The function to get the keys of a given object.
  	     * @returns {Function} Returns the new pairs function.
  	     */function createToPairs(keysFunc){return function(object){var tag=getTag(object);if(tag==mapTag){return mapToArray(object);}if(tag==setTag){return setToPairs(object);}return baseToPairs(object,keysFunc(object));};}/**
  	     * Creates a function that either curries or invokes `func` with optional
  	     * `this` binding and partially applied arguments.
  	     *
  	     * @private
  	     * @param {Function|string} func The function or method name to wrap.
  	     * @param {number} bitmask The bitmask flags.
  	     *    1 - `_.bind`
  	     *    2 - `_.bindKey`
  	     *    4 - `_.curry` or `_.curryRight` of a bound function
  	     *    8 - `_.curry`
  	     *   16 - `_.curryRight`
  	     *   32 - `_.partial`
  	     *   64 - `_.partialRight`
  	     *  128 - `_.rearg`
  	     *  256 - `_.ary`
  	     *  512 - `_.flip`
  	     * @param {*} [thisArg] The `this` binding of `func`.
  	     * @param {Array} [partials] The arguments to be partially applied.
  	     * @param {Array} [holders] The `partials` placeholder indexes.
  	     * @param {Array} [argPos] The argument positions of the new function.
  	     * @param {number} [ary] The arity cap of `func`.
  	     * @param {number} [arity] The arity of `func`.
  	     * @returns {Function} Returns the new wrapped function.
  	     */function createWrap(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&WRAP_BIND_KEY_FLAG;if(!isBindKey&&typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}var length=partials?partials.length:0;if(!length){bitmask&=~(WRAP_PARTIAL_FLAG|WRAP_PARTIAL_RIGHT_FLAG);partials=holders=undefined$1;}ary=ary===undefined$1?ary:nativeMax(toInteger(ary),0);arity=arity===undefined$1?arity:toInteger(arity);length-=holders?holders.length:0;if(bitmask&WRAP_PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=undefined$1;}var data=isBindKey?undefined$1:getData(func);var newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data);}func=newData[0];bitmask=newData[1];thisArg=newData[2];partials=newData[3];holders=newData[4];arity=newData[9]=newData[9]===undefined$1?isBindKey?0:func.length:nativeMax(newData[9]-length,0);if(!arity&&bitmask&(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG)){bitmask&=~(WRAP_CURRY_FLAG|WRAP_CURRY_RIGHT_FLAG);}if(!bitmask||bitmask==WRAP_BIND_FLAG){var result=createBind(func,bitmask,thisArg);}else if(bitmask==WRAP_CURRY_FLAG||bitmask==WRAP_CURRY_RIGHT_FLAG){result=createCurry(func,bitmask,arity);}else if((bitmask==WRAP_PARTIAL_FLAG||bitmask==(WRAP_BIND_FLAG|WRAP_PARTIAL_FLAG))&&!holders.length){result=createPartial(func,bitmask,thisArg,partials);}else {result=createHybrid.apply(undefined$1,newData);}var setter=data?baseSetData:setData;return setWrapToString(setter(result,newData),func,bitmask);}/**
  	     * Used by `_.defaults` to customize its `_.assignIn` use to assign properties
  	     * of source objects to the destination object for all destination properties
  	     * that resolve to `undefined`.
  	     *
  	     * @private
  	     * @param {*} objValue The destination value.
  	     * @param {*} srcValue The source value.
  	     * @param {string} key The key of the property to assign.
  	     * @param {Object} object The parent object of `objValue`.
  	     * @returns {*} Returns the value to assign.
  	     */function customDefaultsAssignIn(objValue,srcValue,key,object){if(objValue===undefined$1||eq(objValue,objectProto[key])&&!hasOwnProperty.call(object,key)){return srcValue;}return objValue;}/**
  	     * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
  	     * objects into destination objects that are passed thru.
  	     *
  	     * @private
  	     * @param {*} objValue The destination value.
  	     * @param {*} srcValue The source value.
  	     * @param {string} key The key of the property to merge.
  	     * @param {Object} object The parent object of `objValue`.
  	     * @param {Object} source The parent object of `srcValue`.
  	     * @param {Object} [stack] Tracks traversed source values and their merged
  	     *  counterparts.
  	     * @returns {*} Returns the value to assign.
  	     */function customDefaultsMerge(objValue,srcValue,key,object,source,stack){if(isObject(objValue)&&isObject(srcValue)){// Recursively merge objects and arrays (susceptible to call stack limits).
  stack.set(srcValue,objValue);baseMerge(objValue,srcValue,undefined$1,customDefaultsMerge,stack);stack['delete'](srcValue);}return objValue;}/**
  	     * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
  	     * objects.
  	     *
  	     * @private
  	     * @param {*} value The value to inspect.
  	     * @param {string} key The key of the property to inspect.
  	     * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
  	     */function customOmitClone(value){return isPlainObject(value)?undefined$1:value;}/**
  	     * A specialized version of `baseIsEqualDeep` for arrays with support for
  	     * partial deep comparisons.
  	     *
  	     * @private
  	     * @param {Array} array The array to compare.
  	     * @param {Array} other The other array to compare.
  	     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  	     * @param {Function} customizer The function to customize comparisons.
  	     * @param {Function} equalFunc The function to determine equivalents of values.
  	     * @param {Object} stack Tracks traversed `array` and `other` objects.
  	     * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  	     */function equalArrays(array,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,arrLength=array.length,othLength=other.length;if(arrLength!=othLength&&!(isPartial&&othLength>arrLength)){return false;}// Check that cyclic values are equal.
  var arrStacked=stack.get(array);var othStacked=stack.get(other);if(arrStacked&&othStacked){return arrStacked==other&&othStacked==array;}var index=-1,result=true,seen=bitmask&COMPARE_UNORDERED_FLAG?new SetCache():undefined$1;stack.set(array,other);stack.set(other,array);// Ignore non-index properties.
  while(++index<arrLength){var arrValue=array[index],othValue=other[index];if(customizer){var compared=isPartial?customizer(othValue,arrValue,index,other,array,stack):customizer(arrValue,othValue,index,array,other,stack);}if(compared!==undefined$1){if(compared){continue;}result=false;break;}// Recursively compare arrays (susceptible to call stack limits).
  if(seen){if(!arraySome(other,function(othValue,othIndex){if(!cacheHas(seen,othIndex)&&(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){return seen.push(othIndex);}})){result=false;break;}}else if(!(arrValue===othValue||equalFunc(arrValue,othValue,bitmask,customizer,stack))){result=false;break;}}stack['delete'](array);stack['delete'](other);return result;}/**
  	     * A specialized version of `baseIsEqualDeep` for comparing objects of
  	     * the same `toStringTag`.
  	     *
  	     * **Note:** This function only supports comparing values with tags of
  	     * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  	     *
  	     * @private
  	     * @param {Object} object The object to compare.
  	     * @param {Object} other The other object to compare.
  	     * @param {string} tag The `toStringTag` of the objects to compare.
  	     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  	     * @param {Function} customizer The function to customize comparisons.
  	     * @param {Function} equalFunc The function to determine equivalents of values.
  	     * @param {Object} stack Tracks traversed `object` and `other` objects.
  	     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  	     */function equalByTag(object,other,tag,bitmask,customizer,equalFunc,stack){switch(tag){case dataViewTag:if(object.byteLength!=other.byteLength||object.byteOffset!=other.byteOffset){return false;}object=object.buffer;other=other.buffer;case arrayBufferTag:if(object.byteLength!=other.byteLength||!equalFunc(new Uint8Array(object),new Uint8Array(other))){return false;}return true;case boolTag:case dateTag:case numberTag:// Coerce booleans to `1` or `0` and dates to milliseconds.
  // Invalid dates are coerced to `NaN`.
  return eq(+object,+other);case errorTag:return object.name==other.name&&object.message==other.message;case regexpTag:case stringTag:// Coerce regexes to strings and treat strings, primitives and objects,
  // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  // for more details.
  return object==other+'';case mapTag:var convert=mapToArray;case setTag:var isPartial=bitmask&COMPARE_PARTIAL_FLAG;convert||(convert=setToArray);if(object.size!=other.size&&!isPartial){return false;}// Assume cyclic values are equal.
  var stacked=stack.get(object);if(stacked){return stacked==other;}bitmask|=COMPARE_UNORDERED_FLAG;// Recursively compare objects (susceptible to call stack limits).
  stack.set(object,other);var result=equalArrays(convert(object),convert(other),bitmask,customizer,equalFunc,stack);stack['delete'](object);return result;case symbolTag:if(symbolValueOf){return symbolValueOf.call(object)==symbolValueOf.call(other);}}return false;}/**
  	     * A specialized version of `baseIsEqualDeep` for objects with support for
  	     * partial deep comparisons.
  	     *
  	     * @private
  	     * @param {Object} object The object to compare.
  	     * @param {Object} other The other object to compare.
  	     * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  	     * @param {Function} customizer The function to customize comparisons.
  	     * @param {Function} equalFunc The function to determine equivalents of values.
  	     * @param {Object} stack Tracks traversed `object` and `other` objects.
  	     * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  	     */function equalObjects(object,other,bitmask,customizer,equalFunc,stack){var isPartial=bitmask&COMPARE_PARTIAL_FLAG,objProps=getAllKeys(object),objLength=objProps.length,othProps=getAllKeys(other),othLength=othProps.length;if(objLength!=othLength&&!isPartial){return false;}var index=objLength;while(index--){var key=objProps[index];if(!(isPartial?key in other:hasOwnProperty.call(other,key))){return false;}}// Check that cyclic values are equal.
  var objStacked=stack.get(object);var othStacked=stack.get(other);if(objStacked&&othStacked){return objStacked==other&&othStacked==object;}var result=true;stack.set(object,other);stack.set(other,object);var skipCtor=isPartial;while(++index<objLength){key=objProps[index];var objValue=object[key],othValue=other[key];if(customizer){var compared=isPartial?customizer(othValue,objValue,key,other,object,stack):customizer(objValue,othValue,key,object,other,stack);}// Recursively compare objects (susceptible to call stack limits).
  if(!(compared===undefined$1?objValue===othValue||equalFunc(objValue,othValue,bitmask,customizer,stack):compared)){result=false;break;}skipCtor||(skipCtor=key=='constructor');}if(result&&!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;// Non `Object` object instances with different constructors are not equal.
  if(objCtor!=othCtor&&'constructor'in object&&'constructor'in other&&!(typeof objCtor=='function'&&objCtor instanceof objCtor&&typeof othCtor=='function'&&othCtor instanceof othCtor)){result=false;}}stack['delete'](object);stack['delete'](other);return result;}/**
  	     * A specialized version of `baseRest` which flattens the rest array.
  	     *
  	     * @private
  	     * @param {Function} func The function to apply a rest parameter to.
  	     * @returns {Function} Returns the new function.
  	     */function flatRest(func){return setToString(overRest(func,undefined$1,flatten),func+'');}/**
  	     * Creates an array of own enumerable property names and symbols of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property names and symbols.
  	     */function getAllKeys(object){return baseGetAllKeys(object,keys,getSymbols);}/**
  	     * Creates an array of own and inherited enumerable property names and
  	     * symbols of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property names and symbols.
  	     */function getAllKeysIn(object){return baseGetAllKeys(object,keysIn,getSymbolsIn);}/**
  	     * Gets metadata for `func`.
  	     *
  	     * @private
  	     * @param {Function} func The function to query.
  	     * @returns {*} Returns the metadata for `func`.
  	     */var getData=!metaMap?noop:function(func){return metaMap.get(func);};/**
  	     * Gets the name of `func`.
  	     *
  	     * @private
  	     * @param {Function} func The function to query.
  	     * @returns {string} Returns the function name.
  	     */function getFuncName(func){var result=func.name+'',array=realNames[result],length=hasOwnProperty.call(realNames,result)?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name;}}return result;}/**
  	     * Gets the argument placeholder value for `func`.
  	     *
  	     * @private
  	     * @param {Function} func The function to inspect.
  	     * @returns {*} Returns the placeholder value.
  	     */function getHolder(func){var object=hasOwnProperty.call(lodash,'placeholder')?lodash:func;return object.placeholder;}/**
  	     * Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
  	     * this function returns the custom method, otherwise it returns `baseIteratee`.
  	     * If arguments are provided, the chosen function is invoked with them and
  	     * its result is returned.
  	     *
  	     * @private
  	     * @param {*} [value] The value to convert to an iteratee.
  	     * @param {number} [arity] The arity of the created iteratee.
  	     * @returns {Function} Returns the chosen function or its result.
  	     */function getIteratee(){var result=lodash.iteratee||iteratee;result=result===iteratee?baseIteratee:result;return arguments.length?result(arguments[0],arguments[1]):result;}/**
  	     * Gets the data for `map`.
  	     *
  	     * @private
  	     * @param {Object} map The map to query.
  	     * @param {string} key The reference key.
  	     * @returns {*} Returns the map data.
  	     */function getMapData(map,key){var data=map.__data__;return isKeyable(key)?data[typeof key=='string'?'string':'hash']:data.map;}/**
  	     * Gets the property names, values, and compare flags of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the match data of `object`.
  	     */function getMatchData(object){var result=keys(object),length=result.length;while(length--){var key=result[length],value=object[key];result[length]=[key,value,isStrictComparable(value)];}return result;}/**
  	     * Gets the native function at `key` of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @param {string} key The key of the method to get.
  	     * @returns {*} Returns the function if it's native, else `undefined`.
  	     */function getNative(object,key){var value=getValue(object,key);return baseIsNative(value)?value:undefined$1;}/**
  	     * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  	     *
  	     * @private
  	     * @param {*} value The value to query.
  	     * @returns {string} Returns the raw `toStringTag`.
  	     */function getRawTag(value){var isOwn=hasOwnProperty.call(value,symToStringTag),tag=value[symToStringTag];try{value[symToStringTag]=undefined$1;var unmasked=true;}catch(e){}var result=nativeObjectToString.call(value);if(unmasked){if(isOwn){value[symToStringTag]=tag;}else {delete value[symToStringTag];}}return result;}/**
  	     * Creates an array of the own enumerable symbols of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of symbols.
  	     */var getSymbols=!nativeGetSymbols?stubArray:function(object){if(object==null){return [];}object=Object(object);return arrayFilter(nativeGetSymbols(object),function(symbol){return propertyIsEnumerable.call(object,symbol);});};/**
  	     * Creates an array of the own and inherited enumerable symbols of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of symbols.
  	     */var getSymbolsIn=!nativeGetSymbols?stubArray:function(object){var result=[];while(object){arrayPush(result,getSymbols(object));object=getPrototype(object);}return result;};/**
  	     * Gets the `toStringTag` of `value`.
  	     *
  	     * @private
  	     * @param {*} value The value to query.
  	     * @returns {string} Returns the `toStringTag`.
  	     */var getTag=baseGetTag;// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  if(DataView&&getTag(new DataView(new ArrayBuffer(1)))!=dataViewTag||Map&&getTag(new Map())!=mapTag||Promise&&getTag(Promise.resolve())!=promiseTag||Set&&getTag(new Set())!=setTag||WeakMap&&getTag(new WeakMap())!=weakMapTag){getTag=function(value){var result=baseGetTag(value),Ctor=result==objectTag?value.constructor:undefined$1,ctorString=Ctor?toSource(Ctor):'';if(ctorString){switch(ctorString){case dataViewCtorString:return dataViewTag;case mapCtorString:return mapTag;case promiseCtorString:return promiseTag;case setCtorString:return setTag;case weakMapCtorString:return weakMapTag;}}return result;};}/**
  	     * Gets the view, applying any `transforms` to the `start` and `end` positions.
  	     *
  	     * @private
  	     * @param {number} start The start of the view.
  	     * @param {number} end The end of the view.
  	     * @param {Array} transforms The transformations to apply to the view.
  	     * @returns {Object} Returns an object containing the `start` and `end`
  	     *  positions of the view.
  	     */function getView(start,end,transforms){var index=-1,length=transforms.length;while(++index<length){var data=transforms[index],size=data.size;switch(data.type){case'drop':start+=size;break;case'dropRight':end-=size;break;case'take':end=nativeMin(end,start+size);break;case'takeRight':start=nativeMax(start,end-size);break;}}return {'start':start,'end':end};}/**
  	     * Extracts wrapper details from the `source` body comment.
  	     *
  	     * @private
  	     * @param {string} source The source to inspect.
  	     * @returns {Array} Returns the wrapper details.
  	     */function getWrapDetails(source){var match=source.match(reWrapDetails);return match?match[1].split(reSplitDetails):[];}/**
  	     * Checks if `path` exists on `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path to check.
  	     * @param {Function} hasFunc The function to check properties.
  	     * @returns {boolean} Returns `true` if `path` exists, else `false`.
  	     */function hasPath(object,path,hasFunc){path=castPath(path,object);var index=-1,length=path.length,result=false;while(++index<length){var key=toKey(path[index]);if(!(result=object!=null&&hasFunc(object,key))){break;}object=object[key];}if(result||++index!=length){return result;}length=object==null?0:object.length;return !!length&&isLength(length)&&isIndex(key,length)&&(isArray(object)||isArguments(object));}/**
  	     * Initializes an array clone.
  	     *
  	     * @private
  	     * @param {Array} array The array to clone.
  	     * @returns {Array} Returns the initialized clone.
  	     */function initCloneArray(array){var length=array.length,result=new array.constructor(length);// Add properties assigned by `RegExp#exec`.
  if(length&&typeof array[0]=='string'&&hasOwnProperty.call(array,'index')){result.index=array.index;result.input=array.input;}return result;}/**
  	     * Initializes an object clone.
  	     *
  	     * @private
  	     * @param {Object} object The object to clone.
  	     * @returns {Object} Returns the initialized clone.
  	     */function initCloneObject(object){return typeof object.constructor=='function'&&!isPrototype(object)?baseCreate(getPrototype(object)):{};}/**
  	     * Initializes an object clone based on its `toStringTag`.
  	     *
  	     * **Note:** This function only supports cloning values with tags of
  	     * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
  	     *
  	     * @private
  	     * @param {Object} object The object to clone.
  	     * @param {string} tag The `toStringTag` of the object to clone.
  	     * @param {boolean} [isDeep] Specify a deep clone.
  	     * @returns {Object} Returns the initialized clone.
  	     */function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return cloneArrayBuffer(object);case boolTag:case dateTag:return new Ctor(+object);case dataViewTag:return cloneDataView(object,isDeep);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:return cloneTypedArray(object,isDeep);case mapTag:return new Ctor();case numberTag:case stringTag:return new Ctor(object);case regexpTag:return cloneRegExp(object);case setTag:return new Ctor();case symbolTag:return cloneSymbol(object);}}/**
  	     * Inserts wrapper `details` in a comment at the top of the `source` body.
  	     *
  	     * @private
  	     * @param {string} source The source to modify.
  	     * @returns {Array} details The details to insert.
  	     * @returns {string} Returns the modified source.
  	     */function insertWrapDetails(source,details){var length=details.length;if(!length){return source;}var lastIndex=length-1;details[lastIndex]=(length>1?'& ':'')+details[lastIndex];details=details.join(length>2?', ':' ');return source.replace(reWrapComment,'{\n/* [wrapped with '+details+'] */\n');}/**
  	     * Checks if `value` is a flattenable `arguments` object or array.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
  	     */function isFlattenable(value){return isArray(value)||isArguments(value)||!!(spreadableSymbol&&value&&value[spreadableSymbol]);}/**
  	     * Checks if `value` is a valid array-like index.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  	     * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  	     */function isIndex(value,length){var type=typeof value;length=length==null?MAX_SAFE_INTEGER:length;return !!length&&(type=='number'||type!='symbol'&&reIsUint.test(value))&&value>-1&&value%1==0&&value<length;}/**
  	     * Checks if the given arguments are from an iteratee call.
  	     *
  	     * @private
  	     * @param {*} value The potential iteratee value argument.
  	     * @param {*} index The potential iteratee index or key argument.
  	     * @param {*} object The potential iteratee object argument.
  	     * @returns {boolean} Returns `true` if the arguments are from an iteratee call,
  	     *  else `false`.
  	     */function isIterateeCall(value,index,object){if(!isObject(object)){return false;}var type=typeof index;if(type=='number'?isArrayLike(object)&&isIndex(index,object.length):type=='string'&&index in object){return eq(object[index],value);}return false;}/**
  	     * Checks if `value` is a property name and not a property path.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @param {Object} [object] The object to query keys on.
  	     * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  	     */function isKey(value,object){if(isArray(value)){return false;}var type=typeof value;if(type=='number'||type=='symbol'||type=='boolean'||value==null||isSymbol(value)){return true;}return reIsPlainProp.test(value)||!reIsDeepProp.test(value)||object!=null&&value in Object(object);}/**
  	     * Checks if `value` is suitable for use as unique object key.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  	     */function isKeyable(value){var type=typeof value;return type=='string'||type=='number'||type=='symbol'||type=='boolean'?value!=='__proto__':value===null;}/**
  	     * Checks if `func` has a lazy counterpart.
  	     *
  	     * @private
  	     * @param {Function} func The function to check.
  	     * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
  	     *  else `false`.
  	     */function isLaziable(func){var funcName=getFuncName(func),other=lodash[funcName];if(typeof other!='function'||!(funcName in LazyWrapper.prototype)){return false;}if(func===other){return true;}var data=getData(other);return !!data&&func===data[0];}/**
  	     * Checks if `func` has its source masked.
  	     *
  	     * @private
  	     * @param {Function} func The function to check.
  	     * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  	     */function isMasked(func){return !!maskSrcKey&&maskSrcKey in func;}/**
  	     * Checks if `func` is capable of being masked.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `func` is maskable, else `false`.
  	     */var isMaskable=coreJsData?isFunction:stubFalse;/**
  	     * Checks if `value` is likely a prototype object.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  	     */function isPrototype(value){var Ctor=value&&value.constructor,proto=typeof Ctor=='function'&&Ctor.prototype||objectProto;return value===proto;}/**
  	     * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
  	     *
  	     * @private
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` if suitable for strict
  	     *  equality comparisons, else `false`.
  	     */function isStrictComparable(value){return value===value&&!isObject(value);}/**
  	     * A specialized version of `matchesProperty` for source values suitable
  	     * for strict equality comparisons, i.e. `===`.
  	     *
  	     * @private
  	     * @param {string} key The key of the property to get.
  	     * @param {*} srcValue The value to match.
  	     * @returns {Function} Returns the new spec function.
  	     */function matchesStrictComparable(key,srcValue){return function(object){if(object==null){return false;}return object[key]===srcValue&&(srcValue!==undefined$1||key in Object(object));};}/**
  	     * A specialized version of `_.memoize` which clears the memoized function's
  	     * cache when it exceeds `MAX_MEMOIZE_SIZE`.
  	     *
  	     * @private
  	     * @param {Function} func The function to have its output memoized.
  	     * @returns {Function} Returns the new memoized function.
  	     */function memoizeCapped(func){var result=memoize(func,function(key){if(cache.size===MAX_MEMOIZE_SIZE){cache.clear();}return key;});var cache=result.cache;return result;}/**
  	     * Merges the function metadata of `source` into `data`.
  	     *
  	     * Merging metadata reduces the number of wrappers used to invoke a function.
  	     * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
  	     * may be applied regardless of execution order. Methods like `_.ary` and
  	     * `_.rearg` modify function arguments, making the order in which they are
  	     * executed important, preventing the merging of metadata. However, we make
  	     * an exception for a safe combined case where curried functions have `_.ary`
  	     * and or `_.rearg` applied.
  	     *
  	     * @private
  	     * @param {Array} data The destination metadata.
  	     * @param {Array} source The source metadata.
  	     * @returns {Array} Returns `data`.
  	     */function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<(WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG|WRAP_ARY_FLAG);var isCombo=srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_CURRY_FLAG||srcBitmask==WRAP_ARY_FLAG&&bitmask==WRAP_REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(WRAP_ARY_FLAG|WRAP_REARG_FLAG)&&source[7].length<=source[8]&&bitmask==WRAP_CURRY_FLAG;// Exit early if metadata can't be merged.
  if(!(isCommon||isCombo)){return data;}// Use source `thisArg` if available.
  if(srcBitmask&WRAP_BIND_FLAG){data[2]=source[2];// Set when currying a bound function.
  newBitmask|=bitmask&WRAP_BIND_FLAG?0:WRAP_CURRY_BOUND_FLAG;}// Compose partial arguments.
  var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):value;data[4]=partials?replaceHolders(data[3],PLACEHOLDER):source[4];}// Compose partial right arguments.
  value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):value;data[6]=partials?replaceHolders(data[5],PLACEHOLDER):source[6];}// Use source `argPos` if available.
  value=source[7];if(value){data[7]=value;}// Use source `ary` if it's smaller.
  if(srcBitmask&WRAP_ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin(data[8],source[8]);}// Use source `arity` if one is not provided.
  if(data[9]==null){data[9]=source[9];}// Use source `func` and merge bitmasks.
  data[0]=source[0];data[1]=newBitmask;return data;}/**
  	     * This function is like
  	     * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  	     * except that it includes inherited enumerable properties.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property names.
  	     */function nativeKeysIn(object){var result=[];if(object!=null){for(var key in Object(object)){result.push(key);}}return result;}/**
  	     * Converts `value` to a string using `Object.prototype.toString`.
  	     *
  	     * @private
  	     * @param {*} value The value to convert.
  	     * @returns {string} Returns the converted string.
  	     */function objectToString(value){return nativeObjectToString.call(value);}/**
  	     * A specialized version of `baseRest` which transforms the rest array.
  	     *
  	     * @private
  	     * @param {Function} func The function to apply a rest parameter to.
  	     * @param {number} [start=func.length-1] The start position of the rest parameter.
  	     * @param {Function} transform The rest array transform.
  	     * @returns {Function} Returns the new function.
  	     */function overRest(func,start,transform){start=nativeMax(start===undefined$1?func.length-1:start,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);while(++index<length){array[index]=args[start+index];}index=-1;var otherArgs=Array(start+1);while(++index<start){otherArgs[index]=args[index];}otherArgs[start]=transform(array);return apply(func,this,otherArgs);};}/**
  	     * Gets the parent value at `path` of `object`.
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @param {Array} path The path to get the parent value of.
  	     * @returns {*} Returns the parent value.
  	     */function parent(object,path){return path.length<2?object:baseGet(object,baseSlice(path,0,-1));}/**
  	     * Reorder `array` according to the specified indexes where the element at
  	     * the first index is assigned as the first element, the element at
  	     * the second index is assigned as the second element, and so on.
  	     *
  	     * @private
  	     * @param {Array} array The array to reorder.
  	     * @param {Array} indexes The arranged array indexes.
  	     * @returns {Array} Returns `array`.
  	     */function reorder(array,indexes){var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=copyArray(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined$1;}return array;}/**
  	     * Gets the value at `key`, unless `key` is "__proto__" or "constructor".
  	     *
  	     * @private
  	     * @param {Object} object The object to query.
  	     * @param {string} key The key of the property to get.
  	     * @returns {*} Returns the property value.
  	     */function safeGet(object,key){if(key==='constructor'&&typeof object[key]==='function'){return;}if(key=='__proto__'){return;}return object[key];}/**
  	     * Sets metadata for `func`.
  	     *
  	     * **Note:** If this function becomes hot, i.e. is invoked a lot in a short
  	     * period of time, it will trip its breaker and transition to an identity
  	     * function to avoid garbage collection pauses in V8. See
  	     * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
  	     * for more details.
  	     *
  	     * @private
  	     * @param {Function} func The function to associate metadata with.
  	     * @param {*} data The metadata.
  	     * @returns {Function} Returns `func`.
  	     */var setData=shortOut(baseSetData);/**
  	     * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
  	     *
  	     * @private
  	     * @param {Function} func The function to delay.
  	     * @param {number} wait The number of milliseconds to delay invocation.
  	     * @returns {number|Object} Returns the timer id or timeout object.
  	     */var setTimeout=ctxSetTimeout||function(func,wait){return root.setTimeout(func,wait);};/**
  	     * Sets the `toString` method of `func` to return `string`.
  	     *
  	     * @private
  	     * @param {Function} func The function to modify.
  	     * @param {Function} string The `toString` result.
  	     * @returns {Function} Returns `func`.
  	     */var setToString=shortOut(baseSetToString);/**
  	     * Sets the `toString` method of `wrapper` to mimic the source of `reference`
  	     * with wrapper details in a comment at the top of the source body.
  	     *
  	     * @private
  	     * @param {Function} wrapper The function to modify.
  	     * @param {Function} reference The reference function.
  	     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  	     * @returns {Function} Returns `wrapper`.
  	     */function setWrapToString(wrapper,reference,bitmask){var source=reference+'';return setToString(wrapper,insertWrapDetails(source,updateWrapDetails(getWrapDetails(source),bitmask)));}/**
  	     * Creates a function that'll short out and invoke `identity` instead
  	     * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
  	     * milliseconds.
  	     *
  	     * @private
  	     * @param {Function} func The function to restrict.
  	     * @returns {Function} Returns the new shortable function.
  	     */function shortOut(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return arguments[0];}}else {count=0;}return func.apply(undefined$1,arguments);};}/**
  	     * A specialized version of `_.shuffle` which mutates and sets the size of `array`.
  	     *
  	     * @private
  	     * @param {Array} array The array to shuffle.
  	     * @param {number} [size=array.length] The size of `array`.
  	     * @returns {Array} Returns `array`.
  	     */function shuffleSelf(array,size){var index=-1,length=array.length,lastIndex=length-1;size=size===undefined$1?length:size;while(++index<size){var rand=baseRandom(index,lastIndex),value=array[rand];array[rand]=array[index];array[index]=value;}array.length=size;return array;}/**
  	     * Converts `string` to a property path array.
  	     *
  	     * @private
  	     * @param {string} string The string to convert.
  	     * @returns {Array} Returns the property path array.
  	     */var stringToPath=memoizeCapped(function(string){var result=[];if(string.charCodeAt(0)===46/* . */){result.push('');}string.replace(rePropName,function(match,number,quote,subString){result.push(quote?subString.replace(reEscapeChar,'$1'):number||match);});return result;});/**
  	     * Converts `value` to a string key if it's not a string or symbol.
  	     *
  	     * @private
  	     * @param {*} value The value to inspect.
  	     * @returns {string|symbol} Returns the key.
  	     */function toKey(value){if(typeof value=='string'||isSymbol(value)){return value;}var result=value+'';return result=='0'&&1/value==-INFINITY?'-0':result;}/**
  	     * Converts `func` to its source code.
  	     *
  	     * @private
  	     * @param {Function} func The function to convert.
  	     * @returns {string} Returns the source code.
  	     */function toSource(func){if(func!=null){try{return funcToString.call(func);}catch(e){}try{return func+'';}catch(e){}}return '';}/**
  	     * Updates wrapper `details` based on `bitmask` flags.
  	     *
  	     * @private
  	     * @returns {Array} details The details to modify.
  	     * @param {number} bitmask The bitmask flags. See `createWrap` for more details.
  	     * @returns {Array} Returns `details`.
  	     */function updateWrapDetails(details,bitmask){arrayEach(wrapFlags,function(pair){var value='_.'+pair[0];if(bitmask&pair[1]&&!arrayIncludes(details,value)){details.push(value);}});return details.sort();}/**
  	     * Creates a clone of `wrapper`.
  	     *
  	     * @private
  	     * @param {Object} wrapper The wrapper to clone.
  	     * @returns {Object} Returns the cloned wrapper.
  	     */function wrapperClone(wrapper){if(wrapper instanceof LazyWrapper){return wrapper.clone();}var result=new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__);result.__actions__=copyArray(wrapper.__actions__);result.__index__=wrapper.__index__;result.__values__=wrapper.__values__;return result;}/*------------------------------------------------------------------------*/ /**
  	     * Creates an array of elements split into groups the length of `size`.
  	     * If `array` can't be split evenly, the final chunk will be the remaining
  	     * elements.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to process.
  	     * @param {number} [size=1] The length of each chunk
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Array} Returns the new array of chunks.
  	     * @example
  	     *
  	     * _.chunk(['a', 'b', 'c', 'd'], 2);
  	     * // => [['a', 'b'], ['c', 'd']]
  	     *
  	     * _.chunk(['a', 'b', 'c', 'd'], 3);
  	     * // => [['a', 'b', 'c'], ['d']]
  	     */function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size===undefined$1){size=1;}else {size=nativeMax(toInteger(size),0);}var length=array==null?0:array.length;if(!length||size<1){return [];}var index=0,resIndex=0,result=Array(nativeCeil(length/size));while(index<length){result[resIndex++]=baseSlice(array,index,index+=size);}return result;}/**
  	     * Creates an array with all falsey values removed. The values `false`, `null`,
  	     * `0`, `""`, `undefined`, and `NaN` are falsey.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to compact.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @example
  	     *
  	     * _.compact([0, 1, false, 2, '', 3]);
  	     * // => [1, 2, 3]
  	     */function compact(array){var index=-1,length=array==null?0:array.length,resIndex=0,result=[];while(++index<length){var value=array[index];if(value){result[resIndex++]=value;}}return result;}/**
  	     * Creates a new array concatenating `array` with any additional arrays
  	     * and/or values.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to concatenate.
  	     * @param {...*} [values] The values to concatenate.
  	     * @returns {Array} Returns the new concatenated array.
  	     * @example
  	     *
  	     * var array = [1];
  	     * var other = _.concat(array, 2, [3], [[4]]);
  	     *
  	     * console.log(other);
  	     * // => [1, 2, 3, [4]]
  	     *
  	     * console.log(array);
  	     * // => [1]
  	     */function concat(){var length=arguments.length;if(!length){return [];}var args=Array(length-1),array=arguments[0],index=length;while(index--){args[index-1]=arguments[index];}return arrayPush(isArray(array)?copyArray(array):[array],baseFlatten(args,1));}/**
  	     * Creates an array of `array` values not included in the other given arrays
  	     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons. The order and references of result values are
  	     * determined by the first array.
  	     *
  	     * **Note:** Unlike `_.pullAll`, this method returns a new array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {...Array} [values] The values to exclude.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @see _.without, _.xor
  	     * @example
  	     *
  	     * _.difference([2, 1], [2, 3]);
  	     * // => [1]
  	     */var difference=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true)):[];});/**
  	     * This method is like `_.difference` except that it accepts `iteratee` which
  	     * is invoked for each element of `array` and `values` to generate the criterion
  	     * by which they're compared. The order and references of result values are
  	     * determined by the first array. The iteratee is invoked with one argument:
  	     * (value).
  	     *
  	     * **Note:** Unlike `_.pullAllBy`, this method returns a new array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {...Array} [values] The values to exclude.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @example
  	     *
  	     * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  	     * // => [1.2]
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
  	     * // => [{ 'x': 2 }]
  	     */var differenceBy=baseRest(function(array,values){var iteratee=last(values);if(isArrayLikeObject(iteratee)){iteratee=undefined$1;}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),getIteratee(iteratee,2)):[];});/**
  	     * This method is like `_.difference` except that it accepts `comparator`
  	     * which is invoked to compare elements of `array` to `values`. The order and
  	     * references of result values are determined by the first array. The comparator
  	     * is invoked with two arguments: (arrVal, othVal).
  	     *
  	     * **Note:** Unlike `_.pullAllWith`, this method returns a new array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {...Array} [values] The values to exclude.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @example
  	     *
  	     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  	     *
  	     * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
  	     * // => [{ 'x': 2, 'y': 1 }]
  	     */var differenceWith=baseRest(function(array,values){var comparator=last(values);if(isArrayLikeObject(comparator)){comparator=undefined$1;}return isArrayLikeObject(array)?baseDifference(array,baseFlatten(values,1,isArrayLikeObject,true),undefined$1,comparator):[];});/**
  	     * Creates a slice of `array` with `n` elements dropped from the beginning.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.5.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {number} [n=1] The number of elements to drop.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * _.drop([1, 2, 3]);
  	     * // => [2, 3]
  	     *
  	     * _.drop([1, 2, 3], 2);
  	     * // => [3]
  	     *
  	     * _.drop([1, 2, 3], 5);
  	     * // => []
  	     *
  	     * _.drop([1, 2, 3], 0);
  	     * // => [1, 2, 3]
  	     */function drop(array,n,guard){var length=array==null?0:array.length;if(!length){return [];}n=guard||n===undefined$1?1:toInteger(n);return baseSlice(array,n<0?0:n,length);}/**
  	     * Creates a slice of `array` with `n` elements dropped from the end.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {number} [n=1] The number of elements to drop.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * _.dropRight([1, 2, 3]);
  	     * // => [1, 2]
  	     *
  	     * _.dropRight([1, 2, 3], 2);
  	     * // => [1]
  	     *
  	     * _.dropRight([1, 2, 3], 5);
  	     * // => []
  	     *
  	     * _.dropRight([1, 2, 3], 0);
  	     * // => [1, 2, 3]
  	     */function dropRight(array,n,guard){var length=array==null?0:array.length;if(!length){return [];}n=guard||n===undefined$1?1:toInteger(n);n=length-n;return baseSlice(array,0,n<0?0:n);}/**
  	     * Creates a slice of `array` excluding elements dropped from the end.
  	     * Elements are dropped until `predicate` returns falsey. The predicate is
  	     * invoked with three arguments: (value, index, array).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'active': true },
  	     *   { 'user': 'fred',    'active': false },
  	     *   { 'user': 'pebbles', 'active': false }
  	     * ];
  	     *
  	     * _.dropRightWhile(users, function(o) { return !o.active; });
  	     * // => objects for ['barney']
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
  	     * // => objects for ['barney', 'fred']
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.dropRightWhile(users, ['active', false]);
  	     * // => objects for ['barney']
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.dropRightWhile(users, 'active');
  	     * // => objects for ['barney', 'fred', 'pebbles']
  	     */function dropRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true,true):[];}/**
  	     * Creates a slice of `array` excluding elements dropped from the beginning.
  	     * Elements are dropped until `predicate` returns falsey. The predicate is
  	     * invoked with three arguments: (value, index, array).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'active': false },
  	     *   { 'user': 'fred',    'active': false },
  	     *   { 'user': 'pebbles', 'active': true }
  	     * ];
  	     *
  	     * _.dropWhile(users, function(o) { return !o.active; });
  	     * // => objects for ['pebbles']
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.dropWhile(users, { 'user': 'barney', 'active': false });
  	     * // => objects for ['fred', 'pebbles']
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.dropWhile(users, ['active', false]);
  	     * // => objects for ['pebbles']
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.dropWhile(users, 'active');
  	     * // => objects for ['barney', 'fred', 'pebbles']
  	     */function dropWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),true):[];}/**
  	     * Fills elements of `array` with `value` from `start` up to, but not
  	     * including, `end`.
  	     *
  	     * **Note:** This method mutates `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.2.0
  	     * @category Array
  	     * @param {Array} array The array to fill.
  	     * @param {*} value The value to fill `array` with.
  	     * @param {number} [start=0] The start position.
  	     * @param {number} [end=array.length] The end position.
  	     * @returns {Array} Returns `array`.
  	     * @example
  	     *
  	     * var array = [1, 2, 3];
  	     *
  	     * _.fill(array, 'a');
  	     * console.log(array);
  	     * // => ['a', 'a', 'a']
  	     *
  	     * _.fill(Array(3), 2);
  	     * // => [2, 2, 2]
  	     *
  	     * _.fill([4, 6, 8, 10], '*', 1, 3);
  	     * // => [4, '*', '*', 10]
  	     */function fill(array,value,start,end){var length=array==null?0:array.length;if(!length){return [];}if(start&&typeof start!='number'&&isIterateeCall(array,value,start)){start=0;end=length;}return baseFill(array,value,start,end);}/**
  	     * This method is like `_.find` except that it returns the index of the first
  	     * element `predicate` returns truthy for instead of the element itself.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.1.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @param {number} [fromIndex=0] The index to search from.
  	     * @returns {number} Returns the index of the found element, else `-1`.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'active': false },
  	     *   { 'user': 'fred',    'active': false },
  	     *   { 'user': 'pebbles', 'active': true }
  	     * ];
  	     *
  	     * _.findIndex(users, function(o) { return o.user == 'barney'; });
  	     * // => 0
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.findIndex(users, { 'user': 'fred', 'active': false });
  	     * // => 1
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.findIndex(users, ['active', false]);
  	     * // => 0
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.findIndex(users, 'active');
  	     * // => 2
  	     */function findIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return -1;}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0);}return baseFindIndex(array,getIteratee(predicate,3),index);}/**
  	     * This method is like `_.findIndex` except that it iterates over elements
  	     * of `collection` from right to left.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @param {number} [fromIndex=array.length-1] The index to search from.
  	     * @returns {number} Returns the index of the found element, else `-1`.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'active': true },
  	     *   { 'user': 'fred',    'active': false },
  	     *   { 'user': 'pebbles', 'active': false }
  	     * ];
  	     *
  	     * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
  	     * // => 2
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.findLastIndex(users, { 'user': 'barney', 'active': true });
  	     * // => 0
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.findLastIndex(users, ['active', false]);
  	     * // => 2
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.findLastIndex(users, 'active');
  	     * // => 0
  	     */function findLastIndex(array,predicate,fromIndex){var length=array==null?0:array.length;if(!length){return -1;}var index=length-1;if(fromIndex!==undefined$1){index=toInteger(fromIndex);index=fromIndex<0?nativeMax(length+index,0):nativeMin(index,length-1);}return baseFindIndex(array,getIteratee(predicate,3),index,true);}/**
  	     * Flattens `array` a single level deep.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to flatten.
  	     * @returns {Array} Returns the new flattened array.
  	     * @example
  	     *
  	     * _.flatten([1, [2, [3, [4]], 5]]);
  	     * // => [1, 2, [3, [4]], 5]
  	     */function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array,1):[];}/**
  	     * Recursively flattens `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to flatten.
  	     * @returns {Array} Returns the new flattened array.
  	     * @example
  	     *
  	     * _.flattenDeep([1, [2, [3, [4]], 5]]);
  	     * // => [1, 2, 3, 4, 5]
  	     */function flattenDeep(array){var length=array==null?0:array.length;return length?baseFlatten(array,INFINITY):[];}/**
  	     * Recursively flatten `array` up to `depth` times.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.4.0
  	     * @category Array
  	     * @param {Array} array The array to flatten.
  	     * @param {number} [depth=1] The maximum recursion depth.
  	     * @returns {Array} Returns the new flattened array.
  	     * @example
  	     *
  	     * var array = [1, [2, [3, [4]], 5]];
  	     *
  	     * _.flattenDepth(array, 1);
  	     * // => [1, 2, [3, [4]], 5]
  	     *
  	     * _.flattenDepth(array, 2);
  	     * // => [1, 2, 3, [4], 5]
  	     */function flattenDepth(array,depth){var length=array==null?0:array.length;if(!length){return [];}depth=depth===undefined$1?1:toInteger(depth);return baseFlatten(array,depth);}/**
  	     * The inverse of `_.toPairs`; this method returns an object composed
  	     * from key-value `pairs`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} pairs The key-value pairs.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * _.fromPairs([['a', 1], ['b', 2]]);
  	     * // => { 'a': 1, 'b': 2 }
  	     */function fromPairs(pairs){var index=-1,length=pairs==null?0:pairs.length,result={};while(++index<length){var pair=pairs[index];result[pair[0]]=pair[1];}return result;}/**
  	     * Gets the first element of `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @alias first
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @returns {*} Returns the first element of `array`.
  	     * @example
  	     *
  	     * _.head([1, 2, 3]);
  	     * // => 1
  	     *
  	     * _.head([]);
  	     * // => undefined
  	     */function head(array){return array&&array.length?array[0]:undefined$1;}/**
  	     * Gets the index at which the first occurrence of `value` is found in `array`
  	     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons. If `fromIndex` is negative, it's used as the
  	     * offset from the end of `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {*} value The value to search for.
  	     * @param {number} [fromIndex=0] The index to search from.
  	     * @returns {number} Returns the index of the matched value, else `-1`.
  	     * @example
  	     *
  	     * _.indexOf([1, 2, 1, 2], 2);
  	     * // => 1
  	     *
  	     * // Search from the `fromIndex`.
  	     * _.indexOf([1, 2, 1, 2], 2, 2);
  	     * // => 3
  	     */function indexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return -1;}var index=fromIndex==null?0:toInteger(fromIndex);if(index<0){index=nativeMax(length+index,0);}return baseIndexOf(array,value,index);}/**
  	     * Gets all but the last element of `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * _.initial([1, 2, 3]);
  	     * // => [1, 2]
  	     */function initial(array){var length=array==null?0:array.length;return length?baseSlice(array,0,-1):[];}/**
  	     * Creates an array of unique values that are included in all given arrays
  	     * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons. The order and references of result values are
  	     * determined by the first array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @returns {Array} Returns the new array of intersecting values.
  	     * @example
  	     *
  	     * _.intersection([2, 1], [2, 3]);
  	     * // => [2]
  	     */var intersection=baseRest(function(arrays){var mapped=arrayMap(arrays,castArrayLikeObject);return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped):[];});/**
  	     * This method is like `_.intersection` except that it accepts `iteratee`
  	     * which is invoked for each element of each `arrays` to generate the criterion
  	     * by which they're compared. The order and references of result values are
  	     * determined by the first array. The iteratee is invoked with one argument:
  	     * (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {Array} Returns the new array of intersecting values.
  	     * @example
  	     *
  	     * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  	     * // => [2.1]
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  	     * // => [{ 'x': 1 }]
  	     */var intersectionBy=baseRest(function(arrays){var iteratee=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);if(iteratee===last(mapped)){iteratee=undefined$1;}else {mapped.pop();}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,getIteratee(iteratee,2)):[];});/**
  	     * This method is like `_.intersection` except that it accepts `comparator`
  	     * which is invoked to compare elements of `arrays`. The order and references
  	     * of result values are determined by the first array. The comparator is
  	     * invoked with two arguments: (arrVal, othVal).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new array of intersecting values.
  	     * @example
  	     *
  	     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  	     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  	     *
  	     * _.intersectionWith(objects, others, _.isEqual);
  	     * // => [{ 'x': 1, 'y': 2 }]
  	     */var intersectionWith=baseRest(function(arrays){var comparator=last(arrays),mapped=arrayMap(arrays,castArrayLikeObject);comparator=typeof comparator=='function'?comparator:undefined$1;if(comparator){mapped.pop();}return mapped.length&&mapped[0]===arrays[0]?baseIntersection(mapped,undefined$1,comparator):[];});/**
  	     * Converts all elements in `array` into a string separated by `separator`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to convert.
  	     * @param {string} [separator=','] The element separator.
  	     * @returns {string} Returns the joined string.
  	     * @example
  	     *
  	     * _.join(['a', 'b', 'c'], '~');
  	     * // => 'a~b~c'
  	     */function join(array,separator){return array==null?'':nativeJoin.call(array,separator);}/**
  	     * Gets the last element of `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @returns {*} Returns the last element of `array`.
  	     * @example
  	     *
  	     * _.last([1, 2, 3]);
  	     * // => 3
  	     */function last(array){var length=array==null?0:array.length;return length?array[length-1]:undefined$1;}/**
  	     * This method is like `_.indexOf` except that it iterates over elements of
  	     * `array` from right to left.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {*} value The value to search for.
  	     * @param {number} [fromIndex=array.length-1] The index to search from.
  	     * @returns {number} Returns the index of the matched value, else `-1`.
  	     * @example
  	     *
  	     * _.lastIndexOf([1, 2, 1, 2], 2);
  	     * // => 3
  	     *
  	     * // Search from the `fromIndex`.
  	     * _.lastIndexOf([1, 2, 1, 2], 2, 2);
  	     * // => 1
  	     */function lastIndexOf(array,value,fromIndex){var length=array==null?0:array.length;if(!length){return -1;}var index=length;if(fromIndex!==undefined$1){index=toInteger(fromIndex);index=index<0?nativeMax(length+index,0):nativeMin(index,length-1);}return value===value?strictLastIndexOf(array,value,index):baseFindIndex(array,baseIsNaN,index,true);}/**
  	     * Gets the element at index `n` of `array`. If `n` is negative, the nth
  	     * element from the end is returned.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.11.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {number} [n=0] The index of the element to return.
  	     * @returns {*} Returns the nth element of `array`.
  	     * @example
  	     *
  	     * var array = ['a', 'b', 'c', 'd'];
  	     *
  	     * _.nth(array, 1);
  	     * // => 'b'
  	     *
  	     * _.nth(array, -2);
  	     * // => 'c';
  	     */function nth(array,n){return array&&array.length?baseNth(array,toInteger(n)):undefined$1;}/**
  	     * Removes all given values from `array` using
  	     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons.
  	     *
  	     * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
  	     * to remove elements from an array by predicate.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Array
  	     * @param {Array} array The array to modify.
  	     * @param {...*} [values] The values to remove.
  	     * @returns {Array} Returns `array`.
  	     * @example
  	     *
  	     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  	     *
  	     * _.pull(array, 'a', 'c');
  	     * console.log(array);
  	     * // => ['b', 'b']
  	     */var pull=baseRest(pullAll);/**
  	     * This method is like `_.pull` except that it accepts an array of values to remove.
  	     *
  	     * **Note:** Unlike `_.difference`, this method mutates `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to modify.
  	     * @param {Array} values The values to remove.
  	     * @returns {Array} Returns `array`.
  	     * @example
  	     *
  	     * var array = ['a', 'b', 'c', 'a', 'b', 'c'];
  	     *
  	     * _.pullAll(array, ['a', 'c']);
  	     * console.log(array);
  	     * // => ['b', 'b']
  	     */function pullAll(array,values){return array&&array.length&&values&&values.length?basePullAll(array,values):array;}/**
  	     * This method is like `_.pullAll` except that it accepts `iteratee` which is
  	     * invoked for each element of `array` and `values` to generate the criterion
  	     * by which they're compared. The iteratee is invoked with one argument: (value).
  	     *
  	     * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to modify.
  	     * @param {Array} values The values to remove.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {Array} Returns `array`.
  	     * @example
  	     *
  	     * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
  	     *
  	     * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
  	     * console.log(array);
  	     * // => [{ 'x': 2 }]
  	     */function pullAllBy(array,values,iteratee){return array&&array.length&&values&&values.length?basePullAll(array,values,getIteratee(iteratee,2)):array;}/**
  	     * This method is like `_.pullAll` except that it accepts `comparator` which
  	     * is invoked to compare elements of `array` to `values`. The comparator is
  	     * invoked with two arguments: (arrVal, othVal).
  	     *
  	     * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.6.0
  	     * @category Array
  	     * @param {Array} array The array to modify.
  	     * @param {Array} values The values to remove.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns `array`.
  	     * @example
  	     *
  	     * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
  	     *
  	     * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
  	     * console.log(array);
  	     * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
  	     */function pullAllWith(array,values,comparator){return array&&array.length&&values&&values.length?basePullAll(array,values,undefined$1,comparator):array;}/**
  	     * Removes elements from `array` corresponding to `indexes` and returns an
  	     * array of removed elements.
  	     *
  	     * **Note:** Unlike `_.at`, this method mutates `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to modify.
  	     * @param {...(number|number[])} [indexes] The indexes of elements to remove.
  	     * @returns {Array} Returns the new array of removed elements.
  	     * @example
  	     *
  	     * var array = ['a', 'b', 'c', 'd'];
  	     * var pulled = _.pullAt(array, [1, 3]);
  	     *
  	     * console.log(array);
  	     * // => ['a', 'c']
  	     *
  	     * console.log(pulled);
  	     * // => ['b', 'd']
  	     */var pullAt=flatRest(function(array,indexes){var length=array==null?0:array.length,result=baseAt(array,indexes);basePullAt(array,arrayMap(indexes,function(index){return isIndex(index,length)?+index:index;}).sort(compareAscending));return result;});/**
  	     * Removes all elements from `array` that `predicate` returns truthy for
  	     * and returns an array of the removed elements. The predicate is invoked
  	     * with three arguments: (value, index, array).
  	     *
  	     * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
  	     * to pull elements from an array by value.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Array
  	     * @param {Array} array The array to modify.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the new array of removed elements.
  	     * @example
  	     *
  	     * var array = [1, 2, 3, 4];
  	     * var evens = _.remove(array, function(n) {
  	     *   return n % 2 == 0;
  	     * });
  	     *
  	     * console.log(array);
  	     * // => [1, 3]
  	     *
  	     * console.log(evens);
  	     * // => [2, 4]
  	     */function remove(array,predicate){var result=[];if(!(array&&array.length)){return result;}var index=-1,indexes=[],length=array.length;predicate=getIteratee(predicate,3);while(++index<length){var value=array[index];if(predicate(value,index,array)){result.push(value);indexes.push(index);}}basePullAt(array,indexes);return result;}/**
  	     * Reverses `array` so that the first element becomes the last, the second
  	     * element becomes the second to last, and so on.
  	     *
  	     * **Note:** This method mutates `array` and is based on
  	     * [`Array#reverse`](https://mdn.io/Array/reverse).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to modify.
  	     * @returns {Array} Returns `array`.
  	     * @example
  	     *
  	     * var array = [1, 2, 3];
  	     *
  	     * _.reverse(array);
  	     * // => [3, 2, 1]
  	     *
  	     * console.log(array);
  	     * // => [3, 2, 1]
  	     */function reverse(array){return array==null?array:nativeReverse.call(array);}/**
  	     * Creates a slice of `array` from `start` up to, but not including, `end`.
  	     *
  	     * **Note:** This method is used instead of
  	     * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
  	     * returned.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to slice.
  	     * @param {number} [start=0] The start position.
  	     * @param {number} [end=array.length] The end position.
  	     * @returns {Array} Returns the slice of `array`.
  	     */function slice(array,start,end){var length=array==null?0:array.length;if(!length){return [];}if(end&&typeof end!='number'&&isIterateeCall(array,start,end)){start=0;end=length;}else {start=start==null?0:toInteger(start);end=end===undefined$1?length:toInteger(end);}return baseSlice(array,start,end);}/**
  	     * Uses a binary search to determine the lowest index at which `value`
  	     * should be inserted into `array` in order to maintain its sort order.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The sorted array to inspect.
  	     * @param {*} value The value to evaluate.
  	     * @returns {number} Returns the index at which `value` should be inserted
  	     *  into `array`.
  	     * @example
  	     *
  	     * _.sortedIndex([30, 50], 40);
  	     * // => 1
  	     */function sortedIndex(array,value){return baseSortedIndex(array,value);}/**
  	     * This method is like `_.sortedIndex` except that it accepts `iteratee`
  	     * which is invoked for `value` and each element of `array` to compute their
  	     * sort ranking. The iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The sorted array to inspect.
  	     * @param {*} value The value to evaluate.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {number} Returns the index at which `value` should be inserted
  	     *  into `array`.
  	     * @example
  	     *
  	     * var objects = [{ 'x': 4 }, { 'x': 5 }];
  	     *
  	     * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  	     * // => 0
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.sortedIndexBy(objects, { 'x': 4 }, 'x');
  	     * // => 0
  	     */function sortedIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2));}/**
  	     * This method is like `_.indexOf` except that it performs a binary
  	     * search on a sorted `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {*} value The value to search for.
  	     * @returns {number} Returns the index of the matched value, else `-1`.
  	     * @example
  	     *
  	     * _.sortedIndexOf([4, 5, 5, 5, 6], 5);
  	     * // => 1
  	     */function sortedIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value);if(index<length&&eq(array[index],value)){return index;}}return -1;}/**
  	     * This method is like `_.sortedIndex` except that it returns the highest
  	     * index at which `value` should be inserted into `array` in order to
  	     * maintain its sort order.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The sorted array to inspect.
  	     * @param {*} value The value to evaluate.
  	     * @returns {number} Returns the index at which `value` should be inserted
  	     *  into `array`.
  	     * @example
  	     *
  	     * _.sortedLastIndex([4, 5, 5, 5, 6], 5);
  	     * // => 4
  	     */function sortedLastIndex(array,value){return baseSortedIndex(array,value,true);}/**
  	     * This method is like `_.sortedLastIndex` except that it accepts `iteratee`
  	     * which is invoked for `value` and each element of `array` to compute their
  	     * sort ranking. The iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The sorted array to inspect.
  	     * @param {*} value The value to evaluate.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {number} Returns the index at which `value` should be inserted
  	     *  into `array`.
  	     * @example
  	     *
  	     * var objects = [{ 'x': 4 }, { 'x': 5 }];
  	     *
  	     * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
  	     * // => 1
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
  	     * // => 1
  	     */function sortedLastIndexBy(array,value,iteratee){return baseSortedIndexBy(array,value,getIteratee(iteratee,2),true);}/**
  	     * This method is like `_.lastIndexOf` except that it performs a binary
  	     * search on a sorted `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {*} value The value to search for.
  	     * @returns {number} Returns the index of the matched value, else `-1`.
  	     * @example
  	     *
  	     * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
  	     * // => 3
  	     */function sortedLastIndexOf(array,value){var length=array==null?0:array.length;if(length){var index=baseSortedIndex(array,value,true)-1;if(eq(array[index],value)){return index;}}return -1;}/**
  	     * This method is like `_.uniq` except that it's designed and optimized
  	     * for sorted arrays.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @returns {Array} Returns the new duplicate free array.
  	     * @example
  	     *
  	     * _.sortedUniq([1, 1, 2]);
  	     * // => [1, 2]
  	     */function sortedUniq(array){return array&&array.length?baseSortedUniq(array):[];}/**
  	     * This method is like `_.uniqBy` except that it's designed and optimized
  	     * for sorted arrays.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {Function} [iteratee] The iteratee invoked per element.
  	     * @returns {Array} Returns the new duplicate free array.
  	     * @example
  	     *
  	     * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
  	     * // => [1.1, 2.3]
  	     */function sortedUniqBy(array,iteratee){return array&&array.length?baseSortedUniq(array,getIteratee(iteratee,2)):[];}/**
  	     * Gets all but the first element of `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * _.tail([1, 2, 3]);
  	     * // => [2, 3]
  	     */function tail(array){var length=array==null?0:array.length;return length?baseSlice(array,1,length):[];}/**
  	     * Creates a slice of `array` with `n` elements taken from the beginning.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {number} [n=1] The number of elements to take.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * _.take([1, 2, 3]);
  	     * // => [1]
  	     *
  	     * _.take([1, 2, 3], 2);
  	     * // => [1, 2]
  	     *
  	     * _.take([1, 2, 3], 5);
  	     * // => [1, 2, 3]
  	     *
  	     * _.take([1, 2, 3], 0);
  	     * // => []
  	     */function take(array,n,guard){if(!(array&&array.length)){return [];}n=guard||n===undefined$1?1:toInteger(n);return baseSlice(array,0,n<0?0:n);}/**
  	     * Creates a slice of `array` with `n` elements taken from the end.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {number} [n=1] The number of elements to take.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * _.takeRight([1, 2, 3]);
  	     * // => [3]
  	     *
  	     * _.takeRight([1, 2, 3], 2);
  	     * // => [2, 3]
  	     *
  	     * _.takeRight([1, 2, 3], 5);
  	     * // => [1, 2, 3]
  	     *
  	     * _.takeRight([1, 2, 3], 0);
  	     * // => []
  	     */function takeRight(array,n,guard){var length=array==null?0:array.length;if(!length){return [];}n=guard||n===undefined$1?1:toInteger(n);n=length-n;return baseSlice(array,n<0?0:n,length);}/**
  	     * Creates a slice of `array` with elements taken from the end. Elements are
  	     * taken until `predicate` returns falsey. The predicate is invoked with
  	     * three arguments: (value, index, array).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'active': true },
  	     *   { 'user': 'fred',    'active': false },
  	     *   { 'user': 'pebbles', 'active': false }
  	     * ];
  	     *
  	     * _.takeRightWhile(users, function(o) { return !o.active; });
  	     * // => objects for ['fred', 'pebbles']
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
  	     * // => objects for ['pebbles']
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.takeRightWhile(users, ['active', false]);
  	     * // => objects for ['fred', 'pebbles']
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.takeRightWhile(users, 'active');
  	     * // => []
  	     */function takeRightWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3),false,true):[];}/**
  	     * Creates a slice of `array` with elements taken from the beginning. Elements
  	     * are taken until `predicate` returns falsey. The predicate is invoked with
  	     * three arguments: (value, index, array).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Array
  	     * @param {Array} array The array to query.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the slice of `array`.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'active': false },
  	     *   { 'user': 'fred',    'active': false },
  	     *   { 'user': 'pebbles', 'active': true }
  	     * ];
  	     *
  	     * _.takeWhile(users, function(o) { return !o.active; });
  	     * // => objects for ['barney', 'fred']
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.takeWhile(users, { 'user': 'barney', 'active': false });
  	     * // => objects for ['barney']
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.takeWhile(users, ['active', false]);
  	     * // => objects for ['barney', 'fred']
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.takeWhile(users, 'active');
  	     * // => []
  	     */function takeWhile(array,predicate){return array&&array.length?baseWhile(array,getIteratee(predicate,3)):[];}/**
  	     * Creates an array of unique values, in order, from all given arrays using
  	     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @returns {Array} Returns the new array of combined values.
  	     * @example
  	     *
  	     * _.union([2], [1, 2]);
  	     * // => [2, 1]
  	     */var union=baseRest(function(arrays){return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true));});/**
  	     * This method is like `_.union` except that it accepts `iteratee` which is
  	     * invoked for each element of each `arrays` to generate the criterion by
  	     * which uniqueness is computed. Result values are chosen from the first
  	     * array in which the value occurs. The iteratee is invoked with one argument:
  	     * (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {Array} Returns the new array of combined values.
  	     * @example
  	     *
  	     * _.unionBy([2.1], [1.2, 2.3], Math.floor);
  	     * // => [2.1, 1.2]
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  	     * // => [{ 'x': 1 }, { 'x': 2 }]
  	     */var unionBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined$1;}return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),getIteratee(iteratee,2));});/**
  	     * This method is like `_.union` except that it accepts `comparator` which
  	     * is invoked to compare elements of `arrays`. Result values are chosen from
  	     * the first array in which the value occurs. The comparator is invoked
  	     * with two arguments: (arrVal, othVal).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new array of combined values.
  	     * @example
  	     *
  	     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  	     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  	     *
  	     * _.unionWith(objects, others, _.isEqual);
  	     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  	     */var unionWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=='function'?comparator:undefined$1;return baseUniq(baseFlatten(arrays,1,isArrayLikeObject,true),undefined$1,comparator);});/**
  	     * Creates a duplicate-free version of an array, using
  	     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons, in which only the first occurrence of each element
  	     * is kept. The order of result values is determined by the order they occur
  	     * in the array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @returns {Array} Returns the new duplicate free array.
  	     * @example
  	     *
  	     * _.uniq([2, 1, 2]);
  	     * // => [2, 1]
  	     */function uniq(array){return array&&array.length?baseUniq(array):[];}/**
  	     * This method is like `_.uniq` except that it accepts `iteratee` which is
  	     * invoked for each element in `array` to generate the criterion by which
  	     * uniqueness is computed. The order of result values is determined by the
  	     * order they occur in the array. The iteratee is invoked with one argument:
  	     * (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {Array} Returns the new duplicate free array.
  	     * @example
  	     *
  	     * _.uniqBy([2.1, 1.2, 2.3], Math.floor);
  	     * // => [2.1, 1.2]
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
  	     * // => [{ 'x': 1 }, { 'x': 2 }]
  	     */function uniqBy(array,iteratee){return array&&array.length?baseUniq(array,getIteratee(iteratee,2)):[];}/**
  	     * This method is like `_.uniq` except that it accepts `comparator` which
  	     * is invoked to compare elements of `array`. The order of result values is
  	     * determined by the order they occur in the array.The comparator is invoked
  	     * with two arguments: (arrVal, othVal).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new duplicate free array.
  	     * @example
  	     *
  	     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
  	     *
  	     * _.uniqWith(objects, _.isEqual);
  	     * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
  	     */function uniqWith(array,comparator){comparator=typeof comparator=='function'?comparator:undefined$1;return array&&array.length?baseUniq(array,undefined$1,comparator):[];}/**
  	     * This method is like `_.zip` except that it accepts an array of grouped
  	     * elements and creates an array regrouping the elements to their pre-zip
  	     * configuration.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.2.0
  	     * @category Array
  	     * @param {Array} array The array of grouped elements to process.
  	     * @returns {Array} Returns the new array of regrouped elements.
  	     * @example
  	     *
  	     * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
  	     * // => [['a', 1, true], ['b', 2, false]]
  	     *
  	     * _.unzip(zipped);
  	     * // => [['a', 'b'], [1, 2], [true, false]]
  	     */function unzip(array){if(!(array&&array.length)){return [];}var length=0;array=arrayFilter(array,function(group){if(isArrayLikeObject(group)){length=nativeMax(group.length,length);return true;}});return baseTimes(length,function(index){return arrayMap(array,baseProperty(index));});}/**
  	     * This method is like `_.unzip` except that it accepts `iteratee` to specify
  	     * how regrouped values should be combined. The iteratee is invoked with the
  	     * elements of each group: (...group).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.8.0
  	     * @category Array
  	     * @param {Array} array The array of grouped elements to process.
  	     * @param {Function} [iteratee=_.identity] The function to combine
  	     *  regrouped values.
  	     * @returns {Array} Returns the new array of regrouped elements.
  	     * @example
  	     *
  	     * var zipped = _.zip([1, 2], [10, 20], [100, 200]);
  	     * // => [[1, 10, 100], [2, 20, 200]]
  	     *
  	     * _.unzipWith(zipped, _.add);
  	     * // => [3, 30, 300]
  	     */function unzipWith(array,iteratee){if(!(array&&array.length)){return [];}var result=unzip(array);if(iteratee==null){return result;}return arrayMap(result,function(group){return apply(iteratee,undefined$1,group);});}/**
  	     * Creates an array excluding all given values using
  	     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * for equality comparisons.
  	     *
  	     * **Note:** Unlike `_.pull`, this method returns a new array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {Array} array The array to inspect.
  	     * @param {...*} [values] The values to exclude.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @see _.difference, _.xor
  	     * @example
  	     *
  	     * _.without([2, 1, 2, 3], 1, 2);
  	     * // => [3]
  	     */var without=baseRest(function(array,values){return isArrayLikeObject(array)?baseDifference(array,values):[];});/**
  	     * Creates an array of unique values that is the
  	     * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
  	     * of the given arrays. The order of result values is determined by the order
  	     * they occur in the arrays.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.4.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @see _.difference, _.without
  	     * @example
  	     *
  	     * _.xor([2, 1], [2, 3]);
  	     * // => [1, 3]
  	     */var xor=baseRest(function(arrays){return baseXor(arrayFilter(arrays,isArrayLikeObject));});/**
  	     * This method is like `_.xor` except that it accepts `iteratee` which is
  	     * invoked for each element of each `arrays` to generate the criterion by
  	     * which by which they're compared. The order of result values is determined
  	     * by the order they occur in the arrays. The iteratee is invoked with one
  	     * argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @example
  	     *
  	     * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
  	     * // => [1.2, 3.4]
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
  	     * // => [{ 'x': 2 }]
  	     */var xorBy=baseRest(function(arrays){var iteratee=last(arrays);if(isArrayLikeObject(iteratee)){iteratee=undefined$1;}return baseXor(arrayFilter(arrays,isArrayLikeObject),getIteratee(iteratee,2));});/**
  	     * This method is like `_.xor` except that it accepts `comparator` which is
  	     * invoked to compare elements of `arrays`. The order of result values is
  	     * determined by the order they occur in the arrays. The comparator is invoked
  	     * with two arguments: (arrVal, othVal).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to inspect.
  	     * @param {Function} [comparator] The comparator invoked per element.
  	     * @returns {Array} Returns the new array of filtered values.
  	     * @example
  	     *
  	     * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
  	     * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
  	     *
  	     * _.xorWith(objects, others, _.isEqual);
  	     * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
  	     */var xorWith=baseRest(function(arrays){var comparator=last(arrays);comparator=typeof comparator=='function'?comparator:undefined$1;return baseXor(arrayFilter(arrays,isArrayLikeObject),undefined$1,comparator);});/**
  	     * Creates an array of grouped elements, the first of which contains the
  	     * first elements of the given arrays, the second of which contains the
  	     * second elements of the given arrays, and so on.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to process.
  	     * @returns {Array} Returns the new array of grouped elements.
  	     * @example
  	     *
  	     * _.zip(['a', 'b'], [1, 2], [true, false]);
  	     * // => [['a', 1, true], ['b', 2, false]]
  	     */var zip=baseRest(unzip);/**
  	     * This method is like `_.fromPairs` except that it accepts two arrays,
  	     * one of property identifiers and one of corresponding values.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.4.0
  	     * @category Array
  	     * @param {Array} [props=[]] The property identifiers.
  	     * @param {Array} [values=[]] The property values.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * _.zipObject(['a', 'b'], [1, 2]);
  	     * // => { 'a': 1, 'b': 2 }
  	     */function zipObject(props,values){return baseZipObject(props||[],values||[],assignValue);}/**
  	     * This method is like `_.zipObject` except that it supports property paths.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.1.0
  	     * @category Array
  	     * @param {Array} [props=[]] The property identifiers.
  	     * @param {Array} [values=[]] The property values.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
  	     * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
  	     */function zipObjectDeep(props,values){return baseZipObject(props||[],values||[],baseSet);}/**
  	     * This method is like `_.zip` except that it accepts `iteratee` to specify
  	     * how grouped values should be combined. The iteratee is invoked with the
  	     * elements of each group: (...group).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.8.0
  	     * @category Array
  	     * @param {...Array} [arrays] The arrays to process.
  	     * @param {Function} [iteratee=_.identity] The function to combine
  	     *  grouped values.
  	     * @returns {Array} Returns the new array of grouped elements.
  	     * @example
  	     *
  	     * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
  	     *   return a + b + c;
  	     * });
  	     * // => [111, 222]
  	     */var zipWith=baseRest(function(arrays){var length=arrays.length,iteratee=length>1?arrays[length-1]:undefined$1;iteratee=typeof iteratee=='function'?(arrays.pop(),iteratee):undefined$1;return unzipWith(arrays,iteratee);});/*------------------------------------------------------------------------*/ /**
  	     * Creates a `lodash` wrapper instance that wraps `value` with explicit method
  	     * chain sequences enabled. The result of such sequences must be unwrapped
  	     * with `_#value`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.3.0
  	     * @category Seq
  	     * @param {*} value The value to wrap.
  	     * @returns {Object} Returns the new `lodash` wrapper instance.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'age': 36 },
  	     *   { 'user': 'fred',    'age': 40 },
  	     *   { 'user': 'pebbles', 'age': 1 }
  	     * ];
  	     *
  	     * var youngest = _
  	     *   .chain(users)
  	     *   .sortBy('age')
  	     *   .map(function(o) {
  	     *     return o.user + ' is ' + o.age;
  	     *   })
  	     *   .head()
  	     *   .value();
  	     * // => 'pebbles is 1'
  	     */function chain(value){var result=lodash(value);result.__chain__=true;return result;}/**
  	     * This method invokes `interceptor` and returns `value`. The interceptor
  	     * is invoked with one argument; (value). The purpose of this method is to
  	     * "tap into" a method chain sequence in order to modify intermediate results.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Seq
  	     * @param {*} value The value to provide to `interceptor`.
  	     * @param {Function} interceptor The function to invoke.
  	     * @returns {*} Returns `value`.
  	     * @example
  	     *
  	     * _([1, 2, 3])
  	     *  .tap(function(array) {
  	     *    // Mutate input array.
  	     *    array.pop();
  	     *  })
  	     *  .reverse()
  	     *  .value();
  	     * // => [2, 1]
  	     */function tap(value,interceptor){interceptor(value);return value;}/**
  	     * This method is like `_.tap` except that it returns the result of `interceptor`.
  	     * The purpose of this method is to "pass thru" values replacing intermediate
  	     * results in a method chain sequence.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Seq
  	     * @param {*} value The value to provide to `interceptor`.
  	     * @param {Function} interceptor The function to invoke.
  	     * @returns {*} Returns the result of `interceptor`.
  	     * @example
  	     *
  	     * _('  abc  ')
  	     *  .chain()
  	     *  .trim()
  	     *  .thru(function(value) {
  	     *    return [value];
  	     *  })
  	     *  .value();
  	     * // => ['abc']
  	     */function thru(value,interceptor){return interceptor(value);}/**
  	     * This method is the wrapper version of `_.at`.
  	     *
  	     * @name at
  	     * @memberOf _
  	     * @since 1.0.0
  	     * @category Seq
  	     * @param {...(string|string[])} [paths] The property paths to pick.
  	     * @returns {Object} Returns the new `lodash` wrapper instance.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  	     *
  	     * _(object).at(['a[0].b.c', 'a[1]']).value();
  	     * // => [3, 4]
  	     */var wrapperAt=flatRest(function(paths){var length=paths.length,start=length?paths[0]:0,value=this.__wrapped__,interceptor=function(object){return baseAt(object,paths);};if(length>1||this.__actions__.length||!(value instanceof LazyWrapper)||!isIndex(start)){return this.thru(interceptor);}value=value.slice(start,+start+(length?1:0));value.__actions__.push({'func':thru,'args':[interceptor],'thisArg':undefined$1});return new LodashWrapper(value,this.__chain__).thru(function(array){if(length&&!array.length){array.push(undefined$1);}return array;});});/**
  	     * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
  	     *
  	     * @name chain
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Seq
  	     * @returns {Object} Returns the new `lodash` wrapper instance.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney', 'age': 36 },
  	     *   { 'user': 'fred',   'age': 40 }
  	     * ];
  	     *
  	     * // A sequence without explicit chaining.
  	     * _(users).head();
  	     * // => { 'user': 'barney', 'age': 36 }
  	     *
  	     * // A sequence with explicit chaining.
  	     * _(users)
  	     *   .chain()
  	     *   .head()
  	     *   .pick('user')
  	     *   .value();
  	     * // => { 'user': 'barney' }
  	     */function wrapperChain(){return chain(this);}/**
  	     * Executes the chain sequence and returns the wrapped result.
  	     *
  	     * @name commit
  	     * @memberOf _
  	     * @since 3.2.0
  	     * @category Seq
  	     * @returns {Object} Returns the new `lodash` wrapper instance.
  	     * @example
  	     *
  	     * var array = [1, 2];
  	     * var wrapped = _(array).push(3);
  	     *
  	     * console.log(array);
  	     * // => [1, 2]
  	     *
  	     * wrapped = wrapped.commit();
  	     * console.log(array);
  	     * // => [1, 2, 3]
  	     *
  	     * wrapped.last();
  	     * // => 3
  	     *
  	     * console.log(array);
  	     * // => [1, 2, 3]
  	     */function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__);}/**
  	     * Gets the next value on a wrapped object following the
  	     * [iterator protocol](https://mdn.io/iteration_protocols#iterator).
  	     *
  	     * @name next
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Seq
  	     * @returns {Object} Returns the next iterator value.
  	     * @example
  	     *
  	     * var wrapped = _([1, 2]);
  	     *
  	     * wrapped.next();
  	     * // => { 'done': false, 'value': 1 }
  	     *
  	     * wrapped.next();
  	     * // => { 'done': false, 'value': 2 }
  	     *
  	     * wrapped.next();
  	     * // => { 'done': true, 'value': undefined }
  	     */function wrapperNext(){if(this.__values__===undefined$1){this.__values__=toArray(this.value());}var done=this.__index__>=this.__values__.length,value=done?undefined$1:this.__values__[this.__index__++];return {'done':done,'value':value};}/**
  	     * Enables the wrapper to be iterable.
  	     *
  	     * @name Symbol.iterator
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Seq
  	     * @returns {Object} Returns the wrapper object.
  	     * @example
  	     *
  	     * var wrapped = _([1, 2]);
  	     *
  	     * wrapped[Symbol.iterator]() === wrapped;
  	     * // => true
  	     *
  	     * Array.from(wrapped);
  	     * // => [1, 2]
  	     */function wrapperToIterator(){return this;}/**
  	     * Creates a clone of the chain sequence planting `value` as the wrapped value.
  	     *
  	     * @name plant
  	     * @memberOf _
  	     * @since 3.2.0
  	     * @category Seq
  	     * @param {*} value The value to plant.
  	     * @returns {Object} Returns the new `lodash` wrapper instance.
  	     * @example
  	     *
  	     * function square(n) {
  	     *   return n * n;
  	     * }
  	     *
  	     * var wrapped = _([1, 2]).map(square);
  	     * var other = wrapped.plant([3, 4]);
  	     *
  	     * other.value();
  	     * // => [9, 16]
  	     *
  	     * wrapped.value();
  	     * // => [1, 4]
  	     */function wrapperPlant(value){var result,parent=this;while(parent instanceof baseLodash){var clone=wrapperClone(parent);clone.__index__=0;clone.__values__=undefined$1;if(result){previous.__wrapped__=clone;}else {result=clone;}var previous=clone;parent=parent.__wrapped__;}previous.__wrapped__=value;return result;}/**
  	     * This method is the wrapper version of `_.reverse`.
  	     *
  	     * **Note:** This method mutates the wrapped array.
  	     *
  	     * @name reverse
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Seq
  	     * @returns {Object} Returns the new `lodash` wrapper instance.
  	     * @example
  	     *
  	     * var array = [1, 2, 3];
  	     *
  	     * _(array).reverse().value()
  	     * // => [3, 2, 1]
  	     *
  	     * console.log(array);
  	     * // => [3, 2, 1]
  	     */function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){var wrapped=value;if(this.__actions__.length){wrapped=new LazyWrapper(this);}wrapped=wrapped.reverse();wrapped.__actions__.push({'func':thru,'args':[reverse],'thisArg':undefined$1});return new LodashWrapper(wrapped,this.__chain__);}return this.thru(reverse);}/**
  	     * Executes the chain sequence to resolve the unwrapped value.
  	     *
  	     * @name value
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @alias toJSON, valueOf
  	     * @category Seq
  	     * @returns {*} Returns the resolved unwrapped value.
  	     * @example
  	     *
  	     * _([1, 2, 3]).value();
  	     * // => [1, 2, 3]
  	     */function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__);}/*------------------------------------------------------------------------*/ /**
  	     * Creates an object composed of keys generated from the results of running
  	     * each element of `collection` thru `iteratee`. The corresponding value of
  	     * each key is the number of times the key was returned by `iteratee`. The
  	     * iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.5.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  	     * @returns {Object} Returns the composed aggregate object.
  	     * @example
  	     *
  	     * _.countBy([6.1, 4.2, 6.3], Math.floor);
  	     * // => { '4': 1, '6': 2 }
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.countBy(['one', 'two', 'three'], 'length');
  	     * // => { '3': 2, '5': 1 }
  	     */var countBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){++result[key];}else {baseAssignValue(result,key,1);}});/**
  	     * Checks if `predicate` returns truthy for **all** elements of `collection`.
  	     * Iteration is stopped once `predicate` returns falsey. The predicate is
  	     * invoked with three arguments: (value, index|key, collection).
  	     *
  	     * **Note:** This method returns `true` for
  	     * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
  	     * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
  	     * elements of empty collections.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {boolean} Returns `true` if all elements pass the predicate check,
  	     *  else `false`.
  	     * @example
  	     *
  	     * _.every([true, 1, null, 'yes'], Boolean);
  	     * // => false
  	     *
  	     * var users = [
  	     *   { 'user': 'barney', 'age': 36, 'active': false },
  	     *   { 'user': 'fred',   'age': 40, 'active': false }
  	     * ];
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.every(users, { 'user': 'barney', 'active': false });
  	     * // => false
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.every(users, ['active', false]);
  	     * // => true
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.every(users, 'active');
  	     * // => false
  	     */function every(collection,predicate,guard){var func=isArray(collection)?arrayEvery:baseEvery;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined$1;}return func(collection,getIteratee(predicate,3));}/**
  	     * Iterates over elements of `collection`, returning an array of all elements
  	     * `predicate` returns truthy for. The predicate is invoked with three
  	     * arguments: (value, index|key, collection).
  	     *
  	     * **Note:** Unlike `_.remove`, this method returns a new array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the new filtered array.
  	     * @see _.reject
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney', 'age': 36, 'active': true },
  	     *   { 'user': 'fred',   'age': 40, 'active': false }
  	     * ];
  	     *
  	     * _.filter(users, function(o) { return !o.active; });
  	     * // => objects for ['fred']
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.filter(users, { 'age': 36, 'active': true });
  	     * // => objects for ['barney']
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.filter(users, ['active', false]);
  	     * // => objects for ['fred']
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.filter(users, 'active');
  	     * // => objects for ['barney']
  	     *
  	     * // Combining several predicates using `_.overEvery` or `_.overSome`.
  	     * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
  	     * // => objects for ['fred', 'barney']
  	     */function filter(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,getIteratee(predicate,3));}/**
  	     * Iterates over elements of `collection`, returning the first element
  	     * `predicate` returns truthy for. The predicate is invoked with three
  	     * arguments: (value, index|key, collection).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to inspect.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @param {number} [fromIndex=0] The index to search from.
  	     * @returns {*} Returns the matched element, else `undefined`.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'age': 36, 'active': true },
  	     *   { 'user': 'fred',    'age': 40, 'active': false },
  	     *   { 'user': 'pebbles', 'age': 1,  'active': true }
  	     * ];
  	     *
  	     * _.find(users, function(o) { return o.age < 40; });
  	     * // => object for 'barney'
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.find(users, { 'age': 1, 'active': true });
  	     * // => object for 'pebbles'
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.find(users, ['active', false]);
  	     * // => object for 'fred'
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.find(users, 'active');
  	     * // => object for 'barney'
  	     */var find=createFind(findIndex);/**
  	     * This method is like `_.find` except that it iterates over elements of
  	     * `collection` from right to left.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to inspect.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @param {number} [fromIndex=collection.length-1] The index to search from.
  	     * @returns {*} Returns the matched element, else `undefined`.
  	     * @example
  	     *
  	     * _.findLast([1, 2, 3, 4], function(n) {
  	     *   return n % 2 == 1;
  	     * });
  	     * // => 3
  	     */var findLast=createFind(findLastIndex);/**
  	     * Creates a flattened array of values by running each element in `collection`
  	     * thru `iteratee` and flattening the mapped results. The iteratee is invoked
  	     * with three arguments: (value, index|key, collection).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the new flattened array.
  	     * @example
  	     *
  	     * function duplicate(n) {
  	     *   return [n, n];
  	     * }
  	     *
  	     * _.flatMap([1, 2], duplicate);
  	     * // => [1, 1, 2, 2]
  	     */function flatMap(collection,iteratee){return baseFlatten(map(collection,iteratee),1);}/**
  	     * This method is like `_.flatMap` except that it recursively flattens the
  	     * mapped results.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.7.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the new flattened array.
  	     * @example
  	     *
  	     * function duplicate(n) {
  	     *   return [[[n, n]]];
  	     * }
  	     *
  	     * _.flatMapDeep([1, 2], duplicate);
  	     * // => [1, 1, 2, 2]
  	     */function flatMapDeep(collection,iteratee){return baseFlatten(map(collection,iteratee),INFINITY);}/**
  	     * This method is like `_.flatMap` except that it recursively flattens the
  	     * mapped results up to `depth` times.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.7.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @param {number} [depth=1] The maximum recursion depth.
  	     * @returns {Array} Returns the new flattened array.
  	     * @example
  	     *
  	     * function duplicate(n) {
  	     *   return [[[n, n]]];
  	     * }
  	     *
  	     * _.flatMapDepth([1, 2], duplicate, 2);
  	     * // => [[1, 1], [2, 2]]
  	     */function flatMapDepth(collection,iteratee,depth){depth=depth===undefined$1?1:toInteger(depth);return baseFlatten(map(collection,iteratee),depth);}/**
  	     * Iterates over elements of `collection` and invokes `iteratee` for each element.
  	     * The iteratee is invoked with three arguments: (value, index|key, collection).
  	     * Iteratee functions may exit iteration early by explicitly returning `false`.
  	     *
  	     * **Note:** As with other "Collections" methods, objects with a "length"
  	     * property are iterated like arrays. To avoid this behavior use `_.forIn`
  	     * or `_.forOwn` for object iteration.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @alias each
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Array|Object} Returns `collection`.
  	     * @see _.forEachRight
  	     * @example
  	     *
  	     * _.forEach([1, 2], function(value) {
  	     *   console.log(value);
  	     * });
  	     * // => Logs `1` then `2`.
  	     *
  	     * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
  	     *   console.log(key);
  	     * });
  	     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  	     */function forEach(collection,iteratee){var func=isArray(collection)?arrayEach:baseEach;return func(collection,getIteratee(iteratee,3));}/**
  	     * This method is like `_.forEach` except that it iterates over elements of
  	     * `collection` from right to left.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @alias eachRight
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Array|Object} Returns `collection`.
  	     * @see _.forEach
  	     * @example
  	     *
  	     * _.forEachRight([1, 2], function(value) {
  	     *   console.log(value);
  	     * });
  	     * // => Logs `2` then `1`.
  	     */function forEachRight(collection,iteratee){var func=isArray(collection)?arrayEachRight:baseEachRight;return func(collection,getIteratee(iteratee,3));}/**
  	     * Creates an object composed of keys generated from the results of running
  	     * each element of `collection` thru `iteratee`. The order of grouped values
  	     * is determined by the order they occur in `collection`. The corresponding
  	     * value of each key is an array of elements responsible for generating the
  	     * key. The iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  	     * @returns {Object} Returns the composed aggregate object.
  	     * @example
  	     *
  	     * _.groupBy([6.1, 4.2, 6.3], Math.floor);
  	     * // => { '4': [4.2], '6': [6.1, 6.3] }
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.groupBy(['one', 'two', 'three'], 'length');
  	     * // => { '3': ['one', 'two'], '5': ['three'] }
  	     */var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value);}else {baseAssignValue(result,key,[value]);}});/**
  	     * Checks if `value` is in `collection`. If `collection` is a string, it's
  	     * checked for a substring of `value`, otherwise
  	     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * is used for equality comparisons. If `fromIndex` is negative, it's used as
  	     * the offset from the end of `collection`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object|string} collection The collection to inspect.
  	     * @param {*} value The value to search for.
  	     * @param {number} [fromIndex=0] The index to search from.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  	     * @returns {boolean} Returns `true` if `value` is found, else `false`.
  	     * @example
  	     *
  	     * _.includes([1, 2, 3], 1);
  	     * // => true
  	     *
  	     * _.includes([1, 2, 3], 1, 2);
  	     * // => false
  	     *
  	     * _.includes({ 'a': 1, 'b': 2 }, 1);
  	     * // => true
  	     *
  	     * _.includes('abcd', 'bc');
  	     * // => true
  	     */function includes(collection,value,fromIndex,guard){collection=isArrayLike(collection)?collection:values(collection);fromIndex=fromIndex&&!guard?toInteger(fromIndex):0;var length=collection.length;if(fromIndex<0){fromIndex=nativeMax(length+fromIndex,0);}return isString(collection)?fromIndex<=length&&collection.indexOf(value,fromIndex)>-1:!!length&&baseIndexOf(collection,value,fromIndex)>-1;}/**
  	     * Invokes the method at `path` of each element in `collection`, returning
  	     * an array of the results of each invoked method. Any additional arguments
  	     * are provided to each invoked method. If `path` is a function, it's invoked
  	     * for, and `this` bound to, each element in `collection`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Array|Function|string} path The path of the method to invoke or
  	     *  the function invoked per iteration.
  	     * @param {...*} [args] The arguments to invoke each method with.
  	     * @returns {Array} Returns the array of results.
  	     * @example
  	     *
  	     * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
  	     * // => [[1, 5, 7], [1, 2, 3]]
  	     *
  	     * _.invokeMap([123, 456], String.prototype.split, '');
  	     * // => [['1', '2', '3'], ['4', '5', '6']]
  	     */var invokeMap=baseRest(function(collection,path,args){var index=-1,isFunc=typeof path=='function',result=isArrayLike(collection)?Array(collection.length):[];baseEach(collection,function(value){result[++index]=isFunc?apply(path,value,args):baseInvoke(value,path,args);});return result;});/**
  	     * Creates an object composed of keys generated from the results of running
  	     * each element of `collection` thru `iteratee`. The corresponding value of
  	     * each key is the last element responsible for generating the key. The
  	     * iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The iteratee to transform keys.
  	     * @returns {Object} Returns the composed aggregate object.
  	     * @example
  	     *
  	     * var array = [
  	     *   { 'dir': 'left', 'code': 97 },
  	     *   { 'dir': 'right', 'code': 100 }
  	     * ];
  	     *
  	     * _.keyBy(array, function(o) {
  	     *   return String.fromCharCode(o.code);
  	     * });
  	     * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
  	     *
  	     * _.keyBy(array, 'dir');
  	     * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
  	     */var keyBy=createAggregator(function(result,value,key){baseAssignValue(result,key,value);});/**
  	     * Creates an array of values by running each element in `collection` thru
  	     * `iteratee`. The iteratee is invoked with three arguments:
  	     * (value, index|key, collection).
  	     *
  	     * Many lodash methods are guarded to work as iteratees for methods like
  	     * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
  	     *
  	     * The guarded methods are:
  	     * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
  	     * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
  	     * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
  	     * `template`, `trim`, `trimEnd`, `trimStart`, and `words`
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the new mapped array.
  	     * @example
  	     *
  	     * function square(n) {
  	     *   return n * n;
  	     * }
  	     *
  	     * _.map([4, 8], square);
  	     * // => [16, 64]
  	     *
  	     * _.map({ 'a': 4, 'b': 8 }, square);
  	     * // => [16, 64] (iteration order is not guaranteed)
  	     *
  	     * var users = [
  	     *   { 'user': 'barney' },
  	     *   { 'user': 'fred' }
  	     * ];
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.map(users, 'user');
  	     * // => ['barney', 'fred']
  	     */function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,getIteratee(iteratee,3));}/**
  	     * This method is like `_.sortBy` except that it allows specifying the sort
  	     * orders of the iteratees to sort by. If `orders` is unspecified, all values
  	     * are sorted in ascending order. Otherwise, specify an order of "desc" for
  	     * descending or "asc" for ascending sort order of corresponding values.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
  	     *  The iteratees to sort by.
  	     * @param {string[]} [orders] The sort orders of `iteratees`.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
  	     * @returns {Array} Returns the new sorted array.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'fred',   'age': 48 },
  	     *   { 'user': 'barney', 'age': 34 },
  	     *   { 'user': 'fred',   'age': 40 },
  	     *   { 'user': 'barney', 'age': 36 }
  	     * ];
  	     *
  	     * // Sort by `user` in ascending order and by `age` in descending order.
  	     * _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
  	     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
  	     */function orderBy(collection,iteratees,orders,guard){if(collection==null){return [];}if(!isArray(iteratees)){iteratees=iteratees==null?[]:[iteratees];}orders=guard?undefined$1:orders;if(!isArray(orders)){orders=orders==null?[]:[orders];}return baseOrderBy(collection,iteratees,orders);}/**
  	     * Creates an array of elements split into two groups, the first of which
  	     * contains elements `predicate` returns truthy for, the second of which
  	     * contains elements `predicate` returns falsey for. The predicate is
  	     * invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the array of grouped elements.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney',  'age': 36, 'active': false },
  	     *   { 'user': 'fred',    'age': 40, 'active': true },
  	     *   { 'user': 'pebbles', 'age': 1,  'active': false }
  	     * ];
  	     *
  	     * _.partition(users, function(o) { return o.active; });
  	     * // => objects for [['fred'], ['barney', 'pebbles']]
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.partition(users, { 'age': 1, 'active': false });
  	     * // => objects for [['pebbles'], ['barney', 'fred']]
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.partition(users, ['active', false]);
  	     * // => objects for [['barney', 'pebbles'], ['fred']]
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.partition(users, 'active');
  	     * // => objects for [['fred'], ['barney', 'pebbles']]
  	     */var partition=createAggregator(function(result,value,key){result[key?0:1].push(value);},function(){return [[],[]];});/**
  	     * Reduces `collection` to a value which is the accumulated result of running
  	     * each element in `collection` thru `iteratee`, where each successive
  	     * invocation is supplied the return value of the previous. If `accumulator`
  	     * is not given, the first element of `collection` is used as the initial
  	     * value. The iteratee is invoked with four arguments:
  	     * (accumulator, value, index|key, collection).
  	     *
  	     * Many lodash methods are guarded to work as iteratees for methods like
  	     * `_.reduce`, `_.reduceRight`, and `_.transform`.
  	     *
  	     * The guarded methods are:
  	     * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
  	     * and `sortBy`
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @param {*} [accumulator] The initial value.
  	     * @returns {*} Returns the accumulated value.
  	     * @see _.reduceRight
  	     * @example
  	     *
  	     * _.reduce([1, 2], function(sum, n) {
  	     *   return sum + n;
  	     * }, 0);
  	     * // => 3
  	     *
  	     * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  	     *   (result[value] || (result[value] = [])).push(key);
  	     *   return result;
  	     * }, {});
  	     * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
  	     */function reduce(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduce:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEach);}/**
  	     * This method is like `_.reduce` except that it iterates over elements of
  	     * `collection` from right to left.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @param {*} [accumulator] The initial value.
  	     * @returns {*} Returns the accumulated value.
  	     * @see _.reduce
  	     * @example
  	     *
  	     * var array = [[0, 1], [2, 3], [4, 5]];
  	     *
  	     * _.reduceRight(array, function(flattened, other) {
  	     *   return flattened.concat(other);
  	     * }, []);
  	     * // => [4, 5, 2, 3, 0, 1]
  	     */function reduceRight(collection,iteratee,accumulator){var func=isArray(collection)?arrayReduceRight:baseReduce,initAccum=arguments.length<3;return func(collection,getIteratee(iteratee,4),accumulator,initAccum,baseEachRight);}/**
  	     * The opposite of `_.filter`; this method returns the elements of `collection`
  	     * that `predicate` does **not** return truthy for.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the new filtered array.
  	     * @see _.filter
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney', 'age': 36, 'active': false },
  	     *   { 'user': 'fred',   'age': 40, 'active': true }
  	     * ];
  	     *
  	     * _.reject(users, function(o) { return !o.active; });
  	     * // => objects for ['fred']
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.reject(users, { 'age': 40, 'active': true });
  	     * // => objects for ['barney']
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.reject(users, ['active', false]);
  	     * // => objects for ['fred']
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.reject(users, 'active');
  	     * // => objects for ['barney']
  	     */function reject(collection,predicate){var func=isArray(collection)?arrayFilter:baseFilter;return func(collection,negate(getIteratee(predicate,3)));}/**
  	     * Gets a random element from `collection`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to sample.
  	     * @returns {*} Returns the random element.
  	     * @example
  	     *
  	     * _.sample([1, 2, 3, 4]);
  	     * // => 2
  	     */function sample(collection){var func=isArray(collection)?arraySample:baseSample;return func(collection);}/**
  	     * Gets `n` random elements at unique keys from `collection` up to the
  	     * size of `collection`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to sample.
  	     * @param {number} [n=1] The number of elements to sample.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Array} Returns the random elements.
  	     * @example
  	     *
  	     * _.sampleSize([1, 2, 3], 2);
  	     * // => [3, 1]
  	     *
  	     * _.sampleSize([1, 2, 3], 4);
  	     * // => [2, 3, 1]
  	     */function sampleSize(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n===undefined$1){n=1;}else {n=toInteger(n);}var func=isArray(collection)?arraySampleSize:baseSampleSize;return func(collection,n);}/**
  	     * Creates an array of shuffled values, using a version of the
  	     * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to shuffle.
  	     * @returns {Array} Returns the new shuffled array.
  	     * @example
  	     *
  	     * _.shuffle([1, 2, 3, 4]);
  	     * // => [4, 1, 3, 2]
  	     */function shuffle(collection){var func=isArray(collection)?arrayShuffle:baseShuffle;return func(collection);}/**
  	     * Gets the size of `collection` by returning its length for array-like
  	     * values or the number of own enumerable string keyed properties for objects.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object|string} collection The collection to inspect.
  	     * @returns {number} Returns the collection size.
  	     * @example
  	     *
  	     * _.size([1, 2, 3]);
  	     * // => 3
  	     *
  	     * _.size({ 'a': 1, 'b': 2 });
  	     * // => 2
  	     *
  	     * _.size('pebbles');
  	     * // => 7
  	     */function size(collection){if(collection==null){return 0;}if(isArrayLike(collection)){return isString(collection)?stringSize(collection):collection.length;}var tag=getTag(collection);if(tag==mapTag||tag==setTag){return collection.size;}return baseKeys(collection).length;}/**
  	     * Checks if `predicate` returns truthy for **any** element of `collection`.
  	     * Iteration is stopped once `predicate` returns truthy. The predicate is
  	     * invoked with three arguments: (value, index|key, collection).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {boolean} Returns `true` if any element passes the predicate check,
  	     *  else `false`.
  	     * @example
  	     *
  	     * _.some([null, 0, 'yes', false], Boolean);
  	     * // => true
  	     *
  	     * var users = [
  	     *   { 'user': 'barney', 'active': true },
  	     *   { 'user': 'fred',   'active': false }
  	     * ];
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.some(users, { 'user': 'barney', 'active': false });
  	     * // => false
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.some(users, ['active', false]);
  	     * // => true
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.some(users, 'active');
  	     * // => true
  	     */function some(collection,predicate,guard){var func=isArray(collection)?arraySome:baseSome;if(guard&&isIterateeCall(collection,predicate,guard)){predicate=undefined$1;}return func(collection,getIteratee(predicate,3));}/**
  	     * Creates an array of elements, sorted in ascending order by the results of
  	     * running each element in a collection thru each iteratee. This method
  	     * performs a stable sort, that is, it preserves the original sort order of
  	     * equal elements. The iteratees are invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Collection
  	     * @param {Array|Object} collection The collection to iterate over.
  	     * @param {...(Function|Function[])} [iteratees=[_.identity]]
  	     *  The iteratees to sort by.
  	     * @returns {Array} Returns the new sorted array.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'fred',   'age': 48 },
  	     *   { 'user': 'barney', 'age': 36 },
  	     *   { 'user': 'fred',   'age': 30 },
  	     *   { 'user': 'barney', 'age': 34 }
  	     * ];
  	     *
  	     * _.sortBy(users, [function(o) { return o.user; }]);
  	     * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
  	     *
  	     * _.sortBy(users, ['user', 'age']);
  	     * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
  	     */var sortBy=baseRest(function(collection,iteratees){if(collection==null){return [];}var length=iteratees.length;if(length>1&&isIterateeCall(collection,iteratees[0],iteratees[1])){iteratees=[];}else if(length>2&&isIterateeCall(iteratees[0],iteratees[1],iteratees[2])){iteratees=[iteratees[0]];}return baseOrderBy(collection,baseFlatten(iteratees,1),[]);});/*------------------------------------------------------------------------*/ /**
  	     * Gets the timestamp of the number of milliseconds that have elapsed since
  	     * the Unix epoch (1 January 1970 00:00:00 UTC).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.4.0
  	     * @category Date
  	     * @returns {number} Returns the timestamp.
  	     * @example
  	     *
  	     * _.defer(function(stamp) {
  	     *   console.log(_.now() - stamp);
  	     * }, _.now());
  	     * // => Logs the number of milliseconds it took for the deferred invocation.
  	     */var now=ctxNow||function(){return root.Date.now();};/*------------------------------------------------------------------------*/ /**
  	     * The opposite of `_.before`; this method creates a function that invokes
  	     * `func` once it's called `n` or more times.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {number} n The number of calls before `func` is invoked.
  	     * @param {Function} func The function to restrict.
  	     * @returns {Function} Returns the new restricted function.
  	     * @example
  	     *
  	     * var saves = ['profile', 'settings'];
  	     *
  	     * var done = _.after(saves.length, function() {
  	     *   console.log('done saving!');
  	     * });
  	     *
  	     * _.forEach(saves, function(type) {
  	     *   asyncSave({ 'type': type, 'complete': done });
  	     * });
  	     * // => Logs 'done saving!' after the two async saves have completed.
  	     */function after(n,func){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}n=toInteger(n);return function(){if(--n<1){return func.apply(this,arguments);}};}/**
  	     * Creates a function that invokes `func`, with up to `n` arguments,
  	     * ignoring any additional arguments.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Function
  	     * @param {Function} func The function to cap arguments for.
  	     * @param {number} [n=func.length] The arity cap.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Function} Returns the new capped function.
  	     * @example
  	     *
  	     * _.map(['6', '8', '10'], _.ary(parseInt, 1));
  	     * // => [6, 8, 10]
  	     */function ary(func,n,guard){n=guard?undefined$1:n;n=func&&n==null?func.length:n;return createWrap(func,WRAP_ARY_FLAG,undefined$1,undefined$1,undefined$1,undefined$1,n);}/**
  	     * Creates a function that invokes `func`, with the `this` binding and arguments
  	     * of the created function, while it's called less than `n` times. Subsequent
  	     * calls to the created function return the result of the last `func` invocation.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Function
  	     * @param {number} n The number of calls at which `func` is no longer invoked.
  	     * @param {Function} func The function to restrict.
  	     * @returns {Function} Returns the new restricted function.
  	     * @example
  	     *
  	     * jQuery(element).on('click', _.before(5, addContactToList));
  	     * // => Allows adding up to 4 contacts to the list.
  	     */function before(n,func){var result;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}n=toInteger(n);return function(){if(--n>0){result=func.apply(this,arguments);}if(n<=1){func=undefined$1;}return result;};}/**
  	     * Creates a function that invokes `func` with the `this` binding of `thisArg`
  	     * and `partials` prepended to the arguments it receives.
  	     *
  	     * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
  	     * may be used as a placeholder for partially applied arguments.
  	     *
  	     * **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
  	     * property of bound functions.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {Function} func The function to bind.
  	     * @param {*} thisArg The `this` binding of `func`.
  	     * @param {...*} [partials] The arguments to be partially applied.
  	     * @returns {Function} Returns the new bound function.
  	     * @example
  	     *
  	     * function greet(greeting, punctuation) {
  	     *   return greeting + ' ' + this.user + punctuation;
  	     * }
  	     *
  	     * var object = { 'user': 'fred' };
  	     *
  	     * var bound = _.bind(greet, object, 'hi');
  	     * bound('!');
  	     * // => 'hi fred!'
  	     *
  	     * // Bound with placeholders.
  	     * var bound = _.bind(greet, object, _, '!');
  	     * bound('hi');
  	     * // => 'hi fred!'
  	     */var bind=baseRest(function(func,thisArg,partials){var bitmask=WRAP_BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bind));bitmask|=WRAP_PARTIAL_FLAG;}return createWrap(func,bitmask,thisArg,partials,holders);});/**
  	     * Creates a function that invokes the method at `object[key]` with `partials`
  	     * prepended to the arguments it receives.
  	     *
  	     * This method differs from `_.bind` by allowing bound functions to reference
  	     * methods that may be redefined or don't yet exist. See
  	     * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
  	     * for more details.
  	     *
  	     * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
  	     * builds, may be used as a placeholder for partially applied arguments.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.10.0
  	     * @category Function
  	     * @param {Object} object The object to invoke the method on.
  	     * @param {string} key The key of the method.
  	     * @param {...*} [partials] The arguments to be partially applied.
  	     * @returns {Function} Returns the new bound function.
  	     * @example
  	     *
  	     * var object = {
  	     *   'user': 'fred',
  	     *   'greet': function(greeting, punctuation) {
  	     *     return greeting + ' ' + this.user + punctuation;
  	     *   }
  	     * };
  	     *
  	     * var bound = _.bindKey(object, 'greet', 'hi');
  	     * bound('!');
  	     * // => 'hi fred!'
  	     *
  	     * object.greet = function(greeting, punctuation) {
  	     *   return greeting + 'ya ' + this.user + punctuation;
  	     * };
  	     *
  	     * bound('!');
  	     * // => 'hiya fred!'
  	     *
  	     * // Bound with placeholders.
  	     * var bound = _.bindKey(object, 'greet', _, '!');
  	     * bound('hi');
  	     * // => 'hiya fred!'
  	     */var bindKey=baseRest(function(object,key,partials){var bitmask=WRAP_BIND_FLAG|WRAP_BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,getHolder(bindKey));bitmask|=WRAP_PARTIAL_FLAG;}return createWrap(key,bitmask,object,partials,holders);});/**
  	     * Creates a function that accepts arguments of `func` and either invokes
  	     * `func` returning its result, if at least `arity` number of arguments have
  	     * been provided, or returns a function that accepts the remaining `func`
  	     * arguments, and so on. The arity of `func` may be specified if `func.length`
  	     * is not sufficient.
  	     *
  	     * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
  	     * may be used as a placeholder for provided arguments.
  	     *
  	     * **Note:** This method doesn't set the "length" property of curried functions.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Function
  	     * @param {Function} func The function to curry.
  	     * @param {number} [arity=func.length] The arity of `func`.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Function} Returns the new curried function.
  	     * @example
  	     *
  	     * var abc = function(a, b, c) {
  	     *   return [a, b, c];
  	     * };
  	     *
  	     * var curried = _.curry(abc);
  	     *
  	     * curried(1)(2)(3);
  	     * // => [1, 2, 3]
  	     *
  	     * curried(1, 2)(3);
  	     * // => [1, 2, 3]
  	     *
  	     * curried(1, 2, 3);
  	     * // => [1, 2, 3]
  	     *
  	     * // Curried with placeholders.
  	     * curried(1)(_, 3)(2);
  	     * // => [1, 2, 3]
  	     */function curry(func,arity,guard){arity=guard?undefined$1:arity;var result=createWrap(func,WRAP_CURRY_FLAG,undefined$1,undefined$1,undefined$1,undefined$1,undefined$1,arity);result.placeholder=curry.placeholder;return result;}/**
  	     * This method is like `_.curry` except that arguments are applied to `func`
  	     * in the manner of `_.partialRight` instead of `_.partial`.
  	     *
  	     * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
  	     * builds, may be used as a placeholder for provided arguments.
  	     *
  	     * **Note:** This method doesn't set the "length" property of curried functions.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Function
  	     * @param {Function} func The function to curry.
  	     * @param {number} [arity=func.length] The arity of `func`.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Function} Returns the new curried function.
  	     * @example
  	     *
  	     * var abc = function(a, b, c) {
  	     *   return [a, b, c];
  	     * };
  	     *
  	     * var curried = _.curryRight(abc);
  	     *
  	     * curried(3)(2)(1);
  	     * // => [1, 2, 3]
  	     *
  	     * curried(2, 3)(1);
  	     * // => [1, 2, 3]
  	     *
  	     * curried(1, 2, 3);
  	     * // => [1, 2, 3]
  	     *
  	     * // Curried with placeholders.
  	     * curried(3)(1, _)(2);
  	     * // => [1, 2, 3]
  	     */function curryRight(func,arity,guard){arity=guard?undefined$1:arity;var result=createWrap(func,WRAP_CURRY_RIGHT_FLAG,undefined$1,undefined$1,undefined$1,undefined$1,undefined$1,arity);result.placeholder=curryRight.placeholder;return result;}/**
  	     * Creates a debounced function that delays invoking `func` until after `wait`
  	     * milliseconds have elapsed since the last time the debounced function was
  	     * invoked. The debounced function comes with a `cancel` method to cancel
  	     * delayed `func` invocations and a `flush` method to immediately invoke them.
  	     * Provide `options` to indicate whether `func` should be invoked on the
  	     * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
  	     * with the last arguments provided to the debounced function. Subsequent
  	     * calls to the debounced function return the result of the last `func`
  	     * invocation.
  	     *
  	     * **Note:** If `leading` and `trailing` options are `true`, `func` is
  	     * invoked on the trailing edge of the timeout only if the debounced function
  	     * is invoked more than once during the `wait` timeout.
  	     *
  	     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  	     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  	     *
  	     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  	     * for details over the differences between `_.debounce` and `_.throttle`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {Function} func The function to debounce.
  	     * @param {number} [wait=0] The number of milliseconds to delay.
  	     * @param {Object} [options={}] The options object.
  	     * @param {boolean} [options.leading=false]
  	     *  Specify invoking on the leading edge of the timeout.
  	     * @param {number} [options.maxWait]
  	     *  The maximum time `func` is allowed to be delayed before it's invoked.
  	     * @param {boolean} [options.trailing=true]
  	     *  Specify invoking on the trailing edge of the timeout.
  	     * @returns {Function} Returns the new debounced function.
  	     * @example
  	     *
  	     * // Avoid costly calculations while the window size is in flux.
  	     * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
  	     *
  	     * // Invoke `sendMail` when clicked, debouncing subsequent calls.
  	     * jQuery(element).on('click', _.debounce(sendMail, 300, {
  	     *   'leading': true,
  	     *   'trailing': false
  	     * }));
  	     *
  	     * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
  	     * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
  	     * var source = new EventSource('/stream');
  	     * jQuery(source).on('message', debounced);
  	     *
  	     * // Cancel the trailing debounced invocation.
  	     * jQuery(window).on('popstate', debounced.cancel);
  	     */function debounce(func,wait,options){var lastArgs,lastThis,maxWait,result,timerId,lastCallTime,lastInvokeTime=0,leading=false,maxing=false,trailing=true;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}wait=toNumber(wait)||0;if(isObject(options)){leading=!!options.leading;maxing='maxWait'in options;maxWait=maxing?nativeMax(toNumber(options.maxWait)||0,wait):maxWait;trailing='trailing'in options?!!options.trailing:trailing;}function invokeFunc(time){var args=lastArgs,thisArg=lastThis;lastArgs=lastThis=undefined$1;lastInvokeTime=time;result=func.apply(thisArg,args);return result;}function leadingEdge(time){// Reset any `maxWait` timer.
  lastInvokeTime=time;// Start the timer for the trailing edge.
  timerId=setTimeout(timerExpired,wait);// Invoke the leading edge.
  return leading?invokeFunc(time):result;}function remainingWait(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime,timeWaiting=wait-timeSinceLastCall;return maxing?nativeMin(timeWaiting,maxWait-timeSinceLastInvoke):timeWaiting;}function shouldInvoke(time){var timeSinceLastCall=time-lastCallTime,timeSinceLastInvoke=time-lastInvokeTime;// Either this is the first call, activity has stopped and we're at the
  // trailing edge, the system time has gone backwards and we're treating
  // it as the trailing edge, or we've hit the `maxWait` limit.
  return lastCallTime===undefined$1||timeSinceLastCall>=wait||timeSinceLastCall<0||maxing&&timeSinceLastInvoke>=maxWait;}function timerExpired(){var time=now();if(shouldInvoke(time)){return trailingEdge(time);}// Restart the timer.
  timerId=setTimeout(timerExpired,remainingWait(time));}function trailingEdge(time){timerId=undefined$1;// Only invoke if we have `lastArgs` which means `func` has been
  // debounced at least once.
  if(trailing&&lastArgs){return invokeFunc(time);}lastArgs=lastThis=undefined$1;return result;}function cancel(){if(timerId!==undefined$1){clearTimeout(timerId);}lastInvokeTime=0;lastArgs=lastCallTime=lastThis=timerId=undefined$1;}function flush(){return timerId===undefined$1?result:trailingEdge(now());}function debounced(){var time=now(),isInvoking=shouldInvoke(time);lastArgs=arguments;lastThis=this;lastCallTime=time;if(isInvoking){if(timerId===undefined$1){return leadingEdge(lastCallTime);}if(maxing){// Handle invocations in a tight loop.
  clearTimeout(timerId);timerId=setTimeout(timerExpired,wait);return invokeFunc(lastCallTime);}}if(timerId===undefined$1){timerId=setTimeout(timerExpired,wait);}return result;}debounced.cancel=cancel;debounced.flush=flush;return debounced;}/**
  	     * Defers invoking the `func` until the current call stack has cleared. Any
  	     * additional arguments are provided to `func` when it's invoked.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {Function} func The function to defer.
  	     * @param {...*} [args] The arguments to invoke `func` with.
  	     * @returns {number} Returns the timer id.
  	     * @example
  	     *
  	     * _.defer(function(text) {
  	     *   console.log(text);
  	     * }, 'deferred');
  	     * // => Logs 'deferred' after one millisecond.
  	     */var defer=baseRest(function(func,args){return baseDelay(func,1,args);});/**
  	     * Invokes `func` after `wait` milliseconds. Any additional arguments are
  	     * provided to `func` when it's invoked.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {Function} func The function to delay.
  	     * @param {number} wait The number of milliseconds to delay invocation.
  	     * @param {...*} [args] The arguments to invoke `func` with.
  	     * @returns {number} Returns the timer id.
  	     * @example
  	     *
  	     * _.delay(function(text) {
  	     *   console.log(text);
  	     * }, 1000, 'later');
  	     * // => Logs 'later' after one second.
  	     */var delay=baseRest(function(func,wait,args){return baseDelay(func,toNumber(wait)||0,args);});/**
  	     * Creates a function that invokes `func` with arguments reversed.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Function
  	     * @param {Function} func The function to flip arguments for.
  	     * @returns {Function} Returns the new flipped function.
  	     * @example
  	     *
  	     * var flipped = _.flip(function() {
  	     *   return _.toArray(arguments);
  	     * });
  	     *
  	     * flipped('a', 'b', 'c', 'd');
  	     * // => ['d', 'c', 'b', 'a']
  	     */function flip(func){return createWrap(func,WRAP_FLIP_FLAG);}/**
  	     * Creates a function that memoizes the result of `func`. If `resolver` is
  	     * provided, it determines the cache key for storing the result based on the
  	     * arguments provided to the memoized function. By default, the first argument
  	     * provided to the memoized function is used as the map cache key. The `func`
  	     * is invoked with the `this` binding of the memoized function.
  	     *
  	     * **Note:** The cache is exposed as the `cache` property on the memoized
  	     * function. Its creation may be customized by replacing the `_.memoize.Cache`
  	     * constructor with one whose instances implement the
  	     * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  	     * method interface of `clear`, `delete`, `get`, `has`, and `set`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {Function} func The function to have its output memoized.
  	     * @param {Function} [resolver] The function to resolve the cache key.
  	     * @returns {Function} Returns the new memoized function.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': 2 };
  	     * var other = { 'c': 3, 'd': 4 };
  	     *
  	     * var values = _.memoize(_.values);
  	     * values(object);
  	     * // => [1, 2]
  	     *
  	     * values(other);
  	     * // => [3, 4]
  	     *
  	     * object.a = 2;
  	     * values(object);
  	     * // => [1, 2]
  	     *
  	     * // Modify the result cache.
  	     * values.cache.set(object, ['a', 'b']);
  	     * values(object);
  	     * // => ['a', 'b']
  	     *
  	     * // Replace `_.memoize.Cache`.
  	     * _.memoize.Cache = WeakMap;
  	     */function memoize(func,resolver){if(typeof func!='function'||resolver!=null&&typeof resolver!='function'){throw new TypeError(FUNC_ERROR_TEXT);}var memoized=function(){var args=arguments,key=resolver?resolver.apply(this,args):args[0],cache=memoized.cache;if(cache.has(key)){return cache.get(key);}var result=func.apply(this,args);memoized.cache=cache.set(key,result)||cache;return result;};memoized.cache=new(memoize.Cache||MapCache)();return memoized;}// Expose `MapCache`.
  memoize.Cache=MapCache;/**
  	     * Creates a function that negates the result of the predicate `func`. The
  	     * `func` predicate is invoked with the `this` binding and arguments of the
  	     * created function.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Function
  	     * @param {Function} predicate The predicate to negate.
  	     * @returns {Function} Returns the new negated function.
  	     * @example
  	     *
  	     * function isEven(n) {
  	     *   return n % 2 == 0;
  	     * }
  	     *
  	     * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
  	     * // => [1, 3, 5]
  	     */function negate(predicate){if(typeof predicate!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return function(){var args=arguments;switch(args.length){case 0:return !predicate.call(this);case 1:return !predicate.call(this,args[0]);case 2:return !predicate.call(this,args[0],args[1]);case 3:return !predicate.call(this,args[0],args[1],args[2]);}return !predicate.apply(this,args);};}/**
  	     * Creates a function that is restricted to invoking `func` once. Repeat calls
  	     * to the function return the value of the first invocation. The `func` is
  	     * invoked with the `this` binding and arguments of the created function.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {Function} func The function to restrict.
  	     * @returns {Function} Returns the new restricted function.
  	     * @example
  	     *
  	     * var initialize = _.once(createApplication);
  	     * initialize();
  	     * initialize();
  	     * // => `createApplication` is invoked once
  	     */function once(func){return before(2,func);}/**
  	     * Creates a function that invokes `func` with its arguments transformed.
  	     *
  	     * @static
  	     * @since 4.0.0
  	     * @memberOf _
  	     * @category Function
  	     * @param {Function} func The function to wrap.
  	     * @param {...(Function|Function[])} [transforms=[_.identity]]
  	     *  The argument transforms.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * function doubled(n) {
  	     *   return n * 2;
  	     * }
  	     *
  	     * function square(n) {
  	     *   return n * n;
  	     * }
  	     *
  	     * var func = _.overArgs(function(x, y) {
  	     *   return [x, y];
  	     * }, [square, doubled]);
  	     *
  	     * func(9, 3);
  	     * // => [81, 6]
  	     *
  	     * func(10, 5);
  	     * // => [100, 10]
  	     */var overArgs=castRest(function(func,transforms){transforms=transforms.length==1&&isArray(transforms[0])?arrayMap(transforms[0],baseUnary(getIteratee())):arrayMap(baseFlatten(transforms,1),baseUnary(getIteratee()));var funcsLength=transforms.length;return baseRest(function(args){var index=-1,length=nativeMin(args.length,funcsLength);while(++index<length){args[index]=transforms[index].call(this,args[index]);}return apply(func,this,args);});});/**
  	     * Creates a function that invokes `func` with `partials` prepended to the
  	     * arguments it receives. This method is like `_.bind` except it does **not**
  	     * alter the `this` binding.
  	     *
  	     * The `_.partial.placeholder` value, which defaults to `_` in monolithic
  	     * builds, may be used as a placeholder for partially applied arguments.
  	     *
  	     * **Note:** This method doesn't set the "length" property of partially
  	     * applied functions.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.2.0
  	     * @category Function
  	     * @param {Function} func The function to partially apply arguments to.
  	     * @param {...*} [partials] The arguments to be partially applied.
  	     * @returns {Function} Returns the new partially applied function.
  	     * @example
  	     *
  	     * function greet(greeting, name) {
  	     *   return greeting + ' ' + name;
  	     * }
  	     *
  	     * var sayHelloTo = _.partial(greet, 'hello');
  	     * sayHelloTo('fred');
  	     * // => 'hello fred'
  	     *
  	     * // Partially applied with placeholders.
  	     * var greetFred = _.partial(greet, _, 'fred');
  	     * greetFred('hi');
  	     * // => 'hi fred'
  	     */var partial=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partial));return createWrap(func,WRAP_PARTIAL_FLAG,undefined$1,partials,holders);});/**
  	     * This method is like `_.partial` except that partially applied arguments
  	     * are appended to the arguments it receives.
  	     *
  	     * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
  	     * builds, may be used as a placeholder for partially applied arguments.
  	     *
  	     * **Note:** This method doesn't set the "length" property of partially
  	     * applied functions.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.0.0
  	     * @category Function
  	     * @param {Function} func The function to partially apply arguments to.
  	     * @param {...*} [partials] The arguments to be partially applied.
  	     * @returns {Function} Returns the new partially applied function.
  	     * @example
  	     *
  	     * function greet(greeting, name) {
  	     *   return greeting + ' ' + name;
  	     * }
  	     *
  	     * var greetFred = _.partialRight(greet, 'fred');
  	     * greetFred('hi');
  	     * // => 'hi fred'
  	     *
  	     * // Partially applied with placeholders.
  	     * var sayHelloTo = _.partialRight(greet, 'hello', _);
  	     * sayHelloTo('fred');
  	     * // => 'hello fred'
  	     */var partialRight=baseRest(function(func,partials){var holders=replaceHolders(partials,getHolder(partialRight));return createWrap(func,WRAP_PARTIAL_RIGHT_FLAG,undefined$1,partials,holders);});/**
  	     * Creates a function that invokes `func` with arguments arranged according
  	     * to the specified `indexes` where the argument value at the first index is
  	     * provided as the first argument, the argument value at the second index is
  	     * provided as the second argument, and so on.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Function
  	     * @param {Function} func The function to rearrange arguments for.
  	     * @param {...(number|number[])} indexes The arranged argument indexes.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * var rearged = _.rearg(function(a, b, c) {
  	     *   return [a, b, c];
  	     * }, [2, 0, 1]);
  	     *
  	     * rearged('b', 'c', 'a')
  	     * // => ['a', 'b', 'c']
  	     */var rearg=flatRest(function(func,indexes){return createWrap(func,WRAP_REARG_FLAG,undefined$1,undefined$1,undefined$1,indexes);});/**
  	     * Creates a function that invokes `func` with the `this` binding of the
  	     * created function and arguments from `start` and beyond provided as
  	     * an array.
  	     *
  	     * **Note:** This method is based on the
  	     * [rest parameter](https://mdn.io/rest_parameters).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Function
  	     * @param {Function} func The function to apply a rest parameter to.
  	     * @param {number} [start=func.length-1] The start position of the rest parameter.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * var say = _.rest(function(what, names) {
  	     *   return what + ' ' + _.initial(names).join(', ') +
  	     *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);
  	     * });
  	     *
  	     * say('hello', 'fred', 'barney', 'pebbles');
  	     * // => 'hello fred, barney, & pebbles'
  	     */function rest(func,start){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}start=start===undefined$1?start:toInteger(start);return baseRest(func,start);}/**
  	     * Creates a function that invokes `func` with the `this` binding of the
  	     * create function and an array of arguments much like
  	     * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
  	     *
  	     * **Note:** This method is based on the
  	     * [spread operator](https://mdn.io/spread_operator).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.2.0
  	     * @category Function
  	     * @param {Function} func The function to spread arguments over.
  	     * @param {number} [start=0] The start position of the spread.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * var say = _.spread(function(who, what) {
  	     *   return who + ' says ' + what;
  	     * });
  	     *
  	     * say(['fred', 'hello']);
  	     * // => 'fred says hello'
  	     *
  	     * var numbers = Promise.all([
  	     *   Promise.resolve(40),
  	     *   Promise.resolve(36)
  	     * ]);
  	     *
  	     * numbers.then(_.spread(function(x, y) {
  	     *   return x + y;
  	     * }));
  	     * // => a Promise of 76
  	     */function spread(func,start){if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}start=start==null?0:nativeMax(toInteger(start),0);return baseRest(function(args){var array=args[start],otherArgs=castSlice(args,0,start);if(array){arrayPush(otherArgs,array);}return apply(func,this,otherArgs);});}/**
  	     * Creates a throttled function that only invokes `func` at most once per
  	     * every `wait` milliseconds. The throttled function comes with a `cancel`
  	     * method to cancel delayed `func` invocations and a `flush` method to
  	     * immediately invoke them. Provide `options` to indicate whether `func`
  	     * should be invoked on the leading and/or trailing edge of the `wait`
  	     * timeout. The `func` is invoked with the last arguments provided to the
  	     * throttled function. Subsequent calls to the throttled function return the
  	     * result of the last `func` invocation.
  	     *
  	     * **Note:** If `leading` and `trailing` options are `true`, `func` is
  	     * invoked on the trailing edge of the timeout only if the throttled function
  	     * is invoked more than once during the `wait` timeout.
  	     *
  	     * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
  	     * until to the next tick, similar to `setTimeout` with a timeout of `0`.
  	     *
  	     * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
  	     * for details over the differences between `_.throttle` and `_.debounce`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {Function} func The function to throttle.
  	     * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
  	     * @param {Object} [options={}] The options object.
  	     * @param {boolean} [options.leading=true]
  	     *  Specify invoking on the leading edge of the timeout.
  	     * @param {boolean} [options.trailing=true]
  	     *  Specify invoking on the trailing edge of the timeout.
  	     * @returns {Function} Returns the new throttled function.
  	     * @example
  	     *
  	     * // Avoid excessively updating the position while scrolling.
  	     * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
  	     *
  	     * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
  	     * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
  	     * jQuery(element).on('click', throttled);
  	     *
  	     * // Cancel the trailing throttled invocation.
  	     * jQuery(window).on('popstate', throttled.cancel);
  	     */function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!='function'){throw new TypeError(FUNC_ERROR_TEXT);}if(isObject(options)){leading='leading'in options?!!options.leading:leading;trailing='trailing'in options?!!options.trailing:trailing;}return debounce(func,wait,{'leading':leading,'maxWait':wait,'trailing':trailing});}/**
  	     * Creates a function that accepts up to one argument, ignoring any
  	     * additional arguments.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Function
  	     * @param {Function} func The function to cap arguments for.
  	     * @returns {Function} Returns the new capped function.
  	     * @example
  	     *
  	     * _.map(['6', '8', '10'], _.unary(parseInt));
  	     * // => [6, 8, 10]
  	     */function unary(func){return ary(func,1);}/**
  	     * Creates a function that provides `value` to `wrapper` as its first
  	     * argument. Any additional arguments provided to the function are appended
  	     * to those provided to the `wrapper`. The wrapper is invoked with the `this`
  	     * binding of the created function.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Function
  	     * @param {*} value The value to wrap.
  	     * @param {Function} [wrapper=identity] The wrapper function.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * var p = _.wrap(_.escape, function(func, text) {
  	     *   return '<p>' + func(text) + '</p>';
  	     * });
  	     *
  	     * p('fred, barney, & pebbles');
  	     * // => '<p>fred, barney, &amp; pebbles</p>'
  	     */function wrap(value,wrapper){return partial(castFunction(wrapper),value);}/*------------------------------------------------------------------------*/ /**
  	     * Casts `value` as an array if it's not one.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.4.0
  	     * @category Lang
  	     * @param {*} value The value to inspect.
  	     * @returns {Array} Returns the cast array.
  	     * @example
  	     *
  	     * _.castArray(1);
  	     * // => [1]
  	     *
  	     * _.castArray({ 'a': 1 });
  	     * // => [{ 'a': 1 }]
  	     *
  	     * _.castArray('abc');
  	     * // => ['abc']
  	     *
  	     * _.castArray(null);
  	     * // => [null]
  	     *
  	     * _.castArray(undefined);
  	     * // => [undefined]
  	     *
  	     * _.castArray();
  	     * // => []
  	     *
  	     * var array = [1, 2, 3];
  	     * console.log(_.castArray(array) === array);
  	     * // => true
  	     */function castArray(){if(!arguments.length){return [];}var value=arguments[0];return isArray(value)?value:[value];}/**
  	     * Creates a shallow clone of `value`.
  	     *
  	     * **Note:** This method is loosely based on the
  	     * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
  	     * and supports cloning arrays, array buffers, booleans, date objects, maps,
  	     * numbers, `Object` objects, regexes, sets, strings, symbols, and typed
  	     * arrays. The own enumerable properties of `arguments` objects are cloned
  	     * as plain objects. An empty object is returned for uncloneable values such
  	     * as error objects, functions, DOM nodes, and WeakMaps.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to clone.
  	     * @returns {*} Returns the cloned value.
  	     * @see _.cloneDeep
  	     * @example
  	     *
  	     * var objects = [{ 'a': 1 }, { 'b': 2 }];
  	     *
  	     * var shallow = _.clone(objects);
  	     * console.log(shallow[0] === objects[0]);
  	     * // => true
  	     */function clone(value){return baseClone(value,CLONE_SYMBOLS_FLAG);}/**
  	     * This method is like `_.clone` except that it accepts `customizer` which
  	     * is invoked to produce the cloned value. If `customizer` returns `undefined`,
  	     * cloning is handled by the method instead. The `customizer` is invoked with
  	     * up to four arguments; (value [, index|key, object, stack]).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to clone.
  	     * @param {Function} [customizer] The function to customize cloning.
  	     * @returns {*} Returns the cloned value.
  	     * @see _.cloneDeepWith
  	     * @example
  	     *
  	     * function customizer(value) {
  	     *   if (_.isElement(value)) {
  	     *     return value.cloneNode(false);
  	     *   }
  	     * }
  	     *
  	     * var el = _.cloneWith(document.body, customizer);
  	     *
  	     * console.log(el === document.body);
  	     * // => false
  	     * console.log(el.nodeName);
  	     * // => 'BODY'
  	     * console.log(el.childNodes.length);
  	     * // => 0
  	     */function cloneWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return baseClone(value,CLONE_SYMBOLS_FLAG,customizer);}/**
  	     * This method is like `_.clone` except that it recursively clones `value`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.0.0
  	     * @category Lang
  	     * @param {*} value The value to recursively clone.
  	     * @returns {*} Returns the deep cloned value.
  	     * @see _.clone
  	     * @example
  	     *
  	     * var objects = [{ 'a': 1 }, { 'b': 2 }];
  	     *
  	     * var deep = _.cloneDeep(objects);
  	     * console.log(deep[0] === objects[0]);
  	     * // => false
  	     */function cloneDeep(value){return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG);}/**
  	     * This method is like `_.cloneWith` except that it recursively clones `value`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to recursively clone.
  	     * @param {Function} [customizer] The function to customize cloning.
  	     * @returns {*} Returns the deep cloned value.
  	     * @see _.cloneWith
  	     * @example
  	     *
  	     * function customizer(value) {
  	     *   if (_.isElement(value)) {
  	     *     return value.cloneNode(true);
  	     *   }
  	     * }
  	     *
  	     * var el = _.cloneDeepWith(document.body, customizer);
  	     *
  	     * console.log(el === document.body);
  	     * // => false
  	     * console.log(el.nodeName);
  	     * // => 'BODY'
  	     * console.log(el.childNodes.length);
  	     * // => 20
  	     */function cloneDeepWith(value,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return baseClone(value,CLONE_DEEP_FLAG|CLONE_SYMBOLS_FLAG,customizer);}/**
  	     * Checks if `object` conforms to `source` by invoking the predicate
  	     * properties of `source` with the corresponding property values of `object`.
  	     *
  	     * **Note:** This method is equivalent to `_.conforms` when `source` is
  	     * partially applied.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.14.0
  	     * @category Lang
  	     * @param {Object} object The object to inspect.
  	     * @param {Object} source The object of property predicates to conform to.
  	     * @returns {boolean} Returns `true` if `object` conforms, else `false`.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': 2 };
  	     *
  	     * _.conformsTo(object, { 'b': function(n) { return n > 1; } });
  	     * // => true
  	     *
  	     * _.conformsTo(object, { 'b': function(n) { return n > 2; } });
  	     * // => false
  	     */function conformsTo(object,source){return source==null||baseConformsTo(object,source,keys(source));}/**
  	     * Performs a
  	     * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  	     * comparison between two values to determine if they are equivalent.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  	     * @example
  	     *
  	     * var object = { 'a': 1 };
  	     * var other = { 'a': 1 };
  	     *
  	     * _.eq(object, object);
  	     * // => true
  	     *
  	     * _.eq(object, other);
  	     * // => false
  	     *
  	     * _.eq('a', 'a');
  	     * // => true
  	     *
  	     * _.eq('a', Object('a'));
  	     * // => false
  	     *
  	     * _.eq(NaN, NaN);
  	     * // => true
  	     */function eq(value,other){return value===other||value!==value&&other!==other;}/**
  	     * Checks if `value` is greater than `other`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.9.0
  	     * @category Lang
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if `value` is greater than `other`,
  	     *  else `false`.
  	     * @see _.lt
  	     * @example
  	     *
  	     * _.gt(3, 1);
  	     * // => true
  	     *
  	     * _.gt(3, 3);
  	     * // => false
  	     *
  	     * _.gt(1, 3);
  	     * // => false
  	     */var gt=createRelationalOperation(baseGt);/**
  	     * Checks if `value` is greater than or equal to `other`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.9.0
  	     * @category Lang
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if `value` is greater than or equal to
  	     *  `other`, else `false`.
  	     * @see _.lte
  	     * @example
  	     *
  	     * _.gte(3, 1);
  	     * // => true
  	     *
  	     * _.gte(3, 3);
  	     * // => true
  	     *
  	     * _.gte(1, 3);
  	     * // => false
  	     */var gte=createRelationalOperation(function(value,other){return value>=other;});/**
  	     * Checks if `value` is likely an `arguments` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  	     *  else `false`.
  	     * @example
  	     *
  	     * _.isArguments(function() { return arguments; }());
  	     * // => true
  	     *
  	     * _.isArguments([1, 2, 3]);
  	     * // => false
  	     */var isArguments=baseIsArguments(function(){return arguments;}())?baseIsArguments:function(value){return isObjectLike(value)&&hasOwnProperty.call(value,'callee')&&!propertyIsEnumerable.call(value,'callee');};/**
  	     * Checks if `value` is classified as an `Array` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  	     * @example
  	     *
  	     * _.isArray([1, 2, 3]);
  	     * // => true
  	     *
  	     * _.isArray(document.body.children);
  	     * // => false
  	     *
  	     * _.isArray('abc');
  	     * // => false
  	     *
  	     * _.isArray(_.noop);
  	     * // => false
  	     */var isArray=Array.isArray;/**
  	     * Checks if `value` is classified as an `ArrayBuffer` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.3.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
  	     * @example
  	     *
  	     * _.isArrayBuffer(new ArrayBuffer(2));
  	     * // => true
  	     *
  	     * _.isArrayBuffer(new Array(2));
  	     * // => false
  	     */var isArrayBuffer=nodeIsArrayBuffer?baseUnary(nodeIsArrayBuffer):baseIsArrayBuffer;/**
  	     * Checks if `value` is array-like. A value is considered array-like if it's
  	     * not a function and has a `value.length` that's an integer greater than or
  	     * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  	     * @example
  	     *
  	     * _.isArrayLike([1, 2, 3]);
  	     * // => true
  	     *
  	     * _.isArrayLike(document.body.children);
  	     * // => true
  	     *
  	     * _.isArrayLike('abc');
  	     * // => true
  	     *
  	     * _.isArrayLike(_.noop);
  	     * // => false
  	     */function isArrayLike(value){return value!=null&&isLength(value.length)&&!isFunction(value);}/**
  	     * This method is like `_.isArrayLike` except that it also checks if `value`
  	     * is an object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an array-like object,
  	     *  else `false`.
  	     * @example
  	     *
  	     * _.isArrayLikeObject([1, 2, 3]);
  	     * // => true
  	     *
  	     * _.isArrayLikeObject(document.body.children);
  	     * // => true
  	     *
  	     * _.isArrayLikeObject('abc');
  	     * // => false
  	     *
  	     * _.isArrayLikeObject(_.noop);
  	     * // => false
  	     */function isArrayLikeObject(value){return isObjectLike(value)&&isArrayLike(value);}/**
  	     * Checks if `value` is classified as a boolean primitive or object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
  	     * @example
  	     *
  	     * _.isBoolean(false);
  	     * // => true
  	     *
  	     * _.isBoolean(null);
  	     * // => false
  	     */function isBoolean(value){return value===true||value===false||isObjectLike(value)&&baseGetTag(value)==boolTag;}/**
  	     * Checks if `value` is a buffer.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.3.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  	     * @example
  	     *
  	     * _.isBuffer(new Buffer(2));
  	     * // => true
  	     *
  	     * _.isBuffer(new Uint8Array(2));
  	     * // => false
  	     */var isBuffer=nativeIsBuffer||stubFalse;/**
  	     * Checks if `value` is classified as a `Date` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a date object, else `false`.
  	     * @example
  	     *
  	     * _.isDate(new Date);
  	     * // => true
  	     *
  	     * _.isDate('Mon April 23 2012');
  	     * // => false
  	     */var isDate=nodeIsDate?baseUnary(nodeIsDate):baseIsDate;/**
  	     * Checks if `value` is likely a DOM element.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
  	     * @example
  	     *
  	     * _.isElement(document.body);
  	     * // => true
  	     *
  	     * _.isElement('<body>');
  	     * // => false
  	     */function isElement(value){return isObjectLike(value)&&value.nodeType===1&&!isPlainObject(value);}/**
  	     * Checks if `value` is an empty object, collection, map, or set.
  	     *
  	     * Objects are considered empty if they have no own enumerable string keyed
  	     * properties.
  	     *
  	     * Array-like values such as `arguments` objects, arrays, buffers, strings, or
  	     * jQuery-like collections are considered empty if they have a `length` of `0`.
  	     * Similarly, maps and sets are considered empty if they have a `size` of `0`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is empty, else `false`.
  	     * @example
  	     *
  	     * _.isEmpty(null);
  	     * // => true
  	     *
  	     * _.isEmpty(true);
  	     * // => true
  	     *
  	     * _.isEmpty(1);
  	     * // => true
  	     *
  	     * _.isEmpty([1, 2, 3]);
  	     * // => false
  	     *
  	     * _.isEmpty({ 'a': 1 });
  	     * // => false
  	     */function isEmpty(value){if(value==null){return true;}if(isArrayLike(value)&&(isArray(value)||typeof value=='string'||typeof value.splice=='function'||isBuffer(value)||isTypedArray(value)||isArguments(value))){return !value.length;}var tag=getTag(value);if(tag==mapTag||tag==setTag){return !value.size;}if(isPrototype(value)){return !baseKeys(value).length;}for(var key in value){if(hasOwnProperty.call(value,key)){return false;}}return true;}/**
  	     * Performs a deep comparison between two values to determine if they are
  	     * equivalent.
  	     *
  	     * **Note:** This method supports comparing arrays, array buffers, booleans,
  	     * date objects, error objects, maps, numbers, `Object` objects, regexes,
  	     * sets, strings, symbols, and typed arrays. `Object` objects are compared
  	     * by their own, not inherited, enumerable properties. Functions and DOM
  	     * nodes are compared by strict equality, i.e. `===`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  	     * @example
  	     *
  	     * var object = { 'a': 1 };
  	     * var other = { 'a': 1 };
  	     *
  	     * _.isEqual(object, other);
  	     * // => true
  	     *
  	     * object === other;
  	     * // => false
  	     */function isEqual(value,other){return baseIsEqual(value,other);}/**
  	     * This method is like `_.isEqual` except that it accepts `customizer` which
  	     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  	     * are handled by the method instead. The `customizer` is invoked with up to
  	     * six arguments: (objValue, othValue [, index|key, object, other, stack]).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @param {Function} [customizer] The function to customize comparisons.
  	     * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  	     * @example
  	     *
  	     * function isGreeting(value) {
  	     *   return /^h(?:i|ello)$/.test(value);
  	     * }
  	     *
  	     * function customizer(objValue, othValue) {
  	     *   if (isGreeting(objValue) && isGreeting(othValue)) {
  	     *     return true;
  	     *   }
  	     * }
  	     *
  	     * var array = ['hello', 'goodbye'];
  	     * var other = ['hi', 'goodbye'];
  	     *
  	     * _.isEqualWith(array, other, customizer);
  	     * // => true
  	     */function isEqualWith(value,other,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;var result=customizer?customizer(value,other):undefined$1;return result===undefined$1?baseIsEqual(value,other,undefined$1,customizer):!!result;}/**
  	     * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
  	     * `SyntaxError`, `TypeError`, or `URIError` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an error object, else `false`.
  	     * @example
  	     *
  	     * _.isError(new Error);
  	     * // => true
  	     *
  	     * _.isError(Error);
  	     * // => false
  	     */function isError(value){if(!isObjectLike(value)){return false;}var tag=baseGetTag(value);return tag==errorTag||tag==domExcTag||typeof value.message=='string'&&typeof value.name=='string'&&!isPlainObject(value);}/**
  	     * Checks if `value` is a finite primitive number.
  	     *
  	     * **Note:** This method is based on
  	     * [`Number.isFinite`](https://mdn.io/Number/isFinite).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
  	     * @example
  	     *
  	     * _.isFinite(3);
  	     * // => true
  	     *
  	     * _.isFinite(Number.MIN_VALUE);
  	     * // => true
  	     *
  	     * _.isFinite(Infinity);
  	     * // => false
  	     *
  	     * _.isFinite('3');
  	     * // => false
  	     */function isFinite(value){return typeof value=='number'&&nativeIsFinite(value);}/**
  	     * Checks if `value` is classified as a `Function` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  	     * @example
  	     *
  	     * _.isFunction(_);
  	     * // => true
  	     *
  	     * _.isFunction(/abc/);
  	     * // => false
  	     */function isFunction(value){if(!isObject(value)){return false;}// The use of `Object#toString` avoids issues with the `typeof` operator
  // in Safari 9 which returns 'object' for typed arrays and other constructors.
  var tag=baseGetTag(value);return tag==funcTag||tag==genTag||tag==asyncTag||tag==proxyTag;}/**
  	     * Checks if `value` is an integer.
  	     *
  	     * **Note:** This method is based on
  	     * [`Number.isInteger`](https://mdn.io/Number/isInteger).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an integer, else `false`.
  	     * @example
  	     *
  	     * _.isInteger(3);
  	     * // => true
  	     *
  	     * _.isInteger(Number.MIN_VALUE);
  	     * // => false
  	     *
  	     * _.isInteger(Infinity);
  	     * // => false
  	     *
  	     * _.isInteger('3');
  	     * // => false
  	     */function isInteger(value){return typeof value=='number'&&value==toInteger(value);}/**
  	     * Checks if `value` is a valid array-like length.
  	     *
  	     * **Note:** This method is loosely based on
  	     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  	     * @example
  	     *
  	     * _.isLength(3);
  	     * // => true
  	     *
  	     * _.isLength(Number.MIN_VALUE);
  	     * // => false
  	     *
  	     * _.isLength(Infinity);
  	     * // => false
  	     *
  	     * _.isLength('3');
  	     * // => false
  	     */function isLength(value){return typeof value=='number'&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER;}/**
  	     * Checks if `value` is the
  	     * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  	     * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  	     * @example
  	     *
  	     * _.isObject({});
  	     * // => true
  	     *
  	     * _.isObject([1, 2, 3]);
  	     * // => true
  	     *
  	     * _.isObject(_.noop);
  	     * // => true
  	     *
  	     * _.isObject(null);
  	     * // => false
  	     */function isObject(value){var type=typeof value;return value!=null&&(type=='object'||type=='function');}/**
  	     * Checks if `value` is object-like. A value is object-like if it's not `null`
  	     * and has a `typeof` result of "object".
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  	     * @example
  	     *
  	     * _.isObjectLike({});
  	     * // => true
  	     *
  	     * _.isObjectLike([1, 2, 3]);
  	     * // => true
  	     *
  	     * _.isObjectLike(_.noop);
  	     * // => false
  	     *
  	     * _.isObjectLike(null);
  	     * // => false
  	     */function isObjectLike(value){return value!=null&&typeof value=='object';}/**
  	     * Checks if `value` is classified as a `Map` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.3.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a map, else `false`.
  	     * @example
  	     *
  	     * _.isMap(new Map);
  	     * // => true
  	     *
  	     * _.isMap(new WeakMap);
  	     * // => false
  	     */var isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap;/**
  	     * Performs a partial deep comparison between `object` and `source` to
  	     * determine if `object` contains equivalent property values.
  	     *
  	     * **Note:** This method is equivalent to `_.matches` when `source` is
  	     * partially applied.
  	     *
  	     * Partial comparisons will match empty array and empty object `source`
  	     * values against any array or object value, respectively. See `_.isEqual`
  	     * for a list of supported value comparisons.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Lang
  	     * @param {Object} object The object to inspect.
  	     * @param {Object} source The object of property values to match.
  	     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': 2 };
  	     *
  	     * _.isMatch(object, { 'b': 2 });
  	     * // => true
  	     *
  	     * _.isMatch(object, { 'b': 1 });
  	     * // => false
  	     */function isMatch(object,source){return object===source||baseIsMatch(object,source,getMatchData(source));}/**
  	     * This method is like `_.isMatch` except that it accepts `customizer` which
  	     * is invoked to compare values. If `customizer` returns `undefined`, comparisons
  	     * are handled by the method instead. The `customizer` is invoked with five
  	     * arguments: (objValue, srcValue, index|key, object, source).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {Object} object The object to inspect.
  	     * @param {Object} source The object of property values to match.
  	     * @param {Function} [customizer] The function to customize comparisons.
  	     * @returns {boolean} Returns `true` if `object` is a match, else `false`.
  	     * @example
  	     *
  	     * function isGreeting(value) {
  	     *   return /^h(?:i|ello)$/.test(value);
  	     * }
  	     *
  	     * function customizer(objValue, srcValue) {
  	     *   if (isGreeting(objValue) && isGreeting(srcValue)) {
  	     *     return true;
  	     *   }
  	     * }
  	     *
  	     * var object = { 'greeting': 'hello' };
  	     * var source = { 'greeting': 'hi' };
  	     *
  	     * _.isMatchWith(object, source, customizer);
  	     * // => true
  	     */function isMatchWith(object,source,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return baseIsMatch(object,source,getMatchData(source),customizer);}/**
  	     * Checks if `value` is `NaN`.
  	     *
  	     * **Note:** This method is based on
  	     * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
  	     * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
  	     * `undefined` and other non-number values.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  	     * @example
  	     *
  	     * _.isNaN(NaN);
  	     * // => true
  	     *
  	     * _.isNaN(new Number(NaN));
  	     * // => true
  	     *
  	     * isNaN(undefined);
  	     * // => true
  	     *
  	     * _.isNaN(undefined);
  	     * // => false
  	     */function isNaN(value){// An `NaN` primitive is the only value that is not equal to itself.
  // Perform the `toStringTag` check first to avoid errors with some
  // ActiveX objects in IE.
  return isNumber(value)&&value!=+value;}/**
  	     * Checks if `value` is a pristine native function.
  	     *
  	     * **Note:** This method can't reliably detect native functions in the presence
  	     * of the core-js package because core-js circumvents this kind of detection.
  	     * Despite multiple requests, the core-js maintainer has made it clear: any
  	     * attempt to fix the detection will be obstructed. As a result, we're left
  	     * with little choice but to throw an error. Unfortunately, this also affects
  	     * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
  	     * which rely on core-js.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a native function,
  	     *  else `false`.
  	     * @example
  	     *
  	     * _.isNative(Array.prototype.push);
  	     * // => true
  	     *
  	     * _.isNative(_);
  	     * // => false
  	     */function isNative(value){if(isMaskable(value)){throw new Error(CORE_ERROR_TEXT);}return baseIsNative(value);}/**
  	     * Checks if `value` is `null`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is `null`, else `false`.
  	     * @example
  	     *
  	     * _.isNull(null);
  	     * // => true
  	     *
  	     * _.isNull(void 0);
  	     * // => false
  	     */function isNull(value){return value===null;}/**
  	     * Checks if `value` is `null` or `undefined`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is nullish, else `false`.
  	     * @example
  	     *
  	     * _.isNil(null);
  	     * // => true
  	     *
  	     * _.isNil(void 0);
  	     * // => true
  	     *
  	     * _.isNil(NaN);
  	     * // => false
  	     */function isNil(value){return value==null;}/**
  	     * Checks if `value` is classified as a `Number` primitive or object.
  	     *
  	     * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
  	     * classified as numbers, use the `_.isFinite` method.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a number, else `false`.
  	     * @example
  	     *
  	     * _.isNumber(3);
  	     * // => true
  	     *
  	     * _.isNumber(Number.MIN_VALUE);
  	     * // => true
  	     *
  	     * _.isNumber(Infinity);
  	     * // => true
  	     *
  	     * _.isNumber('3');
  	     * // => false
  	     */function isNumber(value){return typeof value=='number'||isObjectLike(value)&&baseGetTag(value)==numberTag;}/**
  	     * Checks if `value` is a plain object, that is, an object created by the
  	     * `Object` constructor or one with a `[[Prototype]]` of `null`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.8.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     * }
  	     *
  	     * _.isPlainObject(new Foo);
  	     * // => false
  	     *
  	     * _.isPlainObject([1, 2, 3]);
  	     * // => false
  	     *
  	     * _.isPlainObject({ 'x': 0, 'y': 0 });
  	     * // => true
  	     *
  	     * _.isPlainObject(Object.create(null));
  	     * // => true
  	     */function isPlainObject(value){if(!isObjectLike(value)||baseGetTag(value)!=objectTag){return false;}var proto=getPrototype(value);if(proto===null){return true;}var Ctor=hasOwnProperty.call(proto,'constructor')&&proto.constructor;return typeof Ctor=='function'&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString;}/**
  	     * Checks if `value` is classified as a `RegExp` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.1.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
  	     * @example
  	     *
  	     * _.isRegExp(/abc/);
  	     * // => true
  	     *
  	     * _.isRegExp('/abc/');
  	     * // => false
  	     */var isRegExp=nodeIsRegExp?baseUnary(nodeIsRegExp):baseIsRegExp;/**
  	     * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
  	     * double precision number which isn't the result of a rounded unsafe integer.
  	     *
  	     * **Note:** This method is based on
  	     * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
  	     * @example
  	     *
  	     * _.isSafeInteger(3);
  	     * // => true
  	     *
  	     * _.isSafeInteger(Number.MIN_VALUE);
  	     * // => false
  	     *
  	     * _.isSafeInteger(Infinity);
  	     * // => false
  	     *
  	     * _.isSafeInteger('3');
  	     * // => false
  	     */function isSafeInteger(value){return isInteger(value)&&value>=-MAX_SAFE_INTEGER&&value<=MAX_SAFE_INTEGER;}/**
  	     * Checks if `value` is classified as a `Set` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.3.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a set, else `false`.
  	     * @example
  	     *
  	     * _.isSet(new Set);
  	     * // => true
  	     *
  	     * _.isSet(new WeakSet);
  	     * // => false
  	     */var isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet;/**
  	     * Checks if `value` is classified as a `String` primitive or object.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a string, else `false`.
  	     * @example
  	     *
  	     * _.isString('abc');
  	     * // => true
  	     *
  	     * _.isString(1);
  	     * // => false
  	     */function isString(value){return typeof value=='string'||!isArray(value)&&isObjectLike(value)&&baseGetTag(value)==stringTag;}/**
  	     * Checks if `value` is classified as a `Symbol` primitive or object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  	     * @example
  	     *
  	     * _.isSymbol(Symbol.iterator);
  	     * // => true
  	     *
  	     * _.isSymbol('abc');
  	     * // => false
  	     */function isSymbol(value){return typeof value=='symbol'||isObjectLike(value)&&baseGetTag(value)==symbolTag;}/**
  	     * Checks if `value` is classified as a typed array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  	     * @example
  	     *
  	     * _.isTypedArray(new Uint8Array);
  	     * // => true
  	     *
  	     * _.isTypedArray([]);
  	     * // => false
  	     */var isTypedArray=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray;/**
  	     * Checks if `value` is `undefined`.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
  	     * @example
  	     *
  	     * _.isUndefined(void 0);
  	     * // => true
  	     *
  	     * _.isUndefined(null);
  	     * // => false
  	     */function isUndefined(value){return value===undefined$1;}/**
  	     * Checks if `value` is classified as a `WeakMap` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.3.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
  	     * @example
  	     *
  	     * _.isWeakMap(new WeakMap);
  	     * // => true
  	     *
  	     * _.isWeakMap(new Map);
  	     * // => false
  	     */function isWeakMap(value){return isObjectLike(value)&&getTag(value)==weakMapTag;}/**
  	     * Checks if `value` is classified as a `WeakSet` object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.3.0
  	     * @category Lang
  	     * @param {*} value The value to check.
  	     * @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
  	     * @example
  	     *
  	     * _.isWeakSet(new WeakSet);
  	     * // => true
  	     *
  	     * _.isWeakSet(new Set);
  	     * // => false
  	     */function isWeakSet(value){return isObjectLike(value)&&baseGetTag(value)==weakSetTag;}/**
  	     * Checks if `value` is less than `other`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.9.0
  	     * @category Lang
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if `value` is less than `other`,
  	     *  else `false`.
  	     * @see _.gt
  	     * @example
  	     *
  	     * _.lt(1, 3);
  	     * // => true
  	     *
  	     * _.lt(3, 3);
  	     * // => false
  	     *
  	     * _.lt(3, 1);
  	     * // => false
  	     */var lt=createRelationalOperation(baseLt);/**
  	     * Checks if `value` is less than or equal to `other`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.9.0
  	     * @category Lang
  	     * @param {*} value The value to compare.
  	     * @param {*} other The other value to compare.
  	     * @returns {boolean} Returns `true` if `value` is less than or equal to
  	     *  `other`, else `false`.
  	     * @see _.gte
  	     * @example
  	     *
  	     * _.lte(1, 3);
  	     * // => true
  	     *
  	     * _.lte(3, 3);
  	     * // => true
  	     *
  	     * _.lte(3, 1);
  	     * // => false
  	     */var lte=createRelationalOperation(function(value,other){return value<=other;});/**
  	     * Converts `value` to an array.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Lang
  	     * @param {*} value The value to convert.
  	     * @returns {Array} Returns the converted array.
  	     * @example
  	     *
  	     * _.toArray({ 'a': 1, 'b': 2 });
  	     * // => [1, 2]
  	     *
  	     * _.toArray('abc');
  	     * // => ['a', 'b', 'c']
  	     *
  	     * _.toArray(1);
  	     * // => []
  	     *
  	     * _.toArray(null);
  	     * // => []
  	     */function toArray(value){if(!value){return [];}if(isArrayLike(value)){return isString(value)?stringToArray(value):copyArray(value);}if(symIterator&&value[symIterator]){return iteratorToArray(value[symIterator]());}var tag=getTag(value),func=tag==mapTag?mapToArray:tag==setTag?setToArray:values;return func(value);}/**
  	     * Converts `value` to a finite number.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.12.0
  	     * @category Lang
  	     * @param {*} value The value to convert.
  	     * @returns {number} Returns the converted number.
  	     * @example
  	     *
  	     * _.toFinite(3.2);
  	     * // => 3.2
  	     *
  	     * _.toFinite(Number.MIN_VALUE);
  	     * // => 5e-324
  	     *
  	     * _.toFinite(Infinity);
  	     * // => 1.7976931348623157e+308
  	     *
  	     * _.toFinite('3.2');
  	     * // => 3.2
  	     */function toFinite(value){if(!value){return value===0?value:0;}value=toNumber(value);if(value===INFINITY||value===-INFINITY){var sign=value<0?-1:1;return sign*MAX_INTEGER;}return value===value?value:0;}/**
  	     * Converts `value` to an integer.
  	     *
  	     * **Note:** This method is loosely based on
  	     * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to convert.
  	     * @returns {number} Returns the converted integer.
  	     * @example
  	     *
  	     * _.toInteger(3.2);
  	     * // => 3
  	     *
  	     * _.toInteger(Number.MIN_VALUE);
  	     * // => 0
  	     *
  	     * _.toInteger(Infinity);
  	     * // => 1.7976931348623157e+308
  	     *
  	     * _.toInteger('3.2');
  	     * // => 3
  	     */function toInteger(value){var result=toFinite(value),remainder=result%1;return result===result?remainder?result-remainder:result:0;}/**
  	     * Converts `value` to an integer suitable for use as the length of an
  	     * array-like object.
  	     *
  	     * **Note:** This method is based on
  	     * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to convert.
  	     * @returns {number} Returns the converted integer.
  	     * @example
  	     *
  	     * _.toLength(3.2);
  	     * // => 3
  	     *
  	     * _.toLength(Number.MIN_VALUE);
  	     * // => 0
  	     *
  	     * _.toLength(Infinity);
  	     * // => 4294967295
  	     *
  	     * _.toLength('3.2');
  	     * // => 3
  	     */function toLength(value){return value?baseClamp(toInteger(value),0,MAX_ARRAY_LENGTH):0;}/**
  	     * Converts `value` to a number.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to process.
  	     * @returns {number} Returns the number.
  	     * @example
  	     *
  	     * _.toNumber(3.2);
  	     * // => 3.2
  	     *
  	     * _.toNumber(Number.MIN_VALUE);
  	     * // => 5e-324
  	     *
  	     * _.toNumber(Infinity);
  	     * // => Infinity
  	     *
  	     * _.toNumber('3.2');
  	     * // => 3.2
  	     */function toNumber(value){if(typeof value=='number'){return value;}if(isSymbol(value)){return NAN;}if(isObject(value)){var other=typeof value.valueOf=='function'?value.valueOf():value;value=isObject(other)?other+'':other;}if(typeof value!='string'){return value===0?value:+value;}value=baseTrim(value);var isBinary=reIsBinary.test(value);return isBinary||reIsOctal.test(value)?freeParseInt(value.slice(2),isBinary?2:8):reIsBadHex.test(value)?NAN:+value;}/**
  	     * Converts `value` to a plain object flattening inherited enumerable string
  	     * keyed properties of `value` to own properties of the plain object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Lang
  	     * @param {*} value The value to convert.
  	     * @returns {Object} Returns the converted plain object.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.assign({ 'a': 1 }, new Foo);
  	     * // => { 'a': 1, 'b': 2 }
  	     *
  	     * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
  	     * // => { 'a': 1, 'b': 2, 'c': 3 }
  	     */function toPlainObject(value){return copyObject(value,keysIn(value));}/**
  	     * Converts `value` to a safe integer. A safe integer can be compared and
  	     * represented correctly.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to convert.
  	     * @returns {number} Returns the converted integer.
  	     * @example
  	     *
  	     * _.toSafeInteger(3.2);
  	     * // => 3
  	     *
  	     * _.toSafeInteger(Number.MIN_VALUE);
  	     * // => 0
  	     *
  	     * _.toSafeInteger(Infinity);
  	     * // => 9007199254740991
  	     *
  	     * _.toSafeInteger('3.2');
  	     * // => 3
  	     */function toSafeInteger(value){return value?baseClamp(toInteger(value),-MAX_SAFE_INTEGER,MAX_SAFE_INTEGER):value===0?value:0;}/**
  	     * Converts `value` to a string. An empty string is returned for `null`
  	     * and `undefined` values. The sign of `-0` is preserved.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Lang
  	     * @param {*} value The value to convert.
  	     * @returns {string} Returns the converted string.
  	     * @example
  	     *
  	     * _.toString(null);
  	     * // => ''
  	     *
  	     * _.toString(-0);
  	     * // => '-0'
  	     *
  	     * _.toString([1, 2, 3]);
  	     * // => '1,2,3'
  	     */function toString(value){return value==null?'':baseToString(value);}/*------------------------------------------------------------------------*/ /**
  	     * Assigns own enumerable string keyed properties of source objects to the
  	     * destination object. Source objects are applied from left to right.
  	     * Subsequent sources overwrite property assignments of previous sources.
  	     *
  	     * **Note:** This method mutates `object` and is loosely based on
  	     * [`Object.assign`](https://mdn.io/Object/assign).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.10.0
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} [sources] The source objects.
  	     * @returns {Object} Returns `object`.
  	     * @see _.assignIn
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     * }
  	     *
  	     * function Bar() {
  	     *   this.c = 3;
  	     * }
  	     *
  	     * Foo.prototype.b = 2;
  	     * Bar.prototype.d = 4;
  	     *
  	     * _.assign({ 'a': 0 }, new Foo, new Bar);
  	     * // => { 'a': 1, 'c': 3 }
  	     */var assign=createAssigner(function(object,source){if(isPrototype(source)||isArrayLike(source)){copyObject(source,keys(source),object);return;}for(var key in source){if(hasOwnProperty.call(source,key)){assignValue(object,key,source[key]);}}});/**
  	     * This method is like `_.assign` except that it iterates over own and
  	     * inherited source properties.
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @alias extend
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} [sources] The source objects.
  	     * @returns {Object} Returns `object`.
  	     * @see _.assign
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     * }
  	     *
  	     * function Bar() {
  	     *   this.c = 3;
  	     * }
  	     *
  	     * Foo.prototype.b = 2;
  	     * Bar.prototype.d = 4;
  	     *
  	     * _.assignIn({ 'a': 0 }, new Foo, new Bar);
  	     * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
  	     */var assignIn=createAssigner(function(object,source){copyObject(source,keysIn(source),object);});/**
  	     * This method is like `_.assignIn` except that it accepts `customizer`
  	     * which is invoked to produce the assigned values. If `customizer` returns
  	     * `undefined`, assignment is handled by the method instead. The `customizer`
  	     * is invoked with five arguments: (objValue, srcValue, key, object, source).
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @alias extendWith
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} sources The source objects.
  	     * @param {Function} [customizer] The function to customize assigned values.
  	     * @returns {Object} Returns `object`.
  	     * @see _.assignWith
  	     * @example
  	     *
  	     * function customizer(objValue, srcValue) {
  	     *   return _.isUndefined(objValue) ? srcValue : objValue;
  	     * }
  	     *
  	     * var defaults = _.partialRight(_.assignInWith, customizer);
  	     *
  	     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  	     * // => { 'a': 1, 'b': 2 }
  	     */var assignInWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keysIn(source),object,customizer);});/**
  	     * This method is like `_.assign` except that it accepts `customizer`
  	     * which is invoked to produce the assigned values. If `customizer` returns
  	     * `undefined`, assignment is handled by the method instead. The `customizer`
  	     * is invoked with five arguments: (objValue, srcValue, key, object, source).
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} sources The source objects.
  	     * @param {Function} [customizer] The function to customize assigned values.
  	     * @returns {Object} Returns `object`.
  	     * @see _.assignInWith
  	     * @example
  	     *
  	     * function customizer(objValue, srcValue) {
  	     *   return _.isUndefined(objValue) ? srcValue : objValue;
  	     * }
  	     *
  	     * var defaults = _.partialRight(_.assignWith, customizer);
  	     *
  	     * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  	     * // => { 'a': 1, 'b': 2 }
  	     */var assignWith=createAssigner(function(object,source,srcIndex,customizer){copyObject(source,keys(source),object,customizer);});/**
  	     * Creates an array of values corresponding to `paths` of `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.0.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {...(string|string[])} [paths] The property paths to pick.
  	     * @returns {Array} Returns the picked values.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
  	     *
  	     * _.at(object, ['a[0].b.c', 'a[1]']);
  	     * // => [3, 4]
  	     */var at=flatRest(baseAt);/**
  	     * Creates an object that inherits from the `prototype` object. If a
  	     * `properties` object is given, its own enumerable string keyed properties
  	     * are assigned to the created object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.3.0
  	     * @category Object
  	     * @param {Object} prototype The object to inherit from.
  	     * @param {Object} [properties] The properties to assign to the object.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * function Shape() {
  	     *   this.x = 0;
  	     *   this.y = 0;
  	     * }
  	     *
  	     * function Circle() {
  	     *   Shape.call(this);
  	     * }
  	     *
  	     * Circle.prototype = _.create(Shape.prototype, {
  	     *   'constructor': Circle
  	     * });
  	     *
  	     * var circle = new Circle;
  	     * circle instanceof Circle;
  	     * // => true
  	     *
  	     * circle instanceof Shape;
  	     * // => true
  	     */function create(prototype,properties){var result=baseCreate(prototype);return properties==null?result:baseAssign(result,properties);}/**
  	     * Assigns own and inherited enumerable string keyed properties of source
  	     * objects to the destination object for all destination properties that
  	     * resolve to `undefined`. Source objects are applied from left to right.
  	     * Once a property is set, additional values of the same property are ignored.
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} [sources] The source objects.
  	     * @returns {Object} Returns `object`.
  	     * @see _.defaultsDeep
  	     * @example
  	     *
  	     * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
  	     * // => { 'a': 1, 'b': 2 }
  	     */var defaults=baseRest(function(object,sources){object=Object(object);var index=-1;var length=sources.length;var guard=length>2?sources[2]:undefined$1;if(guard&&isIterateeCall(sources[0],sources[1],guard)){length=1;}while(++index<length){var source=sources[index];var props=keysIn(source);var propsIndex=-1;var propsLength=props.length;while(++propsIndex<propsLength){var key=props[propsIndex];var value=object[key];if(value===undefined$1||eq(value,objectProto[key])&&!hasOwnProperty.call(object,key)){object[key]=source[key];}}}return object;});/**
  	     * This method is like `_.defaults` except that it recursively assigns
  	     * default properties.
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.10.0
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} [sources] The source objects.
  	     * @returns {Object} Returns `object`.
  	     * @see _.defaults
  	     * @example
  	     *
  	     * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
  	     * // => { 'a': { 'b': 2, 'c': 3 } }
  	     */var defaultsDeep=baseRest(function(args){args.push(undefined$1,customDefaultsMerge);return apply(mergeWith,undefined$1,args);});/**
  	     * This method is like `_.find` except that it returns the key of the first
  	     * element `predicate` returns truthy for instead of the element itself.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.1.0
  	     * @category Object
  	     * @param {Object} object The object to inspect.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {string|undefined} Returns the key of the matched element,
  	     *  else `undefined`.
  	     * @example
  	     *
  	     * var users = {
  	     *   'barney':  { 'age': 36, 'active': true },
  	     *   'fred':    { 'age': 40, 'active': false },
  	     *   'pebbles': { 'age': 1,  'active': true }
  	     * };
  	     *
  	     * _.findKey(users, function(o) { return o.age < 40; });
  	     * // => 'barney' (iteration order is not guaranteed)
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.findKey(users, { 'age': 1, 'active': true });
  	     * // => 'pebbles'
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.findKey(users, ['active', false]);
  	     * // => 'fred'
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.findKey(users, 'active');
  	     * // => 'barney'
  	     */function findKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwn);}/**
  	     * This method is like `_.findKey` except that it iterates over elements of
  	     * a collection in the opposite order.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Object
  	     * @param {Object} object The object to inspect.
  	     * @param {Function} [predicate=_.identity] The function invoked per iteration.
  	     * @returns {string|undefined} Returns the key of the matched element,
  	     *  else `undefined`.
  	     * @example
  	     *
  	     * var users = {
  	     *   'barney':  { 'age': 36, 'active': true },
  	     *   'fred':    { 'age': 40, 'active': false },
  	     *   'pebbles': { 'age': 1,  'active': true }
  	     * };
  	     *
  	     * _.findLastKey(users, function(o) { return o.age < 40; });
  	     * // => returns 'pebbles' assuming `_.findKey` returns 'barney'
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.findLastKey(users, { 'age': 36, 'active': true });
  	     * // => 'barney'
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.findLastKey(users, ['active', false]);
  	     * // => 'fred'
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.findLastKey(users, 'active');
  	     * // => 'pebbles'
  	     */function findLastKey(object,predicate){return baseFindKey(object,getIteratee(predicate,3),baseForOwnRight);}/**
  	     * Iterates over own and inherited enumerable string keyed properties of an
  	     * object and invokes `iteratee` for each property. The iteratee is invoked
  	     * with three arguments: (value, key, object). Iteratee functions may exit
  	     * iteration early by explicitly returning `false`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.3.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Object} Returns `object`.
  	     * @see _.forInRight
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.forIn(new Foo, function(value, key) {
  	     *   console.log(key);
  	     * });
  	     * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
  	     */function forIn(object,iteratee){return object==null?object:baseFor(object,getIteratee(iteratee,3),keysIn);}/**
  	     * This method is like `_.forIn` except that it iterates over properties of
  	     * `object` in the opposite order.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Object} Returns `object`.
  	     * @see _.forIn
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.forInRight(new Foo, function(value, key) {
  	     *   console.log(key);
  	     * });
  	     * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
  	     */function forInRight(object,iteratee){return object==null?object:baseForRight(object,getIteratee(iteratee,3),keysIn);}/**
  	     * Iterates over own enumerable string keyed properties of an object and
  	     * invokes `iteratee` for each property. The iteratee is invoked with three
  	     * arguments: (value, key, object). Iteratee functions may exit iteration
  	     * early by explicitly returning `false`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.3.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Object} Returns `object`.
  	     * @see _.forOwnRight
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.forOwn(new Foo, function(value, key) {
  	     *   console.log(key);
  	     * });
  	     * // => Logs 'a' then 'b' (iteration order is not guaranteed).
  	     */function forOwn(object,iteratee){return object&&baseForOwn(object,getIteratee(iteratee,3));}/**
  	     * This method is like `_.forOwn` except that it iterates over properties of
  	     * `object` in the opposite order.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.0.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Object} Returns `object`.
  	     * @see _.forOwn
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.forOwnRight(new Foo, function(value, key) {
  	     *   console.log(key);
  	     * });
  	     * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
  	     */function forOwnRight(object,iteratee){return object&&baseForOwnRight(object,getIteratee(iteratee,3));}/**
  	     * Creates an array of function property names from own enumerable properties
  	     * of `object`.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The object to inspect.
  	     * @returns {Array} Returns the function names.
  	     * @see _.functionsIn
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = _.constant('a');
  	     *   this.b = _.constant('b');
  	     * }
  	     *
  	     * Foo.prototype.c = _.constant('c');
  	     *
  	     * _.functions(new Foo);
  	     * // => ['a', 'b']
  	     */function functions(object){return object==null?[]:baseFunctions(object,keys(object));}/**
  	     * Creates an array of function property names from own and inherited
  	     * enumerable properties of `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The object to inspect.
  	     * @returns {Array} Returns the function names.
  	     * @see _.functions
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = _.constant('a');
  	     *   this.b = _.constant('b');
  	     * }
  	     *
  	     * Foo.prototype.c = _.constant('c');
  	     *
  	     * _.functionsIn(new Foo);
  	     * // => ['a', 'b', 'c']
  	     */function functionsIn(object){return object==null?[]:baseFunctions(object,keysIn(object));}/**
  	     * Gets the value at `path` of `object`. If the resolved value is
  	     * `undefined`, the `defaultValue` is returned in its place.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.7.0
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path of the property to get.
  	     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  	     * @returns {*} Returns the resolved value.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  	     *
  	     * _.get(object, 'a[0].b.c');
  	     * // => 3
  	     *
  	     * _.get(object, ['a', '0', 'b', 'c']);
  	     * // => 3
  	     *
  	     * _.get(object, 'a.b.c', 'default');
  	     * // => 'default'
  	     */function get(object,path,defaultValue){var result=object==null?undefined$1:baseGet(object,path);return result===undefined$1?defaultValue:result;}/**
  	     * Checks if `path` is a direct property of `object`.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path to check.
  	     * @returns {boolean} Returns `true` if `path` exists, else `false`.
  	     * @example
  	     *
  	     * var object = { 'a': { 'b': 2 } };
  	     * var other = _.create({ 'a': _.create({ 'b': 2 }) });
  	     *
  	     * _.has(object, 'a');
  	     * // => true
  	     *
  	     * _.has(object, 'a.b');
  	     * // => true
  	     *
  	     * _.has(object, ['a', 'b']);
  	     * // => true
  	     *
  	     * _.has(other, 'a');
  	     * // => false
  	     */function has(object,path){return object!=null&&hasPath(object,path,baseHas);}/**
  	     * Checks if `path` is a direct or inherited property of `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path to check.
  	     * @returns {boolean} Returns `true` if `path` exists, else `false`.
  	     * @example
  	     *
  	     * var object = _.create({ 'a': _.create({ 'b': 2 }) });
  	     *
  	     * _.hasIn(object, 'a');
  	     * // => true
  	     *
  	     * _.hasIn(object, 'a.b');
  	     * // => true
  	     *
  	     * _.hasIn(object, ['a', 'b']);
  	     * // => true
  	     *
  	     * _.hasIn(object, 'b');
  	     * // => false
  	     */function hasIn(object,path){return object!=null&&hasPath(object,path,baseHasIn);}/**
  	     * Creates an object composed of the inverted keys and values of `object`.
  	     * If `object` contains duplicate values, subsequent values overwrite
  	     * property assignments of previous values.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.7.0
  	     * @category Object
  	     * @param {Object} object The object to invert.
  	     * @returns {Object} Returns the new inverted object.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': 2, 'c': 1 };
  	     *
  	     * _.invert(object);
  	     * // => { '1': 'c', '2': 'b' }
  	     */var invert=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!='function'){value=nativeObjectToString.call(value);}result[value]=key;},constant(identity));/**
  	     * This method is like `_.invert` except that the inverted object is generated
  	     * from the results of running each element of `object` thru `iteratee`. The
  	     * corresponding inverted value of each inverted key is an array of keys
  	     * responsible for generating the inverted value. The iteratee is invoked
  	     * with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.1.0
  	     * @category Object
  	     * @param {Object} object The object to invert.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {Object} Returns the new inverted object.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': 2, 'c': 1 };
  	     *
  	     * _.invertBy(object);
  	     * // => { '1': ['a', 'c'], '2': ['b'] }
  	     *
  	     * _.invertBy(object, function(value) {
  	     *   return 'group' + value;
  	     * });
  	     * // => { 'group1': ['a', 'c'], 'group2': ['b'] }
  	     */var invertBy=createInverter(function(result,value,key){if(value!=null&&typeof value.toString!='function'){value=nativeObjectToString.call(value);}if(hasOwnProperty.call(result,value)){result[value].push(key);}else {result[value]=[key];}},getIteratee);/**
  	     * Invokes the method at `path` of `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path of the method to invoke.
  	     * @param {...*} [args] The arguments to invoke the method with.
  	     * @returns {*} Returns the result of the invoked method.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
  	     *
  	     * _.invoke(object, 'a[0].b.c.slice', 1, 3);
  	     * // => [2, 3]
  	     */var invoke=baseRest(baseInvoke);/**
  	     * Creates an array of the own enumerable property names of `object`.
  	     *
  	     * **Note:** Non-object values are coerced to objects. See the
  	     * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  	     * for more details.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property names.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.keys(new Foo);
  	     * // => ['a', 'b'] (iteration order is not guaranteed)
  	     *
  	     * _.keys('hi');
  	     * // => ['0', '1']
  	     */function keys(object){return isArrayLike(object)?arrayLikeKeys(object):baseKeys(object);}/**
  	     * Creates an array of the own and inherited enumerable property names of `object`.
  	     *
  	     * **Note:** Non-object values are coerced to objects.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property names.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.keysIn(new Foo);
  	     * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
  	     */function keysIn(object){return isArrayLike(object)?arrayLikeKeys(object,true):baseKeysIn(object);}/**
  	     * The opposite of `_.mapValues`; this method creates an object with the
  	     * same values as `object` and keys generated by running each own enumerable
  	     * string keyed property of `object` thru `iteratee`. The iteratee is invoked
  	     * with three arguments: (value, key, object).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.8.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Object} Returns the new mapped object.
  	     * @see _.mapValues
  	     * @example
  	     *
  	     * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
  	     *   return key + value;
  	     * });
  	     * // => { 'a1': 1, 'b2': 2 }
  	     */function mapKeys(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,iteratee(value,key,object),value);});return result;}/**
  	     * Creates an object with the same keys as `object` and values generated
  	     * by running each own enumerable string keyed property of `object` thru
  	     * `iteratee`. The iteratee is invoked with three arguments:
  	     * (value, key, object).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.4.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Object} Returns the new mapped object.
  	     * @see _.mapKeys
  	     * @example
  	     *
  	     * var users = {
  	     *   'fred':    { 'user': 'fred',    'age': 40 },
  	     *   'pebbles': { 'user': 'pebbles', 'age': 1 }
  	     * };
  	     *
  	     * _.mapValues(users, function(o) { return o.age; });
  	     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.mapValues(users, 'age');
  	     * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
  	     */function mapValues(object,iteratee){var result={};iteratee=getIteratee(iteratee,3);baseForOwn(object,function(value,key,object){baseAssignValue(result,key,iteratee(value,key,object));});return result;}/**
  	     * This method is like `_.assign` except that it recursively merges own and
  	     * inherited enumerable string keyed properties of source objects into the
  	     * destination object. Source properties that resolve to `undefined` are
  	     * skipped if a destination value exists. Array and plain object properties
  	     * are merged recursively. Other objects and value types are overridden by
  	     * assignment. Source objects are applied from left to right. Subsequent
  	     * sources overwrite property assignments of previous sources.
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.5.0
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} [sources] The source objects.
  	     * @returns {Object} Returns `object`.
  	     * @example
  	     *
  	     * var object = {
  	     *   'a': [{ 'b': 2 }, { 'd': 4 }]
  	     * };
  	     *
  	     * var other = {
  	     *   'a': [{ 'c': 3 }, { 'e': 5 }]
  	     * };
  	     *
  	     * _.merge(object, other);
  	     * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
  	     */var merge=createAssigner(function(object,source,srcIndex){baseMerge(object,source,srcIndex);});/**
  	     * This method is like `_.merge` except that it accepts `customizer` which
  	     * is invoked to produce the merged values of the destination and source
  	     * properties. If `customizer` returns `undefined`, merging is handled by the
  	     * method instead. The `customizer` is invoked with six arguments:
  	     * (objValue, srcValue, key, object, source, stack).
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The destination object.
  	     * @param {...Object} sources The source objects.
  	     * @param {Function} customizer The function to customize assigned values.
  	     * @returns {Object} Returns `object`.
  	     * @example
  	     *
  	     * function customizer(objValue, srcValue) {
  	     *   if (_.isArray(objValue)) {
  	     *     return objValue.concat(srcValue);
  	     *   }
  	     * }
  	     *
  	     * var object = { 'a': [1], 'b': [2] };
  	     * var other = { 'a': [3], 'b': [4] };
  	     *
  	     * _.mergeWith(object, other, customizer);
  	     * // => { 'a': [1, 3], 'b': [2, 4] }
  	     */var mergeWith=createAssigner(function(object,source,srcIndex,customizer){baseMerge(object,source,srcIndex,customizer);});/**
  	     * The opposite of `_.pick`; this method creates an object composed of the
  	     * own and inherited enumerable property paths of `object` that are not omitted.
  	     *
  	     * **Note:** This method is considerably slower than `_.pick`.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The source object.
  	     * @param {...(string|string[])} [paths] The property paths to omit.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': '2', 'c': 3 };
  	     *
  	     * _.omit(object, ['a', 'c']);
  	     * // => { 'b': '2' }
  	     */var omit=flatRest(function(object,paths){var result={};if(object==null){return result;}var isDeep=false;paths=arrayMap(paths,function(path){path=castPath(path,object);isDeep||(isDeep=path.length>1);return path;});copyObject(object,getAllKeysIn(object),result);if(isDeep){result=baseClone(result,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone);}var length=paths.length;while(length--){baseUnset(result,paths[length]);}return result;});/**
  	     * The opposite of `_.pickBy`; this method creates an object composed of
  	     * the own and inherited enumerable string keyed properties of `object` that
  	     * `predicate` doesn't return truthy for. The predicate is invoked with two
  	     * arguments: (value, key).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The source object.
  	     * @param {Function} [predicate=_.identity] The function invoked per property.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': '2', 'c': 3 };
  	     *
  	     * _.omitBy(object, _.isNumber);
  	     * // => { 'b': '2' }
  	     */function omitBy(object,predicate){return pickBy(object,negate(getIteratee(predicate)));}/**
  	     * Creates an object composed of the picked `object` properties.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The source object.
  	     * @param {...(string|string[])} [paths] The property paths to pick.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': '2', 'c': 3 };
  	     *
  	     * _.pick(object, ['a', 'c']);
  	     * // => { 'a': 1, 'c': 3 }
  	     */var pick=flatRest(function(object,paths){return object==null?{}:basePick(object,paths);});/**
  	     * Creates an object composed of the `object` properties `predicate` returns
  	     * truthy for. The predicate is invoked with two arguments: (value, key).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The source object.
  	     * @param {Function} [predicate=_.identity] The function invoked per property.
  	     * @returns {Object} Returns the new object.
  	     * @example
  	     *
  	     * var object = { 'a': 1, 'b': '2', 'c': 3 };
  	     *
  	     * _.pickBy(object, _.isNumber);
  	     * // => { 'a': 1, 'c': 3 }
  	     */function pickBy(object,predicate){if(object==null){return {};}var props=arrayMap(getAllKeysIn(object),function(prop){return [prop];});predicate=getIteratee(predicate);return basePickBy(object,props,function(value,path){return predicate(value,path[0]);});}/**
  	     * This method is like `_.get` except that if the resolved value is a
  	     * function it's invoked with the `this` binding of its parent object and
  	     * its result is returned.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @param {Array|string} path The path of the property to resolve.
  	     * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  	     * @returns {*} Returns the resolved value.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
  	     *
  	     * _.result(object, 'a[0].b.c1');
  	     * // => 3
  	     *
  	     * _.result(object, 'a[0].b.c2');
  	     * // => 4
  	     *
  	     * _.result(object, 'a[0].b.c3', 'default');
  	     * // => 'default'
  	     *
  	     * _.result(object, 'a[0].b.c3', _.constant('default'));
  	     * // => 'default'
  	     */function result(object,path,defaultValue){path=castPath(path,object);var index=-1,length=path.length;// Ensure the loop is entered when path is empty.
  if(!length){length=1;object=undefined$1;}while(++index<length){var value=object==null?undefined$1:object[toKey(path[index])];if(value===undefined$1){index=length;value=defaultValue;}object=isFunction(value)?value.call(object):value;}return object;}/**
  	     * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  	     * it's created. Arrays are created for missing index properties while objects
  	     * are created for all other missing properties. Use `_.setWith` to customize
  	     * `path` creation.
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.7.0
  	     * @category Object
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The path of the property to set.
  	     * @param {*} value The value to set.
  	     * @returns {Object} Returns `object`.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  	     *
  	     * _.set(object, 'a[0].b.c', 4);
  	     * console.log(object.a[0].b.c);
  	     * // => 4
  	     *
  	     * _.set(object, ['x', '0', 'y', 'z'], 5);
  	     * console.log(object.x[0].y.z);
  	     * // => 5
  	     */function set(object,path,value){return object==null?object:baseSet(object,path,value);}/**
  	     * This method is like `_.set` except that it accepts `customizer` which is
  	     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
  	     * path creation is handled by the method instead. The `customizer` is invoked
  	     * with three arguments: (nsValue, key, nsObject).
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The path of the property to set.
  	     * @param {*} value The value to set.
  	     * @param {Function} [customizer] The function to customize assigned values.
  	     * @returns {Object} Returns `object`.
  	     * @example
  	     *
  	     * var object = {};
  	     *
  	     * _.setWith(object, '[0][1]', 'a', Object);
  	     * // => { '0': { '1': 'a' } }
  	     */function setWith(object,path,value,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return object==null?object:baseSet(object,path,value,customizer);}/**
  	     * Creates an array of own enumerable string keyed-value pairs for `object`
  	     * which can be consumed by `_.fromPairs`. If `object` is a map or set, its
  	     * entries are returned.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @alias entries
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the key-value pairs.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.toPairs(new Foo);
  	     * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
  	     */var toPairs=createToPairs(keys);/**
  	     * Creates an array of own and inherited enumerable string keyed-value pairs
  	     * for `object` which can be consumed by `_.fromPairs`. If `object` is a map
  	     * or set, its entries are returned.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @alias entriesIn
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the key-value pairs.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.toPairsIn(new Foo);
  	     * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
  	     */var toPairsIn=createToPairs(keysIn);/**
  	     * An alternative to `_.reduce`; this method transforms `object` to a new
  	     * `accumulator` object which is the result of running each of its own
  	     * enumerable string keyed properties thru `iteratee`, with each invocation
  	     * potentially mutating the `accumulator` object. If `accumulator` is not
  	     * provided, a new object with the same `[[Prototype]]` will be used. The
  	     * iteratee is invoked with four arguments: (accumulator, value, key, object).
  	     * Iteratee functions may exit iteration early by explicitly returning `false`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.3.0
  	     * @category Object
  	     * @param {Object} object The object to iterate over.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @param {*} [accumulator] The custom accumulator value.
  	     * @returns {*} Returns the accumulated value.
  	     * @example
  	     *
  	     * _.transform([2, 3, 4], function(result, n) {
  	     *   result.push(n *= n);
  	     *   return n % 2 == 0;
  	     * }, []);
  	     * // => [4, 9]
  	     *
  	     * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
  	     *   (result[value] || (result[value] = [])).push(key);
  	     * }, {});
  	     * // => { '1': ['a', 'c'], '2': ['b'] }
  	     */function transform(object,iteratee,accumulator){var isArr=isArray(object),isArrLike=isArr||isBuffer(object)||isTypedArray(object);iteratee=getIteratee(iteratee,4);if(accumulator==null){var Ctor=object&&object.constructor;if(isArrLike){accumulator=isArr?new Ctor():[];}else if(isObject(object)){accumulator=isFunction(Ctor)?baseCreate(getPrototype(object)):{};}else {accumulator={};}}(isArrLike?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object);});return accumulator;}/**
  	     * Removes the property at `path` of `object`.
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Object
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The path of the property to unset.
  	     * @returns {boolean} Returns `true` if the property is deleted, else `false`.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c': 7 } }] };
  	     * _.unset(object, 'a[0].b.c');
  	     * // => true
  	     *
  	     * console.log(object);
  	     * // => { 'a': [{ 'b': {} }] };
  	     *
  	     * _.unset(object, ['a', '0', 'b', 'c']);
  	     * // => true
  	     *
  	     * console.log(object);
  	     * // => { 'a': [{ 'b': {} }] };
  	     */function unset(object,path){return object==null?true:baseUnset(object,path);}/**
  	     * This method is like `_.set` except that accepts `updater` to produce the
  	     * value to set. Use `_.updateWith` to customize `path` creation. The `updater`
  	     * is invoked with one argument: (value).
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.6.0
  	     * @category Object
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The path of the property to set.
  	     * @param {Function} updater The function to produce the updated value.
  	     * @returns {Object} Returns `object`.
  	     * @example
  	     *
  	     * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  	     *
  	     * _.update(object, 'a[0].b.c', function(n) { return n * n; });
  	     * console.log(object.a[0].b.c);
  	     * // => 9
  	     *
  	     * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
  	     * console.log(object.x[0].y.z);
  	     * // => 0
  	     */function update(object,path,updater){return object==null?object:baseUpdate(object,path,castFunction(updater));}/**
  	     * This method is like `_.update` except that it accepts `customizer` which is
  	     * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
  	     * path creation is handled by the method instead. The `customizer` is invoked
  	     * with three arguments: (nsValue, key, nsObject).
  	     *
  	     * **Note:** This method mutates `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.6.0
  	     * @category Object
  	     * @param {Object} object The object to modify.
  	     * @param {Array|string} path The path of the property to set.
  	     * @param {Function} updater The function to produce the updated value.
  	     * @param {Function} [customizer] The function to customize assigned values.
  	     * @returns {Object} Returns `object`.
  	     * @example
  	     *
  	     * var object = {};
  	     *
  	     * _.updateWith(object, '[0][1]', _.constant('a'), Object);
  	     * // => { '0': { '1': 'a' } }
  	     */function updateWith(object,path,updater,customizer){customizer=typeof customizer=='function'?customizer:undefined$1;return object==null?object:baseUpdate(object,path,castFunction(updater),customizer);}/**
  	     * Creates an array of the own enumerable string keyed property values of `object`.
  	     *
  	     * **Note:** Non-object values are coerced to objects.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property values.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.values(new Foo);
  	     * // => [1, 2] (iteration order is not guaranteed)
  	     *
  	     * _.values('hi');
  	     * // => ['h', 'i']
  	     */function values(object){return object==null?[]:baseValues(object,keys(object));}/**
  	     * Creates an array of the own and inherited enumerable string keyed property
  	     * values of `object`.
  	     *
  	     * **Note:** Non-object values are coerced to objects.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Object
  	     * @param {Object} object The object to query.
  	     * @returns {Array} Returns the array of property values.
  	     * @example
  	     *
  	     * function Foo() {
  	     *   this.a = 1;
  	     *   this.b = 2;
  	     * }
  	     *
  	     * Foo.prototype.c = 3;
  	     *
  	     * _.valuesIn(new Foo);
  	     * // => [1, 2, 3] (iteration order is not guaranteed)
  	     */function valuesIn(object){return object==null?[]:baseValues(object,keysIn(object));}/*------------------------------------------------------------------------*/ /**
  	     * Clamps `number` within the inclusive `lower` and `upper` bounds.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Number
  	     * @param {number} number The number to clamp.
  	     * @param {number} [lower] The lower bound.
  	     * @param {number} upper The upper bound.
  	     * @returns {number} Returns the clamped number.
  	     * @example
  	     *
  	     * _.clamp(-10, -5, 5);
  	     * // => -5
  	     *
  	     * _.clamp(10, -5, 5);
  	     * // => 5
  	     */function clamp(number,lower,upper){if(upper===undefined$1){upper=lower;lower=undefined$1;}if(upper!==undefined$1){upper=toNumber(upper);upper=upper===upper?upper:0;}if(lower!==undefined$1){lower=toNumber(lower);lower=lower===lower?lower:0;}return baseClamp(toNumber(number),lower,upper);}/**
  	     * Checks if `n` is between `start` and up to, but not including, `end`. If
  	     * `end` is not specified, it's set to `start` with `start` then set to `0`.
  	     * If `start` is greater than `end` the params are swapped to support
  	     * negative ranges.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.3.0
  	     * @category Number
  	     * @param {number} number The number to check.
  	     * @param {number} [start=0] The start of the range.
  	     * @param {number} end The end of the range.
  	     * @returns {boolean} Returns `true` if `number` is in the range, else `false`.
  	     * @see _.range, _.rangeRight
  	     * @example
  	     *
  	     * _.inRange(3, 2, 4);
  	     * // => true
  	     *
  	     * _.inRange(4, 8);
  	     * // => true
  	     *
  	     * _.inRange(4, 2);
  	     * // => false
  	     *
  	     * _.inRange(2, 2);
  	     * // => false
  	     *
  	     * _.inRange(1.2, 2);
  	     * // => true
  	     *
  	     * _.inRange(5.2, 4);
  	     * // => false
  	     *
  	     * _.inRange(-3, -2, -6);
  	     * // => true
  	     */function inRange(number,start,end){start=toFinite(start);if(end===undefined$1){end=start;start=0;}else {end=toFinite(end);}number=toNumber(number);return baseInRange(number,start,end);}/**
  	     * Produces a random number between the inclusive `lower` and `upper` bounds.
  	     * If only one argument is provided a number between `0` and the given number
  	     * is returned. If `floating` is `true`, or either `lower` or `upper` are
  	     * floats, a floating-point number is returned instead of an integer.
  	     *
  	     * **Note:** JavaScript follows the IEEE-754 standard for resolving
  	     * floating-point values which can produce unexpected results.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.7.0
  	     * @category Number
  	     * @param {number} [lower=0] The lower bound.
  	     * @param {number} [upper=1] The upper bound.
  	     * @param {boolean} [floating] Specify returning a floating-point number.
  	     * @returns {number} Returns the random number.
  	     * @example
  	     *
  	     * _.random(0, 5);
  	     * // => an integer between 0 and 5
  	     *
  	     * _.random(5);
  	     * // => also an integer between 0 and 5
  	     *
  	     * _.random(5, true);
  	     * // => a floating-point number between 0 and 5
  	     *
  	     * _.random(1.2, 5.2);
  	     * // => a floating-point number between 1.2 and 5.2
  	     */function random(lower,upper,floating){if(floating&&typeof floating!='boolean'&&isIterateeCall(lower,upper,floating)){upper=floating=undefined$1;}if(floating===undefined$1){if(typeof upper=='boolean'){floating=upper;upper=undefined$1;}else if(typeof lower=='boolean'){floating=lower;lower=undefined$1;}}if(lower===undefined$1&&upper===undefined$1){lower=0;upper=1;}else {lower=toFinite(lower);if(upper===undefined$1){upper=lower;lower=0;}else {upper=toFinite(upper);}}if(lower>upper){var temp=lower;lower=upper;upper=temp;}if(floating||lower%1||upper%1){var rand=nativeRandom();return nativeMin(lower+rand*(upper-lower+freeParseFloat('1e-'+((rand+'').length-1))),upper);}return baseRandom(lower,upper);}/*------------------------------------------------------------------------*/ /**
  	     * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the camel cased string.
  	     * @example
  	     *
  	     * _.camelCase('Foo Bar');
  	     * // => 'fooBar'
  	     *
  	     * _.camelCase('--foo-bar--');
  	     * // => 'fooBar'
  	     *
  	     * _.camelCase('__FOO_BAR__');
  	     * // => 'fooBar'
  	     */var camelCase=createCompounder(function(result,word,index){word=word.toLowerCase();return result+(index?capitalize(word):word);});/**
  	     * Converts the first character of `string` to upper case and the remaining
  	     * to lower case.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to capitalize.
  	     * @returns {string} Returns the capitalized string.
  	     * @example
  	     *
  	     * _.capitalize('FRED');
  	     * // => 'Fred'
  	     */function capitalize(string){return upperFirst(toString(string).toLowerCase());}/**
  	     * Deburrs `string` by converting
  	     * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
  	     * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
  	     * letters to basic Latin letters and removing
  	     * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to deburr.
  	     * @returns {string} Returns the deburred string.
  	     * @example
  	     *
  	     * _.deburr('déjà vu');
  	     * // => 'deja vu'
  	     */function deburr(string){string=toString(string);return string&&string.replace(reLatin,deburrLetter).replace(reComboMark,'');}/**
  	     * Checks if `string` ends with the given target string.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to inspect.
  	     * @param {string} [target] The string to search for.
  	     * @param {number} [position=string.length] The position to search up to.
  	     * @returns {boolean} Returns `true` if `string` ends with `target`,
  	     *  else `false`.
  	     * @example
  	     *
  	     * _.endsWith('abc', 'c');
  	     * // => true
  	     *
  	     * _.endsWith('abc', 'b');
  	     * // => false
  	     *
  	     * _.endsWith('abc', 'b', 2);
  	     * // => true
  	     */function endsWith(string,target,position){string=toString(string);target=baseToString(target);var length=string.length;position=position===undefined$1?length:baseClamp(toInteger(position),0,length);var end=position;position-=target.length;return position>=0&&string.slice(position,end)==target;}/**
  	     * Converts the characters "&", "<", ">", '"', and "'" in `string` to their
  	     * corresponding HTML entities.
  	     *
  	     * **Note:** No other characters are escaped. To escape additional
  	     * characters use a third-party library like [_he_](https://mths.be/he).
  	     *
  	     * Though the ">" character is escaped for symmetry, characters like
  	     * ">" and "/" don't need escaping in HTML and have no special meaning
  	     * unless they're part of a tag or unquoted attribute value. See
  	     * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
  	     * (under "semi-related fun fact") for more details.
  	     *
  	     * When working with HTML you should always
  	     * [quote attribute values](http://wonko.com/post/html-escaping) to reduce
  	     * XSS vectors.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category String
  	     * @param {string} [string=''] The string to escape.
  	     * @returns {string} Returns the escaped string.
  	     * @example
  	     *
  	     * _.escape('fred, barney, & pebbles');
  	     * // => 'fred, barney, &amp; pebbles'
  	     */function escape(string){string=toString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string;}/**
  	     * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
  	     * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to escape.
  	     * @returns {string} Returns the escaped string.
  	     * @example
  	     *
  	     * _.escapeRegExp('[lodash](https://lodash.com/)');
  	     * // => '\[lodash\]\(https://lodash\.com/\)'
  	     */function escapeRegExp(string){string=toString(string);return string&&reHasRegExpChar.test(string)?string.replace(reRegExpChar,'\\$&'):string;}/**
  	     * Converts `string` to
  	     * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the kebab cased string.
  	     * @example
  	     *
  	     * _.kebabCase('Foo Bar');
  	     * // => 'foo-bar'
  	     *
  	     * _.kebabCase('fooBar');
  	     * // => 'foo-bar'
  	     *
  	     * _.kebabCase('__FOO_BAR__');
  	     * // => 'foo-bar'
  	     */var kebabCase=createCompounder(function(result,word,index){return result+(index?'-':'')+word.toLowerCase();});/**
  	     * Converts `string`, as space separated words, to lower case.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the lower cased string.
  	     * @example
  	     *
  	     * _.lowerCase('--Foo-Bar--');
  	     * // => 'foo bar'
  	     *
  	     * _.lowerCase('fooBar');
  	     * // => 'foo bar'
  	     *
  	     * _.lowerCase('__FOO_BAR__');
  	     * // => 'foo bar'
  	     */var lowerCase=createCompounder(function(result,word,index){return result+(index?' ':'')+word.toLowerCase();});/**
  	     * Converts the first character of `string` to lower case.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the converted string.
  	     * @example
  	     *
  	     * _.lowerFirst('Fred');
  	     * // => 'fred'
  	     *
  	     * _.lowerFirst('FRED');
  	     * // => 'fRED'
  	     */var lowerFirst=createCaseFirst('toLowerCase');/**
  	     * Pads `string` on the left and right sides if it's shorter than `length`.
  	     * Padding characters are truncated if they can't be evenly divided by `length`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to pad.
  	     * @param {number} [length=0] The padding length.
  	     * @param {string} [chars=' '] The string used as padding.
  	     * @returns {string} Returns the padded string.
  	     * @example
  	     *
  	     * _.pad('abc', 8);
  	     * // => '  abc   '
  	     *
  	     * _.pad('abc', 8, '_-');
  	     * // => '_-abc_-_'
  	     *
  	     * _.pad('abc', 3);
  	     * // => 'abc'
  	     */function pad(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;if(!length||strLength>=length){return string;}var mid=(length-strLength)/2;return createPadding(nativeFloor(mid),chars)+string+createPadding(nativeCeil(mid),chars);}/**
  	     * Pads `string` on the right side if it's shorter than `length`. Padding
  	     * characters are truncated if they exceed `length`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to pad.
  	     * @param {number} [length=0] The padding length.
  	     * @param {string} [chars=' '] The string used as padding.
  	     * @returns {string} Returns the padded string.
  	     * @example
  	     *
  	     * _.padEnd('abc', 6);
  	     * // => 'abc   '
  	     *
  	     * _.padEnd('abc', 6, '_-');
  	     * // => 'abc_-_'
  	     *
  	     * _.padEnd('abc', 3);
  	     * // => 'abc'
  	     */function padEnd(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?string+createPadding(length-strLength,chars):string;}/**
  	     * Pads `string` on the left side if it's shorter than `length`. Padding
  	     * characters are truncated if they exceed `length`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to pad.
  	     * @param {number} [length=0] The padding length.
  	     * @param {string} [chars=' '] The string used as padding.
  	     * @returns {string} Returns the padded string.
  	     * @example
  	     *
  	     * _.padStart('abc', 6);
  	     * // => '   abc'
  	     *
  	     * _.padStart('abc', 6, '_-');
  	     * // => '_-_abc'
  	     *
  	     * _.padStart('abc', 3);
  	     * // => 'abc'
  	     */function padStart(string,length,chars){string=toString(string);length=toInteger(length);var strLength=length?stringSize(string):0;return length&&strLength<length?createPadding(length-strLength,chars)+string:string;}/**
  	     * Converts `string` to an integer of the specified radix. If `radix` is
  	     * `undefined` or `0`, a `radix` of `10` is used unless `value` is a
  	     * hexadecimal, in which case a `radix` of `16` is used.
  	     *
  	     * **Note:** This method aligns with the
  	     * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 1.1.0
  	     * @category String
  	     * @param {string} string The string to convert.
  	     * @param {number} [radix=10] The radix to interpret `value` by.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {number} Returns the converted integer.
  	     * @example
  	     *
  	     * _.parseInt('08');
  	     * // => 8
  	     *
  	     * _.map(['6', '08', '10'], _.parseInt);
  	     * // => [6, 8, 10]
  	     */function parseInt(string,radix,guard){if(guard||radix==null){radix=0;}else if(radix){radix=+radix;}return nativeParseInt(toString(string).replace(reTrimStart,''),radix||0);}/**
  	     * Repeats the given string `n` times.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to repeat.
  	     * @param {number} [n=1] The number of times to repeat the string.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {string} Returns the repeated string.
  	     * @example
  	     *
  	     * _.repeat('*', 3);
  	     * // => '***'
  	     *
  	     * _.repeat('abc', 2);
  	     * // => 'abcabc'
  	     *
  	     * _.repeat('abc', 0);
  	     * // => ''
  	     */function repeat(string,n,guard){if(guard?isIterateeCall(string,n,guard):n===undefined$1){n=1;}else {n=toInteger(n);}return baseRepeat(toString(string),n);}/**
  	     * Replaces matches for `pattern` in `string` with `replacement`.
  	     *
  	     * **Note:** This method is based on
  	     * [`String#replace`](https://mdn.io/String/replace).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to modify.
  	     * @param {RegExp|string} pattern The pattern to replace.
  	     * @param {Function|string} replacement The match replacement.
  	     * @returns {string} Returns the modified string.
  	     * @example
  	     *
  	     * _.replace('Hi Fred', 'Fred', 'Barney');
  	     * // => 'Hi Barney'
  	     */function replace(){var args=arguments,string=toString(args[0]);return args.length<3?string:string.replace(args[1],args[2]);}/**
  	     * Converts `string` to
  	     * [snake case](https://en.wikipedia.org/wiki/Snake_case).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the snake cased string.
  	     * @example
  	     *
  	     * _.snakeCase('Foo Bar');
  	     * // => 'foo_bar'
  	     *
  	     * _.snakeCase('fooBar');
  	     * // => 'foo_bar'
  	     *
  	     * _.snakeCase('--FOO-BAR--');
  	     * // => 'foo_bar'
  	     */var snakeCase=createCompounder(function(result,word,index){return result+(index?'_':'')+word.toLowerCase();});/**
  	     * Splits `string` by `separator`.
  	     *
  	     * **Note:** This method is based on
  	     * [`String#split`](https://mdn.io/String/split).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to split.
  	     * @param {RegExp|string} separator The separator pattern to split by.
  	     * @param {number} [limit] The length to truncate results to.
  	     * @returns {Array} Returns the string segments.
  	     * @example
  	     *
  	     * _.split('a-b-c', '-', 2);
  	     * // => ['a', 'b']
  	     */function split(string,separator,limit){if(limit&&typeof limit!='number'&&isIterateeCall(string,separator,limit)){separator=limit=undefined$1;}limit=limit===undefined$1?MAX_ARRAY_LENGTH:limit>>>0;if(!limit){return [];}string=toString(string);if(string&&(typeof separator=='string'||separator!=null&&!isRegExp(separator))){separator=baseToString(separator);if(!separator&&hasUnicode(string)){return castSlice(stringToArray(string),0,limit);}}return string.split(separator,limit);}/**
  	     * Converts `string` to
  	     * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.1.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the start cased string.
  	     * @example
  	     *
  	     * _.startCase('--foo-bar--');
  	     * // => 'Foo Bar'
  	     *
  	     * _.startCase('fooBar');
  	     * // => 'Foo Bar'
  	     *
  	     * _.startCase('__FOO_BAR__');
  	     * // => 'FOO BAR'
  	     */var startCase=createCompounder(function(result,word,index){return result+(index?' ':'')+upperFirst(word);});/**
  	     * Checks if `string` starts with the given target string.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to inspect.
  	     * @param {string} [target] The string to search for.
  	     * @param {number} [position=0] The position to search from.
  	     * @returns {boolean} Returns `true` if `string` starts with `target`,
  	     *  else `false`.
  	     * @example
  	     *
  	     * _.startsWith('abc', 'a');
  	     * // => true
  	     *
  	     * _.startsWith('abc', 'b');
  	     * // => false
  	     *
  	     * _.startsWith('abc', 'b', 1);
  	     * // => true
  	     */function startsWith(string,target,position){string=toString(string);position=position==null?0:baseClamp(toInteger(position),0,string.length);target=baseToString(target);return string.slice(position,position+target.length)==target;}/**
  	     * Creates a compiled template function that can interpolate data properties
  	     * in "interpolate" delimiters, HTML-escape interpolated data properties in
  	     * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
  	     * properties may be accessed as free variables in the template. If a setting
  	     * object is given, it takes precedence over `_.templateSettings` values.
  	     *
  	     * **Note:** In the development build `_.template` utilizes
  	     * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
  	     * for easier debugging.
  	     *
  	     * For more information on precompiling templates see
  	     * [lodash's custom builds documentation](https://lodash.com/custom-builds).
  	     *
  	     * For more information on Chrome extension sandboxes see
  	     * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category String
  	     * @param {string} [string=''] The template string.
  	     * @param {Object} [options={}] The options object.
  	     * @param {RegExp} [options.escape=_.templateSettings.escape]
  	     *  The HTML "escape" delimiter.
  	     * @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
  	     *  The "evaluate" delimiter.
  	     * @param {Object} [options.imports=_.templateSettings.imports]
  	     *  An object to import into the template as free variables.
  	     * @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
  	     *  The "interpolate" delimiter.
  	     * @param {string} [options.sourceURL='lodash.templateSources[n]']
  	     *  The sourceURL of the compiled template.
  	     * @param {string} [options.variable='obj']
  	     *  The data object variable name.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Function} Returns the compiled template function.
  	     * @example
  	     *
  	     * // Use the "interpolate" delimiter to create a compiled template.
  	     * var compiled = _.template('hello <%= user %>!');
  	     * compiled({ 'user': 'fred' });
  	     * // => 'hello fred!'
  	     *
  	     * // Use the HTML "escape" delimiter to escape data property values.
  	     * var compiled = _.template('<b><%- value %></b>');
  	     * compiled({ 'value': '<script>' });
  	     * // => '<b>&lt;script&gt;</b>'
  	     *
  	     * // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
  	     * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
  	     * compiled({ 'users': ['fred', 'barney'] });
  	     * // => '<li>fred</li><li>barney</li>'
  	     *
  	     * // Use the internal `print` function in "evaluate" delimiters.
  	     * var compiled = _.template('<% print("hello " + user); %>!');
  	     * compiled({ 'user': 'barney' });
  	     * // => 'hello barney!'
  	     *
  	     * // Use the ES template literal delimiter as an "interpolate" delimiter.
  	     * // Disable support by replacing the "interpolate" delimiter.
  	     * var compiled = _.template('hello ${ user }!');
  	     * compiled({ 'user': 'pebbles' });
  	     * // => 'hello pebbles!'
  	     *
  	     * // Use backslashes to treat delimiters as plain text.
  	     * var compiled = _.template('<%= "\\<%- value %\\>" %>');
  	     * compiled({ 'value': 'ignored' });
  	     * // => '<%- value %>'
  	     *
  	     * // Use the `imports` option to import `jQuery` as `jq`.
  	     * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
  	     * var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
  	     * compiled({ 'users': ['fred', 'barney'] });
  	     * // => '<li>fred</li><li>barney</li>'
  	     *
  	     * // Use the `sourceURL` option to specify a custom sourceURL for the template.
  	     * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
  	     * compiled(data);
  	     * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
  	     *
  	     * // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
  	     * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
  	     * compiled.source;
  	     * // => function(data) {
  	     * //   var __t, __p = '';
  	     * //   __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
  	     * //   return __p;
  	     * // }
  	     *
  	     * // Use custom template delimiters.
  	     * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
  	     * var compiled = _.template('hello {{ user }}!');
  	     * compiled({ 'user': 'mustache' });
  	     * // => 'hello mustache!'
  	     *
  	     * // Use the `source` property to inline compiled templates for meaningful
  	     * // line numbers in error messages and stack traces.
  	     * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
  	     *   var JST = {\
  	     *     "main": ' + _.template(mainText).source + '\
  	     *   };\
  	     * ');
  	     */function template(string,options,guard){// Based on John Resig's `tmpl` implementation
  // (http://ejohn.org/blog/javascript-micro-templating/)
  // and Laura Doktorova's doT.js (https://github.com/olado/doT).
  var settings=lodash.templateSettings;if(guard&&isIterateeCall(string,options,guard)){options=undefined$1;}string=toString(string);options=assignInWith({},options,settings,customDefaultsAssignIn);var imports=assignInWith({},options.imports,settings.imports,customDefaultsAssignIn),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys);var isEscaping,isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";// Compile the regexp to match each delimiter.
  var reDelimiters=RegExp((options.escape||reNoMatch).source+'|'+interpolate.source+'|'+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+'|'+(options.evaluate||reNoMatch).source+'|$','g');// Use a sourceURL for easier debugging.
  // The sourceURL gets injected into the source that's eval-ed, so be careful
  // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
  // and escape the comment, thus injecting code that gets evaled.
  var sourceURL='//# sourceURL='+(hasOwnProperty.call(options,'sourceURL')?(options.sourceURL+'').replace(/\s/g,' '):'lodash.templateSources['+ ++templateCounter+']')+'\n';string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);// Escape characters that can't be included in string literals.
  source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar);// Replace delimiters with snippets.
  if(escapeValue){isEscaping=true;source+="' +\n__e("+escapeValue+") +\n'";}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '";}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'";}index=offset+match.length;// The JS engine embedded in Adobe products needs `match` returned in
  // order to produce the correct `offset` value.
  return match;});source+="';\n";// If `variable` is not specified wrap a with-statement around the generated
  // code to add the data object to the top of the scope chain.
  var variable=hasOwnProperty.call(options,'variable')&&options.variable;if(!variable){source='with (obj) {\n'+source+'\n}\n';}// Throw an error if a forbidden character was found in `variable`, to prevent
  // potential command injection attacks.
  else if(reForbiddenIdentifierChars.test(variable)){throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);}// Cleanup code by stripping empty strings.
  source=(isEvaluating?source.replace(reEmptyStringLeading,''):source).replace(reEmptyStringMiddle,'$1').replace(reEmptyStringTrailing,'$1;');// Frame code as the function body.
  source='function('+(variable||'obj')+') {\n'+(variable?'':'obj || (obj = {});\n')+"var __t, __p = ''"+(isEscaping?', __e = _.escape':'')+(isEvaluating?', __j = Array.prototype.join;\n'+"function print() { __p += __j.call(arguments, '') }\n":';\n')+source+'return __p\n}';var result=attempt(function(){return Function(importsKeys,sourceURL+'return '+source).apply(undefined$1,importsValues);});// Provide the compiled function's source by its `toString` method or
  // the `source` property as a convenience for inlining compiled templates.
  result.source=source;if(isError(result)){throw result;}return result;}/**
  	     * Converts `string`, as a whole, to lower case just like
  	     * [String#toLowerCase](https://mdn.io/toLowerCase).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the lower cased string.
  	     * @example
  	     *
  	     * _.toLower('--Foo-Bar--');
  	     * // => '--foo-bar--'
  	     *
  	     * _.toLower('fooBar');
  	     * // => 'foobar'
  	     *
  	     * _.toLower('__FOO_BAR__');
  	     * // => '__foo_bar__'
  	     */function toLower(value){return toString(value).toLowerCase();}/**
  	     * Converts `string`, as a whole, to upper case just like
  	     * [String#toUpperCase](https://mdn.io/toUpperCase).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the upper cased string.
  	     * @example
  	     *
  	     * _.toUpper('--foo-bar--');
  	     * // => '--FOO-BAR--'
  	     *
  	     * _.toUpper('fooBar');
  	     * // => 'FOOBAR'
  	     *
  	     * _.toUpper('__foo_bar__');
  	     * // => '__FOO_BAR__'
  	     */function toUpper(value){return toString(value).toUpperCase();}/**
  	     * Removes leading and trailing whitespace or specified characters from `string`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to trim.
  	     * @param {string} [chars=whitespace] The characters to trim.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {string} Returns the trimmed string.
  	     * @example
  	     *
  	     * _.trim('  abc  ');
  	     * // => 'abc'
  	     *
  	     * _.trim('-_-abc-_-', '_-');
  	     * // => 'abc'
  	     *
  	     * _.map(['  foo  ', '  bar  '], _.trim);
  	     * // => ['foo', 'bar']
  	     */function trim(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined$1)){return baseTrim(string);}if(!string||!(chars=baseToString(chars))){return string;}var strSymbols=stringToArray(string),chrSymbols=stringToArray(chars),start=charsStartIndex(strSymbols,chrSymbols),end=charsEndIndex(strSymbols,chrSymbols)+1;return castSlice(strSymbols,start,end).join('');}/**
  	     * Removes trailing whitespace or specified characters from `string`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to trim.
  	     * @param {string} [chars=whitespace] The characters to trim.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {string} Returns the trimmed string.
  	     * @example
  	     *
  	     * _.trimEnd('  abc  ');
  	     * // => '  abc'
  	     *
  	     * _.trimEnd('-_-abc-_-', '_-');
  	     * // => '-_-abc'
  	     */function trimEnd(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined$1)){return string.slice(0,trimmedEndIndex(string)+1);}if(!string||!(chars=baseToString(chars))){return string;}var strSymbols=stringToArray(string),end=charsEndIndex(strSymbols,stringToArray(chars))+1;return castSlice(strSymbols,0,end).join('');}/**
  	     * Removes leading whitespace or specified characters from `string`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to trim.
  	     * @param {string} [chars=whitespace] The characters to trim.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {string} Returns the trimmed string.
  	     * @example
  	     *
  	     * _.trimStart('  abc  ');
  	     * // => 'abc  '
  	     *
  	     * _.trimStart('-_-abc-_-', '_-');
  	     * // => 'abc-_-'
  	     */function trimStart(string,chars,guard){string=toString(string);if(string&&(guard||chars===undefined$1)){return string.replace(reTrimStart,'');}if(!string||!(chars=baseToString(chars))){return string;}var strSymbols=stringToArray(string),start=charsStartIndex(strSymbols,stringToArray(chars));return castSlice(strSymbols,start).join('');}/**
  	     * Truncates `string` if it's longer than the given maximum string length.
  	     * The last characters of the truncated string are replaced with the omission
  	     * string which defaults to "...".
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to truncate.
  	     * @param {Object} [options={}] The options object.
  	     * @param {number} [options.length=30] The maximum string length.
  	     * @param {string} [options.omission='...'] The string to indicate text is omitted.
  	     * @param {RegExp|string} [options.separator] The separator pattern to truncate to.
  	     * @returns {string} Returns the truncated string.
  	     * @example
  	     *
  	     * _.truncate('hi-diddly-ho there, neighborino');
  	     * // => 'hi-diddly-ho there, neighbo...'
  	     *
  	     * _.truncate('hi-diddly-ho there, neighborino', {
  	     *   'length': 24,
  	     *   'separator': ' '
  	     * });
  	     * // => 'hi-diddly-ho there,...'
  	     *
  	     * _.truncate('hi-diddly-ho there, neighborino', {
  	     *   'length': 24,
  	     *   'separator': /,? +/
  	     * });
  	     * // => 'hi-diddly-ho there...'
  	     *
  	     * _.truncate('hi-diddly-ho there, neighborino', {
  	     *   'omission': ' [...]'
  	     * });
  	     * // => 'hi-diddly-ho there, neig [...]'
  	     */function truncate(string,options){var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(isObject(options)){var separator='separator'in options?options.separator:separator;length='length'in options?toInteger(options.length):length;omission='omission'in options?baseToString(options.omission):omission;}string=toString(string);var strLength=string.length;if(hasUnicode(string)){var strSymbols=stringToArray(string);strLength=strSymbols.length;}if(length>=strLength){return string;}var end=length-stringSize(omission);if(end<1){return omission;}var result=strSymbols?castSlice(strSymbols,0,end).join(''):string.slice(0,end);if(separator===undefined$1){return result+omission;}if(strSymbols){end+=result.length-end;}if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,substring=result;if(!separator.global){separator=RegExp(separator.source,toString(reFlags.exec(separator))+'g');}separator.lastIndex=0;while(match=separator.exec(substring)){var newEnd=match.index;}result=result.slice(0,newEnd===undefined$1?end:newEnd);}}else if(string.indexOf(baseToString(separator),end)!=end){var index=result.lastIndexOf(separator);if(index>-1){result=result.slice(0,index);}}return result+omission;}/**
  	     * The inverse of `_.escape`; this method converts the HTML entities
  	     * `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
  	     * their corresponding characters.
  	     *
  	     * **Note:** No other HTML entities are unescaped. To unescape additional
  	     * HTML entities use a third-party library like [_he_](https://mths.be/he).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 0.6.0
  	     * @category String
  	     * @param {string} [string=''] The string to unescape.
  	     * @returns {string} Returns the unescaped string.
  	     * @example
  	     *
  	     * _.unescape('fred, barney, &amp; pebbles');
  	     * // => 'fred, barney, & pebbles'
  	     */function unescape(string){string=toString(string);return string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string;}/**
  	     * Converts `string`, as space separated words, to upper case.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the upper cased string.
  	     * @example
  	     *
  	     * _.upperCase('--foo-bar');
  	     * // => 'FOO BAR'
  	     *
  	     * _.upperCase('fooBar');
  	     * // => 'FOO BAR'
  	     *
  	     * _.upperCase('__foo_bar__');
  	     * // => 'FOO BAR'
  	     */var upperCase=createCompounder(function(result,word,index){return result+(index?' ':'')+word.toUpperCase();});/**
  	     * Converts the first character of `string` to upper case.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to convert.
  	     * @returns {string} Returns the converted string.
  	     * @example
  	     *
  	     * _.upperFirst('fred');
  	     * // => 'Fred'
  	     *
  	     * _.upperFirst('FRED');
  	     * // => 'FRED'
  	     */var upperFirst=createCaseFirst('toUpperCase');/**
  	     * Splits `string` into an array of its words.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category String
  	     * @param {string} [string=''] The string to inspect.
  	     * @param {RegExp|string} [pattern] The pattern to match words.
  	     * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
  	     * @returns {Array} Returns the words of `string`.
  	     * @example
  	     *
  	     * _.words('fred, barney, & pebbles');
  	     * // => ['fred', 'barney', 'pebbles']
  	     *
  	     * _.words('fred, barney, & pebbles', /[^, ]+/g);
  	     * // => ['fred', 'barney', '&', 'pebbles']
  	     */function words(string,pattern,guard){string=toString(string);pattern=guard?undefined$1:pattern;if(pattern===undefined$1){return hasUnicodeWord(string)?unicodeWords(string):asciiWords(string);}return string.match(pattern)||[];}/*------------------------------------------------------------------------*/ /**
  	     * Attempts to invoke `func`, returning either the result or the caught error
  	     * object. Any additional arguments are provided to `func` when it's invoked.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Util
  	     * @param {Function} func The function to attempt.
  	     * @param {...*} [args] The arguments to invoke `func` with.
  	     * @returns {*} Returns the `func` result or error object.
  	     * @example
  	     *
  	     * // Avoid throwing errors for invalid selectors.
  	     * var elements = _.attempt(function(selector) {
  	     *   return document.querySelectorAll(selector);
  	     * }, '>_>');
  	     *
  	     * if (_.isError(elements)) {
  	     *   elements = [];
  	     * }
  	     */var attempt=baseRest(function(func,args){try{return apply(func,undefined$1,args);}catch(e){return isError(e)?e:new Error(e);}});/**
  	     * Binds methods of an object to the object itself, overwriting the existing
  	     * method.
  	     *
  	     * **Note:** This method doesn't set the "length" property of bound functions.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {Object} object The object to bind and assign the bound methods to.
  	     * @param {...(string|string[])} methodNames The object method names to bind.
  	     * @returns {Object} Returns `object`.
  	     * @example
  	     *
  	     * var view = {
  	     *   'label': 'docs',
  	     *   'click': function() {
  	     *     console.log('clicked ' + this.label);
  	     *   }
  	     * };
  	     *
  	     * _.bindAll(view, ['click']);
  	     * jQuery(element).on('click', view.click);
  	     * // => Logs 'clicked docs' when clicked.
  	     */var bindAll=flatRest(function(object,methodNames){arrayEach(methodNames,function(key){key=toKey(key);baseAssignValue(object,key,bind(object[key],object));});return object;});/**
  	     * Creates a function that iterates over `pairs` and invokes the corresponding
  	     * function of the first predicate to return truthy. The predicate-function
  	     * pairs are invoked with the `this` binding and arguments of the created
  	     * function.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {Array} pairs The predicate-function pairs.
  	     * @returns {Function} Returns the new composite function.
  	     * @example
  	     *
  	     * var func = _.cond([
  	     *   [_.matches({ 'a': 1 }),           _.constant('matches A')],
  	     *   [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
  	     *   [_.stubTrue,                      _.constant('no match')]
  	     * ]);
  	     *
  	     * func({ 'a': 1, 'b': 2 });
  	     * // => 'matches A'
  	     *
  	     * func({ 'a': 0, 'b': 1 });
  	     * // => 'matches B'
  	     *
  	     * func({ 'a': '1', 'b': '2' });
  	     * // => 'no match'
  	     */function cond(pairs){var length=pairs==null?0:pairs.length,toIteratee=getIteratee();pairs=!length?[]:arrayMap(pairs,function(pair){if(typeof pair[1]!='function'){throw new TypeError(FUNC_ERROR_TEXT);}return [toIteratee(pair[0]),pair[1]];});return baseRest(function(args){var index=-1;while(++index<length){var pair=pairs[index];if(apply(pair[0],this,args)){return apply(pair[1],this,args);}}});}/**
  	     * Creates a function that invokes the predicate properties of `source` with
  	     * the corresponding property values of a given object, returning `true` if
  	     * all predicates return truthy, else `false`.
  	     *
  	     * **Note:** The created function is equivalent to `_.conformsTo` with
  	     * `source` partially applied.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {Object} source The object of property predicates to conform to.
  	     * @returns {Function} Returns the new spec function.
  	     * @example
  	     *
  	     * var objects = [
  	     *   { 'a': 2, 'b': 1 },
  	     *   { 'a': 1, 'b': 2 }
  	     * ];
  	     *
  	     * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
  	     * // => [{ 'a': 1, 'b': 2 }]
  	     */function conforms(source){return baseConforms(baseClone(source,CLONE_DEEP_FLAG));}/**
  	     * Creates a function that returns `value`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.4.0
  	     * @category Util
  	     * @param {*} value The value to return from the new function.
  	     * @returns {Function} Returns the new constant function.
  	     * @example
  	     *
  	     * var objects = _.times(2, _.constant({ 'a': 1 }));
  	     *
  	     * console.log(objects);
  	     * // => [{ 'a': 1 }, { 'a': 1 }]
  	     *
  	     * console.log(objects[0] === objects[1]);
  	     * // => true
  	     */function constant(value){return function(){return value;};}/**
  	     * Checks `value` to determine whether a default value should be returned in
  	     * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
  	     * or `undefined`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.14.0
  	     * @category Util
  	     * @param {*} value The value to check.
  	     * @param {*} defaultValue The default value.
  	     * @returns {*} Returns the resolved value.
  	     * @example
  	     *
  	     * _.defaultTo(1, 10);
  	     * // => 1
  	     *
  	     * _.defaultTo(undefined, 10);
  	     * // => 10
  	     */function defaultTo(value,defaultValue){return value==null||value!==value?defaultValue:value;}/**
  	     * Creates a function that returns the result of invoking the given functions
  	     * with the `this` binding of the created function, where each successive
  	     * invocation is supplied the return value of the previous.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Util
  	     * @param {...(Function|Function[])} [funcs] The functions to invoke.
  	     * @returns {Function} Returns the new composite function.
  	     * @see _.flowRight
  	     * @example
  	     *
  	     * function square(n) {
  	     *   return n * n;
  	     * }
  	     *
  	     * var addSquare = _.flow([_.add, square]);
  	     * addSquare(1, 2);
  	     * // => 9
  	     */var flow=createFlow();/**
  	     * This method is like `_.flow` except that it creates a function that
  	     * invokes the given functions from right to left.
  	     *
  	     * @static
  	     * @since 3.0.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {...(Function|Function[])} [funcs] The functions to invoke.
  	     * @returns {Function} Returns the new composite function.
  	     * @see _.flow
  	     * @example
  	     *
  	     * function square(n) {
  	     *   return n * n;
  	     * }
  	     *
  	     * var addSquare = _.flowRight([square, _.add]);
  	     * addSquare(1, 2);
  	     * // => 9
  	     */var flowRight=createFlow(true);/**
  	     * This method returns the first argument it receives.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {*} value Any value.
  	     * @returns {*} Returns `value`.
  	     * @example
  	     *
  	     * var object = { 'a': 1 };
  	     *
  	     * console.log(_.identity(object) === object);
  	     * // => true
  	     */function identity(value){return value;}/**
  	     * Creates a function that invokes `func` with the arguments of the created
  	     * function. If `func` is a property name, the created function returns the
  	     * property value for a given element. If `func` is an array or object, the
  	     * created function returns `true` for elements that contain the equivalent
  	     * source properties, otherwise it returns `false`.
  	     *
  	     * @static
  	     * @since 4.0.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {*} [func=_.identity] The value to convert to a callback.
  	     * @returns {Function} Returns the callback.
  	     * @example
  	     *
  	     * var users = [
  	     *   { 'user': 'barney', 'age': 36, 'active': true },
  	     *   { 'user': 'fred',   'age': 40, 'active': false }
  	     * ];
  	     *
  	     * // The `_.matches` iteratee shorthand.
  	     * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
  	     * // => [{ 'user': 'barney', 'age': 36, 'active': true }]
  	     *
  	     * // The `_.matchesProperty` iteratee shorthand.
  	     * _.filter(users, _.iteratee(['user', 'fred']));
  	     * // => [{ 'user': 'fred', 'age': 40 }]
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.map(users, _.iteratee('user'));
  	     * // => ['barney', 'fred']
  	     *
  	     * // Create custom iteratee shorthands.
  	     * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
  	     *   return !_.isRegExp(func) ? iteratee(func) : function(string) {
  	     *     return func.test(string);
  	     *   };
  	     * });
  	     *
  	     * _.filter(['abc', 'def'], /ef/);
  	     * // => ['def']
  	     */function iteratee(func){return baseIteratee(typeof func=='function'?func:baseClone(func,CLONE_DEEP_FLAG));}/**
  	     * Creates a function that performs a partial deep comparison between a given
  	     * object and `source`, returning `true` if the given object has equivalent
  	     * property values, else `false`.
  	     *
  	     * **Note:** The created function is equivalent to `_.isMatch` with `source`
  	     * partially applied.
  	     *
  	     * Partial comparisons will match empty array and empty object `source`
  	     * values against any array or object value, respectively. See `_.isEqual`
  	     * for a list of supported value comparisons.
  	     *
  	     * **Note:** Multiple values can be checked by combining several matchers
  	     * using `_.overSome`
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Util
  	     * @param {Object} source The object of property values to match.
  	     * @returns {Function} Returns the new spec function.
  	     * @example
  	     *
  	     * var objects = [
  	     *   { 'a': 1, 'b': 2, 'c': 3 },
  	     *   { 'a': 4, 'b': 5, 'c': 6 }
  	     * ];
  	     *
  	     * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
  	     * // => [{ 'a': 4, 'b': 5, 'c': 6 }]
  	     *
  	     * // Checking for several possible values
  	     * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
  	     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  	     */function matches(source){return baseMatches(baseClone(source,CLONE_DEEP_FLAG));}/**
  	     * Creates a function that performs a partial deep comparison between the
  	     * value at `path` of a given object to `srcValue`, returning `true` if the
  	     * object value is equivalent, else `false`.
  	     *
  	     * **Note:** Partial comparisons will match empty array and empty object
  	     * `srcValue` values against any array or object value, respectively. See
  	     * `_.isEqual` for a list of supported value comparisons.
  	     *
  	     * **Note:** Multiple values can be checked by combining several matchers
  	     * using `_.overSome`
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.2.0
  	     * @category Util
  	     * @param {Array|string} path The path of the property to get.
  	     * @param {*} srcValue The value to match.
  	     * @returns {Function} Returns the new spec function.
  	     * @example
  	     *
  	     * var objects = [
  	     *   { 'a': 1, 'b': 2, 'c': 3 },
  	     *   { 'a': 4, 'b': 5, 'c': 6 }
  	     * ];
  	     *
  	     * _.find(objects, _.matchesProperty('a', 4));
  	     * // => { 'a': 4, 'b': 5, 'c': 6 }
  	     *
  	     * // Checking for several possible values
  	     * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
  	     * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
  	     */function matchesProperty(path,srcValue){return baseMatchesProperty(path,baseClone(srcValue,CLONE_DEEP_FLAG));}/**
  	     * Creates a function that invokes the method at `path` of a given object.
  	     * Any additional arguments are provided to the invoked method.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.7.0
  	     * @category Util
  	     * @param {Array|string} path The path of the method to invoke.
  	     * @param {...*} [args] The arguments to invoke the method with.
  	     * @returns {Function} Returns the new invoker function.
  	     * @example
  	     *
  	     * var objects = [
  	     *   { 'a': { 'b': _.constant(2) } },
  	     *   { 'a': { 'b': _.constant(1) } }
  	     * ];
  	     *
  	     * _.map(objects, _.method('a.b'));
  	     * // => [2, 1]
  	     *
  	     * _.map(objects, _.method(['a', 'b']));
  	     * // => [2, 1]
  	     */var method=baseRest(function(path,args){return function(object){return baseInvoke(object,path,args);};});/**
  	     * The opposite of `_.method`; this method creates a function that invokes
  	     * the method at a given path of `object`. Any additional arguments are
  	     * provided to the invoked method.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.7.0
  	     * @category Util
  	     * @param {Object} object The object to query.
  	     * @param {...*} [args] The arguments to invoke the method with.
  	     * @returns {Function} Returns the new invoker function.
  	     * @example
  	     *
  	     * var array = _.times(3, _.constant),
  	     *     object = { 'a': array, 'b': array, 'c': array };
  	     *
  	     * _.map(['a[2]', 'c[0]'], _.methodOf(object));
  	     * // => [2, 0]
  	     *
  	     * _.map([['a', '2'], ['c', '0']], _.methodOf(object));
  	     * // => [2, 0]
  	     */var methodOf=baseRest(function(object,args){return function(path){return baseInvoke(object,path,args);};});/**
  	     * Adds all own enumerable string keyed function properties of a source
  	     * object to the destination object. If `object` is a function, then methods
  	     * are added to its prototype as well.
  	     *
  	     * **Note:** Use `_.runInContext` to create a pristine `lodash` function to
  	     * avoid conflicts caused by modifying the original.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {Function|Object} [object=lodash] The destination object.
  	     * @param {Object} source The object of functions to add.
  	     * @param {Object} [options={}] The options object.
  	     * @param {boolean} [options.chain=true] Specify whether mixins are chainable.
  	     * @returns {Function|Object} Returns `object`.
  	     * @example
  	     *
  	     * function vowels(string) {
  	     *   return _.filter(string, function(v) {
  	     *     return /[aeiou]/i.test(v);
  	     *   });
  	     * }
  	     *
  	     * _.mixin({ 'vowels': vowels });
  	     * _.vowels('fred');
  	     * // => ['e']
  	     *
  	     * _('fred').vowels().value();
  	     * // => ['e']
  	     *
  	     * _.mixin({ 'vowels': vowels }, { 'chain': false });
  	     * _('fred').vowels();
  	     * // => ['e']
  	     */function mixin(object,source,options){var props=keys(source),methodNames=baseFunctions(source,props);if(options==null&&!(isObject(source)&&(methodNames.length||!props.length))){options=source;source=object;object=this;methodNames=baseFunctions(source,keys(source));}var chain=!(isObject(options)&&'chain'in options)||!!options.chain,isFunc=isFunction(object);arrayEach(methodNames,function(methodName){var func=source[methodName];object[methodName]=func;if(isFunc){object.prototype[methodName]=function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=copyArray(this.__actions__);actions.push({'func':func,'args':arguments,'thisArg':object});result.__chain__=chainAll;return result;}return func.apply(object,arrayPush([this.value()],arguments));};}});return object;}/**
  	     * Reverts the `_` variable to its previous value and returns a reference to
  	     * the `lodash` function.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Util
  	     * @returns {Function} Returns the `lodash` function.
  	     * @example
  	     *
  	     * var lodash = _.noConflict();
  	     */function noConflict(){if(root._===this){root._=oldDash;}return this;}/**
  	     * This method returns `undefined`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.3.0
  	     * @category Util
  	     * @example
  	     *
  	     * _.times(2, _.noop);
  	     * // => [undefined, undefined]
  	     */function noop(){// No operation performed.
  }/**
  	     * Creates a function that gets the argument at index `n`. If `n` is negative,
  	     * the nth argument from the end is returned.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {number} [n=0] The index of the argument to return.
  	     * @returns {Function} Returns the new pass-thru function.
  	     * @example
  	     *
  	     * var func = _.nthArg(1);
  	     * func('a', 'b', 'c', 'd');
  	     * // => 'b'
  	     *
  	     * var func = _.nthArg(-2);
  	     * func('a', 'b', 'c', 'd');
  	     * // => 'c'
  	     */function nthArg(n){n=toInteger(n);return baseRest(function(args){return baseNth(args,n);});}/**
  	     * Creates a function that invokes `iteratees` with the arguments it receives
  	     * and returns their results.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {...(Function|Function[])} [iteratees=[_.identity]]
  	     *  The iteratees to invoke.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * var func = _.over([Math.max, Math.min]);
  	     *
  	     * func(1, 2, 3, 4);
  	     * // => [4, 1]
  	     */var over=createOver(arrayMap);/**
  	     * Creates a function that checks if **all** of the `predicates` return
  	     * truthy when invoked with the arguments it receives.
  	     *
  	     * Following shorthands are possible for providing predicates.
  	     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  	     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {...(Function|Function[])} [predicates=[_.identity]]
  	     *  The predicates to check.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * var func = _.overEvery([Boolean, isFinite]);
  	     *
  	     * func('1');
  	     * // => true
  	     *
  	     * func(null);
  	     * // => false
  	     *
  	     * func(NaN);
  	     * // => false
  	     */var overEvery=createOver(arrayEvery);/**
  	     * Creates a function that checks if **any** of the `predicates` return
  	     * truthy when invoked with the arguments it receives.
  	     *
  	     * Following shorthands are possible for providing predicates.
  	     * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
  	     * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {...(Function|Function[])} [predicates=[_.identity]]
  	     *  The predicates to check.
  	     * @returns {Function} Returns the new function.
  	     * @example
  	     *
  	     * var func = _.overSome([Boolean, isFinite]);
  	     *
  	     * func('1');
  	     * // => true
  	     *
  	     * func(null);
  	     * // => true
  	     *
  	     * func(NaN);
  	     * // => false
  	     *
  	     * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
  	     * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
  	     */var overSome=createOver(arraySome);/**
  	     * Creates a function that returns the value at `path` of a given object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 2.4.0
  	     * @category Util
  	     * @param {Array|string} path The path of the property to get.
  	     * @returns {Function} Returns the new accessor function.
  	     * @example
  	     *
  	     * var objects = [
  	     *   { 'a': { 'b': 2 } },
  	     *   { 'a': { 'b': 1 } }
  	     * ];
  	     *
  	     * _.map(objects, _.property('a.b'));
  	     * // => [2, 1]
  	     *
  	     * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
  	     * // => [1, 2]
  	     */function property(path){return isKey(path)?baseProperty(toKey(path)):basePropertyDeep(path);}/**
  	     * The opposite of `_.property`; this method creates a function that returns
  	     * the value at a given path of `object`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.0.0
  	     * @category Util
  	     * @param {Object} object The object to query.
  	     * @returns {Function} Returns the new accessor function.
  	     * @example
  	     *
  	     * var array = [0, 1, 2],
  	     *     object = { 'a': array, 'b': array, 'c': array };
  	     *
  	     * _.map(['a[2]', 'c[0]'], _.propertyOf(object));
  	     * // => [2, 0]
  	     *
  	     * _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
  	     * // => [2, 0]
  	     */function propertyOf(object){return function(path){return object==null?undefined$1:baseGet(object,path);};}/**
  	     * Creates an array of numbers (positive and/or negative) progressing from
  	     * `start` up to, but not including, `end`. A step of `-1` is used if a negative
  	     * `start` is specified without an `end` or `step`. If `end` is not specified,
  	     * it's set to `start` with `start` then set to `0`.
  	     *
  	     * **Note:** JavaScript follows the IEEE-754 standard for resolving
  	     * floating-point values which can produce unexpected results.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {number} [start=0] The start of the range.
  	     * @param {number} end The end of the range.
  	     * @param {number} [step=1] The value to increment or decrement by.
  	     * @returns {Array} Returns the range of numbers.
  	     * @see _.inRange, _.rangeRight
  	     * @example
  	     *
  	     * _.range(4);
  	     * // => [0, 1, 2, 3]
  	     *
  	     * _.range(-4);
  	     * // => [0, -1, -2, -3]
  	     *
  	     * _.range(1, 5);
  	     * // => [1, 2, 3, 4]
  	     *
  	     * _.range(0, 20, 5);
  	     * // => [0, 5, 10, 15]
  	     *
  	     * _.range(0, -4, -1);
  	     * // => [0, -1, -2, -3]
  	     *
  	     * _.range(1, 4, 0);
  	     * // => [1, 1, 1]
  	     *
  	     * _.range(0);
  	     * // => []
  	     */var range=createRange();/**
  	     * This method is like `_.range` except that it populates values in
  	     * descending order.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {number} [start=0] The start of the range.
  	     * @param {number} end The end of the range.
  	     * @param {number} [step=1] The value to increment or decrement by.
  	     * @returns {Array} Returns the range of numbers.
  	     * @see _.inRange, _.range
  	     * @example
  	     *
  	     * _.rangeRight(4);
  	     * // => [3, 2, 1, 0]
  	     *
  	     * _.rangeRight(-4);
  	     * // => [-3, -2, -1, 0]
  	     *
  	     * _.rangeRight(1, 5);
  	     * // => [4, 3, 2, 1]
  	     *
  	     * _.rangeRight(0, 20, 5);
  	     * // => [15, 10, 5, 0]
  	     *
  	     * _.rangeRight(0, -4, -1);
  	     * // => [-3, -2, -1, 0]
  	     *
  	     * _.rangeRight(1, 4, 0);
  	     * // => [1, 1, 1]
  	     *
  	     * _.rangeRight(0);
  	     * // => []
  	     */var rangeRight=createRange(true);/**
  	     * This method returns a new empty array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.13.0
  	     * @category Util
  	     * @returns {Array} Returns the new empty array.
  	     * @example
  	     *
  	     * var arrays = _.times(2, _.stubArray);
  	     *
  	     * console.log(arrays);
  	     * // => [[], []]
  	     *
  	     * console.log(arrays[0] === arrays[1]);
  	     * // => false
  	     */function stubArray(){return [];}/**
  	     * This method returns `false`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.13.0
  	     * @category Util
  	     * @returns {boolean} Returns `false`.
  	     * @example
  	     *
  	     * _.times(2, _.stubFalse);
  	     * // => [false, false]
  	     */function stubFalse(){return false;}/**
  	     * This method returns a new empty object.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.13.0
  	     * @category Util
  	     * @returns {Object} Returns the new empty object.
  	     * @example
  	     *
  	     * var objects = _.times(2, _.stubObject);
  	     *
  	     * console.log(objects);
  	     * // => [{}, {}]
  	     *
  	     * console.log(objects[0] === objects[1]);
  	     * // => false
  	     */function stubObject(){return {};}/**
  	     * This method returns an empty string.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.13.0
  	     * @category Util
  	     * @returns {string} Returns the empty string.
  	     * @example
  	     *
  	     * _.times(2, _.stubString);
  	     * // => ['', '']
  	     */function stubString(){return '';}/**
  	     * This method returns `true`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.13.0
  	     * @category Util
  	     * @returns {boolean} Returns `true`.
  	     * @example
  	     *
  	     * _.times(2, _.stubTrue);
  	     * // => [true, true]
  	     */function stubTrue(){return true;}/**
  	     * Invokes the iteratee `n` times, returning an array of the results of
  	     * each invocation. The iteratee is invoked with one argument; (index).
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {number} n The number of times to invoke `iteratee`.
  	     * @param {Function} [iteratee=_.identity] The function invoked per iteration.
  	     * @returns {Array} Returns the array of results.
  	     * @example
  	     *
  	     * _.times(3, String);
  	     * // => ['0', '1', '2']
  	     *
  	     *  _.times(4, _.constant(0));
  	     * // => [0, 0, 0, 0]
  	     */function times(n,iteratee){n=toInteger(n);if(n<1||n>MAX_SAFE_INTEGER){return [];}var index=MAX_ARRAY_LENGTH,length=nativeMin(n,MAX_ARRAY_LENGTH);iteratee=getIteratee(iteratee);n-=MAX_ARRAY_LENGTH;var result=baseTimes(length,iteratee);while(++index<n){iteratee(index);}return result;}/**
  	     * Converts `value` to a property path array.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Util
  	     * @param {*} value The value to convert.
  	     * @returns {Array} Returns the new property path array.
  	     * @example
  	     *
  	     * _.toPath('a.b.c');
  	     * // => ['a', 'b', 'c']
  	     *
  	     * _.toPath('a[0].b.c');
  	     * // => ['a', '0', 'b', 'c']
  	     */function toPath(value){if(isArray(value)){return arrayMap(value,toKey);}return isSymbol(value)?[value]:copyArray(stringToPath(toString(value)));}/**
  	     * Generates a unique ID. If `prefix` is given, the ID is appended to it.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Util
  	     * @param {string} [prefix=''] The value to prefix the ID with.
  	     * @returns {string} Returns the unique ID.
  	     * @example
  	     *
  	     * _.uniqueId('contact_');
  	     * // => 'contact_104'
  	     *
  	     * _.uniqueId();
  	     * // => '105'
  	     */function uniqueId(prefix){var id=++idCounter;return toString(prefix)+id;}/*------------------------------------------------------------------------*/ /**
  	     * Adds two numbers.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.4.0
  	     * @category Math
  	     * @param {number} augend The first number in an addition.
  	     * @param {number} addend The second number in an addition.
  	     * @returns {number} Returns the total.
  	     * @example
  	     *
  	     * _.add(6, 4);
  	     * // => 10
  	     */var add=createMathOperation(function(augend,addend){return augend+addend;},0);/**
  	     * Computes `number` rounded up to `precision`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.10.0
  	     * @category Math
  	     * @param {number} number The number to round up.
  	     * @param {number} [precision=0] The precision to round up to.
  	     * @returns {number} Returns the rounded up number.
  	     * @example
  	     *
  	     * _.ceil(4.006);
  	     * // => 5
  	     *
  	     * _.ceil(6.004, 2);
  	     * // => 6.01
  	     *
  	     * _.ceil(6040, -2);
  	     * // => 6100
  	     */var ceil=createRound('ceil');/**
  	     * Divide two numbers.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.7.0
  	     * @category Math
  	     * @param {number} dividend The first number in a division.
  	     * @param {number} divisor The second number in a division.
  	     * @returns {number} Returns the quotient.
  	     * @example
  	     *
  	     * _.divide(6, 4);
  	     * // => 1.5
  	     */var divide=createMathOperation(function(dividend,divisor){return dividend/divisor;},1);/**
  	     * Computes `number` rounded down to `precision`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.10.0
  	     * @category Math
  	     * @param {number} number The number to round down.
  	     * @param {number} [precision=0] The precision to round down to.
  	     * @returns {number} Returns the rounded down number.
  	     * @example
  	     *
  	     * _.floor(4.006);
  	     * // => 4
  	     *
  	     * _.floor(0.046, 2);
  	     * // => 0.04
  	     *
  	     * _.floor(4060, -2);
  	     * // => 4000
  	     */var floor=createRound('floor');/**
  	     * Computes the maximum value of `array`. If `array` is empty or falsey,
  	     * `undefined` is returned.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @returns {*} Returns the maximum value.
  	     * @example
  	     *
  	     * _.max([4, 2, 8, 6]);
  	     * // => 8
  	     *
  	     * _.max([]);
  	     * // => undefined
  	     */function max(array){return array&&array.length?baseExtremum(array,identity,baseGt):undefined$1;}/**
  	     * This method is like `_.max` except that it accepts `iteratee` which is
  	     * invoked for each element in `array` to generate the criterion by which
  	     * the value is ranked. The iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {*} Returns the maximum value.
  	     * @example
  	     *
  	     * var objects = [{ 'n': 1 }, { 'n': 2 }];
  	     *
  	     * _.maxBy(objects, function(o) { return o.n; });
  	     * // => { 'n': 2 }
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.maxBy(objects, 'n');
  	     * // => { 'n': 2 }
  	     */function maxBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseGt):undefined$1;}/**
  	     * Computes the mean of the values in `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @returns {number} Returns the mean.
  	     * @example
  	     *
  	     * _.mean([4, 2, 8, 6]);
  	     * // => 5
  	     */function mean(array){return baseMean(array,identity);}/**
  	     * This method is like `_.mean` except that it accepts `iteratee` which is
  	     * invoked for each element in `array` to generate the value to be averaged.
  	     * The iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.7.0
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {number} Returns the mean.
  	     * @example
  	     *
  	     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  	     *
  	     * _.meanBy(objects, function(o) { return o.n; });
  	     * // => 5
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.meanBy(objects, 'n');
  	     * // => 5
  	     */function meanBy(array,iteratee){return baseMean(array,getIteratee(iteratee,2));}/**
  	     * Computes the minimum value of `array`. If `array` is empty or falsey,
  	     * `undefined` is returned.
  	     *
  	     * @static
  	     * @since 0.1.0
  	     * @memberOf _
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @returns {*} Returns the minimum value.
  	     * @example
  	     *
  	     * _.min([4, 2, 8, 6]);
  	     * // => 2
  	     *
  	     * _.min([]);
  	     * // => undefined
  	     */function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):undefined$1;}/**
  	     * This method is like `_.min` except that it accepts `iteratee` which is
  	     * invoked for each element in `array` to generate the criterion by which
  	     * the value is ranked. The iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {*} Returns the minimum value.
  	     * @example
  	     *
  	     * var objects = [{ 'n': 1 }, { 'n': 2 }];
  	     *
  	     * _.minBy(objects, function(o) { return o.n; });
  	     * // => { 'n': 1 }
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.minBy(objects, 'n');
  	     * // => { 'n': 1 }
  	     */function minBy(array,iteratee){return array&&array.length?baseExtremum(array,getIteratee(iteratee,2),baseLt):undefined$1;}/**
  	     * Multiply two numbers.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.7.0
  	     * @category Math
  	     * @param {number} multiplier The first number in a multiplication.
  	     * @param {number} multiplicand The second number in a multiplication.
  	     * @returns {number} Returns the product.
  	     * @example
  	     *
  	     * _.multiply(6, 4);
  	     * // => 24
  	     */var multiply=createMathOperation(function(multiplier,multiplicand){return multiplier*multiplicand;},1);/**
  	     * Computes `number` rounded to `precision`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.10.0
  	     * @category Math
  	     * @param {number} number The number to round.
  	     * @param {number} [precision=0] The precision to round to.
  	     * @returns {number} Returns the rounded number.
  	     * @example
  	     *
  	     * _.round(4.006);
  	     * // => 4
  	     *
  	     * _.round(4.006, 2);
  	     * // => 4.01
  	     *
  	     * _.round(4060, -2);
  	     * // => 4100
  	     */var round=createRound('round');/**
  	     * Subtract two numbers.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Math
  	     * @param {number} minuend The first number in a subtraction.
  	     * @param {number} subtrahend The second number in a subtraction.
  	     * @returns {number} Returns the difference.
  	     * @example
  	     *
  	     * _.subtract(6, 4);
  	     * // => 2
  	     */var subtract=createMathOperation(function(minuend,subtrahend){return minuend-subtrahend;},0);/**
  	     * Computes the sum of the values in `array`.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 3.4.0
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @returns {number} Returns the sum.
  	     * @example
  	     *
  	     * _.sum([4, 2, 8, 6]);
  	     * // => 20
  	     */function sum(array){return array&&array.length?baseSum(array,identity):0;}/**
  	     * This method is like `_.sum` except that it accepts `iteratee` which is
  	     * invoked for each element in `array` to generate the value to be summed.
  	     * The iteratee is invoked with one argument: (value).
  	     *
  	     * @static
  	     * @memberOf _
  	     * @since 4.0.0
  	     * @category Math
  	     * @param {Array} array The array to iterate over.
  	     * @param {Function} [iteratee=_.identity] The iteratee invoked per element.
  	     * @returns {number} Returns the sum.
  	     * @example
  	     *
  	     * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
  	     *
  	     * _.sumBy(objects, function(o) { return o.n; });
  	     * // => 20
  	     *
  	     * // The `_.property` iteratee shorthand.
  	     * _.sumBy(objects, 'n');
  	     * // => 20
  	     */function sumBy(array,iteratee){return array&&array.length?baseSum(array,getIteratee(iteratee,2)):0;}/*------------------------------------------------------------------------*/ // Add methods that return wrapped values in chain sequences.
  lodash.after=after;lodash.ary=ary;lodash.assign=assign;lodash.assignIn=assignIn;lodash.assignInWith=assignInWith;lodash.assignWith=assignWith;lodash.at=at;lodash.before=before;lodash.bind=bind;lodash.bindAll=bindAll;lodash.bindKey=bindKey;lodash.castArray=castArray;lodash.chain=chain;lodash.chunk=chunk;lodash.compact=compact;lodash.concat=concat;lodash.cond=cond;lodash.conforms=conforms;lodash.constant=constant;lodash.countBy=countBy;lodash.create=create;lodash.curry=curry;lodash.curryRight=curryRight;lodash.debounce=debounce;lodash.defaults=defaults;lodash.defaultsDeep=defaultsDeep;lodash.defer=defer;lodash.delay=delay;lodash.difference=difference;lodash.differenceBy=differenceBy;lodash.differenceWith=differenceWith;lodash.drop=drop;lodash.dropRight=dropRight;lodash.dropRightWhile=dropRightWhile;lodash.dropWhile=dropWhile;lodash.fill=fill;lodash.filter=filter;lodash.flatMap=flatMap;lodash.flatMapDeep=flatMapDeep;lodash.flatMapDepth=flatMapDepth;lodash.flatten=flatten;lodash.flattenDeep=flattenDeep;lodash.flattenDepth=flattenDepth;lodash.flip=flip;lodash.flow=flow;lodash.flowRight=flowRight;lodash.fromPairs=fromPairs;lodash.functions=functions;lodash.functionsIn=functionsIn;lodash.groupBy=groupBy;lodash.initial=initial;lodash.intersection=intersection;lodash.intersectionBy=intersectionBy;lodash.intersectionWith=intersectionWith;lodash.invert=invert;lodash.invertBy=invertBy;lodash.invokeMap=invokeMap;lodash.iteratee=iteratee;lodash.keyBy=keyBy;lodash.keys=keys;lodash.keysIn=keysIn;lodash.map=map;lodash.mapKeys=mapKeys;lodash.mapValues=mapValues;lodash.matches=matches;lodash.matchesProperty=matchesProperty;lodash.memoize=memoize;lodash.merge=merge;lodash.mergeWith=mergeWith;lodash.method=method;lodash.methodOf=methodOf;lodash.mixin=mixin;lodash.negate=negate;lodash.nthArg=nthArg;lodash.omit=omit;lodash.omitBy=omitBy;lodash.once=once;lodash.orderBy=orderBy;lodash.over=over;lodash.overArgs=overArgs;lodash.overEvery=overEvery;lodash.overSome=overSome;lodash.partial=partial;lodash.partialRight=partialRight;lodash.partition=partition;lodash.pick=pick;lodash.pickBy=pickBy;lodash.property=property;lodash.propertyOf=propertyOf;lodash.pull=pull;lodash.pullAll=pullAll;lodash.pullAllBy=pullAllBy;lodash.pullAllWith=pullAllWith;lodash.pullAt=pullAt;lodash.range=range;lodash.rangeRight=rangeRight;lodash.rearg=rearg;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.reverse=reverse;lodash.sampleSize=sampleSize;lodash.set=set;lodash.setWith=setWith;lodash.shuffle=shuffle;lodash.slice=slice;lodash.sortBy=sortBy;lodash.sortedUniq=sortedUniq;lodash.sortedUniqBy=sortedUniqBy;lodash.split=split;lodash.spread=spread;lodash.tail=tail;lodash.take=take;lodash.takeRight=takeRight;lodash.takeRightWhile=takeRightWhile;lodash.takeWhile=takeWhile;lodash.tap=tap;lodash.throttle=throttle;lodash.thru=thru;lodash.toArray=toArray;lodash.toPairs=toPairs;lodash.toPairsIn=toPairsIn;lodash.toPath=toPath;lodash.toPlainObject=toPlainObject;lodash.transform=transform;lodash.unary=unary;lodash.union=union;lodash.unionBy=unionBy;lodash.unionWith=unionWith;lodash.uniq=uniq;lodash.uniqBy=uniqBy;lodash.uniqWith=uniqWith;lodash.unset=unset;lodash.unzip=unzip;lodash.unzipWith=unzipWith;lodash.update=update;lodash.updateWith=updateWith;lodash.values=values;lodash.valuesIn=valuesIn;lodash.without=without;lodash.words=words;lodash.wrap=wrap;lodash.xor=xor;lodash.xorBy=xorBy;lodash.xorWith=xorWith;lodash.zip=zip;lodash.zipObject=zipObject;lodash.zipObjectDeep=zipObjectDeep;lodash.zipWith=zipWith;// Add aliases.
  lodash.entries=toPairs;lodash.entriesIn=toPairsIn;lodash.extend=assignIn;lodash.extendWith=assignInWith;// Add methods to `lodash.prototype`.
  mixin(lodash,lodash);/*------------------------------------------------------------------------*/ // Add methods that return unwrapped values in chain sequences.
  lodash.add=add;lodash.attempt=attempt;lodash.camelCase=camelCase;lodash.capitalize=capitalize;lodash.ceil=ceil;lodash.clamp=clamp;lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.cloneDeepWith=cloneDeepWith;lodash.cloneWith=cloneWith;lodash.conformsTo=conformsTo;lodash.deburr=deburr;lodash.defaultTo=defaultTo;lodash.divide=divide;lodash.endsWith=endsWith;lodash.eq=eq;lodash.escape=escape;lodash.escapeRegExp=escapeRegExp;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.floor=floor;lodash.forEach=forEach;lodash.forEachRight=forEachRight;lodash.forIn=forIn;lodash.forInRight=forInRight;lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.get=get;lodash.gt=gt;lodash.gte=gte;lodash.has=has;lodash.hasIn=hasIn;lodash.head=head;lodash.identity=identity;lodash.includes=includes;lodash.indexOf=indexOf;lodash.inRange=inRange;lodash.invoke=invoke;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isArrayBuffer=isArrayBuffer;lodash.isArrayLike=isArrayLike;lodash.isArrayLikeObject=isArrayLikeObject;lodash.isBoolean=isBoolean;lodash.isBuffer=isBuffer;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isEqualWith=isEqualWith;lodash.isError=isError;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isInteger=isInteger;lodash.isLength=isLength;lodash.isMap=isMap;lodash.isMatch=isMatch;lodash.isMatchWith=isMatchWith;lodash.isNaN=isNaN;lodash.isNative=isNative;lodash.isNil=isNil;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isObjectLike=isObjectLike;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isSafeInteger=isSafeInteger;lodash.isSet=isSet;lodash.isString=isString;lodash.isSymbol=isSymbol;lodash.isTypedArray=isTypedArray;lodash.isUndefined=isUndefined;lodash.isWeakMap=isWeakMap;lodash.isWeakSet=isWeakSet;lodash.join=join;lodash.kebabCase=kebabCase;lodash.last=last;lodash.lastIndexOf=lastIndexOf;lodash.lowerCase=lowerCase;lodash.lowerFirst=lowerFirst;lodash.lt=lt;lodash.lte=lte;lodash.max=max;lodash.maxBy=maxBy;lodash.mean=mean;lodash.meanBy=meanBy;lodash.min=min;lodash.minBy=minBy;lodash.stubArray=stubArray;lodash.stubFalse=stubFalse;lodash.stubObject=stubObject;lodash.stubString=stubString;lodash.stubTrue=stubTrue;lodash.multiply=multiply;lodash.nth=nth;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.pad=pad;lodash.padEnd=padEnd;lodash.padStart=padStart;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.repeat=repeat;lodash.replace=replace;lodash.result=result;lodash.round=round;lodash.runInContext=runInContext;lodash.sample=sample;lodash.size=size;lodash.snakeCase=snakeCase;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.sortedIndexBy=sortedIndexBy;lodash.sortedIndexOf=sortedIndexOf;lodash.sortedLastIndex=sortedLastIndex;lodash.sortedLastIndexBy=sortedLastIndexBy;lodash.sortedLastIndexOf=sortedLastIndexOf;lodash.startCase=startCase;lodash.startsWith=startsWith;lodash.subtract=subtract;lodash.sum=sum;lodash.sumBy=sumBy;lodash.template=template;lodash.times=times;lodash.toFinite=toFinite;lodash.toInteger=toInteger;lodash.toLength=toLength;lodash.toLower=toLower;lodash.toNumber=toNumber;lodash.toSafeInteger=toSafeInteger;lodash.toString=toString;lodash.toUpper=toUpper;lodash.trim=trim;lodash.trimEnd=trimEnd;lodash.trimStart=trimStart;lodash.truncate=truncate;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.upperCase=upperCase;lodash.upperFirst=upperFirst;// Add aliases.
  lodash.each=forEach;lodash.eachRight=forEachRight;lodash.first=head;mixin(lodash,function(){var source={};baseForOwn(lodash,function(func,methodName){if(!hasOwnProperty.call(lodash.prototype,methodName)){source[methodName]=func;}});return source;}(),{'chain':false});/*------------------------------------------------------------------------*/ /**
  	     * The semantic version number.
  	     *
  	     * @static
  	     * @memberOf _
  	     * @type {string}
  	     */lodash.VERSION=VERSION;// Assign default placeholders.
  arrayEach(['bind','bindKey','curry','curryRight','partial','partialRight'],function(methodName){lodash[methodName].placeholder=lodash;});// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
  arrayEach(['drop','take'],function(methodName,index){LazyWrapper.prototype[methodName]=function(n){n=n===undefined$1?1:nativeMax(toInteger(n),0);var result=this.__filtered__&&!index?new LazyWrapper(this):this.clone();if(result.__filtered__){result.__takeCount__=nativeMin(n,result.__takeCount__);}else {result.__views__.push({'size':nativeMin(n,MAX_ARRAY_LENGTH),'type':methodName+(result.__dir__<0?'Right':'')});}return result;};LazyWrapper.prototype[methodName+'Right']=function(n){return this.reverse()[methodName](n).reverse();};});// Add `LazyWrapper` methods that accept an `iteratee` value.
  arrayEach(['filter','map','takeWhile'],function(methodName,index){var type=index+1,isFilter=type==LAZY_FILTER_FLAG||type==LAZY_WHILE_FLAG;LazyWrapper.prototype[methodName]=function(iteratee){var result=this.clone();result.__iteratees__.push({'iteratee':getIteratee(iteratee,3),'type':type});result.__filtered__=result.__filtered__||isFilter;return result;};});// Add `LazyWrapper` methods for `_.head` and `_.last`.
  arrayEach(['head','last'],function(methodName,index){var takeName='take'+(index?'Right':'');LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0];};});// Add `LazyWrapper` methods for `_.initial` and `_.tail`.
  arrayEach(['initial','tail'],function(methodName,index){var dropName='drop'+(index?'':'Right');LazyWrapper.prototype[methodName]=function(){return this.__filtered__?new LazyWrapper(this):this[dropName](1);};});LazyWrapper.prototype.compact=function(){return this.filter(identity);};LazyWrapper.prototype.find=function(predicate){return this.filter(predicate).head();};LazyWrapper.prototype.findLast=function(predicate){return this.reverse().find(predicate);};LazyWrapper.prototype.invokeMap=baseRest(function(path,args){if(typeof path=='function'){return new LazyWrapper(this);}return this.map(function(value){return baseInvoke(value,path,args);});});LazyWrapper.prototype.reject=function(predicate){return this.filter(negate(getIteratee(predicate)));};LazyWrapper.prototype.slice=function(start,end){start=toInteger(start);var result=this;if(result.__filtered__&&(start>0||end<0)){return new LazyWrapper(result);}if(start<0){result=result.takeRight(-start);}else if(start){result=result.drop(start);}if(end!==undefined$1){end=toInteger(end);result=end<0?result.dropRight(-end):result.take(end-start);}return result;};LazyWrapper.prototype.takeRightWhile=function(predicate){return this.reverse().takeWhile(predicate).reverse();};LazyWrapper.prototype.toArray=function(){return this.take(MAX_ARRAY_LENGTH);};// Add `LazyWrapper` methods to `lodash.prototype`.
  baseForOwn(LazyWrapper.prototype,function(func,methodName){var checkIteratee=/^(?:filter|find|map|reject)|While$/.test(methodName),isTaker=/^(?:head|last)$/.test(methodName),lodashFunc=lodash[isTaker?'take'+(methodName=='last'?'Right':''):methodName],retUnwrapped=isTaker||/^find/.test(methodName);if(!lodashFunc){return;}lodash.prototype[methodName]=function(){var value=this.__wrapped__,args=isTaker?[1]:arguments,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value);var interceptor=function(value){var result=lodashFunc.apply(lodash,arrayPush([value],args));return isTaker&&chainAll?result[0]:result;};if(useLazy&&checkIteratee&&typeof iteratee=='function'&&iteratee.length!=1){// Avoid lazy use if the iteratee has a "length" value other than `1`.
  isLazy=useLazy=false;}var chainAll=this.__chain__,isHybrid=!!this.__actions__.length,isUnwrapped=retUnwrapped&&!chainAll,onlyLazy=isLazy&&!isHybrid;if(!retUnwrapped&&useLazy){value=onlyLazy?value:new LazyWrapper(this);var result=func.apply(value,args);result.__actions__.push({'func':thru,'args':[interceptor],'thisArg':undefined$1});return new LodashWrapper(result,chainAll);}if(isUnwrapped&&onlyLazy){return func.apply(this,args);}result=this.thru(interceptor);return isUnwrapped?isTaker?result.value()[0]:result.value():result;};});// Add `Array` methods to `lodash.prototype`.
  arrayEach(['pop','push','shift','sort','splice','unshift'],function(methodName){var func=arrayProto[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?'tap':'thru',retUnwrapped=/^(?:pop|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){var value=this.value();return func.apply(isArray(value)?value:[],args);}return this[chainName](function(value){return func.apply(isArray(value)?value:[],args);});};});// Map minified method names to their real names.
  baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name+'';if(!hasOwnProperty.call(realNames,key)){realNames[key]=[];}realNames[key].push({'name':methodName,'func':lodashFunc});}});realNames[createHybrid(undefined$1,WRAP_BIND_KEY_FLAG).name]=[{'name':'wrapper','func':undefined$1}];// Add methods to `LazyWrapper`.
  LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;// Add chain sequence methods to the `lodash` wrapper.
  lodash.prototype.at=wrapperAt;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.next=wrapperNext;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;// Add lazy aliases.
  lodash.prototype.first=lodash.prototype.head;if(symIterator){lodash.prototype[symIterator]=wrapperToIterator;}return lodash;};/*--------------------------------------------------------------------------*/ // Export lodash.
  var _=runInContext();// Some AMD build optimizers, like r.js, check for condition patterns like:
  if(freeModule){// Export for Node.js.
  (freeModule.exports=_)._=_;// Export for CommonJS support.
  freeExports._=_;}else {// Export to the global object.
  root._=_;}}).call(commonjsGlobal);})(lodash,lodash.exports);var lodashExports=lodash.exports;var _ = /*@__PURE__*/getDefaultExportFromCjs(lodashExports);

  /**
   * @class Status
   * @classdesc 播放器状态类
   * @description 提供播放器状态提示
   * 
   * @private
   * 
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer播放器对象 
   * @param {String} id - 播放器id
   * @example
   * var status = new Status(EZUIKitPlayer, "id");
   * status.loadingStart("id");
   * status.loadingStop("id");
   */
  var Status = /*#__PURE__*/function () {
    function Status(jSPlugin, id) {
      _classCallCheck$1(this, Status);
      this.id = id;
      this.jSPlugin = jSPlugin;
      this.state = {
        play: false,
        loading: false,
        text: ''
      };
      this.loadingSetText = this.loadingSetText;
    }
    _createClass$1(Status, [{
      key: "toString",
      value: function toString() {
        return "".concat(this.coreX, "-").concat(this.coreY);
      }

      /**
       * @description 设置播放器状态
       * @param {object} options 
       * @param {boolean=} options.paly 
       * @param {boolean=} options.loading  
       * @param {string=} options.text 
       */
    }, {
      key: "setPlayStatus",
      value: function setPlayStatus(options) {
        this.state = Object.assign(this.state, options);
      }
    }, {
      key: "loadingStart",
      value: function loadingStart(id) {
        var oS = document.createElement('style');
        document.getElementsByTagName("head")[0].appendChild(oS);
        oS.innerHTML = '@keyframes antRotate {to {transform: rotate(400deg);transform-origin:50% 50%;}} .loading {display: inline-block;z-index: 1000;-webkit-animation: antRotate 1s infinite linear;animation: antRotate 1s infinite linear;}';
        var domId = id;
        var domElement = document.getElementById(domId);
        var windowWidth = domElement.offsetWidth;
        var windowHeight = domElement.offsetHeight;
        var offsetTop = 0; //`calc(50% - ${(domElement.offsetTop / 2)}px)`;//domElement.offsetTop; // `calc(50% - ${domElement.offsetTop / 2}px)`
        var offsetLeft = domElement.offsetLeft;
        if (this.jSPlugin.isInspect && this.jSPlugin.Theme.inspectMode == 'map') {
          offsetLeft = 0;
        }
        // 先执行清空loading
        if (document.getElementById("".concat(id, "-loading-id-0"))) {
          document.getElementById("".concat(id, "-loading-id-0")).parentNode.removeChild(document.getElementById("".concat(id, "-loading-id-0")));
        }
        console.log('loading-id-0---------------');
        var loadingContainerDOM = document.createElement('div');
        loadingContainerDOM.setAttribute('id', "".concat(id, "-loading-id-0"));
        var style = 'position:absolute;outline:none;pointer-events:none;';
        console.log("this.jSPlugin", this.jSPlugin);
        style += 'width: 100%;background-size: cover; background-repeat:no-repeat;';
        style += 'height: 100%;';
        style += 'top:' + offsetTop + ';';
        style += 'left:' + offsetLeft + 'px;';
        loadingContainerDOM.setAttribute('style', style);
        loadingContainerDOM.style.height = windowHeight;
        loadingContainerDOM.setAttribute('class', 'loading-container');
        domElement.style.position = 'relative';
        if (this.jSPlugin.isInspect && this.jSPlugin.Theme.inspectMode == 'map') {
          domElement.style.position = 'absolute';
        }
        domElement.appendChild(loadingContainerDOM);
        var splitBasis = 1;
        var loadingItemContainer = document.createElement('div');
        var loadingStatusDOM = document.createElement('div');
        loadingItemContainer.setAttribute('class', 'loading-item');
        loadingItemContainer.setAttribute('id', "".concat(id, "-loading-item-0"));
        var style = 'display:inline-flex;pointer-events:none;flex-direction:column;justify-content:center;align-items: center;width:100%;height:' + windowHeight + 'px;outline:none;vertical-align: top;position:absolute;';
        style += 'left:' + calLoadingPostion(windowHeight, windowWidth, splitBasis, 0).left + 'px;';
        style += 'top:' + calLoadingPostion(windowHeight, windowWidth, splitBasis, 0).top + 'px;';
        loadingItemContainer.setAttribute('style', style);
        function calLoadingPostion(windowHeight, windowWidth, splitBasis, i) {
          var top = parseInt(i / splitBasis, 10) * (windowHeight / splitBasis);
          var left = i % splitBasis * (windowWidth / splitBasis);
          return {
            top: top,
            left: left
          };
        }
        var scaleWidth = 1;
        var loadingDOM = document.createElement('div');
        loadingStatusDOM.innerHTML = "";
        loadingStatusDOM.style.color = "#fff";
        loadingDOM.setAttribute('class', 'loading');
        loadingDOM.setAttribute('id', 'loading-icon');
        var loading = '<svg t="1567069979438" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2399" width="24" height="24"><path d="M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z" fill="#ffffff" p-id="2400"></path></svg>';
        if (!this.jSPlugin.isMobile && !!this.jSPlugin.isCall) {
          scaleWidth = this.jSPlugin.width / 1024;
          loading = "<svg t=\"1567069979438\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2399\" width=\"".concat(40 * scaleWidth, "\" height=\"").concat(40 * scaleWidth, "\"><path d=\"M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z\" fill=\"#ffffff\" p-id=\"2400\"></path></svg>");
        }
        loadingDOM.innerHTML = loading;
        loadingItemContainer.appendChild(loadingDOM);
        loadingItemContainer.appendChild(loadingStatusDOM);
        loadingContainerDOM.appendChild(loadingItemContainer);
      }

      /**
       * @description 清除loading
       * @param {string} id 
       */
    }, {
      key: "loadingStop",
      value: function loadingStop(id) {
        var loadingItemContainerDOM = document.getElementById("".concat(id, "-loading-item-0"));
        if (loadingItemContainerDOM && document.getElementById('loading-icon')) {
          loadingItemContainerDOM.removeChild(document.getElementById('loading-icon'));
        }
      }

      /**
       * @description loading 设置提示语
       * @param {object} opt  - 提示语设置
       * @param {Node} opt.text - 提示语 
       * @param {number} opt.type - 类型 1:loading 2:带按钮提示 
       * @param {number} opt.delayClear - 延迟清除时间 ms
       */
    }, {
      key: "loadingSetText",
      value: function loadingSetText(opt) {
        var _this = this;
        this.loadingClearText();
        if (document.getElementById("".concat(this.id, "-loading-item-0"))) {
          var loadingItemContainer = document.getElementById("".concat(this.id, "-loading-item-0"));
          var textElement = document.getElementById("".concat(this.id, "-loading-item-0")).childNodes[1];
          if (!textElement) {
            loadingItemContainer.style.height = '100%';
            textElement = document.createElement('div');
            textElement.innerHTML = opt.text;
            loadingItemContainer.appendChild(textElement);
          }
          textElement.id = "".concat(this.id, "-loading-item-txt");
          textElement.innerHTML = opt.text;
          textElement.style.fontSize = "14px";
          if (!this.jSPlugin.isMobile && !!this.jSPlugin.isCall) {
            var scaleWidth = this.jSPlugin.width / 1024;
            textElement.style.fontSize = "".concat(28 * scaleWidth, "px");
            textElement.style.marginTop = "16px";
          }
          if (!!this.jSPlugin.isCall && opt.type == 1) {
            var textElementTmd = document.getElementById("".concat(this.id, "-loading-item-txt"));
            var textElementIcon = document.createElement('div');
            textElementIcon.style = "margin-bottom: 8px;width:24px;height:24px;";
            textElementIcon.innerHTML = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n            <title></title>\n            <g id=\"gantan\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                <g id=\"Group\">\n                    <polygon id=\"Path\" points=\"0 0 24.0000001 0 24.0000001 24.0000001 0 24.0000001\"></polygon>\n                    <path d=\"M12,2.25000001 C17.2781739,2.25000001 21.5934661,6.44926243 21.746085,11.7237735 L21.746085,11.7237735 L21.75,12 C21.75,17.2781739 17.5507376,21.5934661 12.2762266,21.746085 L12.2762266,21.746085 L12,21.75 C6.72182614,21.75 2.40653397,17.5507376 2.25391507,12.2762266 L2.25391507,12.2762266 L2.25000001,12 C2.25000001,6.72182617 6.44926245,2.40653397 11.7237735,2.25391507 L11.7237735,2.25391507 Z M12,3.75000001 L11.7563186,3.75352261 C7.3032926,3.88243816 3.74992165,7.53391173 3.74992165,11.9891583 L3.74992165,11.9891583 L3.75352261,12.2436814 C3.88243816,16.6967075 7.5339117,20.2500784 11.9891583,20.2500784 L11.9891583,20.2500784 L12.2436814,20.2464774 C16.6967075,20.1175619 20.2500784,16.4660884 20.2500784,12.0108417 L20.2500784,12.0108417 L20.2464774,11.7563186 C20.1175619,7.30329258 16.4660883,3.75000001 12,3.75000001 L12,3.75000001 Z M11.999,15.2500001 L12.1156933,15.25672 C12.6133664,15.3144204 12.999993,15.7366564 12.999993,16.2500001 C12.999993,16.8022157 12.5522116,17.2500001 11.999993,17.2500001 C11.4477844,17.2500001 10.999993,16.8022116 11.0000197,16.2554347 C10.9962666,15.7375014 11.3873731,15.3105316 11.8897485,15.2559043 L11.999,15.2500001 Z M12,6.75000003 C12.3796958,6.75000003 12.693491,7.03215391 12.7431534,7.39822947 L12.75,7.50000003 L12.75,12.5 C12.75,12.9142136 12.4142136,13.25 12,13.25 C11.6203043,13.25 11.3065091,12.9678461 11.2568467,12.6017706 L11.25,12.5 L11.25,7.50000003 C11.25,7.08578647 11.5857865,6.75000003 12,6.75000003 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                </g>\n            </g>\n        </svg>";
            loadingItemContainer.insertBefore(textElementIcon, textElementTmd);
          }
          textElement.style.color = opt.color || "#FFFFFF";
          this.state.text = opt.text;
          if (opt.delayClear) {
            //传入delayClear后在指定时间后清除提示语
            var timer = setTimeout(function () {
              _this.loadingClearText();
              clearTimeout(timer);
            }, parseInt(opt.delayClear));
          }
        }
      }

      // 带按钮提示
    }, {
      key: "loadingSetTextWithBtn",
      value: function loadingSetTextWithBtn(opt) {
        var _this2 = this;
        this.loadingClear();
        console.log(this.jSPlugin);
        var themeDataTmd = !!this.jSPlugin.Theme.call && this.jSPlugin.Theme.call.themeData || null;
        if (!!themeDataTmd && (themeDataTmd.customConfig.bellPoster === 0 || this.jSPlugin.Theme.call.bellStatus === 'onCall') || opt.mask) {
          //呼叫模板，有封面响铃状态不加蒙版颜色
          if (document.getElementById("".concat(this.id, "-loading-id-0"))) {
            document.getElementById("".concat(this.id, "-loading-id-0")).style.background = opt.maskStyle || 'rgba(0,0,0,0.7)';
          }
        }
        var loadingItemContainer = document.getElementById("".concat(this.id, "-loading-item-0"));
        if (loadingItemContainer) {
          loadingItemContainer.style.height = '100%';
          loadingItemContainer.style['pointer-events'] = 'auto';
          var textElement = document.createElement('div');
          textElement.id = "".concat(this.id, "-loading-item-txt");
          textElement.innerHTML = opt.text;
          textElement.title = opt.text;
          textElement.style.color = opt.color || "#FFFFFF";
          if (!opt.isMobile) {
            var scaleWidth = this.jSPlugin.width / 1024;
            var txtSize = 28 * scaleWidth;
            textElement.style.fontSize = txtSize + "px";
          } else {
            var _scaleWidth = this.jSPlugin.width / 375;
            var _txtSize = 14 * _scaleWidth;
            textElement.style.fontSize = _txtSize + "px";
          }
          if (this.jSPlugin.isInspect) {
            textElement.style = "text-align: center; color: white; font-size: 14px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis; width: 70%;";
          }
          loadingItemContainer.appendChild(textElement);
          if (opt.type && opt.type == 2) {
            var iconMargin = 8;
            var iconWidth = 24;
            if (!opt.isMobile) {
              var _scaleWidth2 = this.jSPlugin.width / 1024;
              iconMargin = _scaleWidth2 < 1 ? 16 * _scaleWidth2 : 16;
              iconWidth = 40 * _scaleWidth2;
            } else {
              var _scaleWidth3 = this.jSPlugin.width / 375;
              iconWidth = 24 * _scaleWidth3;
            }
            var textElementTmd = document.getElementById("".concat(this.id, "-loading-item-txt"));
            var textElementIcon = document.createElement('div');
            textElementIcon.style = "margin-bottom: ".concat(iconMargin, "px;width:").concat(iconWidth, "px;height:").concat(iconWidth, "px;");
            textElementIcon.innerHTML = "<svg width=\"".concat(iconWidth, "px\" height=\"").concat(iconWidth, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n            <title></title>\n            <g id=\"gantan\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                <g id=\"Group\">\n                    <polygon id=\"Path\" points=\"0 0 24.0000001 0 24.0000001 24.0000001 0 24.0000001\"></polygon>\n                    <path d=\"M12,2.25000001 C17.2781739,2.25000001 21.5934661,6.44926243 21.746085,11.7237735 L21.746085,11.7237735 L21.75,12 C21.75,17.2781739 17.5507376,21.5934661 12.2762266,21.746085 L12.2762266,21.746085 L12,21.75 C6.72182614,21.75 2.40653397,17.5507376 2.25391507,12.2762266 L2.25391507,12.2762266 L2.25000001,12 C2.25000001,6.72182617 6.44926245,2.40653397 11.7237735,2.25391507 L11.7237735,2.25391507 Z M12,3.75000001 L11.7563186,3.75352261 C7.3032926,3.88243816 3.74992165,7.53391173 3.74992165,11.9891583 L3.74992165,11.9891583 L3.75352261,12.2436814 C3.88243816,16.6967075 7.5339117,20.2500784 11.9891583,20.2500784 L11.9891583,20.2500784 L12.2436814,20.2464774 C16.6967075,20.1175619 20.2500784,16.4660884 20.2500784,12.0108417 L20.2500784,12.0108417 L20.2464774,11.7563186 C20.1175619,7.30329258 16.4660883,3.75000001 12,3.75000001 L12,3.75000001 Z M11.999,15.2500001 L12.1156933,15.25672 C12.6133664,15.3144204 12.999993,15.7366564 12.999993,16.2500001 C12.999993,16.8022157 12.5522116,17.2500001 11.999993,17.2500001 C11.4477844,17.2500001 10.999993,16.8022116 11.0000197,16.2554347 C10.9962666,15.7375014 11.3873731,15.3105316 11.8897485,15.2559043 L11.999,15.2500001 Z M12,6.75000003 C12.3796958,6.75000003 12.693491,7.03215391 12.7431534,7.39822947 L12.75,7.50000003 L12.75,12.5 C12.75,12.9142136 12.4142136,13.25 12,13.25 C11.6203043,13.25 11.3065091,12.9678461 11.2568467,12.6017706 L11.25,12.5 L11.25,7.50000003 C11.25,7.08578647 11.5857865,6.75000003 12,6.75000003 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                </g>\n            </g>\n        </svg>");
            loadingItemContainer.insertBefore(textElementIcon, textElementTmd);
          } else {
            var textElementBtn = document.createElement('div');
            textElementBtn.id = "".concat(this.id, "-loading-item-btn-wrap");
            textElementBtn.innerHTML = "\n          <div id=\"".concat(this.id, "-loading-item-btn\" style=\"display: ").concat(this.jSPlugin.isInspect && this.jSPlugin.Theme.inspectMode == 'map' ? 'none' : 'block', " \">").concat(opt.btnName, "</div>\n          <svg id=\"").concat(this.id, "-loading-item-btn-svg\" style=\"display: ").concat(this.jSPlugin.isInspect && this.jSPlugin.Theme.inspectMode == 'map' ? 'block' : 'none', " ; margin: 0 auto\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"13\" height=\"13\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n            <path fill=\"#fff\" d=\"M960 416V192l-73.056 73.056a447.712 447.712 0 0 0-373.6-201.088C265.92 63.968 65.312 264.544 65.312 512S265.92 960.032 513.344 960.032a448.064 448.064 0 0 0 415.232-279.488 38.368 38.368 0 1 0-71.136-28.896 371.36 371.36 0 0 1-344.096 231.584C308.32 883.232 142.112 717.024 142.112 512S308.32 140.768 513.344 140.768c132.448 0 251.936 70.08 318.016 179.84L736 416h224z\"></path>\n          </svg>\n        ");
            if (opt.isMobile) {
              if (opt.type == 1) {
                textElementBtn.style = "color:white;width:100px;height:30px;border-radius: 10px;background: rgba(255,255,255,0.25);text-align:center;line-height:30px;margin-top:9px;font-size:14px;-webkit-tap-highlight-color: transparent;";
              } else {
                textElementBtn.style = "border: 1px solid rgba(204,204,204,1);color:white;width:80px;height:24px;border-radius: 12px;background: rgba(255,255,255,0.1);text-align:center;line-height:24px;margin-top:20px;font-size:12px;-webkit-tap-highlight-color: transparent;";
              }
            } else {
              var _scaleWidth4 = this.jSPlugin.width / 1024;
              textElementBtn.style = "color:#648FFC;margin-top:16px;cursor: pointer;font-size:".concat(24 * _scaleWidth4, "px;");
              if (this.jSPlugin.isInspect && this.jSPlugin.Theme.inspectMode == 'video') {
                textElementBtn.style = "border: 1px solid rgba(255,255,255,1);color:white; cursor: pointer;text-align: center;width:80px;height:32px;border-radius:2px; text-align:center;line-height:32px;margin-top:16px;font-size:14px;-webkit-tap-highlight-color: transparent;";
              }
            }
            loadingItemContainer.appendChild(textElementBtn);
            if (opt.isMobile && opt.type == 1) {
              var _textElementTmd = document.getElementById("".concat(this.id, "-loading-item-txt"));
              var textElementIcon = document.createElement('div');
              textElementIcon.style = "margin-bottom: 8px;width:24px;height:24px;";
              textElementIcon.innerHTML = "<svg width=\"24px\" height=\"24px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <title></title>\n              <g id=\"gantan\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                  <g id=\"Group\">\n                      <polygon id=\"Path\" points=\"0 0 24.0000001 0 24.0000001 24.0000001 0 24.0000001\"></polygon>\n                      <path d=\"M12,2.25000001 C17.2781739,2.25000001 21.5934661,6.44926243 21.746085,11.7237735 L21.746085,11.7237735 L21.75,12 C21.75,17.2781739 17.5507376,21.5934661 12.2762266,21.746085 L12.2762266,21.746085 L12,21.75 C6.72182614,21.75 2.40653397,17.5507376 2.25391507,12.2762266 L2.25391507,12.2762266 L2.25000001,12 C2.25000001,6.72182617 6.44926245,2.40653397 11.7237735,2.25391507 L11.7237735,2.25391507 Z M12,3.75000001 L11.7563186,3.75352261 C7.3032926,3.88243816 3.74992165,7.53391173 3.74992165,11.9891583 L3.74992165,11.9891583 L3.75352261,12.2436814 C3.88243816,16.6967075 7.5339117,20.2500784 11.9891583,20.2500784 L11.9891583,20.2500784 L12.2436814,20.2464774 C16.6967075,20.1175619 20.2500784,16.4660884 20.2500784,12.0108417 L20.2500784,12.0108417 L20.2464774,11.7563186 C20.1175619,7.30329258 16.4660883,3.75000001 12,3.75000001 L12,3.75000001 Z M11.999,15.2500001 L12.1156933,15.25672 C12.6133664,15.3144204 12.999993,15.7366564 12.999993,16.2500001 C12.999993,16.8022157 12.5522116,17.2500001 11.999993,17.2500001 C11.4477844,17.2500001 10.999993,16.8022116 11.0000197,16.2554347 C10.9962666,15.7375014 11.3873731,15.3105316 11.8897485,15.2559043 L11.999,15.2500001 Z M12,6.75000003 C12.3796958,6.75000003 12.693491,7.03215391 12.7431534,7.39822947 L12.75,7.50000003 L12.75,12.5 C12.75,12.9142136 12.4142136,13.25 12,13.25 C11.6203043,13.25 11.3065091,12.9678461 11.2568467,12.6017706 L11.25,12.5 L11.25,7.50000003 C11.25,7.08578647 11.5857865,6.75000003 12,6.75000003 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                  </g>\n              </g>\n          </svg>";
              loadingItemContainer.insertBefore(textElementIcon, _textElementTmd);
            }
            if (document.getElementById("".concat(this.id, "-loading-item-btn-wrap"))) {
              document.getElementById("".concat(this.id, "-loading-item-btn-wrap")).onclick = function () {
                //重新加载
                _this2.jSPlugin.play();
                _this2.loadingClear();
                _this2.loadingStart(_this2.id);
                _this2.loadingSetText({
                  text: '视频加载中'
                });
              };
            }
          }
          this.state.text = opt.text;
          if (opt.delayClear) {
            // 传入delayClear后在指定时间后清除提示语
            setTimeout(function () {
              _this2.loadingClearText();
            }, parseInt(opt.delayClear));
          }
        }
      }
    }, {
      key: "loadingClearText",
      value: function loadingClearText() {
        if (document.getElementById("".concat(this.id, "-loading-item-0"))) {
          var elements = document.getElementById("".concat(this.id, "-loading-item-0")).childNodes;
          if (elements.length > 1) {
            elements[1].parentNode.removeChild(elements[1]);
          } else {
            elements[0] && elements[0].parentNode.removeChild(elements[0]);
          }
        }
      }
    }, {
      key: "loadingClear",
      value: function loadingClear() {
        if (document.getElementById("".concat(this.id, "-loading-item-0"))) {
          var elements = document.getElementById("".concat(this.id, "-loading-item-0")).childNodes;
          for (var i = elements.length - 1; i >= 0; i--) {
            elements[i].parentNode.removeChild(elements[i]);
          }
          if (document.getElementById("".concat(this.id, "-loading-id-0"))) {
            document.getElementById("".concat(this.id, "-loading-id-0")).style.background = 'none';
          }
          if (document.getElementById('loading-icon')) {
            document.getElementById('loading-icon').parentNode.removeChild(document.getElementById('loading-icon'));
          }
        }
      }
    }, {
      key: "loadingEnd",
      value: function loadingEnd() {
        var loadingItemContainerDOM = document.getElementById("".concat(this.id, "-loading-item-0"));
        if (loadingItemContainerDOM) {
          loadingItemContainerDOM.parentNode.removeChild(loadingItemContainerDOM);
          var loadingContainerDOM = document.getElementById("".concat(this.id, "-loading-id-0"));
          if (loadingContainerDOM && loadingContainerDOM.children.length === 0) {
            loadingContainerDOM.parentNode.removeChild(loadingContainerDOM);
          }
        }
        document.getElementById("".concat(this.id, "-loading-item-0")).style.background = 'none';
      }
    }]);
    return Status;
  }();

  /**
   * @class Message
   * @classdesc 播放器消息提示类
   * @description 提供播放器消息提示
   * 
   * @private
   * 
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer播放器对象 
   * @param {String} id - 播放器id
   * @example
   * var message = new Message(EZUIKitPlayer, "id");
   * message.default("播放失败，请稍后再试");
   */
  var Message$1 = /*#__PURE__*/function () {
    /**
     * 
     * @param {EZUIKitPlayer} jSPlugin 
     * @param {string} id 
     */
    function Message(jSPlugin, id) {
      _classCallCheck$1(this, Message);
      this.id = id;
      this.jSPlugin = jSPlugin;
      this.timer = null;
      this.state = {
        play: false,
        loading: false
      };
    }

    /**
    * 
    * @param {string} msg 消息 支持字符和字符串
    * @param {string} dom 消息挂载的目标dom节点，默认挂载到warp节点
    */
    _createClass$1(Message, [{
      key: "default",
      value: function _default(msg, dom) {
        var _this = this;
        var msgId = "msgId";
        var parentDom = dom || document.getElementById("".concat(this.id, "-wrap"));
        if (document.getElementById("".concat(this.id, "-").concat(msgId))) {
          parentDom.removeChild(document.getElementById("".concat(this.id, "-").concat(msgId)));
        }
        var messageDOM = document.createElement('div');
        messageDOM.id = "".concat(this.id, "-").concat(msgId);
        messageDOM.style = "position: absolute;top: 50%;left:calc(50% - ".concat(msg.length * 14 / 2, "px);padding: 4px 16px;background: #00000080;color: #FFFFFF;font-size: 14px");
        messageDOM.innerHTML = msg;
        parentDom.appendChild(messageDOM);
        if (this.timer) {
          clearTimeout(this.timer);
        }
        this.timer = setTimeout(function () {
          parentDom.removeChild(document.getElementById("".concat(_this.id, "-").concat(msgId)));
        }, 2000);
      }
    }]);
    return Message;
  }();

  var data$d = [
  	{
  		moduleCode: "",
  		detailCode: "405984",
  		description: "",
  		solution: "",
  		updateTime: 1559564188000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10035",
  		description: "获取子账户AccessToken异常,子账户不存在或子账户不属于该开发者",
  		solution: "",
  		updateTime: 1559551958000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1052674",
  		description: "获取本地录像失败",
  		solution: "",
  		updateTime: 1558579653000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395547",
  		description: "",
  		solution: "",
  		updateTime: 1557367296000
  	},
  	{
  		moduleCode: "",
  		detailCode: "12",
  		description: "",
  		solution: "",
  		updateTime: 1557229476000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10052",
  		description: "余额不足",
  		solution: "",
  		updateTime: 1557121463000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20108",
  		description: "当前用户和所添加用户不是好友关系",
  		solution: "",
  		updateTime: 1556541725000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10009",
  		description: "",
  		solution: "",
  		updateTime: 1556422452000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320001",
  		description: "通道不存在",
  		solution: "请检查录像机的关联状态是否正常，没有摄像头的通道无法播放",
  		updateTime: 1556419044000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120001",
  		description: "通道不存在",
  		solution: "请检查录像机的关联状态是否正常，没有摄像头的通道无法播放",
  		updateTime: 1556419030000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320049",
  		description: "",
  		solution: "",
  		updateTime: 1556272984000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380227",
  		description: "",
  		solution: "",
  		updateTime: 1556264379000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10033",
  		description: "policy参数信息异常",
  		solution: "",
  		updateTime: 1555922124000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10065",
  		description: "weakAppKey 不属于accessToken对应的用户",
  		solution: "",
  		updateTime: 1555497522000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100001",
  		description: "",
  		solution: "",
  		updateTime: 1555141776000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395558",
  		description: "",
  		solution: "",
  		updateTime: 1554987121000
  	},
  	{
  		moduleCode: "",
  		detailCode: "70001",
  		description: "智能家居买断用户设备受到限制,建议合理选择pagestart和pageSize",
  		solution: "",
  		updateTime: 1554691023000
  	},
  	{
  		moduleCode: "",
  		detailCode: "170001",
  		description: "",
  		solution: "",
  		updateTime: 1554691023000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1012",
  		description: "重置失败",
  		solution: "",
  		updateTime: 1554645841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1043",
  		description: "重置失败",
  		solution: "",
  		updateTime: 1554645834000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60060",
  		description: "直播功能未开通",
  		solution: "通道未开通直播功能，请先开通直播",
  		updateTime: 1554346018000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380203",
  		description: "",
  		solution: "",
  		updateTime: 1554093666000
  	},
  	{
  		moduleCode: "",
  		detailCode: "399048",
  		description: "免费版并发数达到上限，请升级企业版使用多并发能力",
  		solution: "升级成为企业版套餐即可取消并发数限制",
  		updateTime: 1553839878000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60007",
  		description: "预置点个数超过最大值",
  		solution: "",
  		updateTime: 1553671316000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1005",
  		description: "",
  		solution: "",
  		updateTime: 1553513701000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20605",
  		description: "其他用户正在认证中",
  		solution: "",
  		updateTime: 1552976317000
  	},
  	{
  		moduleCode: "",
  		detailCode: "90004",
  		description: "当前型号设备暂时不支持AI任务：CS-C3W-3B1WFR-YGL",
  		solution: "",
  		updateTime: 1552898525000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60046",
  		description: "添加的设备的IP和本设备的IP冲突",
  		solution: "",
  		updateTime: 1552872372000
  	},
  	{
  		moduleCode: "",
  		detailCode: "3",
  		description: "修改视频清晰度失败!",
  		solution: "",
  		updateTime: 1552440229000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1013",
  		description: "",
  		solution: "",
  		updateTime: 1552035069000
  	},
  	{
  		moduleCode: "",
  		detailCode: "370007",
  		description: "",
  		solution: "",
  		updateTime: 1551852327000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1",
  		description: "",
  		solution: "",
  		updateTime: 1551752889000
  	},
  	{
  		moduleCode: "",
  		detailCode: "30005",
  		description: "弱账户不存在",
  		solution: "",
  		updateTime: 1551422358000
  	},
  	{
  		moduleCode: "",
  		detailCode: "90006",
  		description: "用户操作AI任务受限",
  		solution: "",
  		updateTime: 1551073320000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60203",
  		description: "未开通相关服务",
  		solution: "",
  		updateTime: 1550623070000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10002",
  		description: "accessToken过期或异常",
  		solution: "",
  		updateTime: 1550300346000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380339",
  		description: "",
  		solution: "",
  		updateTime: 1549889458000
  	},
  	{
  		moduleCode: "",
  		detailCode: "90002",
  		description: "AI任务设备配置数达到上限：3",
  		solution: "",
  		updateTime: 1549071664000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380008",
  		description: "",
  		solution: "",
  		updateTime: 1549005979000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320227",
  		description: "",
  		solution: "",
  		updateTime: 1548739731000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60059",
  		description: "ezopen地址均不可用",
  		solution: "",
  		updateTime: 1548395350000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10005",
  		description: "appKey异常",
  		solution: "",
  		updateTime: 1548317858000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60045",
  		description: "添加的设备的IP和其他通道的IP冲突",
  		solution: "",
  		updateTime: 1548155085000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60047",
  		description: "码流类型不支持",
  		solution: "",
  		updateTime: 1547962108000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60041",
  		description: "添加的设备被其他设备关联或响应超时",
  		solution: "",
  		updateTime: 1547960980000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110029",
  		description: "个人用户接口调用频率超限",
  		solution: "请升级企业版：https://open.ys7.com/price.html",
  		updateTime: 1547606859000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380355",
  		description: "设备直连推流异常结束",
  		solution: "",
  		updateTime: 1547106294000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320081",
  		description: "",
  		solution: "",
  		updateTime: 1547106279000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60035",
  		description: "购买云存储服务失败",
  		solution: "",
  		updateTime: 1547026959000
  	},
  	{
  		moduleCode: "",
  		detailCode: "90005",
  		description: "设备已存在：C75714141",
  		solution: "",
  		updateTime: 1546940622000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1053445",
  		description: "该时间段没有录像片段",
  		solution: "",
  		updateTime: 1546935727000
  	},
  	{
  		moduleCode: "",
  		detailCode: "90007",
  		description: "设备未加入到AI任务",
  		solution: "",
  		updateTime: 1546932948000
  	},
  	{
  		moduleCode: "",
  		detailCode: "326000",
  		description: "",
  		solution: "",
  		updateTime: 1546823143000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1021",
  		description: "重置失败",
  		solution: "",
  		updateTime: 1546781152000
  	},
  	{
  		moduleCode: "",
  		detailCode: "2001",
  		description: "删除设备失败!",
  		solution: "",
  		updateTime: 1546422886000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380425",
  		description: "",
  		solution: "",
  		updateTime: 1546407694000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120097",
  		description: "",
  		solution: "",
  		updateTime: 1546085995000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10059",
  		description: "requestId已存在",
  		solution: "",
  		updateTime: 1545824509000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1154723",
  		description: "",
  		solution: "",
  		updateTime: 1545795209000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60043",
  		description: "添加的设备超出最大数量",
  		solution: "",
  		updateTime: 1545493607000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1152677",
  		description: "",
  		solution: "",
  		updateTime: 1545313404000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20097",
  		description: "设备添加异常,设备验证码为ABCDEF或设备被N1，R1关联",
  		solution: "",
  		updateTime: 1545310795000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10060",
  		description: "设备不支持该云存储类型",
  		solution: "",
  		updateTime: 1545309064000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20102",
  		description: "无相应邀请信息，无法接受邀请",
  		solution: "",
  		updateTime: 1545204966000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10053",
  		description: "云存储开通中",
  		solution: "",
  		updateTime: 1545100293000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20401",
  		description: "用户云空间信息不存在",
  		solution: "",
  		updateTime: 1545017880000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20600",
  		description: "临时密码数已达上限",
  		solution: "",
  		updateTime: 1544873457000
  	},
  	{
  		moduleCode: "",
  		detailCode: "901",
  		description: "",
  		solution: "",
  		updateTime: 1544693519000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60210",
  		description: "图片数据错误",
  		solution: "",
  		updateTime: 1544604457000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10013",
  		description: "您的应用没有权限调用",
  		solution: "",
  		updateTime: 1544416237000
  	},
  	{
  		moduleCode: "",
  		detailCode: "70007",
  		description: "授权码不存在",
  		solution: "",
  		updateTime: 1544179533000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10015",
  		description: "授权地址不存在",
  		solution: "",
  		updateTime: 1544163240000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320423",
  		description: "",
  		solution: "",
  		updateTime: 1544100685000
  	},
  	{
  		moduleCode: "",
  		detailCode: "370009",
  		description: "",
  		solution: "",
  		updateTime: 1544077151000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10031",
  		description: "子账户或萤石用户没有权限",
  		solution: "",
  		updateTime: 1543990462000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10055",
  		description: "设备不支持试用云存储服务",
  		solution: "",
  		updateTime: 1543986292000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60042",
  		description: "添加的设备密码错误",
  		solution: "",
  		updateTime: 1543710913000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60082",
  		description: "设备正在响应本次声源定位",
  		solution: "",
  		updateTime: 1543647426000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10056",
  		description: "设备不支持云存储服务转出",
  		solution: "",
  		updateTime: 1543558342000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20104",
  		description: "好友不存在",
  		solution: "",
  		updateTime: 1543492403000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20111",
  		description: "好友不是等待验证状态，无法接受邀请",
  		solution: "",
  		updateTime: 1543492365000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20107",
  		description: "不能添加自己为好友",
  		solution: "",
  		updateTime: 1543480986000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1",
  		description: "设备返回其他错误",
  		solution: "",
  		updateTime: 1543459921000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60084",
  		description: "当前正在关闭隐私遮蔽",
  		solution: "",
  		updateTime: 1543456515000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380255",
  		description: "",
  		solution: "",
  		updateTime: 1543411652000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20015",
  		description: "设备不支持",
  		solution: "",
  		updateTime: 1543390936000
  	},
  	{
  		moduleCode: "",
  		detailCode: "30003",
  		description: "手机验证码错误",
  		solution: "",
  		updateTime: 1543389137000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20615",
  		description: "锁用户已存在",
  		solution: "",
  		updateTime: 1543388325000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60061",
  		description: "账户流量已超出或未购买，限制开通",
  		solution: "",
  		updateTime: 1543372581000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60020",
  		description: "设备不支持该信令",
  		solution: "",
  		updateTime: 1543321636000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320146",
  		description: "",
  		solution: "",
  		updateTime: 1543318472000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60018",
  		description: "设备升级失败",
  		solution: "",
  		updateTime: 1543304928000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60044",
  		description: "添加的设备网络不可达超时",
  		solution: "",
  		updateTime: 1543304102000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20619",
  		description: "主用户无法删除",
  		solution: "",
  		updateTime: 1543290219000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20608",
  		description: "锁用户不存在",
  		solution: "",
  		updateTime: 1543281950000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20609",
  		description: "设备响应超时,门锁通信故障或者电量不足,请重试.",
  		solution: "",
  		updateTime: 1543281601000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1049954",
  		description: "升级设备失败",
  		solution: "",
  		updateTime: 1543279264000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60009",
  		description: "正在调用预置点",
  		solution: "",
  		updateTime: 1543238114000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1052677",
  		description: "获取本地录像失败",
  		solution: "",
  		updateTime: 1543207604000
  	},
  	{
  		moduleCode: "",
  		detailCode: "327000",
  		description: "",
  		solution: "",
  		updateTime: 1543196609000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20021",
  		description: "设备在线，未被用户添加",
  		solution: "",
  		updateTime: 1543193436000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20202",
  		description: "操作留言信息失败",
  		solution: "",
  		updateTime: 1543191562000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1052678",
  		description: "获取本地录像失败",
  		solution: "",
  		updateTime: 1543132218000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1054723",
  		description: "格式化设备失败",
  		solution: "",
  		updateTime: 1543129833000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20109",
  		description: "对应分享不存在",
  		solution: "",
  		updateTime: 1543129111000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60026",
  		description: "设备处于隐私遮蔽状态",
  		solution: "",
  		updateTime: 1543110403000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60083",
  		description: "当前正在开启隐私遮蔽",
  		solution: "",
  		updateTime: 1543071148000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60001",
  		description: "用户无云台控制权限",
  		solution: "",
  		updateTime: 1543059167000
  	},
  	{
  		moduleCode: "",
  		detailCode: "2003",
  		description: "设备不在线",
  		solution: "",
  		updateTime: 1543051046000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-24",
  		description: "设置设备enable错误",
  		solution: "",
  		updateTime: 1543042701000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10018",
  		description: "",
  		solution: "",
  		updateTime: 1543041564000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20103",
  		description: "好友已存在",
  		solution: "",
  		updateTime: 1543038430000
  	},
  	{
  		moduleCode: "",
  		detailCode: "70010",
  		description: "授权异常请重试",
  		solution: "",
  		updateTime: 1543035590000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60056",
  		description: "删除设备失败",
  		solution: "",
  		updateTime: 1543031275000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60040",
  		description: "添加的设备不在同一局域网",
  		solution: "",
  		updateTime: 1543031210000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60019",
  		description: "加密已开启",
  		solution: "",
  		updateTime: 1543029931000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1054722",
  		description: "格式化设备失败",
  		solution: "",
  		updateTime: 1543028537000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20016",
  		description: "当前设备正在格式化",
  		solution: "",
  		updateTime: 1543028537000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10024",
  		description: "透明通道权限校验不通过",
  		solution: "",
  		updateTime: 1543025540000
  	},
  	{
  		moduleCode: "",
  		detailCode: "6002",
  		description: "删除设备失败!",
  		solution: "",
  		updateTime: 1543025026000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1011",
  		description: "验证码错误！",
  		solution: "",
  		updateTime: 1543016865000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60032",
  		description: "卡密已使用",
  		solution: "",
  		updateTime: 1543006668000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10034",
  		description: "子账号已存在",
  		solution: "",
  		updateTime: 1542989194000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20301",
  		description: "根据uuid查询联动信息不存在",
  		solution: "",
  		updateTime: 1542988651000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1041",
  		description: "获取验证码过于频繁",
  		solution: "",
  		updateTime: 1542980953000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10012",
  		description: "该appkey下已绑定重复的phone！",
  		solution: "",
  		updateTime: 1542980800000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1008",
  		description: "phone不合法！",
  		solution: "",
  		updateTime: 1542979812000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60023",
  		description: "订阅操作失败",
  		solution: "",
  		updateTime: 1542979006000
  	},
  	{
  		moduleCode: "",
  		detailCode: "5",
  		description: "设备返回其他错误",
  		solution: "",
  		updateTime: 1542977828000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60006",
  		description: "云台当前操作失败",
  		solution: "",
  		updateTime: 1542977598000
  	},
  	{
  		moduleCode: "",
  		detailCode: "131",
  		description: "修改视频清晰度失败!",
  		solution: "",
  		updateTime: 1542977246000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10019",
  		description: "密码错误",
  		solution: "",
  		updateTime: 1542976628000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10004",
  		description: "用户不存在",
  		solution: "",
  		updateTime: 1542976268000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20201",
  		description: "操作报警信息失败",
  		solution: "",
  		updateTime: 1542975906000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20024",
  		description: "设备不在线，已经被别的用户添加",
  		solution: "",
  		updateTime: 1542975858000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60004",
  		description: "设备云台旋转达到左限位",
  		solution: "",
  		updateTime: 1542975207000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1052679",
  		description: "修改视频清晰度失败!",
  		solution: "",
  		updateTime: 1542974886000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20031",
  		description: "请在萤石客户端关闭终端绑定",
  		solution: "",
  		updateTime: 1542974756000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1053825",
  		description: "获取本地录像失败",
  		solution: "",
  		updateTime: 1542974692000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60011",
  		description: "预置点不存在",
  		solution: "",
  		updateTime: 1542974414000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1052936",
  		description: "修改视频清晰度失败!",
  		solution: "",
  		updateTime: 1542974390000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1016",
  		description: "",
  		solution: "",
  		updateTime: 1542974273000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10032",
  		description: "子账号不存在",
  		solution: "",
  		updateTime: 1542973906000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20013",
  		description: "设备已被别人添加",
  		solution: "",
  		updateTime: 1542973817000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50000",
  		description: "服务器错误!",
  		solution: "",
  		updateTime: 1542973801000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60010",
  		description: "该预置点已经是当前位置",
  		solution: "",
  		updateTime: 1542973800000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60003",
  		description: "设备云台旋转达到下限位",
  		solution: "",
  		updateTime: 1542973770000
  	},
  	{
  		moduleCode: "",
  		detailCode: "4",
  		description: "设备返回其他错误",
  		solution: "",
  		updateTime: 1542973755000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60016",
  		description: "加密未开启，无需关闭",
  		solution: "",
  		updateTime: 1542973753000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60002",
  		description: "设备云台旋转达到上限位",
  		solution: "",
  		updateTime: 1542973742000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20023",
  		description: "设备不在线，未被用户添加",
  		solution: "",
  		updateTime: 1542973685000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10008",
  		description: "",
  		solution: "",
  		updateTime: 1542973676000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20010",
  		description: "设备验证码错误",
  		solution: "",
  		updateTime: 1542973658000
  	},
  	{
  		moduleCode: "",
  		detailCode: "60005",
  		description: "设备云台旋转达到右限位",
  		solution: "",
  		updateTime: 1542973657000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20017",
  		description: "设备已经被自己添加",
  		solution: "",
  		updateTime: 1542973648000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20020",
  		description: "设备在线，已经被自己添加",
  		solution: "",
  		updateTime: 1542973533000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20029",
  		description: "设备不在线，已经被自己添加",
  		solution: "",
  		updateTime: 1542973530000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10014",
  		description: "APPKEY下对应的第三方userId和phone未绑定！",
  		solution: "",
  		updateTime: 1542973499000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20002",
  		description: "设备不存在",
  		solution: "",
  		updateTime: 1542973499000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10030",
  		description: "appkey和appsecret不匹配",
  		solution: "",
  		updateTime: 1542973490000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20022",
  		description: "设备在线，已经被别的用户添加",
  		solution: "",
  		updateTime: 1542973486000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20008",
  		description: "设备响应超时",
  		solution: "",
  		updateTime: 1542973484000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20032",
  		description: "该用户下通道不存在",
  		solution: "",
  		updateTime: 1542973481000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20006",
  		description: "网络异常",
  		solution: "",
  		updateTime: 1542973475000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20014",
  		description: "deviceSerial不合法!",
  		solution: "",
  		updateTime: 1542973454000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20007",
  		description: "设备不在线",
  		solution: "",
  		updateTime: 1542973454000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20018",
  		description: "该用户不拥有该设备",
  		solution: "",
  		updateTime: 1542973453000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10010",
  		description: "",
  		solution: "",
  		updateTime: 1542973453000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10011",
  		description: "未绑定！",
  		solution: "",
  		updateTime: 1542973453000
  	},
  	{
  		moduleCode: "",
  		detailCode: "20001",
  		description: "通道不存在!",
  		solution: "",
  		updateTime: 1542973452000
  	},
  	{
  		moduleCode: "",
  		detailCode: "10017",
  		description: "appKey不存在",
  		solution: "",
  		updateTime: 1542973451000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400259",
  		description: "",
  		solution: "",
  		updateTime: 1542875643000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400004",
  		description: "",
  		solution: "",
  		updateTime: 1542873364000
  	},
  	{
  		moduleCode: "",
  		detailCode: "3840",
  		description: "",
  		solution: "",
  		updateTime: 1541860000000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1017",
  		description: "",
  		solution: "",
  		updateTime: 1541733663000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320025",
  		description: "",
  		solution: "",
  		updateTime: 1541078281000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320024",
  		description: "",
  		solution: "",
  		updateTime: 1540801374000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321002",
  		description: "",
  		solution: "",
  		updateTime: 1540631734000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321000",
  		description: "",
  		solution: "",
  		updateTime: 1540609178000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321022",
  		description: "",
  		solution: "",
  		updateTime: 1540548345000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321016",
  		description: "",
  		solution: "",
  		updateTime: 1540287187000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320023",
  		description: "",
  		solution: "",
  		updateTime: 1539825993000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1016",
  		description: "",
  		solution: "",
  		updateTime: 1539584931000
  	},
  	{
  		moduleCode: "",
  		detailCode: "8",
  		description: "",
  		solution: "",
  		updateTime: 1539391812000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1075127593",
  		description: "",
  		solution: "",
  		updateTime: 1538959251000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380421",
  		description: "",
  		solution: "",
  		updateTime: 1537288465000
  	},
  	{
  		moduleCode: "",
  		detailCode: "322000",
  		description: "麦克风权限未开启",
  		solution: "",
  		updateTime: 1536820136000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1152678",
  		description: "",
  		solution: "",
  		updateTime: 1536738348000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320047",
  		description: "",
  		solution: "",
  		updateTime: 1536664472000
  	},
  	{
  		moduleCode: "",
  		detailCode: "327006",
  		description: "",
  		solution: "",
  		updateTime: 1536136120000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1074807593",
  		description: "",
  		solution: "",
  		updateTime: 1536135035000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320291",
  		description: "",
  		solution: "",
  		updateTime: 1536110836000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320045",
  		description: "",
  		solution: "",
  		updateTime: 1535963775000
  	},
  	{
  		moduleCode: "",
  		detailCode: "370004",
  		description: "",
  		solution: "",
  		updateTime: 1535883699000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1149954",
  		description: "",
  		solution: "",
  		updateTime: 1535700674000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320053",
  		description: "",
  		solution: "",
  		updateTime: 1535681079000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400000",
  		description: "",
  		solution: "",
  		updateTime: 1535532332000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110028",
  		description: "个人版抓图接口日调用次数超出限制",
  		solution: "请升级企业版：https://open.ys7.com/price.html",
  		updateTime: 1535348756000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110027",
  		description: "个人版帐号数量超出安全限制，无法调用",
  		solution: "请升级企业版：https://open.ys7.com/price.html",
  		updateTime: 1535348734000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110026",
  		description: "设备数量超出个人版限制，当前设备无法操作",
  		solution: "请升级企业版：https://open.ys7.com/price.html",
  		updateTime: 1535348588000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100000",
  		description: "",
  		solution: "",
  		updateTime: 1534980008000
  	},
  	{
  		moduleCode: "",
  		detailCode: "324004",
  		description: "",
  		solution: "",
  		updateTime: 1534927762000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360104",
  		description: "",
  		solution: "",
  		updateTime: 1534761006000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320204",
  		description: "",
  		solution: "",
  		updateTime: 1534584221000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380001",
  		description: "",
  		solution: "",
  		updateTime: 1534404715000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380204",
  		description: "",
  		solution: "",
  		updateTime: 1534401682000
  	},
  	{
  		moduleCode: "",
  		detailCode: "328006",
  		description: "",
  		solution: "",
  		updateTime: 1534144407000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321703",
  		description: "",
  		solution: "",
  		updateTime: 1534127274000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321510",
  		description: "",
  		solution: "",
  		updateTime: 1533428892000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321006",
  		description: "",
  		solution: "",
  		updateTime: 1533036916000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50009",
  		description: "",
  		solution: "",
  		updateTime: 1532078548000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50007",
  		description: "",
  		solution: "",
  		updateTime: 1531991720000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50018",
  		description: "",
  		solution: "",
  		updateTime: 1531912829000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380451",
  		description: "",
  		solution: "",
  		updateTime: 1531615700000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380336",
  		description: "",
  		solution: "",
  		updateTime: 1531231721000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360020",
  		description: "",
  		solution: "",
  		updateTime: 1531117554000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380418",
  		description: "",
  		solution: "",
  		updateTime: 1531107070000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1153445",
  		description: "设备在该时间段内没有录像",
  		solution: "",
  		updateTime: 1530944007000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110007",
  		description: "调用接口总次数达到上限",
  		solution: "请升级企业版，获取更高能力",
  		updateTime: 1530935584000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360019",
  		description: "",
  		solution: "",
  		updateTime: 1530869771000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360100",
  		description: "",
  		solution: "",
  		updateTime: 1530786188000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380042",
  		description: "",
  		solution: "",
  		updateTime: 1530775199000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320355",
  		description: "",
  		solution: "",
  		updateTime: 1530716074000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100003",
  		description: "",
  		solution: "",
  		updateTime: 1530232541000
  	},
  	{
  		moduleCode: "",
  		detailCode: "371026",
  		description: "",
  		solution: "",
  		updateTime: 1530192600000
  	},
  	{
  		moduleCode: "",
  		detailCode: "102",
  		description: "",
  		solution: "",
  		updateTime: 1529895641000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380201",
  		description: "",
  		solution: "",
  		updateTime: 1529740929000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320054",
  		description: "",
  		solution: "",
  		updateTime: 1529544875000
  	},
  	{
  		moduleCode: "",
  		detailCode: "500101",
  		description: "",
  		solution: "",
  		updateTime: 1529485953000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321001",
  		description: "",
  		solution: "",
  		updateTime: 1529411048000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321508",
  		description: "",
  		solution: "",
  		updateTime: 1529393279000
  	},
  	{
  		moduleCode: "",
  		detailCode: "405991",
  		description: "",
  		solution: "",
  		updateTime: 1529380238000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380461",
  		description: "",
  		solution: "",
  		updateTime: 1529130941000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1019",
  		description: "",
  		solution: "",
  		updateTime: 1529057245000
  	},
  	{
  		moduleCode: "",
  		detailCode: "322009",
  		description: "",
  		solution: "",
  		updateTime: 1528965717000
  	},
  	{
  		moduleCode: "",
  		detailCode: "324005",
  		description: "",
  		solution: "",
  		updateTime: 1528950153000
  	},
  	{
  		moduleCode: "",
  		detailCode: "325000",
  		description: "",
  		solution: "",
  		updateTime: 1528947143000
  	},
  	{
  		moduleCode: "",
  		detailCode: "326032",
  		description: "",
  		solution: "",
  		updateTime: 1528872971000
  	},
  	{
  		moduleCode: "",
  		detailCode: "325032",
  		description: "",
  		solution: "",
  		updateTime: 1528863189000
  	},
  	{
  		moduleCode: "",
  		detailCode: "328000",
  		description: "",
  		solution: "",
  		updateTime: 1528794505000
  	},
  	{
  		moduleCode: "",
  		detailCode: "53",
  		description: "",
  		solution: "",
  		updateTime: 1528693249000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1020",
  		description: "",
  		solution: "",
  		updateTime: 1528499440000
  	},
  	{
  		moduleCode: "",
  		detailCode: "329032",
  		description: "",
  		solution: "",
  		updateTime: 1528446301000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1202",
  		description: "",
  		solution: "",
  		updateTime: 1528439820000
  	},
  	{
  		moduleCode: "",
  		detailCode: "2",
  		description: "",
  		solution: "",
  		updateTime: 1528434175000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1152936",
  		description: "",
  		solution: "",
  		updateTime: 1528345986000
  	},
  	{
  		moduleCode: "",
  		detailCode: "328011",
  		description: "",
  		solution: "",
  		updateTime: 1528338600000
  	},
  	{
  		moduleCode: "",
  		detailCode: "28",
  		description: "",
  		solution: "",
  		updateTime: 1528337530000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320356",
  		description: "",
  		solution: "",
  		updateTime: 1528188693000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320357",
  		description: "",
  		solution: "",
  		updateTime: 1528188517000
  	},
  	{
  		moduleCode: "",
  		detailCode: "405800",
  		description: "",
  		solution: "",
  		updateTime: 1528168732000
  	},
  	{
  		moduleCode: "",
  		detailCode: "405996",
  		description: "",
  		solution: "",
  		updateTime: 1528168686000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380357",
  		description: "",
  		solution: "",
  		updateTime: 1528011565000
  	},
  	{
  		moduleCode: "",
  		detailCode: "328022",
  		description: "",
  		solution: "",
  		updateTime: 1527929065000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380003",
  		description: "",
  		solution: "",
  		updateTime: 1527927819000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50004",
  		description: "",
  		solution: "",
  		updateTime: 1527770643000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50011",
  		description: "",
  		solution: "",
  		updateTime: 1527770635000
  	},
  	{
  		moduleCode: "",
  		detailCode: "370017",
  		description: "",
  		solution: "",
  		updateTime: 1527739514000
  	},
  	{
  		moduleCode: "",
  		detailCode: "327032",
  		description: "",
  		solution: "",
  		updateTime: 1527726704000
  	},
  	{
  		moduleCode: "",
  		detailCode: "324001",
  		description: "",
  		solution: "",
  		updateTime: 1527681892000
  	},
  	{
  		moduleCode: "",
  		detailCode: "405997",
  		description: "",
  		solution: "",
  		updateTime: 1527653408000
  	},
  	{
  		moduleCode: "",
  		detailCode: "405995",
  		description: "",
  		solution: "",
  		updateTime: 1527647283000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1153825",
  		description: "",
  		solution: "",
  		updateTime: 1527601747000
  	},
  	{
  		moduleCode: "",
  		detailCode: "328002",
  		description: "",
  		solution: "",
  		updateTime: 1527495292000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1152679",
  		description: "",
  		solution: "",
  		updateTime: 1527486665000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380356",
  		description: "",
  		solution: "",
  		updateTime: 1527125669000
  	},
  	{
  		moduleCode: "",
  		detailCode: "328032",
  		description: "",
  		solution: "",
  		updateTime: 1527069382000
  	},
  	{
  		moduleCode: "",
  		detailCode: "22",
  		description: "",
  		solution: "",
  		updateTime: 1527049826000
  	},
  	{
  		moduleCode: "",
  		detailCode: "9",
  		description: "",
  		solution: "",
  		updateTime: 1527006778000
  	},
  	{
  		moduleCode: "",
  		detailCode: "89",
  		description: "",
  		solution: "",
  		updateTime: 1526622784000
  	},
  	{
  		moduleCode: "",
  		detailCode: "328016",
  		description: "",
  		solution: "",
  		updateTime: 1526452365000
  	},
  	{
  		moduleCode: "",
  		detailCode: "368005",
  		description: "",
  		solution: "",
  		updateTime: 1525921264000
  	},
  	{
  		moduleCode: "",
  		detailCode: "0",
  		description: "",
  		solution: "",
  		updateTime: 1525920242000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380006",
  		description: "",
  		solution: "",
  		updateTime: 1525918868000
  	},
  	{
  		moduleCode: "",
  		detailCode: "310",
  		description: "",
  		solution: "",
  		updateTime: 1525834436000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360011",
  		description: "",
  		solution: "",
  		updateTime: 1525681552000
  	},
  	{
  		moduleCode: "",
  		detailCode: "170005",
  		description: "",
  		solution: "",
  		updateTime: 1525433900000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50023",
  		description: "",
  		solution: "",
  		updateTime: 1525403338000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100131",
  		description: "",
  		solution: "",
  		updateTime: 1525229691000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1018",
  		description: "",
  		solution: "",
  		updateTime: 1525142341000
  	},
  	{
  		moduleCode: "",
  		detailCode: "362026",
  		description: "",
  		solution: "",
  		updateTime: 1524882677000
  	},
  	{
  		moduleCode: "",
  		detailCode: "368007",
  		description: "",
  		solution: "",
  		updateTime: 1524832269000
  	},
  	{
  		moduleCode: "",
  		detailCode: "54",
  		description: "",
  		solution: "",
  		updateTime: 1524793646000
  	},
  	{
  		moduleCode: "",
  		detailCode: "1154722",
  		description: "",
  		solution: "",
  		updateTime: 1524620807000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320229",
  		description: "",
  		solution: "",
  		updateTime: 1524551682000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360012",
  		description: "",
  		solution: "",
  		updateTime: 1524472094000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380229",
  		description: "",
  		solution: "",
  		updateTime: 1524110755000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360016",
  		description: "",
  		solution: "",
  		updateTime: 1523933518000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1003",
  		description: "",
  		solution: "",
  		updateTime: 1523584804000
  	},
  	{
  		moduleCode: "",
  		detailCode: "410026",
  		description: "",
  		solution: "",
  		updateTime: 1523517430000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360102",
  		description: "TTS初始化失败",
  		solution: "",
  		updateTime: 1523503528000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360013",
  		description: "设备开启了隐私保护",
  		solution: "",
  		updateTime: 1523503507000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360010",
  		description: "设备正在对讲中",
  		solution: "",
  		updateTime: 1523503491000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360007",
  		description: "TTS关闭了与客户端的连接",
  		solution: "",
  		updateTime: 1523503475000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360006",
  		description: "客户端接收发生错误",
  		solution: "",
  		updateTime: 1523503457000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360005",
  		description: "客户端发送的消息错误",
  		solution: "",
  		updateTime: 1523503437000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360004",
  		description: "TTS内部发生错误",
  		solution: "",
  		updateTime: 1523503421000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360003",
  		description: "TTS的设备端发生错误",
  		solution: "",
  		updateTime: 1523503397000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360002",
  		description: "对讲发起超时",
  		solution: "",
  		updateTime: 1523503376000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360001",
  		description: "客户端请求超时",
  		solution: "",
  		updateTime: 1523503357000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320077",
  		description: "",
  		solution: "",
  		updateTime: 1523444274000
  	},
  	{
  		moduleCode: "",
  		detailCode: "370047",
  		description: "",
  		solution: "",
  		updateTime: 1523440480000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100002",
  		description: "",
  		solution: "",
  		updateTime: 1523413964000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1004",
  		description: "",
  		solution: "",
  		updateTime: 1523336653000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380000",
  		description: "",
  		solution: "",
  		updateTime: 1523180856000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380213",
  		description: "",
  		solution: "",
  		updateTime: 1523180623000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380101",
  		description: "",
  		solution: "",
  		updateTime: 1522834231000
  	},
  	{
  		moduleCode: "",
  		detailCode: "50047",
  		description: "",
  		solution: "",
  		updateTime: 1522833243000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-999",
  		description: "",
  		solution: "",
  		updateTime: 1522831034000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320418",
  		description: "",
  		solution: "",
  		updateTime: 1522829072000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1009",
  		description: "",
  		solution: "",
  		updateTime: 1522746247000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320209",
  		description: "",
  		solution: "",
  		updateTime: 1522744395000
  	},
  	{
  		moduleCode: "",
  		detailCode: "368006",
  		description: "",
  		solution: "",
  		updateTime: 1522744300000
  	},
  	{
  		moduleCode: "",
  		detailCode: "369003",
  		description: "",
  		solution: "",
  		updateTime: 1522736355000
  	},
  	{
  		moduleCode: "",
  		detailCode: "405989",
  		description: "",
  		solution: "",
  		updateTime: 1522726571000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1012",
  		description: "",
  		solution: "",
  		updateTime: 1522726203000
  	},
  	{
  		moduleCode: "",
  		detailCode: "322016",
  		description: "",
  		solution: "",
  		updateTime: 1522722918000
  	},
  	{
  		moduleCode: "",
  		detailCode: "500103",
  		description: "",
  		solution: "",
  		updateTime: 1522655556000
  	},
  	{
  		moduleCode: "",
  		detailCode: "405999",
  		description: "",
  		solution: "",
  		updateTime: 1522654716000
  	},
  	{
  		moduleCode: "",
  		detailCode: "321032",
  		description: "",
  		solution: "",
  		updateTime: 1522647732000
  	},
  	{
  		moduleCode: "",
  		detailCode: "381101",
  		description: "",
  		solution: "",
  		updateTime: 1522392414000
  	},
  	{
  		moduleCode: "",
  		detailCode: "399999",
  		description: "",
  		solution: "",
  		updateTime: 1522379834000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380103",
  		description: "",
  		solution: "",
  		updateTime: 1522312724000
  	},
  	{
  		moduleCode: "",
  		detailCode: "360014",
  		description: "",
  		solution: "",
  		updateTime: 1522304341000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1005",
  		description: "",
  		solution: "",
  		updateTime: 1522288195000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100005",
  		description: "",
  		solution: "",
  		updateTime: 1522218849000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100004",
  		description: "",
  		solution: "",
  		updateTime: 1522209053000
  	},
  	{
  		moduleCode: "",
  		detailCode: "106002",
  		description: "",
  		solution: "",
  		updateTime: 1522206200000
  	},
  	{
  		moduleCode: "",
  		detailCode: "410030",
  		description: "",
  		solution: "",
  		updateTime: 1522162252000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1002",
  		description: "",
  		solution: "",
  		updateTime: 1522150690000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1200",
  		description: "",
  		solution: "",
  		updateTime: 1522139025000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1001",
  		description: "",
  		solution: "",
  		updateTime: 1522046436000
  	},
  	{
  		moduleCode: "",
  		detailCode: "-1011",
  		description: "",
  		solution: "",
  		updateTime: 1522045931000
  	},
  	{
  		moduleCode: "",
  		detailCode: "381102",
  		description: "",
  		solution: "",
  		updateTime: 1522044953000
  	},
  	{
  		moduleCode: "",
  		detailCode: "381103",
  		description: "",
  		solution: "",
  		updateTime: 1522044953000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391205",
  		description: "vtdu解析服务器ip失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391206",
  		description: "vtdu描述符select失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391207",
  		description: "vtdu文件描述符不在可读中",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391208",
  		description: "vtdu网络发生错误getsockopt",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391209",
  		description: "vtdu描述符select超时",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395000",
  		description: "cas回复信令，发现内存已经释放（和设备之间异常断开）",
  		msg: "播放失败请重试",
  		solution: "检查设备网络；刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395400",
  		description: "私有化协议vtm检测私有化协议中码流类型小于0或者设备序列号为空等非法参数场景返回(app不重试取流)",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395402",
  		description: "回放找不到录像文件",
  		msg: "回放找不到录像文件，本地存储请检查存储卡是否接触良好",
  		solution: "检查是否有存储卡并且接触良好",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395403",
  		description: "操作码或信令密钥与设备不匹配",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395404",
  		description: "设备不在线",
  		solution: "检查设备网络；重启设备接入萤石云",
  		msg: "设备不在线，请检查设备网络或重启设备接入萤石云",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395405",
  		description: "流媒体向设备发送或接受信令超时/cas响应超时",
  		msg: "播放失败，请检查设备网络或重启设备",
  		solution: "检查设备网络；重启设备",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395406",
  		description: "token失效",
  		msg: "播放失败请重试或重启设备",
  		solution: "刷新重试或者重启设备",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395407",
  		description: "客户端的URL格式错误",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395409",
  		description: "预览开启隐私保护",
  		msg: "播放失败请关闭隐私遮蔽",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395410",
  		description: "设备达到最大连接数",
  		solution: "请升级设备固件版本",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395411",
  		description: "token无权限",
  		msg: "播放失败",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395412",
  		description: "session不存在",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395413",
  		description: "验证token的他异常（不具体） ",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395415",
  		description: "设备通道错",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395416",
  		description: "设备资源受限",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395451",
  		description: "设备不支持的码流类型",
  		msg: "播放失败请重试或切换设备码流",
  		solution: "刷新重试或者切换到高清模式",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395452",
  		description: "设备链接流媒体服务器失败",
  		msg: "播放失败，请检查设备网络或重启设备或重新加载",
  		solution: "检查设备网络，重启设备，刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395454",
  		description: "流媒体中关于设备取流会话不存在",
  		msg: "播放失败请重试",
  		solution: "流媒体中关于设备取流会话不存在",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395455",
  		description: "设备通道未关联",
  		msg: "播放失败，请检查设备通道是否关联",
  		solution: "检查设备通道是否关联",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395456",
  		description: "设备通道关联设备不在线",
  		msg: "播放失败，请检查设备通道是否上线",
  		solution: "检查设备通道是否上线",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395457",
  		description: "客户端不支持端到端加密",
  		msg: "播放失败",
  		solution: "客户端不支持端到端加密",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395458",
  		description: "设备不支持当前并发ECDH密",
  		msg: "客户端不支持端到端加密",
  		solution: "设备不支持当前并发ECDH密",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395459",
  		description: "VTDU 处理ECDH 加密失败",
  		msg: "播放失败",
  		solution: "VTDU 处理ECDH 加密失败",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395460",
  		description: "流媒体中关于设备取流会话不存在",
  		msg: "播放失败请重试",
  		solution: "流媒体中关于设备取流会话不存在",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395492",
  		description: "设备不支持的命令",
  		msg: "操作失败，设备不支持",
  		solution: "",
  		updateTime: 1522220180000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395500",
  		description: "服务器处理失败",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395501",
  		description: "流媒体vtdu达到最大负载，请扩容",
  		msg: "播放失败请重试",
  		solution: "服务器负载达到上限，请稍后重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395503",
  		description: "vtm返回分配vtdu失败",
  		msg: "播放失败请重试",
  		solution: "vtdu服务异常，请请稍后重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395504",
  		description: "流媒体vtdu达到最大负载",
  		msg: "播放失败请重试",
  		solution: "服务器负载达到上限，请稍后重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395505",
  		description: "vtm ecdh解密失败",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395506",
  		description: "vtm 返回IPC不支持取流（需要IPC添加NVR后支持）",
  		msg: "播放失败，请绑定NVR使用",
  		solution: "IPC绑定NVR使用",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395544",
  		description: "设备返回无视频源",
  		msg: "播放失败，请检查设备接触情况",
  		solution: "设备是否接触良好； 如果一直无法解决，请联系技术支持",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395545",
  		description: "视频分享时间已经结束",
  		msg: "视频分享时间已结束",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395546",
  		description: "vtdu返回达到取流并发路数限制",
  		msg: "并发上限，请升级为企业版",
  		solution: "请升级为企业版，放开并发限制",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395547",
  		description: "vtdu返回开放平台用户并发限制",
  		msg: "并发上限，请升级为企业版",
  		solution: "请确定开放平台用户预览是否超过用户并发数量限制",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395556",
  		description: "ticket校验失败",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395557",
  		description: "回放服务器等待流头超时",
  		msg: "播放失败请重试",
  		solution: "刷新重试，检测设备网络，重启设备",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395558",
  		description: "查找录像开始时间错误",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395560",
  		description: "群组分享取流二次验证失败",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395561",
  		description: "分享群组用户被锁住",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395562",
  		description: "群组分享用户权限变更",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395563",
  		description: "认证服务连接失败",
  		msg: "播放失败请重试",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395564",
  		description: "认证超时",
  		msg: "播放失败请重试",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395566",
  		description: "不在分享时间内预览",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395567",
  		description: "分享通道被锁定",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395568",
  		description: "未找到认证类型",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395569",
  		description: "认证返回的参数异常",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395600",
  		description: "分享设备不在分享时间内",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395601",
  		description: "群组分享用户没权限",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395602",
  		description: "群组分享权限变更",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395610",
  		description: "接收流头失败",
  		msg: "播放失败请重试并检查设备网络情况以及设备配置",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395620",
  		description: "心跳超时",
  		msg: "播放失败请重试并检查设备网络情况以及设备配置",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395530",
  		description: "机房故障不可用",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395701",
  		description: "cas信令返回格式错误",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395702",
  		description: "SPGW请求Cas、Status透传超时",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "395703",
  		description: "SPGW请求http不通",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396001",
  		description: "客户端参数出错",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396099",
  		description: "客户端默认错误",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396101",
  		description: "不支持的命令",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396102",
  		description: "设备流头发送失败",
  		msg: "播放失败请重试",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396103",
  		description: "cas/设备返回错误1",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396104",
  		description: "cas/设备返回错误-1",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396105",
  		description: "设备返回错误码3",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396106",
  		description: "设备返回错误码4",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396107",
  		description: "设备返回错误码5",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396108",
  		description: "cas信令回应重复",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396109",
  		description: "视频广场取消分享",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396110",
  		description: "设备信令默认错误",
  		msg: "播放失败请重试",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396501",
  		description: "设备数据链路和实际链路不匹配",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396502",
  		description: "设备数据链路重复建立连接",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396503",
  		description: "设备数据链路端口不匹配",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396504",
  		description: "缓存设备数据链路失败(内存块不足)",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396505",
  		description: "设备发送确认头消息重复",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396506",
  		description: "设备数据先于确定头部到达",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396508",
  		description: "设备数据头部长度非法",
  		msg: "播放失败请重试或重启设备",
  		solution: "刷新重试，或者重启设备",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396509",
  		description: "索引找不到设备数据管理块",
  		msg: "播放失败请重试",
  		solution: "刷新重试",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396510",
  		description: "设备数据链路vtdu内存块协议状态不匹配",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396511",
  		description: "设备数据头部没有streamkey错误",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396512",
  		description: "设备数据头部非法(较笼统)",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396513",
  		description: "设备数据长度过小",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396514",
  		description: "设备老协议推流头部没有streamkey错误",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396515",
  		description: "设备老协议推流数据非法",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396516",
  		description: "设备老协议索引找不到内存管理块",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396517",
  		description: "设备老协议推流数据非法",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396518",
  		description: "设备数据包过大",
  		msg: "播放失败请重试或重启设备",
  		solution: "刷新重试，或者重启设备",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396519",
  		description: "设备推流链路网络不稳定",
  		msg: "播放失败，请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396520",
  		description: "设备推流链路网络不稳定(默认)",
  		msg: "播放失败请重试或重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396700",
  		description: "异常数据包",
  		msg: "播放失败，设备重启",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "396701",
  		description: "回放结束数据包",
  		msg: "回放结束",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "397001",
  		description: "与相应服务连接失败",
  		msg: "播放失败请重试，请检查设备网络情况以及连接情况",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "397002",
  		description: "与相应服务连接失败",
  		msg: "播放失败请重试，请检查设备网络情况以及连接情况",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "397003",
  		description: "与相应服务连接失败",
  		msg: "播放失败请重试，请检查设备网络情况以及连接情况",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "397004",
  		description: "与相应服务连接失败",
  		msg: "播放失败请重试，请检查设备网络情况以及连接情况",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "397005",
  		description: "VTDU连接失败，或VTDU侧断开连接",
  		msg: "播放失败请重试，请检查设备网络情况以及连接情况",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "397006",
  		description: "vtm断开连接（无需 关注）",
  		msg: "播放失败请重试，请检查设备网络情况以及连接情况",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "397007",
  		description: "客户端发送缓冲区满（上行带宽太小）",
  		msg: "播放失败，上行带宽过小请检查设备网络情况",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "399000",
  		description: "无效包，包过大",
  		msg: " 检查设备重启设备",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "399001",
  		description: "地址不合法",
  		msg: "播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "399002",
  		description: "缺少端口",
  		msg: " 播放失败",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "170003",
  		description: "refreshToken不存在",
  		solution: "建议用户重新调用logout接口，然后调用openLoginPage接口重新启动登录页面登录",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "170004",
  		description: "refreshToken已过期",
  		solution: "建议用户重新调用logout接口，然后调用openLoginPage接口重新启动登录页面登录",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380011",
  		description: "设备隐私保护中",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380045",
  		description: "设备直连取流连接数量过大",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380047",
  		description: "设备不支持该命令",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380077",
  		description: "设备正在对讲中",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380102",
  		description: "数据接收异常",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380205",
  		description: "设备检测入参异常",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380209",
  		description: "网络连接超时",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380212",
  		description: "设备端网络连接超时",
  		solution: "",
  		updateTime: 1522034841000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101007",
  		description: "手机号未注册",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120503",
  		description: "正在响铃",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390016",
  		description: "vtdu成功响应未携带流头",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101008",
  		description: "手机号码不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120504",
  		description: "室内机正在通话",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390017",
  		description: "无数据流，尚未使用",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101009",
  		description: "用户名与手机不匹配",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120505",
  		description: "设备操作失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390018",
  		description: "信令消息体PB解析失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101010",
  		description: "获取验证码失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120506",
  		description: "非法命令",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390019",
  		description: "信令消息体PB封装失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101011",
  		description: "验证码错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120507",
  		description: "智能锁密码错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390020",
  		description: "申请系统内存资源失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101012",
  		description: "验证码失效",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120508",
  		description: "开关锁失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390021",
  		description: "vtdu地址尚未获取到",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101013",
  		description: "用户不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120509",
  		description: "开关锁超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390022",
  		description: "客户端尚未支持",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101014",
  		description: "密码不正确或者appKey不正确",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120510",
  		description: "智能锁设备繁忙",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390023",
  		description: "获取系统socket资源失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101015",
  		description: "用户被锁住",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120511",
  		description: "远程开锁功能未打开",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390024",
  		description: "上层填充的StreamSsnId不匹配",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101021",
  		description: "验证参数异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120600",
  		description: "临时密码数已达上限",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390025",
  		description: "链接服务器失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101026",
  		description: "邮箱已经被注册",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120601",
  		description: "添加临时密码失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390026",
  		description: "客户端请求未收到服务端应答",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101031",
  		description: "邮箱未注册",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120602",
  		description: "删除临时密码失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390027",
  		description: "链路断开",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101032",
  		description: "邮箱不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120603",
  		description: "该临时密码不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390028",
  		description: "没有取流链接",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101041",
  		description: "获取验证码过于频繁",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120604",
  		description: "指纹锁射频通信失败,请稍后再试",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390029",
  		description: "流成功停止",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101043",
  		description: "手机验证码输入错误超过规定次数",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120605",
  		description: "其他用户正在认证中",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390030",
  		description: "客户端防串流校验失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "102000",
  		description: "设备不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120606",
  		description: "验证已启动,请在120s内进行本地验证和调用添加设备接口",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390031",
  		description: "应用层tcp粘包处理缓冲区满",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "102001",
  		description: "摄像机不存在",
  		solution: "摄像机未注册到萤石云平台，请仔细检查摄像机的网络配置，确保连接到网络",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120607",
  		description: "删除用户失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390032",
  		description: "无效状态迁移",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "102003",
  		description: "设备不在线",
  		solution: "参考服务中心排查方法",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120608",
  		description: "用户不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390033",
  		description: "无效客户端状态",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "102004",
  		description: "设备异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120609",
  		description: "设备响应超时,门锁通信故障或者电量不足,请重试.",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390034",
  		description: "向vtm取流流媒体信息请求超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "102007",
  		description: "设备序列号不正确",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120610",
  		description: "获取临时密码列表失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390035",
  		description: "向代理取流请求超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "102009",
  		description: "设备请求响应超时异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "130001",
  		description: "用户不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390036",
  		description: "向代理保活取流请求超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "105000",
  		description: "设备已被自己添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "130002",
  		description: "手机号码已经注册",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390037",
  		description: "向vtdu取流请求超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "105001",
  		description: "设备已被别人添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "130003",
  		description: "手机验证码错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390038",
  		description: "向vtdu保活取流请求超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "105002",
  		description: "设备验证码错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "130004",
  		description: "终端绑定操作失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391001",
  		description: "vtm地址或端口非法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "107001",
  		description: "邀请不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "149999",
  		description: "数据异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391002",
  		description: "vtm生成文件描述符失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "107002",
  		description: "邀请验证失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "150000",
  		description: "服务器异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391003",
  		description: "vtm设置文件描述符非阻塞失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "107003",
  		description: "邀请用户不匹配",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160000",
  		description: "设备不支持云台控制",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391004",
  		description: "vtm设置文件描述符阻塞失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "107004",
  		description: "云存储连接失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160001",
  		description: "用户无云台控制权限",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391005",
  		description: "vtm解析服务器ip失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "7005",
  		description: "VTDU主动断开连接",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "107005",
  		description: "VTDU主动断开连接",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160002",
  		description: "设备云台旋转达到上限位",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391006",
  		description: "vtm描述符select失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "107006",
  		description: "不能邀请自己",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160003",
  		description: "设备云台旋转达到下限位",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391007",
  		description: "vtm文件描述符不在可读中",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "107007",
  		description: "重复邀请",
  		solution: "分享和删除分享必须全部由接口形式操作，如果与萤石客户端混用会造成这个问题，解决办法：在萤石客户端清空所有相关分享数据并重新添加设备，再通过接口操作即可",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160004",
  		description: "设备云台旋转达到左限位",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391008",
  		description: "vtm网络发生错误getsockopt",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110001",
  		description: "参数错误",
  		solution: "参数为空或者格式不对",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160005",
  		description: "设备云台旋转达到右限位",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391009",
  		description: "vtm描述符select超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110002",
  		description: "accessToken异常或过期",
  		solution: "accessToken有效期为七天，建议在accessToken即将过期或者出现10002错误码的时候重新获取accessToken",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160006",
  		description: "云台当前操作失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391101",
  		description: "proxy地址或端口非法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110004",
  		description: "用户不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160007",
  		description: "预置点个数超过最大值",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391102",
  		description: "proxy生成文件描述符失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110005",
  		description: "appKey异常",
  		solution: "确认appKey状态，不通过或者冻结状态会返回该错误码",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160009",
  		description: "正在调用预置点",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391103",
  		description: "proxy设置文件描述符非阻塞失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110006",
  		description: "ip受限",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160010",
  		description: "该预置点已经是当前位置",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391104",
  		description: "proxy设置文件描述符阻塞失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160011",
  		description: "预置点不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391105",
  		description: "proxy解析服务器ip失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110008",
  		description: "签名错误",
  		solution: "①获取签名方式详见apidemo及[旧]API文档 ②注意编码格式为UTF-8",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160013",
  		description: "设备版本已是最新",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391106",
  		description: "proxy描述符select失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110009",
  		description: "签名参数错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160014",
  		description: "设备正在升级",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391107",
  		description: "proxy文件描述符不在可读中",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110010",
  		description: "签名超时",
  		solution: "请调用同步服务器时间接口进行校时",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160015",
  		description: "设备正在重启",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391108",
  		description: "proxy网络发生错误getsockopt",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110011",
  		description: "未开通萤石云服务",
  		solution: "参照绑定流程",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160016",
  		description: "加密未开启，无须关闭",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391109",
  		description: "proxy描述符select超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110012",
  		description: "第三方账户与萤石账号已经绑定",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160017",
  		description: "设备抓图失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391201",
  		description: "vtdu地址或端口非法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110013",
  		description: "应用没有权限调用此接口",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160018",
  		description: "设备升级失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391202",
  		description: "vtdu生成文件描述符失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110014",
  		description: "APPKEY下对应的第三方userId和phone未绑定",
  		solution: "获取AccessToken时所用appKey与SDK所用appKey不一致",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160019",
  		description: "加密已开启",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391203",
  		description: "vtdu设置文件描述符非阻塞失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110017",
  		description: "appKey不存在",
  		solution: "请填写在官网申请的应用秘钥",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160020",
  		description: "不支持该命令",
  		solution: "请确认设备是否支持该命令",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "391204",
  		description: "vtdu设置文件描述符阻塞失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110018",
  		description: "AccessToken与Appkey不匹配",
  		solution: "请检查获取accessToken对应的appKey和SDK中设置的appKey是否一致",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160023",
  		description: "订阅操作失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110019",
  		description: "密码错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160024",
  		description: "取消订阅操作失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110020",
  		description: "请求方法为空",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160025",
  		description: "客流统计配置失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110021",
  		description: "ticket校验失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160026",
  		description: "设备处于隐私遮蔽状态",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110022",
  		description: "透传目的地非法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160027",
  		description: "设备正在镜像操作",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110024",
  		description: "无透传权限",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160028",
  		description: "设备正在键控动作",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110025",
  		description: "appKey被禁止使用通明通道",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160029",
  		description: "设备处于语音对讲状态",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160030",
  		description: "卡密输入错误次数过多，24小时后再输入",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160031",
  		description: "卡密信息不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160032",
  		description: "卡密状态不对或已过期",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160033",
  		description: "卡密非卖品，只能开通对应的绑定设备",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110030",
  		description: "appKey和appSecret不匹配",
  		solution: "请检查appKey和appSecret是否对应",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160035",
  		description: "购买云存储服务失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110031",
  		description: "子账户或萤石用户没有权限",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160040",
  		description: "添加的设备不在同一局域网",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110032",
  		description: "子账户不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160041",
  		description: "添加的设备被其他设备关联或响应超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110033",
  		description: "子账户未设置授权策略",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160042",
  		description: "添加的设备密码错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110034",
  		description: "子账户已存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160043",
  		description: "添加的设备超出最大数量",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110035",
  		description: "获取子账户AccessToken异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160044",
  		description: "添加的设备网络不可达超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110036",
  		description: "子账户被禁用",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160045",
  		description: "添加的设备的IP和其他通道的IP冲突",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "110051",
  		description: "无权限进行抓图",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160046",
  		description: "添加的设备的IP和本设备的IP冲突",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160047",
  		description: "码流类型不支持",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120002",
  		description: "设备不存在",
  		solution: "①设备没有注册到萤石云平台，请检查下设备网络参数，确保能正常连接网络②设备序列号不存在",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160048",
  		description: "带宽超出系统接入带宽",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120003",
  		description: "参数异常，SDK版本过低",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160049",
  		description: "IP或者端口不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120004",
  		description: "参数异常，SDK版本过低",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160050",
  		description: "添加的设备版本不支持需要升级才能接入",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120005",
  		description: "安全认证失败，需进行SDK安全认证",
  		solution: "已去掉安全验证",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160051",
  		description: "添加的设备不支持接入",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120006",
  		description: "网络异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160052",
  		description: "添加的设备通道号出错",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120007",
  		description: "设备不在线",
  		solution: "参考服务中心排查方法",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160053",
  		description: "添加的设备分辨率不支持",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120008",
  		description: "设备响应超时",
  		solution: "设备响应超时，请检测设备网络或重试",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160054",
  		description: "添加的设备账号被锁定",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120009",
  		description: "子账号不能添加设备",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160055",
  		description: "添加的设备取码流出错",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120010",
  		description: "设备验证码错误",
  		solution: "验证码在设备标签上，六位大写字母，注意大小写",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160056",
  		description: "删除设备失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120012",
  		description: "设备添加失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160057",
  		description: "删除的设备未关联",
  		solution: "检查IPC与NVR是否有关联关系",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120013",
  		description: "设备已被别人添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160060",
  		description: "地址未绑定",
  		solution: "请前往官网设置直播",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120014",
  		description: "设备序列号不正确",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160061",
  		description: "账户流量已超出或未购买，限制开通",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120015",
  		description: "设备不支持该功能",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160062",
  		description: "该通道直播已开通",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120016",
  		description: "当前设备正在格式化",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160063",
  		description: "直播未使用或直播已关闭",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120017",
  		description: "设备已被自己添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160070",
  		description: "设备不能转移给自己",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120018",
  		description: "该用户不拥有该设备",
  		solution: "确认设备是否属于用户",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160071",
  		description: "设备不能转移，设备与其他设备存在关联关系",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400001",
  		description: "参数为空",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120019",
  		description: "设备不支持云存储服务",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160072",
  		description: "设备不能转移，通道被分享给其他用户或者分享到视频广场",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400002",
  		description: "参数错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120020",
  		description: "设备在线，被自己添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160073",
  		description: "云存储转移失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400025",
  		description: "设备不支持对讲",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120021",
  		description: "设备在线，但是未被用户添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160080",
  		description: "当前正在声源定位",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400029",
  		description: "没有初始化或资源被释放",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120022",
  		description: "设备在线，但是已经被别的用户添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160081",
  		description: "当前正在轨迹巡航",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400030",
  		description: "json解析异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120023",
  		description: "设备不在线，未被用户添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160082",
  		description: "设备正在响应本次声源定位",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400031",
  		description: "网络异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120024",
  		description: "设备不在线，但是已经被别的用户添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160083",
  		description: "当前正在开启隐私遮蔽",
  		solution: "设备正在操作隐私遮蔽，无法进行当前操作",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400032",
  		description: "设备信息异常为空",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120025",
  		description: "重复申请分享",
  		solution: "确认设备是否由添加过该设备且申请过分享的账户下是否还存在分享记录",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "160084",
  		description: "当前正在关闭隐私遮蔽",
  		solution: "设备正在操作隐私遮蔽，无法进行当前操作",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400034",
  		description: "取流超时",
  		solution: "一般是由于网络状况不好导致，可以尝试下让用户重新播放",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120026",
  		description: "视频广场不存在该视频",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "380290",
  		description: "　连接CAS服务器失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400035",
  		description: "设备已加密，需要输入验证码",
  		solution: "收到此错误码，需要让用户输入验证码后，调用EZPlayer.setPlayKey传入验证码，并重新调用播放函数",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120027",
  		description: "视频转码失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361001",
  		description: "对讲服务端排队超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400036",
  		description: "播放验证码错误",
  		solution: "收到此错误码，需要让用户输入验证码后，调用EZPlayer.setPlayKey传入验证码，并重新调用播放函数",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120028",
  		description: "设备固件升级包不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361002",
  		description: "对讲服务端处理超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400037",
  		description: "surfacehold错误",
  		solution: "请检查是否是播放之前销毁了surface，收到此错误也可以重新建立surface后播放",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120029",
  		description: "设备不在线，但是已经被自己添加",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361003",
  		description: "设备链接对讲服务器超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400100",
  		description: "未知错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120030",
  		description: "该用户不拥有该视频广场视频",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361004",
  		description: "服务器内部错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400200",
  		description: "player sdk出错，这种错误一般开发者也是无法解决，不具体分类传出，传一个统一的inner错误码出去",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120031",
  		description: "开启终端绑定，硬件特征码验证失败",
  		solution: "请在萤石客户端关闭终端绑定，参考此步骤",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361005",
  		description: "解析消息失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400300",
  		description: "内存溢出",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120032",
  		description: "该用户下通道不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361006",
  		description: "请求重定向--需要向其他服务申请对讲",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400901",
  		description: "设备不在线，可以提示用户",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120033",
  		description: "无法收藏自己分享的视频",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361007",
  		description: "请求url非法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400902",
  		description: "accesstoken异常或失效，需要重新获取accesstoken，并传入到sdk",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120034",
  		description: "该用户下无设备",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361008",
  		description: "token失效",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400903",
  		description: "当前账号开启了终端绑定，只允许指定设备登录操作，提示用户登录i.ys7.com解除终端绑定",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120090",
  		description: "用户反馈失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361009",
  		description: "设备验证码或者通信秘钥不匹配",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400904",
  		description: "设备正在对讲中",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120095",
  		description: "APP包下载失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361010",
  		description: "设备已经在对讲",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "400905",
  		description: "设备开启了隐私保护，不允许预览、对讲等",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120096",
  		description: "APP包信息删除失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361011",
  		description: "设备10s响应超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120101",
  		description: "视频不支持分享给本人",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361012",
  		description: "设备不在线",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320002",
  		description: "参数无效",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120102",
  		description: "无相应邀请信息",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361013",
  		description: "设备开启隐私保护拒绝对讲",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320003",
  		description: "暂不支持此操作",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120103",
  		description: "好友已存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361014",
  		description: "token无权限",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320004",
  		description: "内存溢出",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120104",
  		description: "好友不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361015",
  		description: "设备返回session不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320005",
  		description: "创建CAS session失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120105",
  		description: "好友状态错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361016",
  		description: "验证token其他异常错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320006",
  		description: "创建cloud session失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120106",
  		description: "对应群组不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361017",
  		description: "服务端监听设备建立端口超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320007",
  		description: "token失效",
  		solution: "重新设置token后再重试",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120107",
  		description: "不能添加自己为好友",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361018",
  		description: "设备链路异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320008",
  		description: "token池里面没有token,请传入token",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120108",
  		description: "当前用户和所添加用户不是好友关系",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361019",
  		description: "对讲服务端不支持的信令消息",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320009",
  		description: "传入新的INIT_PARAM并reset(保留，目前未用)",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120109",
  		description: "对应分享不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361020",
  		description: "对讲服务端解析对讲请求未携带会话描述能力集",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320010",
  		description: "请重试",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120110",
  		description: "好友群组不属于当前用户",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361021",
  		description: "对讲服务端优先能力集结果为空",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320011",
  		description: "500毫秒后请重试",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120111",
  		description: "好友不是等待验证状态",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361022",
  		description: "cas链路异常",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320012",
  		description: "token池已满",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120112",
  		description: "添加应用下的用户为好友失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361023",
  		description: "对讲服务端分配对讲会话资源失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320013",
  		description: "P2P client超过限制",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120201",
  		description: "操作报警信息失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "361024",
  		description: "对讲服务端解析信令消息失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320014",
  		description: "sdk未初始化",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120202",
  		description: "操作留言信息失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390001",
  		description: "通用错误返回",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320015",
  		description: "超时",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120301",
  		description: "根据UUID查询报警消息不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390002",
  		description: "入参为空指针",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320016",
  		description: "正在打洞中",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120302",
  		description: "根据UUID查询图片不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390003",
  		description: "入参值无效",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320017",
  		description: "没有视频文件头(播放器层面产生和处理此错误)",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120303",
  		description: "根据FID查询图片不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390004",
  		description: "信令消息解析非法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320018",
  		description: "解码错误/超时(播放器层面产生和处理此错误)",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120305",
  		description: "设备ip解析错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390005",
  		description: "内存资源不足",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320019",
  		description: "取消(保留，用户不用处理)",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120401",
  		description: "用户云空间信息不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390006",
  		description: "协议格式不对或者消息体长度超过STREAM_MAX_MSGBODY_LEN",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320020",
  		description: "播放过程中预连接被用户清除预操作信息",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120402",
  		description: "云空间操作失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390007",
  		description: "设备序列号长度不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320021",
  		description: "流加密码不对",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120403",
  		description: "用户目录不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390008",
  		description: "取流url长度不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "320022",
  		description: "未传入播放窗口",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120404",
  		description: "要操作的目标目录不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390009",
  		description: "解析vtm返回vtdu地址不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "100200",
  		description: "操作成功",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120405",
  		description: "要删除的文件信息不存在",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390010",
  		description: "解析vtm返回级联vtdu地址不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101001",
  		description: "用户名不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120406",
  		description: "已开通云存储",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390011",
  		description: "解析vtm返回会话标识长度不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101002",
  		description: "用户名已被占用",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120407",
  		description: "开通记录失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390012",
  		description: "vtdu返回流头长度不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101003",
  		description: "密码不合法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120500",
  		description: "获取数据错误",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390013",
  		description: "vtdu会话长度非法",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101004",
  		description: "密码为同一字符",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120501",
  		description: "开锁失败",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390014",
  		description: "回调函数未注册",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "101006",
  		description: "手机号码已经被注册",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "120502",
  		description: "室内机未收到呼叫",
  		solution: "",
  		updateTime: 1522034840000
  	},
  	{
  		moduleCode: "",
  		detailCode: "390015",
  		description: "vtdu成功响应未携带会话标识",
  		solution: "",
  		updateTime: 1522034840000
  	}
  ];
  var code = "200";
  var msg$1 = "操作成功!";
  var errorCode = {
  	data: data$d,
  	code: code,
  	msg: msg$1
  };

  /**
   * @class
   * @classdesc 错误码类
   * @private
   */
  var Code = /*#__PURE__*/function () {
    // 构造函数没有使用到
    function Code(x, y) {
      _classCallCheck$1(this, Code);
      this.coreX = x;
      this.coreY = y;
      console.log("ErrorCode", errorCode);
    }

    // 这个也没有使用到
    _createClass$1(Code, [{
      key: "toString",
      value: function toString() {
        return "".concat(this.coreX, "-").concat(this.coreY);
      }

      // 这个方法需要优化 有点low
      // 应该使用 枚举类型 而不是使用json
      /**
       * @description 匹配错误信息
       * @param {string} code 
       * @returns {object}
       */
    }, {
      key: "matchErrorInfo",
      value: function matchErrorInfo(code) {
        return errorCode.data.find(function (item) {
          return item.detailCode.substr(-4) == code;
        });
      }
    }]);
    return Code;
  }();

  var header = {
  	color: "red",
  	backgroundColor: "red",
  	activeColor: "red",
  	btnList: [
  		{
  			btnKey: "ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-0",
  			iconId: "deviceID",
  			part: "left",
  			defaultActive: 1,
  			isrender: 1,
  			themeId: "934f270c08b14e928bf0c2ae8e1a937d"
  		},
  		{
  			btnKey: "ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-header-1",
  			iconId: "deviceName",
  			part: "left",
  			defaultActive: 1,
  			isrender: 1,
  			themeId: "934f270c08b14e928bf0c2ae8e1a937d"
  		}
  	]
  };
  var footer = {
  	color: "blue",
  	backgroundColor: "blue",
  	activeColor: "blue",
  	btnList: [
  		{
  			btnKey: "ade5d065a113432e8091a1c5bc819c57-934f270c08b14e928bf0c2ae8e1a937d-footer-0",
  			iconId: "play",
  			part: "left",
  			defaultActive: 0,
  			isrender: 0,
  			themeId: "934f270c08b14e928bf0c2ae8e1a937d"
  		}
  	]
  };
  var defaultTheme = {
  	header: header,
  	footer: footer
  };

  // 通用请求方法

  /**
   * @class TimeLine
   * @classdesc 时间轴组件
   * @param {EZUIKitPlayer} params - EZUIKitPlayer 插件对象
   * @example
   * const timeLine = new TimeLine(jSPlugin)
   */
  var TimeLine$1 = function TimeLine(jsPlugin) {
    this.jsPlugin = jsPlugin;
    var status = {
      isMouseDown: false,
      // 鼠标是否按下
      isOver: false,
      // 鼠标是否悬浮在进度条上
      mousePosition: null,
      oldTime: null,
      nowTime: jsPlugin.nowTime || null,
      moved: null,
      hoverTime: '2018-12-07 12:00:00',
      hoverLeft: 0,
      timeTipShow: false,
      randomNum: 123,
      timeWidthTbls: [60, 1800, 3600, 86400],
      // 时间宽度单位（秒）
      timeUnits: ['范围: 1分钟; 单位: 秒', '范围: 30分钟; 单位: 分钟', '范围: 1小时; 单位: 分钟', '范围: 1天; 单位: 小时', '范围: 3天; 单位: 小时'],
      // 时间单位
      drawPen: null,
      timeSection: [],
      //时间片段列表
      canvasWidth: null,
      canvasHeight: null,
      timeTips: null
    };
    // Object.keys(status).forEach(element => {
    //     this[element] = status[element];
    // });
    var _this = this;
    Object.keys(status).forEach(function (element) {
      _this[element] = status[element];
    });
    this.options = {
      width: this.canvasWidth,
      height: 48,
      time: new Date().getTime(),
      //new Date("2019-10-31 00:00:00"),//
      timeSection: [],
      timeWidth: 0 // 0-3
    };

    TimeLine.prototype.subTime = function (time) {
      if (time < 10) {
        return '0' + time;
      } else {
        return time;
      }
    };
    TimeLine.prototype.tranTime = function (time) {
      var stringTime = time;
      if (time) {
        var newDate = new Date(time);
        stringTime = newDate.getFullYear() + '/' + (newDate.getMonth() + 1) + '/' + newDate.getDate() + ' ' + this.subTime(newDate.getHours()) + ':' + this.subTime(newDate.getMinutes()) + ':' + this.subTime(newDate.getSeconds());
      }
      return stringTime;
    };
    TimeLine.prototype.init = function (params) {
      var opts = this.options;
      return new Promise(function (resolve, reject) {
        if (params.width) {
          document.getElementById(params.id).setAttribute("width", parseInt(params.width, 10) + 'px');
        }
        _this.randomNum = (Math.random() + '').split('.').join('');
        _this.timeWidthTblIndex = opts.timeWidth; // 当前使用时间宽度索引

        var canvas = document.getElementById("".concat(_this.jsPlugin.id, "-canvas"));
        _this.drawPen = canvas.getContext('2d');
        _this.nowTime = params.nowTime; // 当前时间点
        _this.timeSection = opts.timeSection || []; // 时间段记录区间
        _this.canvasWidth = canvas.offsetWidth;
        _this.canvasHeight = canvas.offsetHeight;
        _this.updata(); // 展示进度条
        // 事件监听
        document.getElementById("".concat(_this.jsPlugin.id, "-canvas")).addEventListener('mousemove', function (e) {
          if (_this.options.readOnly) {
            return;
          }
          _this.mousemove(e);
        });
        document.getElementById("".concat(_this.jsPlugin.id, "-canvas")).addEventListener('mouseover', function (e) {
          if (_this.options.readOnly) {
            return;
          }
          _this.mouseover(e);
        });
        document.getElementById("".concat(_this.jsPlugin.id, "-canvas")).addEventListener('mouseleave', function (e) {
          if (_this.options.readOnly) {
            return;
          }
          _this.mouseleave(e);
        });
        document.getElementById("".concat(_this.jsPlugin.id, "-canvas")).addEventListener('mousedown', function (e) {
          if (_this.options.readOnly) {
            return;
          }
          _this.mousedown(e);
        });
        document.getElementById("".concat(_this.jsPlugin.id, "-canvas")).addEventListener('mouseup', function (e) {
          if (_this.options.readOnly) {
            return;
          }
          var callback = params.onChange;
          _this.mouseUpFn(e, callback);
        });
        resolve();
      });
    };
    TimeLine.prototype.setWidth = function (params) {
      if (params.width) {
        document.getElementById(params.id).width = params.width;
        document.getElementById("".concat(params.id, "-canvas")).width = params.width;
        document.getElementById("".concat(params.id, "-canvas-container")).width = params.width;
        _this.canvasWidth = params.width;
        _this.updata({
          time: _this.nowTime || new Date()
        });
      }
    };
    TimeLine.prototype.mousemove = function (e) {
      //  console.log("鼠标移动",e)
      if (this.isMouseDown && this.isOver) {
        var mouseOffset = this.mousePosition - e.pageX;
        // fix点击引起mousemove的问题
        if (mouseOffset === 0) {
          return;
        }
        var timeOffsetUnit = 0;
        switch (this.timeWidth) {
          // 每个像素代表的时间
          case 60:
            timeOffsetUnit = 1 / 10;
            break;
          case 1800:
            timeOffsetUnit = 1 / 20 * 60;
            break;
          case 3600:
            timeOffsetUnit = 1 / 20 * 30 * 60;
            break;
          case 86400:
            timeOffsetUnit = 1 / 30 * 60 * 60;
            break;
        }
        var currentTime = new Date(this.oldTime).getTime() + mouseOffset * timeOffsetUnit * 1000;
        this.updata({
          time: currentTime
        });
        this.moved = true;
      } else {
        // 12-10
        //var { left, top } = this.$utils.getOffset(this.$refs.drawPanal);

        var left = parseInt(document.getElementById("".concat(this.jsPlugin.id, "-canvas-container")).offsetLeft, 10);
        //12 -10
        this.mousePosition = e.pageX - left;
        this.updata(); // 更新画面
      }
    };

    TimeLine.prototype.mousedown = function (e) {
      this.isMouseDown = true;
      this.mousePosition = e.pageX;
      this.oldTime = this.nowTime;
      // this.$emit('drag', true);
    };

    TimeLine.prototype.mouseover = function (e) {
      this.isOver = true;
    };
    TimeLine.prototype.mouseleave = function (e) {
      this.isOver = false;
      this.isMouseDown = false;
      this.updata();
    };
    TimeLine.prototype.changeSize = function (timeWidth) {
      console.log("changeSize", timeWidth);
      // if (w) {
      //     this.options.width = w;
      //     this.canvasWidth = w;
      // }
      // if (h) {
      //     this.options.height = h;
      //     this.canvasHeight = h;
      // }
      // console.log("tehis.optiosn",this.options)
      this.options.timeWidth = timeWidth;
      this.updata({
        timeWidth: timeWidth
      });
      // this.$nextTick(() => {
      //     this.updata();
      // });
    };

    TimeLine.prototype.mouseUpFn = function (e, callback) {
      if (this.isMouseDown) {
        this.isMouseDown = false;
        if (this.moved) {
          this.moved = false;
          // 限制拖动只更改时分秒
          var newStringTime = new Date(this.nowTime).getFullYear() + '/' + (new Date(this.nowTime).getMonth() + 1) + '/' + new Date(this.nowTime).getDate() + ' ' + this.subTime(new Date(this.nowTime).getHours()) + ':' + this.subTime(new Date(this.nowTime).getMinutes()) + ':' + this.subTime(new Date(this.nowTime).getSeconds());

          // var oldStringTime =
          //     new Date(this.oldTime).getFullYear() +
          //     '/' +
          //     (new Date(this.oldTime).getMonth() + 1) +
          //     '/' +
          //     new Date(this.oldTime).getDate();
          // ' ' +
          // this.subTime(new Date(this.oldTime).getHours()) +
          // ':' +
          // this.subTime( new Date(this.oldTime).getMinutes()) +
          // ':' +
          // this.subTime( new Date(this.oldTime).getSeconds());
          // this.nowTime = new Date(`${oldStringTime.substring(0,11) + newStringTime.substring(11,19)}`).getTime();
          this.nowTime = new Date(newStringTime);
          this.updata({
            time: this.nowTime
          });
          this.oldTime = this.nowTime;
          console.log("nowTime", new Date(this.nowTime), newStringTime);
          callback(this.nowTime);
        }
      }
    };
    TimeLine.prototype.readOnly = function (data) {
      console.log("更改为只读");
      this.options.readOnly = true;
      document.getElementById("".concat(this.jsPlugin.id, "-canvas")).style.cursor = "not-allowed";
    };
    TimeLine.prototype.unReadOnly = function (data) {
      console.log("更改为只读");
      this.options.readOnly = false;
      document.getElementById("".concat(this.jsPlugin.id, "-canvas")).style.cursor = "pointer";
    };
    TimeLine.prototype.run = function (data) {
      if (!_this.isMouseDown) {
        _this.updata(data);
      }
    };
    TimeLine.prototype.getTime = function (data) {
      console.log("this", this);
      console.log("当前时间", new Date(this.nowTime));
    };
    TimeLine.prototype.updata = function (data) {
      data = data || {};
      _this.nowTime = data.time || _this.nowTime;
      _this.timeSection = data.timeSection || _this.timeSection;
      _this.timeWidthTblIndex = data.timeWidth || _this.timeWidthTblIndex;
      _this.timeWidth = _this.timeWidthTbls[data.timeWidth || _this.timeWidthTblIndex];
      _this.timeUnit = _this.timeUnits[data.timeWidth || _this.timeWidthTblIndex];
      if (data.timeWidth === 0) {
        _this.timeWidthTblIndex = 0;
        _this.timeWidth = _this.timeWidthTbls[0];
        _this.timeUnit = _this.timeUnits[0];
      }
      _this.drawPen.fillStyle = '#000000';
      _this.drawPen.fillRect(0, 0, _this.canvasWidth, _this.canvasHeight);
      _this.drawScale(); // 画刻度
      _this.drawRecord(); // 画录像区间
      _this.drawOtherMsg(); // 画录像的其他信息
    };

    TimeLine.prototype.drawSolidLine = function (startX, startY, endX, endY, lineWidth, color) {
      this.drawPen.save();
      this.drawPen.strokeStyle = color;
      this.drawPen.lineWidth = lineWidth;
      this.drawPen.beginPath();
      this.drawPen.moveTo(startX, startY);
      this.drawPen.lineTo(endX, endY);
      this.drawPen.stroke();
      this.drawPen.restore();
    };
    TimeLine.prototype.drawString = function (text, x, y, aling, color) {
      this.drawPen.font = '12px serif';
      this.drawPen.fillStyle = '#ffffff';
      this.drawPen.textAlign = aling || 'left';
      this.drawPen.fillText(text, x, y + 10);
    };
    TimeLine.prototype.drawScale = function () {
      var _this = this;
      var lineColor = 'rgba(255,255,255)';
      var startDate = new Date(_this.nowTime); // 开始时间
      var starSecond = startDate.getSeconds(); // 起始的秒数
      var starMin = startDate.getMinutes(); // 起始的分钟数
      var startHours = startDate.getHours(); // 起始的小时
      var startDay = startDate.getDate(); // 起始的日期
      var curScale = 0; // 计算时间点
      switch (_this.timeWidth) {
        case 60:
          {
            var dotNum = parseInt(_this.canvasWidth / 10); // 每10像素一个点
            startDate.setSeconds(startDate.getSeconds() - parseInt(dotNum / 2, 10)); // 从现在时间的一半开始画起
            startDay = startDate.getDate();
            startHours = startDate.getHours();
            starMin = startDate.getMinutes();
            starSecond = startDate.getSeconds();
            for (var i = 0; i < dotNum; i++) {
              curScale = starSecond + i;
              startDate.setSeconds(curScale);
              // 每一个整10秒画一次线和文字
              if (curScale % 10 === 0) {
                _this.drawSolidLine(i * _this.canvasWidth / dotNum, 8, i * _this.canvasWidth / dotNum, _this.canvasHeight / 5 + 8, 1, lineColor);
                var timeString = this.subTime(startDate.getHours()) + ':' + this.subTime(startDate.getMinutes()) + ':' + this.subTime(startDate.getSeconds());
                _this.drawString(timeString, i * _this.canvasWidth / dotNum, _this.canvasHeight / 5 * 2.5, 'center', 'rgba(255,255,255,0.3)');
              } else {
                // 只画一次线
                _this.drawSolidLine(i * _this.canvasWidth / dotNum, 8, i * _this.canvasWidth / dotNum, _this.canvasHeight / 5 * 0.5 + 8, 1, lineColor);
              }
              /**
               * 偏移距离超过60，setSeconds会每次累加1到分钟，因此绘图完成后需要复原到当前分钟，再次计算偏移
               */
              startDate.setDate(startDay);
              startDate.setHours(startHours);
              startDate.setMinutes(starMin);
            }
            break;
          }
        case 1800:
          {
            var nowTime = new Date(_this.nowTime);
            var scaleSeconds = nowTime.getHours() * 3600 + nowTime.getMinutes() * 60 + nowTime.getSeconds(); //偏移秒数
            var scaleMinutes = parseInt(scaleSeconds / 60); //偏移分钟数
            var center = {
              position: parseInt(_this.canvasWidth / 2),
              time: 0,
              hideString: true //中心刻度不渲染时间戳
            }; //中心点

            // 每20像素一个刻度，一个刻度1分钟（60秒）
            // 每像素3秒
            // 每秒1/3像素
            var _dotNum = Math.ceil(_this.canvasWidth / 40) + scaleMinutes;
            var scaleArr = []; //刻度数组（像素值）
            scaleArr.push(center);
            for (var index = 0; index < _dotNum; index++) {
              // 获取刻度数组
              scaleArr.push({
                position: center.position + index * 20 - parseInt(scaleSeconds / 3),
                time: center.time + index * 60
              });
              scaleArr.unshift({
                position: center.position - index * 20 - parseInt(scaleSeconds / 3),
                time: center.time - index * 60
              });
            }
            for (var _index = 0; _index < scaleArr.length; _index++) {
              // 画刻度、时间文本
              _this.drawSolidLine(scaleArr[_index].position, 8, scaleArr[_index].position, _this.canvasHeight / 5 * (scaleArr[_index].time % 100 === 0 ? 1 : 0.5) + 8, 1, lineColor);
              if (scaleArr[_index].time % 100 === 0 && !scaleArr[_index].hideString) {
                var date = new Date(scaleArr[_index].time * 1000); // 转换为毫秒 
                var hours = date.getUTCHours() < 10 ? "0".concat(date.getUTCHours()) : date.getUTCHours();
                var minutes = date.getUTCMinutes() < 10 ? "0".concat(date.getUTCMinutes()) : date.getUTCMinutes();
                date.getUTCSeconds() < 10 ? "0".concat(date.getUTCSeconds()) : date.getUTCSeconds();
                var timeStr = "".concat(hours, ":").concat(minutes);
                _this.drawString(timeStr, scaleArr[_index].position, _this.canvasHeight / 5 * 2, 'center', 'rgba(255,255,255,0.3)');
              }
            }
            break;
          }
        case 3600:
          {
            var _nowTime = new Date(_this.nowTime);
            var _scaleSeconds = _nowTime.getHours() * 3600 + _nowTime.getMinutes() * 60 + _nowTime.getSeconds(); //偏移秒数
            var scaleHalfHours = parseInt(_scaleSeconds / 1800); //偏移半小时数
            var _center = {
              position: parseInt(_this.canvasWidth / 2),
              time: 0,
              hideString: true //中心刻度不渲染时间戳
            }; //中心点

            // 每20像素一个刻度，一个刻度半小时（1800秒）
            // 每像素90秒
            // 每秒1/90像素
            var _dotNum2 = Math.ceil(_this.canvasWidth / 40) + scaleHalfHours;
            var _scaleArr = []; //刻度数组（像素值）
            _scaleArr.push(_center);
            for (var _index2 = 0; _index2 < _dotNum2; _index2++) {
              // 获取刻度数组
              _scaleArr.push({
                position: _center.position + _index2 * 20 - parseInt(_scaleSeconds / 90),
                time: _center.time + _index2 * 1800
              });
              _scaleArr.unshift({
                position: _center.position - _index2 * 20 - parseInt(_scaleSeconds / 90),
                time: _center.time - _index2 * 1800
              });
            }
            for (var _index3 = 0; _index3 < _scaleArr.length; _index3++) {
              // 画刻度、时间文本
              _this.drawSolidLine(_scaleArr[_index3].position, 8, _scaleArr[_index3].position, _this.canvasHeight / 5 * (_scaleArr[_index3].time % 9000 === 0 ? 1 : 0.5) + 8, 1, lineColor);
              if (_scaleArr[_index3].time % 9000 === 0 && !_scaleArr[_index3].hideString) {
                var _date = new Date(_scaleArr[_index3].time * 1000); // 转换为毫秒 
                var _hours = _date.getUTCHours() < 10 ? "0".concat(_date.getUTCHours()) : _date.getUTCHours();
                var _minutes = _date.getUTCMinutes() < 10 ? "0".concat(_date.getUTCMinutes()) : _date.getUTCMinutes();
                _date.getUTCSeconds() < 10 ? "0".concat(_date.getUTCSeconds()) : _date.getUTCSeconds();
                var _timeStr = "".concat(_hours, ":").concat(_minutes);
                _this.drawString(_timeStr, _scaleArr[_index3].position, _this.canvasHeight / 5 * 2, 'center', 'rgba(255,255,255,0.3)');
              }
            }
            break;
          }
        case 86400:
          {
            var _nowTime2 = new Date(_this.nowTime);
            var _scaleSeconds2 = _nowTime2.getHours() * 3600 + _nowTime2.getMinutes() * 60 + _nowTime2.getSeconds(); //偏移秒数
            var scaleHours = parseInt(_scaleSeconds2 / 3600); //偏移小时数
            var _center2 = {
              position: parseFloat(_this.canvasWidth / 2),
              time: 0,
              hideString: true //中心刻度不渲染时间戳
            }; //中心点

            // 每30像素一个刻度，一个刻度1小时（3600秒）
            // 每像素120秒
            // 每秒1/120像素
            var _dotNum3 = Math.ceil(_this.canvasWidth / 60) + scaleHours;
            var _scaleArr2 = []; //刻度数组（像素值）
            _scaleArr2.push(_center2);
            for (var _index4 = 0; _index4 < _dotNum3; _index4++) {
              // 获取刻度数组
              _scaleArr2.push({
                position: _center2.position + _index4 * 30 - _scaleSeconds2 / 120,
                time: _center2.time + _index4 * 3600
              });
              _scaleArr2.unshift({
                position: _center2.position - _index4 * 30 - _scaleSeconds2 / 120,
                time: _center2.time - _index4 * 3600
              });
            }
            for (var _index5 = 0; _index5 < _scaleArr2.length; _index5++) {
              // 画刻度、时间文本
              _this.drawSolidLine(_scaleArr2[_index5].position, 8, _scaleArr2[_index5].position, _this.canvasHeight / 5 * (_scaleArr2[_index5].time % 7200 === 0 ? 1 : 0.5) + 8, 1, lineColor);
              if (_scaleArr2[_index5].time % 7200 === 0 && !_scaleArr2[_index5].hideString) {
                var _date2 = new Date(_scaleArr2[_index5].time * 1000); // 转换为毫秒 
                var _hours2 = _date2.getUTCHours() < 10 ? "0".concat(_date2.getUTCHours()) : _date2.getUTCHours();
                var _minutes2 = _date2.getUTCMinutes() < 10 ? "0".concat(_date2.getUTCMinutes()) : _date2.getUTCMinutes();
                _date2.getUTCSeconds() < 10 ? "0".concat(_date2.getUTCSeconds()) : _date2.getUTCSeconds();
                var _timeStr2 = "".concat(_hours2, ":").concat(_minutes2);
                _this.drawString(_timeStr2, _scaleArr2[_index5].position, _this.canvasHeight / 5 * 2, 'center', 'rgba(255,255,255,0.3)');
              }
            }
            break;
          }
      }
    };
    TimeLine.prototype.getRecord = function (timeArr, startTime, endTime) {
      this.timeSection = timeArr;
      this.drawRecord();
    };
    TimeLine.prototype.drawRecord = function () {
      // 绘制蓝色区域
      var timeArr = this.timeSection || [];
      var _this = this;
      var drawPen = _this.drawPen;

      // 根据时间查找当前位置
      for (var i = 0; i < timeArr.length; i++) {
        var startPosition = findPosition(timeArr[i].startTime);
        var endPosition = findPosition(timeArr[i].endTime);
        drawPen.fillStyle = '#1890ff80';
        drawPen.fillRect(startPosition, 0, endPosition - startPosition, 48);
      }
      function findPosition(time) {
        var scale = 10;
        switch (_this.timeWidth) {
          case 60:
            scale = 10;
            break;
          case 1800:
            scale = 20 / 60;
            break;
          case 3600:
            scale = 20 / 30 / 60;
            break;
          case 86400:
            scale = 30 / 60 / 60;
            break;
        }
        var nowTimePostion = _this.canvasWidth / 2; //总宽度一半
        var position = nowTimePostion + (time - _this.nowTime) / 1000 * scale;
        if (position > _this.canvasWidth) {
          position = _this.canvasWidth;
        }
        if (position <= 0) {
          position = 0;
        }
        return position;
      }
    };
    TimeLine.prototype.drawOtherMsg = function () {
      // 画中心线
      this.drawSolidLine(this.canvasWidth / 2, 0, this.canvasWidth / 2, this.canvasHeight, 2, '#1890FF');
      this.drawPen.shadowBlur = 0;
      if (this.isOver && !this.isMouseDown) {
        this.mouseTime = this.mousePosition / this.canvasWidth * this.timeWidth * 1000 + this.nowTime - this.timeWidth / 2 * 1000; // 鼠标的悬浮点对应的时间

        this.mouseString = this.tranTime(this.mouseTime); // 鼠标悬浮点显示的文字
        this.hoverTime = this.mouseString;
        this.hoverLeft = this.mousePosition - 60;
        this.timeTipShow = true;
      } else {
        this.timeTipShow = false;
      }
    };
  };

  /**
   * @class Rec
   * @classdesc 回放
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @example 
   * const rec = new Rec(jSPlugin);
   */
  var Rec = /*#__PURE__*/function () {
    function Rec(jSPlugin) {
      _classCallCheck$1(this, Rec);
      this.jSPlugin = jSPlugin;
      if (!document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
        return false;
      }
      this.currentTimeWidth = 0; //回放时间轴尺度 0~3
      this.date = new Date();
      this.datepickerVisible = false;
      this.seekTimer = null;
      this.disabled = false;
      this.isSeeking = false;
      this.seekFrequency = 2000;
      this.recList = [];
      this.lastDate = null; //最后一段录像结束时间
      this.nowTime = null; //时间轴当前时间
      if (this.jSPlugin.params && this.jSPlugin.params.seekFrequency) {
        this.seekFrequency = this.jSPlugin.params.seekFrequency;
      }
      this.recInit();
    }
    _createClass$1(Rec, [{
      key: "recInit",
      value: function recInit() {
        var _this2 = this;
        if (!document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          return false;
        }
        // 重置时间轴尺度
        this.currentTimeWidth = 0;
        var canvasItemWidth = parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).width, 10) - 100;
        var canvasContainer = document.createElement('div');
        canvasContainer.style = "display:inline-block;height:48px;";
        canvasContainer.id = this.jSPlugin.id + "-canvas-container";
        var canvasItem = document.createElement('canvas');
        canvasItem.id = this.jSPlugin.id + "-canvas";
        canvasItem.className = "time-line-body";
        canvasItem.height = "48";
        canvasItem.width = canvasItemWidth;
        canvasItem.style = "display:inline-block;";
        canvasItem.innerHTML = "该浏览器不支持canvas";
        canvasContainer.appendChild(canvasItem);
        insertAfter(canvasContainer, document.getElementById("".concat(this.jSPlugin.id, "-audioControls")));
        var timeLineControlsContainer = document.createElement('div');
        timeLineControlsContainer.className = "timeline-controls";
        timeLineControlsContainer.style = "display:flex;width:100px;height:48px;text-align:center;line-height: 48px;vertical-align: top;background: #000000;";
        var timeLineControls = "\n<div class=\"timeline-controls-scale\" style=\"display: inline-flex;flex-direction: column;justify-content: center;vertical-align: top;padding: 0 20px;\">\n  <span style=\"vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;\" id=\"".concat(this.jSPlugin.id, "-timeline-scale-add\">\n    <svg fill=\"#2C2C2C\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\n      viewBox=\"0 0 20 20\">\n      <title>add</title>\n      <g>\n        <polygon points=\"0.1,0.5 15,0.5 15,15.4 0.1,15.4 \t\" />\n      </g>\n      <g>\n        <path\n          fill=\"#FFFFFF\";\n          d=\"M7.6,12.4c-0.3,0-0.5-0.2-0.5-0.5v-8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v8C8.1,12.2,7.9,12.4,7.6,12.4z\" />\n      </g>\n      <g>\n        <path\n          fill=\"#FFFFFF\";\n          d=\"M11.6,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S11.8,8.4,11.6,8.4z\" />\n      </g>\n    </svg>\n  </span>\n  <span style=\"vertical-Align: middle;line-height: 14px;height: 18px; width: 18px;cursor:pointer;\" id=\"").concat(this.jSPlugin.id, "-timeline-scale-sub\">\n    <svg fill=\"#2C2C2C\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\n      viewBox=\"0 0 20 20\">\n      <title>reduce</title>\n      <g>\n        <polygon class=\"st0\" points=\"1,0.8 15.2,0.8 15.2,15 1,15 \t\" />\n      </g>\n      <g>\n        <path class=\"st1\"\n          fill=\"#FFFFFF\";\n          d=\"M12.1,8.4h-8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h8c0.3,0,0.5,0.2,0.5,0.5S12.4,8.4,12.1,8.4z\" />\n      </g>\n    </svg>\n  </span>\n</div>\n<label for=\"").concat(this.jSPlugin.id, "-datepicker\">\n  <div class=\"timeline-controls-date\">\n    <span>\n      <svg fill=\"#2C2C2C\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\"\n        viewBox=\"0 0 20 20\">\n        <title>ifttt</title>\n        <g id=\"Rectangle\">\n          <rect x=\"0.6\" y=\"0.9\" class=\"st0\" width=\"20\" height=\"20\" />\n        </g>\n        <g id=\"Stroke-1\">\n          <path fill=\"#FFFFFF\"; class=\"st1\"\n            d=\"M14,7.2c-0.3,0-0.5-0.2-0.5-0.5V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C14.5,7,14.2,7.2,14,7.2z\" />\n        </g>\n        <g id=\"Stroke-3\">\n          <path fill=\"#FFFFFF\"; class=\"st1\"\n            d=\"M7.3,7.2C7,7.2,6.8,7,6.8,6.7V3.4c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v3.3C7.8,7,7.6,7.2,7.3,7.2z\" />\n        </g>\n        <g id=\"Stroke-5\">\n          <path fill=\"#FFFFFF\"; class=\"st1\"\n            d=\"M18.1,9.7h-15c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h15c0.3,0,0.5,0.2,0.5,0.5S18.4,9.7,18.1,9.7z\" />\n        </g>\n        <g id=\"Stroke-7\">\n          <path fill=\"#FFFFFF\"; class=\"st1\" d=\"M16.5,19.7H4.8c-1.2,0-2.2-1-2.2-2.2V6.7c0-1.2,1-2.2,2.2-2.2h11.7c1.2,0,2.2,1,2.2,2.2v10.8\nC18.6,18.8,17.7,19.7,16.5,19.7z M4.8,5.6c-0.6,0-1.2,0.5-1.2,1.2v10.8c0,0.6,0.5,1.2,1.2,1.2h11.7c0.6,0,1.2-0.5,1.2-1.2V6.7\nc0-0.6-0.5-1.2-1.2-1.2H4.8z\" />\n        </g>\n        <g id=\"Stroke-9\">\n          <path fill=\"#FFFFFF\"; class=\"st1\" d=\"M10.6,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5s0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7\nS11,13.3,10.6,13.3z\" />\n        </g>\n        <g id=\"Stroke-11\">\n          <path fill=\"#FFFFFF\"; class=\"st1\" d=\"M14.8,13.3c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2c0.4,0,0.7,0.3,0.7,0.7\nS15.2,13.3,14.8,13.3z M14.8,12.3c-0.2,0-0.3,0.1-0.3,0.3c0,0.2,0.3,0.4,0.5,0.2c0.1-0.1,0.1-0.1,0.1-0.2\nC15.1,12.4,15,12.3,14.8,12.3z\" />\n        </g>\n        <g id=\"Stroke-13\">\n          <path fill=\"#FFFFFF\"; class=\"st1\" d=\"M6.5,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7\nC7.2,16.3,6.9,16.6,6.5,16.6z\" />\n        </g>\n        <g id=\"Stroke-15\">\n          <path fill=\"#FFFFFF\"; class=\"st1\" d=\"M10.6,16.6c-0.4,0-0.7-0.3-0.7-0.7c0-0.2,0.1-0.4,0.2-0.5c0.1-0.1,0.3-0.2,0.5-0.2h0h0c0.4,0,0.7,0.3,0.7,0.7\nC11.4,16.3,11,16.6,10.6,16.6z\" />\n        </g>\n      </svg>\n    </span>\n  </div>\n</label>\n<input autocomplete=\"off\" data-toggle=\"").concat(this.jSPlugin.id, "-datepicker\" id=\"").concat(this.jSPlugin.id, "-datepicker\" name=\"").concat(this.jSPlugin.id, "-datepicker\" style=\"opacity:0;width:24px;margin-left:-24px;cursor:pointer;\" />\n");
        timeLineControlsContainer.innerHTML = timeLineControls;
        insertAfter(timeLineControlsContainer, canvasContainer);
        this.timeLine = new TimeLine$1(this.jSPlugin);
        var that = this;
        this.timeLine.init({
          id: this.jSPlugin.id + '-canvas',
          width: canvasItemWidth,
          nowTime: this.nowTime,
          onChange: function onChange(time) {
            console.log("time", time, new Date(time).Format('yyyyMMddhhmmss'));
            var newBegin = new Date(time).Format('yyyyMMddhhmmss');
            console.log('----------------this.jSPlugin.url', _this2.jSPlugin.url);
            //切换播放时间时关闭录像计时
            if (_this2.jSPlugin.Theme && _this2.jSPlugin.Theme.decoderState.state.recordvideo) {
              _this2.jSPlugin.Theme.setDecoderState({
                recordvideo: false
              });
              if (matchEzopenUrl(_this2.jSPlugin.url).type === 'cloud.rec') {
                _this2.jSPlugin.stopSave();
              }
            }
            //云录制、支持seek功能的设备开启seek回放功能
            if (matchEzopenUrl(_this2.jSPlugin.url).type === 'cloud.rec') {
              if (!_this2.isSeeking) {
                if (that.recList.length > 0) {
                  if (new Date(time).valueOf() >= that.lastDate) {
                    _this2.jSPlugin.pluginStatus.loadingSetText({
                      text: "seek回放未找到录像片段",
                      color: "red",
                      delayClear: 2000
                    });
                  } else {
                    // 进入seek状态后停止同步时间轴
                    // 持续获取OSD时间
                    // 当OSD时间大于等于下发的seek时间时，表示seek完成，开始同步时间轴
                    _this2.unSyncTimeLine().then(function () {
                      _this2.isSeeking = true;
                      _this2.jSPlugin.pluginStatus.loadingStart(_this2.jSPlugin.id);
                      _this2.jSPlugin.pluginStatus.setPlayStatus({
                        loading: true
                      });
                      _this2.jSPlugin.pluginStatus.loadingSetText({
                        text: "加载中，请稍后"
                      });
                      _this2.jSPlugin.Theme.setDisabled(true);
                      _this2.jSPlugin.seek(newBegin.substr(8, 6), "235959").then(function () {
                        var timer = setInterval(function () {
                          _this2.jSPlugin.getOSDTime().then(function (OSDdate) {
                            var tmpTime = new Date(time).valueOf() / 1000;
                            console.log('seek时间同步:', OSDdate.data, tmpTime, OSDdate.data >= tmpTime);
                            if (OSDdate.data >= tmpTime - 2) {
                              _this2.isSeeking = false;
                              _this2.syncTimeLine();
                              clearInterval(timer);
                              _this2.jSPlugin.pluginStatus.loadingStop(_this2.jSPlugin.id);
                              _this2.jSPlugin.pluginStatus.setPlayStatus({
                                loading: false
                              });
                              _this2.jSPlugin.pluginStatus.loadingClear();
                              _this2.jSPlugin.Theme.setDisabled(false);
                            }
                          });
                        }, 1000);
                      });
                    });
                  }
                }
              }
            } else {
              var callback = function callback() {
                setTimeout(function () {
                  _this2.disabled = false;
                }, _this2.seekFrequency);
              };
              var play = _this2.jSPlugin.Theme.decoderState.state.play;
              var localRecSeek = function localRecSeek(callback) {
                _this2.disabled = true;
                if (play) {
                  _this2.unSyncTimeLine().then(function () {
                    _this2.jSPlugin.pluginStatus.loadingStart(_this2.jSPlugin.id);
                    _this2.jSPlugin.pluginStatus.setPlayStatus({
                      loading: true
                    });
                    _this2.jSPlugin.pluginStatus.loadingSetText({
                      text: "加载中，请稍后"
                    });
                    _this2.jSPlugin.Theme.setDisabled(true);
                    //正在播放时先暂停
                    _this2.jSPlugin.pause(newBegin).then(function () {
                      console.log("暂停成功");
                      _this2.jSPlugin.resume(newBegin).then(function (data) {
                        console.log("恢复成功：", data);
                        if (_this2.jSPlugin.Theme) {
                          _this2.jSPlugin.Theme.setDecoderState({
                            play: true
                          });
                        }
                        // 打开声音
                        if (_this2.jSPlugin.Theme && _this2.jSPlugin.Theme.decoderState.state.sound) {
                          _this2.jSPlugin.openSound();
                        }
                        if (callback) {
                          callback();
                        }
                        _this2.syncTimeLine();
                        _this2.jSPlugin.pluginStatus.loadingStop(_this2.jSPlugin.id);
                        _this2.jSPlugin.pluginStatus.setPlayStatus({
                          loading: false
                        });
                        _this2.jSPlugin.pluginStatus.loadingClear();
                        _this2.jSPlugin.Theme.setDisabled(false);
                      })["catch"](function (err) {
                        console.log("恢复失败", err);
                      });
                    })["catch"](function () {
                      console.log("暂停失败");
                      _this2.jSPlugin.resume(newBegin).then(function (data) {
                        console.log("恢复成功");
                        if (_this2.jSPlugin.Theme) {
                          _this2.jSPlugin.Theme.setDecoderState({
                            play: true
                          });
                        }
                        if (callback) {
                          callback();
                        }
                        _this2.syncTimeLine();
                        _this2.jSPlugin.pluginStatus.loadingStop(_this2.jSPlugin.id);
                        _this2.jSPlugin.pluginStatus.setPlayStatus({
                          loading: false
                        });
                        _this2.jSPlugin.pluginStatus.loadingClear();
                        _this2.jSPlugin.Theme.setDisabled(false);
                      })["catch"](function (err) {
                        console.log("恢复失败", err);
                      });
                    });
                  });
                } else {
                  _this2.unSyncTimeLine().then(function () {
                    //暂停状态下先停止旧的取流
                    _this2.jSPlugin.resume().then(function () {
                      _this2.jSPlugin.pause(newBegin).then(function () {
                        console.log("暂停成功");
                        _this2.jSPlugin.resume(newBegin).then(function (data) {
                          if (_this2.jSPlugin.Theme) {
                            _this2.jSPlugin.Theme.setDecoderState({
                              play: true
                            });
                          }
                          // 打开声音
                          if (_this2.jSPlugin.Theme && _this2.jSPlugin.Theme.decoderState.state.sound) {
                            _this2.jSPlugin.openSound();
                          }
                          if (callback) {
                            callback();
                          }
                          _this2.syncTimeLine();
                        })["catch"](function (err) {
                          console.log("恢复失败", err);
                        });
                      })["catch"](function () {
                        console.log("暂停失败");
                        _this2.jSPlugin.resume(newBegin).then(function (data) {
                          if (_this2.jSPlugin.Theme) {
                            _this2.jSPlugin.Theme.setDecoderState({
                              play: true
                            });
                          }
                          if (callback) {
                            callback();
                          }
                          _this2.syncTimeLine();
                        })["catch"](function (err) {
                          console.log("恢复失败", err);
                        });
                      });
                    })["catch"](function (error) {
                      _this2.jSPlugin.resume(newBegin).then(function (data) {
                        if (_this2.jSPlugin.Theme) {
                          _this2.jSPlugin.Theme.setDecoderState({
                            play: true
                          });
                        }
                        // 打开声音
                        if (_this2.jSPlugin.Theme && _this2.jSPlugin.Theme.decoderState.state.sound) {
                          _this2.jSPlugin.openSound();
                        }
                        if (callback) {
                          callback();
                        }
                        _this2.syncTimeLine();
                      })["catch"](function (err) {
                        console.log("恢复失败", err);
                      });
                    });
                  });
                }
                //重置放大倍数
                if (_this2.jSPlugin.Theme && _this2.jSPlugin.Theme.decoderState && _this2.jSPlugin.Theme.decoderState.state && _this2.jSPlugin.Theme.decoderState.state.zoom) {
                  _this2.jSPlugin.Theme.setDecoderState({
                    zoom: false
                  });
                  _this2.jSPlugin.Zoom.stopZoom();
                }
              };
              if (_this2.disabled) {
                console.log("操作频繁，等待2秒后执行");
                // 限制每2秒只触发一次拖动
                if (_this2.seekTimer) {
                  clearTimeout(_this2.seekTimer);
                }
                _this2.seekTimer = setTimeout(function () {
                  localRecSeek(callback);
                }, _this2.seekFrequency);
              } else {
                localRecSeek(callback);
              }
            }
          }
        }).then(function () {
          _this2.syncTimeLine();
          console.log(_this2.timeLine);
        });
        var _this = this;

        /**
         * 注入js css
         * @param {*} jSPlugin 
         */
        function injectJsCss(jSPlugin) {
          var container = document.getElementById("".concat(jSPlugin.id, "-wrap"));
          addCss("".concat(jSPlugin.staticPath, "/rec/datepicker.min.css"));
          // 加载日期选择器
          addJs("".concat(jSPlugin.staticPath, "/rec/jquery.min.js"), function (jSPlugin) {
            addJs("".concat(jSPlugin.staticPath, "/rec/datepicker.js"), function (jSPlugin) {
              addJs("".concat(jSPlugin.staticPath, "/rec/datepicker.zh-CN.js"), function (jSPlugin) {
                // 第一次创建前没有
                var datepickerContainer = container.getElementsByClassName("datepicker-container")[0];
                // 日期选择：
                if (!datepickerContainer && $("#".concat(jSPlugin.id, "-datepicker")).datepicker) {
                  $("#".concat(jSPlugin.id, "-datepicker")).datepicker({
                    autoShow: false,
                    autoHide: true,
                    autoPick: true,
                    language: 'zh-CN',
                    date: new Date(getQueryString('begin', jSPlugin.params.url).replace(/(\d{4})(\d{2})(\d{2})/, '$1-$2-$3')) || new Date(),
                    format: 'yyyy-mm-dd',
                    endDate: new Date(),
                    inline: true,
                    container: container
                  });
                }
                // 第一次没有创建 在重新获取一次 第二次回去一定存在
                datepickerContainer = container.getElementsByClassName("datepicker-container")[0];
                if (datepickerContainer) {
                  datepickerContainer.style.display = "none";
                }
                _this.datepickerVisible = false;
                $("#".concat(jSPlugin.id, "-datepicker")).on('pick.datepicker', function (e) {
                  console.log("重新选择日期", e.date, new Date(e.date).Format('yyyyMMdd'), new Date(document.getElementById("".concat(jSPlugin.id, "-datepicker")).value).Format('yyyyMMdd'));
                  if (e.date > new Date() || new Date(e.date).Format('yyyyMMdd') === new Date(document.getElementById("".concat(jSPlugin.id, "-datepicker")).value).Format('yyyyMMdd')) {
                    e.preventDefault(); // Prevent to pick the date
                  } else {
                    document.getElementById("".concat(jSPlugin.id, "-datepicker")).value = new Date(e.date).Format('yyyy-MM-dd');
                    _this.renderRec(e.date);
                    if (jSPlugin.Theme.decoderState && jSPlugin.Theme.decoderState.state) {
                      if (jSPlugin.Theme.decoderState.state.cloudRec) {
                        jSPlugin.changePlayUrl({
                          begin: new Date(e.date).Format('yyyyMMdd'),
                          type: 'cloud.rec'
                        }, function () {}, false);
                      } else if (jSPlugin.Theme.decoderState.state.rec) {
                        jSPlugin.changePlayUrl({
                          begin: new Date(e.date).Format('yyyyMMdd'),
                          type: 'rec'
                        }, function () {}, false);
                      } else {
                        jSPlugin.changePlayUrl({
                          begin: new Date(e.date).Format('yyyyMMdd')
                        }, function () {}, false);
                      }
                    } else {
                      jSPlugin.changePlayUrl({
                        begin: new Date(e.date).Format('yyyyMMdd')
                      }, function () {}, false);
                    }
                  }
                  if (datepickerContainer) {
                    datepickerContainer.style.display = "none";
                  }
                  _this.datepickerVisible = false;
                  //xuehb 重置放大倍数
                  if (jSPlugin.Theme && jSPlugin.Theme.decoderState && jSPlugin.Theme.decoderState.state && jSPlugin.Theme.decoderState.state.zoom) {
                    jSPlugin.Theme.setDecoderState({
                      zoom: false
                    });
                    jSPlugin.Zoom.stopZoom();
                  }
                });
                $("#".concat(jSPlugin.id, "-datepicker")).off('click').on("click", function (e) {
                  console.log("点击日期");
                  if (!_this.datepickerVisible) {
                    if (datepickerContainer) {
                      datepickerContainer.style.display = "inline";
                    }
                  } else {
                    if (datepickerContainer) {
                      datepickerContainer.style.display = "none";
                    }
                  }
                  _this.datepickerVisible = !_this.datepickerVisible;
                });
              }, function () {}, jSPlugin);
            }, function () {}, jSPlugin);
          }, function () {}, jSPlugin);
        }
        injectJsCss(_this.jSPlugin);

        // 尺度变化监听
        document.getElementById("".concat(this.jSPlugin.id, "-timeline-scale-add")).onclick = function () {
          _this2.unSyncTimeLine().then(function () {
            var currentTimeWidth = _this2.currentTimeWidth;
            if (currentTimeWidth < 3) {
              _this2.timeLine.changeSize(++_this2.currentTimeWidth);
            }
            _this2.syncTimeLine();
          });
        };
        document.getElementById("".concat(this.jSPlugin.id, "-timeline-scale-sub")).onclick = function () {
          _this2.unSyncTimeLine().then(function () {
            var currentTimeWidth = _this2.currentTimeWidth;
            if (currentTimeWidth > 0) {
              _this2.timeLine.changeSize(--_this2.currentTimeWidth);
            }
            _this2.syncTimeLine();
          });
        };
        // 渲染回放
        var initDate = getQueryString("begin", this.jSPlugin.url) || new Date().Format('yyyyMMdd');
        this.renderRec("".concat(initDate.slice(0, 4), "-").concat(initDate.slice(4, 6), "-").concat(initDate.slice(6, 8)));
        this.observer = new MutationObserver(function (mutations, observer) {
          // this.recAutoSize(false);
        });
        var config = {
          attributes: true,
          attributeOldValue: true,
          attributeFilter: ['style']
        };
        var el = document.getElementById("".concat(this.jSPlugin.id));
        this.observer.observe(el, config);
      }
    }, {
      key: "setDatepickerDate",
      value: function setDatepickerDate(date) {
        var container = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        var datepickerContainer = container.getElementsByClassName("datepicker-container")[0];
        if (datepickerContainer) {
          var dom = datepickerContainer;
          var parentNode = dom.parentNode;
          parentNode.removeChild(dom);
          document.getElementById("".concat(this.jSPlugin.id, "-datepicker")).value = date.replace(/(\d{4})(\d{2})(\d{2})/, '$1-$2-$3');
          $("#".concat(this.jSPlugin.id, "-datepicker")).datepicker({
            autoShow: false,
            autoHide: true,
            autoPick: true,
            language: 'zh-CN',
            defaultDate: date,
            format: 'yyyy-mm-dd',
            endDate: new Date(),
            inline: true,
            container: document.getElementById("".concat(this.jSPlugin.id, "-wrap"))
          });
        }
      }
    }, {
      key: "datepickerHide",
      value: function datepickerHide() {
        var container = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        var datepickerContainer = container?.getElementsByClassName("datepicker-container")?.[0];
        if (container && datepickerContainer) {
          datepickerContainer.style.display = "none";
        }
        this.datepickerVisible = false;
      }
    }, {
      key: "datepickerShow",
      value: function datepickerShow() {
        var container = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        var datepickerContainer = container.getElementsByClassName("datepicker-container")[0];
        if (container) {
          datepickerContainer.style.display = "inline";
        }
        this.datepickerVisible = true;
      }
    }, {
      key: "recAutoSize",
      value: function recAutoSize(callback) {
        var _this3 = this;
        var that = this;
        var canvasItemWidth = parseInt(getComputedStyle(document.getElementById(that.jSPlugin.id)).width, 10) - 100;
        if (document.getElementById("".concat(this.jSPlugin.id, "-canvas")) && canvasItemWidth !== parseInt(document.getElementById("".concat(that.jSPlugin.id, "-canvas")).width)) {
          that.unSyncTimeLine().then(function () {
            that.timeLine.setWidth({
              id: "".concat(_this3.jSPlugin.id),
              width: canvasItemWidth
            });
            that.syncTimeLine();
            callback && callback();
          });
        }
      }
    }, {
      key: "syncTimeLine",
      value: function syncTimeLine() {
        var _this4 = this;
        if (this.jSPlugin.recTimer) {
          clearInterval(this.jSPlugin.recTimer);
        }
        if (Array.isArray(window.recTimer)) {
          window.recTimer.map(function (item) {
            clearInterval(item);
          });
        }
        window.recTimer = [];
        var that = this;
        this.jSPlugin.recTimer = setInterval(function () {
          var getOSDTimePromise = that.jSPlugin.getOSDTime();
          getOSDTimePromise.then(function (data) {
            var v = data.data;
            if (v === -1) {
              console.log("获取播放时间错误");
            } else {
              if (v > 0) {
                var time = new Date(v > 1000000000000 ? v : v * 1000);
                _this4.nowTime = time;
                that.timeLine.run({
                  time: time
                });
              }
            }
            // if (!!that.lastDate && (v > 1000000000000 ? v : v * 1000) >= that.lastDate) {
            //   that.jSPlugin.pluginStatus.loadingSetText({ text: "回放结束", color: "red" });
            // }
          })["catch"](function (err) {
            var pauseDate = that.jSPlugin.Theme.decoderState.state.pauseDate;
            that.timeLine.run({
              time: that.timeLine.nowTime || pauseDate
            });
          });
        }, 1000);
        window.recTimer.push(this.jSPlugin.recTimer);
      }
    }, {
      key: "unSyncTimeLine",
      value: function unSyncTimeLine() {
        var that = this;
        return new Promise(function (resolve, reject) {
          if (that.jSPlugin.recTimer) {
            clearInterval(that.jSPlugin.recTimer);
            that.jSPlugin.recTimer = null;
          }
          if (Array.isArray(window.recTimer)) {
            window.recTimer.map(function (item) {
              clearInterval(item);
            });
            window.recTimer = [];
          }
          resolve();
        });
      }
    }, {
      key: "renderRec",
      value: function renderRec(date) {
        var _this5 = this;
        this.date = date;
        var that = this;
        var dateStart = new Date(new Date(date).Format('yyyy-MM-dd 00:00:00').replace(/-/g, "/")).getTime();
        var dateEnd = new Date(new Date(date).Format('yyyy-MM-dd 23:59:59').replace(/-/g, "/")).getTime();
        this.timeLine.getRecord([], dateStart, dateEnd);
        console.log('-----------233---------this.jSPlugin.url', this.jSPlugin.url);
        var recSliceParams = {
          accessToken: this.jSPlugin.accessToken,
          recType: matchEzopenUrl(this.jSPlugin.url).type === 'cloud.rec' ? 1 : 2,
          deviceSerial: matchEzopenUrl(this.jSPlugin.url).deviceSerial,
          channelNo: matchEzopenUrl(this.jSPlugin.url).channelNo,
          startTime: dateStart,
          endTime: dateEnd,
          version: '2.0'
        };
        var recAPISuccess = function recAPISuccess(data) {
          if (data.data && data.data.files && data.data.files.length > 0) {
            var dataArr = data.data.files;
            var nextFileTime = new Date().getTime();
            var isAll = data.data.isAll;
            that.recList = dataArr;
            that.lastDate = dataArr[dataArr.length - 1].endTime;
            if (isAll) {
              _this5.timeLine.getRecord(dataArr, dateStart, dateEnd);
            } else {
              // 云存储回调事务
              var recTransaction = function recTransaction() {
                function recAPIV2Success(data) {
                  if (data.data && data.data.files && data.data.files.length > 0) {
                    if (data.data.isAll == false) {
                      if (data.data.files) {
                        dataArr = dataArr.concat(data.data.files);
                        that.recList = dataArr;
                        that.lastDate = dataArr[dataArr.length - 1].endTime;
                      }
                      nextFileTime = data.data.nextFileTime > 0 ? data.data.nextFileTime : new Date().getTime();
                      recTransaction();
                    } else {
                      console.log("云存储执行渲染片段");
                      that.timeLine.getRecord(dataArr, dateStart, dateEnd);
                    }
                  } else {
                    that.timeLine.getRecord(dataArr, dateStart, dateEnd);
                  }
                }
                recSliceParams.startTime = nextFileTime;
                request(this.jSPlugin.env.domain + "/api/lapp/video/by/time", 'POST', recSliceParams, '', recAPIV2Success);
              };
              recTransaction();
            }
            _this5.timeLine.run({
              time: new Date(dateStart)
            });
          } else if (data.data && data.data.length > 0) {
            console.log("获取本地录像片段成功", data);
            that.recList = data.data;
            that.lastDate = data.data[data.data.length - 1].endTime;
            that.timeLine.getRecord(data.data, dateStart, dateEnd);
            that.timeLine.run({
              time: new Date(dateStart)
            });
          } else ;
        };
        var recAPIUrl = this.jSPlugin.env.domain + "/api/lapp/video/by/time";
        request(recAPIUrl, 'POST', recSliceParams, '', recAPISuccess);
      }
    }]);
    return Rec;
  }();

  /**
   * @class MobileTimeLine
   * @classdesc 时间轴组件
   * @param {EZUIKitPlayer} params - EZUIKitPlayer 插件对象
   * @example
   * const timeLine = new TimeLine(jSPlugin)
   */
  var TimeLine = function TimeLine(params) {
    console.log("执行TimeLine - params", params);
    this.state = {
      id: params.id,
      start: '00:00:00',
      // 传入最近片段起始时刻
      end: '24:00:00',
      // 传入最近片段结束时刻 默认结束时间为24：00：00, 1440  24
      current: 0,
      // 当前播放时刻
      // rate: 1, // 1：2小时， 2：1小时， 3：半小时， 4：10分钟， 5：1分钟
      timelag: 30,
      // 120: 2小时， 60：1小时， 30：半小时，10：10分钟，1：1分钟
      timeArr: [],
      // 时间轴列表
      availTimeLine: [],
      // 由实际存在视频片段的时间组成，[{st: '', et: ''}, {st: '', et: ''}, ...]
      scrollTop: 0,
      // 页面滚动偏移量 页面偏移量由传入时刻决定
      // currentTimer: '', // 时刻定时器
      // timelineTimer: '', //时间轴定时器,
      index: 0,
      // 初始时刻在availtimeLine中的index
      // playCode: 0, // 当前播放状态值
      date: '',
      noTimeLineTxt: '',
      disabled: false // 禁用拖动轴
    };

    var _this = this;
    this.setState = function (obj) {
      Object.keys(obj).forEach(function (key) {
        _this.state[key] = obj[key];
        if (key === 'scrollTop') {
          document.getElementById('time-line-item').parentNode.scrollTo(0, obj[key]);
        }
        if (key === 'current') {
          document.getElementById('time-line-current').innerHTML = obj[key];
        }
      });
    };
    this.setDisabled = function (value) {
      this.setState({
        disabled: value
      });
      document.getElementById('time-line-item').parentNode.style.overflowY = value ? 'hidden' : 'scroll';
      // console.log(" document.getElementById('time-line-item').parentNode.style", document.getElementById('time-line-item').parentNode)
    };

    this.timeToSecond = function (time) {
      var e = time.split(':');
      var h = Number(e[0]);
      var m = Number(e[1]);
      var s = Number(e[2]);
      return h * 60 * 60 + m * 60 + (s ? s : 0);
    };
    this.minuteToTime = function (minute) {
      var hour = Math.floor(minute / 60);
      var m = minute % 60;
      return (hour > 9 ? hour : '0' + hour) + ':' + (m > 9 ? m : '0' + m);
    };
    this.timeToMinute = function (time) {
      var e = time.split(':');
      var h = Number(e[0]);
      var m = Number(e[1]);
      // const s = Number(e[2]);
      return h * 60 + m;
    };
    this.getPlayParam = params.getPlayParam;
    // js判断是否是苹果设备
    this.checkIsAppleDevice = function () {
      var u = navigator.userAgent;
      var ios = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
      var iPad = u.indexOf("iPad") > -1;
      var iPhone = u.indexOf("iPhone") > -1 || u.indexOf("Mac") > -1;
      if (ios || iPad || iPhone) {
        return true;
      } else {
        return false;
      }
    };
    //js判断是否为鸿蒙系统 chos是鸿蒙webview的标识
    this.checkIsHarmonyOS = function () {
      var u = navigator.userAgent;
      if (u.indexOf("ohos") > -1) {
        return true;
      } else {
        return false;
      }
    };
    if (this.checkIsHarmonyOS()) {
      // js安卓、IOS、鸿蒙系统监听开始触摸

      // 监听手动滚动时间轴时，停止时间轴滚动，时刻仍然变化
      document.getElementById('time-line-item').parentNode.addEventListener('touchstart', function () {
        if (_this.state.disabled) {
          return false;
        }
        params.ontouchstart();
      }, false);
      // 监听手动滚动时间轴时，停止时间轴滚动，时刻仍然变化
      document.getElementById('time-line-item').parentNode.addEventListener('touchmove', function () {
        if (_this.state.disabled) {
          return false;
        }
        params.ontouchmove();
      }, false);
      // 手动滚动停止，选定时刻自动播放
      document.getElementById('time-line-item').parentNode.addEventListener('touchend', function () {
        // var _this = this;
        if (_this.state.disabled) {
          return false;
        }
        //
        var timer;
        var scollPromise = new Promise(function (resolve, reject) {
          var preTop = -1;
          timer = setInterval(function () {
            // debugger
            var reactTop = document.getElementById('time-line-item').parentNode.scrollTop; // 实际偏移高度
            if (reactTop !== preTop) {
              console.log("scolling", reactTop, preTop);
              preTop = reactTop;
            } else {
              console.log("scoll stop", reactTop, preTop);
              clearInterval(timer);
              resolve(reactTop);
            }
          }, 100);
        });

        //
        scollPromise.then(function (reactTop) {
          console.log("scollPromise: then", reactTop, _this);
          _this.rectTopTotime(reactTop);
          console.log('页面滚动实际高度', reactTop, _this.state);
          _this.getPlayParam({
            current: _this.state.current
          });
        });
        params.ontouchend();
      }, false);
    } else {
      // 监听手动滚动时间轴时，停止时间轴滚动，时刻仍然变化
      document.getElementById('time-line-item').parentNode.ontouchstart = function () {
        if (_this.state.disabled) {
          return false;
        }
        params.ontouchstart();
      };
      // 监听手动滚动时间轴时，停止时间轴滚动，时刻仍然变化
      document.getElementById('time-line-item').parentNode.ontouchmove = function () {
        if (_this.state.disabled) {
          return false;
        }
        params.ontouchmove();
      };
      // 手动滚动停止，选定时刻自动播放
      document.getElementById('time-line-item').parentNode.ontouchend = function () {
        // var _this = this;
        if (_this.state.disabled) {
          return false;
        }
        //
        var timer;
        var scollPromise = new Promise(function (resolve, reject) {
          var preTop = -1;
          timer = setInterval(function () {
            // debugger
            var reactTop = document.getElementById('time-line-item').parentNode.scrollTop; // 实际偏移高度
            if (reactTop !== preTop) {
              console.log("scolling", reactTop, preTop);
              preTop = reactTop;
            } else {
              console.log("scoll stop", reactTop, preTop);
              clearInterval(timer);
              resolve(reactTop);
            }
          }, 100);
        });

        //
        scollPromise.then(function (reactTop) {
          console.log("scollPromise: then", reactTop, _this);
          _this.rectTopTotime(reactTop);
          console.log('页面滚动实际高度', reactTop, _this.state);
          _this.getPlayParam({
            current: _this.state.current
          });
        });
        params.ontouchend();
      };
    }
    this.matchTimeDot();
  };
  TimeLine.prototype.changeScale = function (value) {
    this.setState({
      timelag: value // 120: 2小时， 60：1小时， 30：半小时，10：10分钟，1：1分钟
    });

    this.matchTimeDot();
  };
  TimeLine.prototype.setDateLine = function (news, defaultIndex) {
    // if( news.length > 0 ){
    //   if(!defaultIndex){
    //     defaultIndex = 0;
    //   }
    //   this.setState({
    //     availTimeLine: news,
    //     start: news[defaultIndex].st,
    //     end: news[defaultIndex].et,
    //     current: news[defaultIndex].st,
    //   })
    //   console.log("this.state", this.state);
    //   this.matchTimeDot();

    //   this.primaryOffsetH();
    //   // 将当前播放时间片段传给父组件
    //   this.getPlayParam(news[defaultIndex]);
    // }
    if (news.length > 0) {
      if (typeof defaultIndex === 'undefined') {
        defaultIndex = news.length - 1;
      }
      this.setState({
        availTimeLine: news,
        start: news[defaultIndex].st,
        end: news[defaultIndex].et,
        current: news[defaultIndex].st
      });
      console.log("this.state", this.state);
      this.matchRecTimeDot();
      this.primaryOffsetH();
      // 将当前播放时间片段传给父组件
      //this.getPlayParam({ current: news[defaultIndex].st });
    } else {
      this.setState({
        availTimeLine: []
      });
      console.log("this.state", this.state);
      this.matchRecTimeDot();
    }
  };
  TimeLine.prototype.matchTimeDot = function () {
    var _this$state = this.state,
      start = _this$state.start,
      end = _this$state.end,
      timelag = _this$state.timelag;
      _this$state.availTimeLine;
    console.log("start", start, 'end', end);
    var timeArr = [];
    // // 播放时间片段时刻转分钟
    // let availArr = [];
    // let len = availTimeLine.length;
    // for (let i = 0; i < len; i++) {
    //   const temp = availTimeLine[i];
    //   let st = this.timeToSecond(temp.st);
    //   let et = this.timeToSecond(temp.et);
    //   // console.log('st: ', st, 'et:', et);
    //   let stminute;
    //   let etminute;
    //   let stAvailPercent = 0;
    //   let etAvailPercent = 0;
    //   stminute = Math.floor(st / (timelag * 60)) * timelag;
    //   stAvailPercent = (st - (stminute * 60)) / timelag;
    //   etminute = Math.floor(et / (timelag * 60)) * timelag;
    //   etAvailPercent = (et - (etminute * 60)) / timelag;
    //   availArr[i] = {
    //     st: stminute,
    //     et: etminute,
    //     stAvailPercent: stAvailPercent,
    //     etAvailPercent: etAvailPercent
    //   }
    // }
    // console.log('availArr: ', availArr);
    // 时间转分钟
    var minute = this.timeToMinute(end);
    // // 检测是否包含秒,则实际分钟加1
    // const e = end.split(':');
    // const s = Number(e[2]);
    // if (s > 0) {
    //   minute = minute + 1
    // }
    minute = Math.floor(minute / timelag) * timelag;
    for (var i = minute; i >= 0;) {
      var marginTop = 0;
      var marginBottom = 0;
      // 视频片段
      var recArr = [];
      if (i == minute) {
        marginTop = 70;
      }
      if (i == 0) {
        marginBottom = 230;
      }
      // for (let j = 0; j < len; j++) {
      //   if (i >= availArr[j].st && i <= availArr[j].et) {
      //     // borderColor = '#f7a670';
      //     // console.log("i",i,availArr[j])
      //     if (i == availArr[j].st && i == availArr[j].et) {
      //       var height = availArr[j].etAvailPercent - availArr[j].stAvailPercent;
      //       var top = 60 - availArr[j].etAvailPercent;
      //       recArr.push({
      //         height: height,
      //         top: top
      //       })
      //     } else {
      //       if (i == availArr[j].st) {
      //         recArr.push({
      //           height: 60 - availArr[j].stAvailPercent,
      //           top: 0
      //         })
      //       } else if (i == availArr[j].et) {
      //         recArr.push({
      //           height: availArr[j].etAvailPercent,
      //           top: 60 - availArr[j].etAvailPercent,
      //         })
      //       } else if (i > availArr[j].st && i < availArr[j].et) {
      //         // 跨越多个区域
      //         recArr.push({
      //           height: 60,
      //           top: 0,
      //         })
      //       }
      //     }
      //   }

      // }
      var time = this.minuteToTime(i);
      timeArr.push({
        id: i,
        current: time,
        label: "a" + i,
        marginTop: marginTop,
        marginBottom: marginBottom,
        recArr: recArr
      });
      i = i - timelag;
    }
    this.setState({
      timeArr: timeArr
    });
    this.renderDateLine();
  };
  TimeLine.prototype.matchRecTimeDot = function () {
    var _this$state2 = this.state,
      start = _this$state2.start,
      end = _this$state2.end,
      timelag = _this$state2.timelag,
      availTimeLine = _this$state2.availTimeLine,
      timeArr = _this$state2.timeArr;
    console.log("start", start, 'end', end);
    // 播放时间片段时刻转分钟
    var availArr = [];
    var len = availTimeLine.length;
    if (len === 0) {
      for (var j = 0; j < timeArr.length; j++) {
        timeArr[j].recArr = [];
      }
    } else {
      //xuehb 切换回放时要把上一次的回放时间段重置清空掉
      for (var k = 0; k < timeArr.length; k++) {
        timeArr[k].recArr = [];
      }
      for (var i = 0; i < len; i++) {
        var temp = availTimeLine[i];
        var st = this.timeToSecond(temp.st);
        var et = this.timeToSecond(temp.et);
        // console.log('st: ', st, 'et:', et);
        var stminute = void 0;
        var etminute = void 0;
        var stAvailPercent = 0;
        var etAvailPercent = 0;
        stminute = Math.floor(st / (timelag * 60)) * timelag;
        stAvailPercent = (st - stminute * 60) / timelag;
        etminute = Math.floor(et / (timelag * 60)) * timelag;
        etAvailPercent = (et - etminute * 60) / timelag;
        availArr[i] = {
          st: stminute,
          et: etminute,
          stAvailPercent: stAvailPercent,
          etAvailPercent: etAvailPercent
        };
        for (var j = 0; j < timeArr.length; j++) {
          if (timeArr[j].id == stminute && timeArr[j].id == etminute) {
            var height = etAvailPercent - stAvailPercent;
            var top = 60 - etAvailPercent;
            timeArr[j].recArr.push({
              height: height,
              top: top
            });
          } else {
            if (timeArr[j].id == stminute) {
              timeArr[j].recArr.push({
                height: 60 - stAvailPercent,
                top: 0
              });
            } else if (timeArr[j].id == etminute) {
              timeArr[j].recArr.push({
                height: etAvailPercent,
                top: 60 - etAvailPercent
              });
            } else if (timeArr[j].id > stminute && timeArr[j].id < etminute) {
              timeArr[j].recArr.push({
                height: 60,
                top: 0
              });
            }
          }
        }
      }
    }
    console.log('availArr: ', availArr);
    this.setState({
      timeArr: timeArr
    });
    console.log('timeArr:', this.state);
    this.renderDateLine();
  };
  TimeLine.prototype.renderDateLine = function () {
    var _this$state3 = this.state,
      id = _this$state3.id,
      timeArr = _this$state3.timeArr;
    console.log("id,timeArr", id, timeArr);
    var container = document.getElementById("time-line-item");
    container.innerHTML = "";
    timeArr.forEach(function (item, index) {
      var timeItemDOM = document.createElement('div');
      timeItemDOM.setAttribute("class", "time-item");
      timeItemDOM.style = "margin-top: ".concat(item.marginTop, "px; margin-bottom: ").concat(item.marginBottom, "px; border-right-color: ").concat(item.borderColor, ";");
      var scaleDOM = document.createElement('div');
      scaleDOM.setAttribute("class", "scale");
      var timeItemHtml = '<div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale"></div><div class="scale" style="width:10px"></div>';
      item.recArr.forEach(function (i, j) {
        timeItemHtml += "<div class=\"item-unavail\" style=\"height: ".concat(i.height, "px;background-color:#A8B9ED; top: ").concat(i.top, "px\"></div>");
      });
      //timeItemHtml += `<div class="item-unavail" style="height: ${item.availPercent}px; top: ${item.availTop}px"></div>`
      timeItemHtml += "<div id=".concat(item.label, " style=\"position: relative; top: 51px; left: 40%\"> ").concat(item.current, "</div>");
      timeItemDOM.innerHTML = timeItemHtml;
      container.appendChild(timeItemDOM);
    });
  };
  // 计算初始偏移量
  TimeLine.prototype.primaryOffsetH = function () {
    var _this$state4 = this.state,
      start = _this$state4.start,
      timelag = _this$state4.timelag,
      timeArr = _this$state4.timeArr;
    var currentItem = timeArr[0].current;
    var currentTime = this.timeToSecond(currentItem);
    var startSecond = this.timeToSecond(start);
    var offsetS = currentTime - startSecond;
    var offsetH = Math.ceil(offsetS / timelag) + 60; // offsetS / (timelag * 60) * 60
    this.setState({
      scrollTop: offsetH
    });
    console.log('起始偏移量', offsetH);
  };
  // 计算当前偏移量
  TimeLine.prototype.currentOffsetH = function () {
    var _this$state5 = this.state,
      current = _this$state5.current,
      timelag = _this$state5.timelag,
      timeArr = _this$state5.timeArr;
    var startItem = timeArr[0].current;
    var startSecond = this.timeToSecond(startItem);
    var currentSecond = this.timeToSecond(current);
    var offsetS = startSecond - currentSecond;
    var offsetH = Math.ceil(offsetS / timelag) + 60; // offsetS / (timelag * 60) * 60
    this.setState({
      scrollTop: offsetH
    });
  };
  // 通过时间轴位置获取当前时间
  TimeLine.prototype.rectTopTotime = function (reactTop) {
    var timelag = this.state.timelag;
    // let rectTop = rect.top; // 获取当前元素距离父元素顶部的高度
    // let reactTop = 0 - rectTop; // 实际偏移高度
    var index = Math.floor(reactTop / 60); // 以分钟为刻度时，每个元素初始高度为60px, 向下取整并除以时刻倍数得出偏移item;
    var offsetH = reactTop - index * 60; // 偏移高度
    var current;
    var offsetSecond;
    console.log('index：', index, 'offsetH:', offsetH);
    if (offsetH == 0) {
      current = this.state.timeArr[index - 1].current;
      offsetSecond = 0;
    } else {
      // 当timelag==120,timelag==60,timelag==30,timelag==10,timelag==1
      var time = this.state.timeArr[index].current;
      var minute = this.timeToMinute(time);
      // 相对于下一元素偏移
      var offsetY = 60 - offsetH;
      var offsetS = offsetY * timelag; // offsetY / 60 * timelag * 60
      var offsetM = Math.floor(offsetS / 60) + minute;
      var second = Math.floor(offsetS / 60) * 60;
      offsetSecond = Math.ceil(offsetS - second); // 保留两位小数
      current = this.minuteToTime(offsetM);
    }
    this.setState({
      current: current + ':' + (offsetSecond > 9 ? offsetSecond : '0' + offsetSecond),
      scrollTop: reactTop
    });
    // console.log("rectLeft", reactTop);
    // console.log("currentTime", current + ':' + (offsetSecond > 9 ? offsetSecond : '0' + offsetSecond));
  };
  // 时间轴滚动，根据传参变化
  TimeLine.prototype.stepScrollTimeLine = function (time) {
    this.setState({
      current: time
    });
    this.currentOffsetH();
  };
  TimeLine.prototype.secondCountDown = function (time) {
    var current = this.state.current;
    // console.log('currentTime', current);
    var temp = current.split(':');
    var hour = Number(temp[0]);
    var minute = Number(temp[1]);
    var second = Number(temp[2]);
    var t = hour * 60 * 60 + minute * 60 + second + 1;
    var h = Math.floor(t / 3600);
    var m = Math.floor((t - h * 3600) / 60);
    var s = t - h * 3600 - m * 60;
    this.setState({
      current: (h > 9 ? h : '0' + h) + ':' + (m > 9 ? m : '0' + m) + ':' + (s > 9 ? s : '0' + s)
    });
  };
  var MobileTimeLine = TimeLine;

  Date.prototype.Format = function (fmt) {
    //author: meizz
    var o = {
      "M+": this.getMonth() + 1,
      //月份
      "d+": this.getDate(),
      //日
      "h+": this.getHours(),
      //小时
      "m+": this.getMinutes(),
      //分
      "s+": this.getSeconds(),
      //秒
      "q+": Math.floor((this.getMonth() + 3) / 3),
      //季度
      "S": this.getMilliseconds() //毫秒
    };

    if (/(y+)/.test(fmt)) {
      fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    }
    for (var k in o) {
      if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
    }
    return fmt;
  };
  function format(now) {
    var time = new Date(now);
    var h = time.getHours(); //返回日期中的小时数（0到23）
    var m = time.getMinutes(); //返回日期中的分钟数（0到59）
    var s = time.getSeconds(); //返回日期中的秒数（0到59）
    return (h > 9 ? h : '0' + h) + ':' + (m > 9 ? m : '0' + m) + ':' + (s > 9 ? s : '0' + s);
  }

  /**
   * @class MobileRec
   * @classdesc 移动端录像回放
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {Function} changeRecSpeed - 修改播放速度方法
   * @param {Function} resetMobileZoomStatus - 重置放大状态
   * 
   * @example
   * var mobileRec = new MobileRec(jSPlugin, changeRecSpeed, resetMobileZoomStatus);
   */
  var MobileRec = /*#__PURE__*/function () {
    function MobileRec(jSPlugin, changeRecSpeed, resetMobileZoomStatus) {
      var _this = this;
      _classCallCheck$1(this, MobileRec);
      //xuehb 修改播放速度方法
      this.changeRecSpeed = changeRecSpeed;
      //xuehb 重置放大状态
      this.resetMobileZoomStatus = resetMobileZoomStatus;
      this.isMobile = true;
      this.jSPlugin = jSPlugin;
      this.date = new Date().Format('yyyy-MM-dd');
      this.begin = (new Date().Format('yyyy-MM-dd') + ' 00:00:00').replace(/-/g, "/");
      this.end = (new Date().Format('yyyy-MM-dd') + ' 23:59:59').replace(/-/g, "/");
      this.initBegin = null;
      this.initEnd = null;
      this.type = matchEzopenUrl(this.jSPlugin.url).type;
      this.operating = false;
      this.seekTimer = null;
      this.disabled = false;
      this.seekFrequency = 2000;
      this.recList = [];
      this.isSeeking = false;
      if (this.jSPlugin.params && this.jSPlugin.params.seekFrequency) {
        this.seekFrequency = this.jSPlugin.params.seekFrequency;
      }
      var oS = document.createElement('style');
      oS.innerHTML = "\n    body{\n      padding: 0;\n      margin: 0;\n    }\n    .time-line-container {\n      text-align: left;\n      height: 300px;\n      /* outline: 1px solid red; */\n      /* background: gray; */\n      position: relative;\n      /* padding-top: 60px; */\n      margin-top: 20px;\n    }\n\n    .time-line-container .time-line-item-container {\n      display: inline-block;\n      /* height: 400px; */\n      width: 30%;\n      /* background: indianred; */\n      overflow-y: scroll;\n      overflow-x: hidden;\n      /* padding-top: 60px; */\n      height: 300px;\n      box-sizing: border-box;\n      white-space: nowrap;\n      position: relative;\n    }\n\n    .time-line-container .time-line-item-container::-webkit-scrollbar {\n      width: 0px;\n      /*\u6EDA\u52A8\u6761\u5BBD\u5EA6*/\n      height: 0px;\n      /*\u6EDA\u52A8\u6761\u9AD8\u5EA6*/\n    }\n\n    .time-line-item .time-item {\n      position: relative;\n      box-sizing: border-box;\n      height: 60px;\n      font-size: 12px;\n      color: rgb(150, 150, 150);\n      border-right: 6px solid;\n      border-right-color: #ddd;\n    }\n\n    .time-line-item .time-item .scale {\n      width: 6px;\n      height: 9px;\n      border-bottom: 1px solid #ccc;\n      float: right;\n      clear: both;\n    }\n\n    .time-line-item .time-item .item-unavail {\n      width: 6px;\n      position: absolute;\n      left: 100%;\n      background-color: #ddd;\n    }\n\n    .time-line-container .current-time {\n      position: absolute;\n      left: 0;\n      top: 40px;\n      height: 29px;\n      /* line-height: 58px; */\n      border-bottom: 1px solid #648FFC;\n      width: 60%;\n      margin-left: 26%;\n    }\n\n    .time-line-container .current-time .current-time-bg {\n      position: relative;\n      top: 15px;\n      width: 100px;\n      height: 29px;\n      line-height: 29px;\n      left: -70px;\n      font-size: 12px;\n      color: #2C2C2C;\n    }\n\n    .time-line-container .current-time .current-time-bg::before {\n      content: '';\n      display: inline-block;\n      width: 6px;\n      height: 6px;\n      border-radius: 100%;\n      background: #648FFC;\n      top: 11px;\n      position: absolute;\n      right: 30px;\n    }\n\n    .date-switch-container {\n      height: 40px;\n      position: relative;\n      text-align: center;\n      margin: 20px 10px;\n    }\n\n    .date-switch-container .current-date {\n      line-height: 40px;\n      height: 22px;\n      font-size: 16px;\n      color: #2C2C2C;\n      text-align: center;\n      font-weight: bold;\n    }\n\n    .date-container {\n      width: 40px;\n      height: 40px;\n      position: absolute;\n      right: 0;\n      top: 0;\n    }\n\n    .rec-type-container {\n      display: flex;\n      justify-content: space-between;\n    }\n\n    .rec-type-container .rec-type-text {\n      padding: 0 15px;\n      font-size: 12px;\n      color: #2C2C2C;\n    }\n\n    .rec-type-container .rec-type-switch {\n      padding: 0 20px;\n    }\n\n    .date-container input {\n      position: absolute;\n      opacity: 0;\n      display: inline-block;\n      width: 40px;\n      height: 40px;\n      z-index: 10;\n      left: 0;\n    }\n\n    .date-container label {\n      position: absolute;\n      left: 0;\n      top: 0;\n      /* display: none; */\n      z-index: 0;\n    }\n\n    .date-icon {\n      display: inline-block;\n      width: 40px;\n      height: 40px;\n      background: url('https://resource.eziot.com/group2/M00/00/6A/CtwQF2F6VieAQrU9AAABP-_Nsqo949.png') no-repeat 100% 100%;\n    }\n    .select-container {\n      padding: 10px;\n      display: flex;\n      justify-content: space-between;\n    }\n\n    .advice {\n      height: 24px;\n      width: 70px;\n      display: flex;\n      justify-content: space-between;\n      line-height: 24px;\n      background: #F8F8F8;\n      border-radius: 8px;\n    }\n\n    .advice span {\n      width: 40px;\n      display: inline-block;\n    }\n\n    input[type=\"checkbox\"]:not(:checked)+.advice span:first-child {\n      box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);\n      border-radius: 8px;\n      text-align: center;\n\n    }\n\n    input[type=\"checkbox\"]:checked+.advice span:last-child {\n      box-shadow: 0px 2px 5px 0px rgb(23 45 101 / 20%);\n      border-radius: 8px;\n      text-align: center;\n    }\n\n    input[type=\"checkbox\"]:not(:checked)+.advice span:first-child svg {\n      fill: #648FFC !important;\n    }\n\n    input[type=\"checkbox\"]:checked+.advice span:last-child svg {\n      fill: #648FFC !important;\n    }";
      document.getElementsByTagName("head")[0].appendChild(oS);
      if (getQueryString("begin", this.jSPlugin.url)) {
        var begin = getQueryString("begin", this.jSPlugin.url);
        this.date = begin.slice(0, 4) + '/' + begin.slice(4, 6) + '/' + begin.slice(6, 8);
        this.begin = this.date + " ".concat(begin.slice(8, 10) || "00", ":").concat(begin.slice(10, 12) || "00", ":").concat(begin.slice(12, 14) || "00");
        this.end = this.date + ' 23:59:59';
        this.initBegin = this.begin;
      }
      if (getQueryString("end", this.jSPlugin.url)) {
        var end = getQueryString("end", this.jSPlugin.url);
        this.end = this.date + " ".concat(end.slice(8, 10) || "23", ":").concat(end.slice(10, 12) || "59", ":").concat(end.slice(12, 14) || "59");
        this.initEnd = this.end;
      }
      // 回放时间标题
      var mobileRecTitleWrap = document.createElement('div');
      mobileRecTitleWrap.id = "date-switch-container-wrap";
      mobileRecTitleWrap.className = "date-switch-container-wrap";
      mobileRecTitleWrap.style = "";
      mobileRecTitleWrap.innerHTML = "\n      <div class=\"date-switch-container\">\n      <div class=\"current-date\" id=\"current-date\">\u4ECA\u65E5\u5F55\u50CF</div>\n      <div class=\"date-container\">\n        <label for=\"date\">\n          <div class=\"date-icon\"></div>\n        </label>\n        <input type=\"date\" name=\"date\" id=\"date\" value=\"".concat(this.date.replace(/\//g, '-') || new Date().Format('yyyy-MM-dd'), "\" />\n      </div>\n    </div>\n        ");
      insertAfter(mobileRecTitleWrap, document.getElementById("".concat(this.jSPlugin.id, "-wrap")));
      // 回放时间类型选择
      var mobileRecSwitchWrap = document.createElement('div');
      mobileRecSwitchWrap.id = "rec-type-container-wrap";
      mobileRecSwitchWrap.className = "rec-type-container-wrap";
      mobileRecSwitchWrap.style = "";
      mobileRecSwitchWrap.innerHTML = "\n    <div class=\"rec-type-container\">\n    <div class=\"rec-type-text\">\u5171<span id=\"recCount\">0</span>\u4E2A\u5F55\u50CF</div>\n    <div class=\"rec-type-switch\">\n      <label>\n        <input type=\"checkbox\" name=\"type\" id=\"cloudType\" value=\"1\" hidden />\n        <label for=\"cloudType\" class=\"advice\">\n          <span>\n          <svg fill=\"#CCCCCC\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"2 0 20 20\">\n            <path class=\"st0\" d=\"M12.6,5c-2.3,0.1-4.3,1.4-5.3,3.3L7.2,8.6c-2.4,0.5-4.1,2.5-4.1,4.9c0,2.8,2.4,5,5.2,5h9.9\n            c2.4,0,4.3-1.9,4.3-4.2l0-0.2c-0.1-2-1.6-3.5-3.5-3.9l-0.1,0l0-0.2c-0.4-2.8-3-5-6.1-5L12.6,5z\"/>\n          </svg>\n        </span>\n        <span>\n          <svg fill=\"#CCCCCC\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"2 0 20 20\">\n            <path id=\"\u5F62\u72B6\u7ED3\u5408\" class=\"st0\" d=\"M14.3,4c0.6,0,1.2,0.2,1.7,0.7l0,0L18.3,7C18.7,7.4,19,8,19,8.6l0,0v9c0,1.3-1.1,2.3-2.4,2.3\n\tl0,0H8.4C7.1,20,6,19,6,17.7l0,0V6.3C6,5,7.1,4,8.4,4l0,0H14.3z M9.7,7.2C9.3,7.2,8.9,7.6,8.9,8l0,0v2.5l0,0.1\n\tc0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C10.4,7.5,10,7.2,9.7,7.2z M12.2,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0v2.5\n\tl0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C12.9,7.5,12.5,7.2,12.2,7.2z M14.7,7.2c-0.4,0-0.8,0.3-0.8,0.8l0,0\n\tv2.5l0,0.1c0,0.4,0.4,0.6,0.7,0.6c0.4,0,0.8-0.3,0.8-0.8l0,0V8l0-0.1C15.4,7.5,15,7.2,14.7,7.2z\"/>\n          </svg>\n        </span>\n        </label>\n      </label>\n    </div>\n  </div>\n        ";
      insertAfter(mobileRecSwitchWrap, mobileRecTitleWrap);
      // 回放时间轴
      var mobileRecWrap = document.createElement('div');
      mobileRecWrap.id = "mobile-rec-wrap";
      mobileRecWrap.className = "mobileRec-wrap";
      mobileRecWrap.style = "";
      mobileRecWrap.innerHTML = "\n    <div class=\"time-line-container\">\n    <div class=\"current-time\">\n      <div class=\"current-time-bg\" id=\"time-line-current\">00:00:00</div>\n    </div>\n    <div class=\"time-line-item-container\">\n      <div class=\"time-line-item\" id=\"time-line-item\">\n      </div>\n    </div>\n    </div>\n      ";
      insertAfter(mobileRecWrap, mobileRecSwitchWrap);
      var getPlayParam = function getPlayParam(data) {
        var that = _this;
        console.log("子组件传值到父组件", data, data.current);
        var st = data.current;
        var date = new Date(_this.date).Format('yyyyMMdd').substr(0, 8) + (data.current ? st.replace(/:/g, "") : data.current.replace(/:/g, ""));
        if (_this.type === 'cloud.rec') {
          if (!_this.isSeeking) {
            if (that.recList.length > 0) {
              if (new Date("".concat(_this.date, " ").concat(data.current)).valueOf() >= that.lastDate) {
                _this.jSPlugin.pluginStatus.loadingSetText({
                  text: "seek回放未找到录像片段",
                  color: "red",
                  delayClear: 2000
                });
                _this.syncTimeLine();
              } else {
                // 进入seek状态后停止同步时间轴
                // 持续获取OSD时间
                // 当OSD时间大于等于下发的seek时间时，表示seek完成，开始同步时间轴
                _this.unSyncTimeLine().then(function () {
                  _this.isSeeking = true;
                  _this.jSPlugin.pluginStatus.loadingStart(_this.jSPlugin.id);
                  _this.jSPlugin.pluginStatus.setPlayStatus({
                    loading: true
                  });
                  _this.jSPlugin.pluginStatus.loadingSetText({
                    text: "加载中，请稍后"
                  });
                  _this.jSPlugin.Theme.setDisabled(true);
                  _this.jSPlugin.seek(date.substr(8, 6), "235959").then(function () {
                    var timer = setInterval(function () {
                      _this.jSPlugin.getOSDTime().then(function (OSDdate) {
                        console.log('seek时间同步:', new Date(OSDdate.data * 1000).Format("yyyyMMddhhmmss"), date, new Date(OSDdate.data * 1000).Format("yyyyMMddhhmmss") >= date);
                        if (new Date(OSDdate.data * 1000).Format("yyyyMMddhhmmss") >= date) {
                          _this.isSeeking = false;
                          _this.syncTimeLine();
                          clearInterval(timer);
                          _this.jSPlugin.pluginStatus.loadingStop(_this.jSPlugin.id);
                          _this.jSPlugin.pluginStatus.setPlayStatus({
                            loading: false
                          });
                          _this.jSPlugin.pluginStatus.loadingClear();
                          _this.jSPlugin.Theme.setDisabled(false);
                        }
                      });
                    }, 1000);
                  });
                });
              }
            }
          }
        } else {
          var callback = function callback() {
            setTimeout(function () {
              _this.disabled = false;
            }, _this.seekFrequency);
          };
          var play = _this.jSPlugin.Theme.decoderState.state.play;
          var localRecSeek = function localRecSeek(callback) {
            _this.disabled = true;
            _this.jSPlugin.pluginStatus.loadingStart(_this.jSPlugin.id);
            _this.jSPlugin.pluginStatus.setPlayStatus({
              loading: true
            });
            _this.jSPlugin.pluginStatus.loadingSetText({
              text: "加载中，请稍后"
            });
            _this.jSPlugin.Theme.setDisabled(true);
            if (play) {
              _this.unSyncTimeLine().then(function () {
                _this.jSPlugin.pause(date).then(function () {
                  console.log("暂停成功");
                  _this.jSPlugin.resume(date).then(function (data) {
                    console.log("恢复成功");
                    _this.syncTimeLine();
                    _this.jSPlugin.pluginStatus.loadingStop(_this.jSPlugin.id);
                    _this.jSPlugin.pluginStatus.setPlayStatus({
                      loading: false
                    });
                    _this.jSPlugin.pluginStatus.loadingClear();
                    _this.jSPlugin.Theme.setDisabled(false);
                    if (callback) {
                      callback();
                    }
                  });
                })["catch"](function () {
                  console.log("暂停失败");
                  _this.jSPlugin.resume(date).then(function (data) {
                    console.log("恢复成功");
                    _this.syncTimeLine();
                    _this.jSPlugin.pluginStatus.loadingStop(_this.jSPlugin.id);
                    _this.jSPlugin.pluginStatus.setPlayStatus({
                      loading: false
                    });
                    _this.jSPlugin.pluginStatus.loadingClear();
                    _this.jSPlugin.Theme.setDisabled(false);
                    if (callback) {
                      callback();
                    }
                  });
                });
              });
            } else {
              _this.unSyncTimeLine().then(function () {
                _this.jSPlugin.resume(date).then(function (data) {
                  console.log("恢复成功");
                  _this.syncTimeLine();
                  if (callback) {
                    callback();
                  }
                });
              });
            }
          };
          if (_this.disabled) {
            console.log("操作频繁，等待2秒后执行");
            if (_this.seekTimer) {
              clearTimeout(_this.seekTimer);
            }
            _this.seekTimer = setTimeout(function () {
              localRecSeek(callback);
            }, _this.seekFrequency);
          } else {
            // 限制每2秒只触发一次拖动
            localRecSeek(callback);
          }
        }
      };
      var ontouchstart = function ontouchstart() {
        _this.operating = true;
        _this.unSyncTimeLine();
      };
      var ontouchmove = function ontouchmove() {
        if (_this.operating == false) {
          //兼容部分机型不触发ontouchstart，移动过程中停止同步时间轴
          _this.operating = true;
          _this.unSyncTimeLine();
        }
      };
      var ontouchend = function ontouchend() {
        _this.operating = false;
      };
      this.TimeLineOBJ = new MobileTimeLine({
        id: "time-line-item",
        getPlayParam: getPlayParam,
        ontouchstart: ontouchstart,
        ontouchmove: ontouchmove,
        ontouchend: ontouchend
      });
      this.fetchDeviceRec();
      // 监听日期变化
      document.getElementById("date").addEventListener('change', function (e) {
        console.log("日期变化", e.target.value);
        var value = e.target.value;
        // if(this.initBegin && new Date(`${e.target.value}`.replace(/-/g, "/")).getTime() < new Date(this.initBegin.slice(0, 10)).getTime()) {
        //   console.log("超过限制最低值")
        //   return false;
        // }
        // if(this.initEnd && new Date(`${e.target.value}`.replace(/-/g, "/")).getTime() > new Date(this.initEnd.slice(0, 10)).getTime()) {
        //   console.log("超过限制最高值")
        //   return false;
        // }

        // if (this.initBegin || this.initEnd) {
        //   console.log("您开启了时间限制，无法切换日期")
        //   return false;
        // }

        //  选中回放日期不能大于当前时间（格式yyyyMMdd）
        var valueInt = parseInt(new Date(value).Format("yyyy/MM/dd").replace(/\//g, ''));
        var nowDate = new Date();
        var newDateInt = parseInt(nowDate.Format("yyyy/MM/dd").replace(/\//g, ''));
        if (valueInt > newDateInt) {
          // 如果选中的日期大于当前日期 不取加载数据 日期重置为上次选中的日期
          document.getElementById("date").value = new Date(_this.date.replace(/\//g, '-') || nowDate.Format("yyyy-MM-dd")).Format("yyyy-MM-dd");
          return;
        }
        _this.date = new Date(value).Format("yyyy/MM/dd");
        _this.begin = _this.date + ' 00:00:00';
        _this.end = _this.date + ' 23:59:59';
        // this.fetchDeviceRec();
        _this.jSPlugin.changePlayUrl({
          type: _this.type,
          begin: "".concat(new Date(_this.date).Format('yyyyMMdd'), "000000")
        }).then(function (url) {
          // WARN: 因为dom 重新渲染， dom获取不到，加一个异步，这样就可以展示选中的日期了
          setTimeout(function () {
            var dateEle = document.getElementById("date");
            if (dateEle) dateEle.value = value;
          }, 0);
        });
        //xuehb 将播放倍速重置为1
        _this.changeRecSpeed(1);
        //xuehb 重置放大状态
        _this.resetMobileZoomStatus();
      });
      document.getElementById("cloudType").checked = this.type === 'rec';
      document.getElementById("cloudType").addEventListener('change', function (e) {
        var recType = e.target.checked ? 2 : 1;
        _this.type = e.target.checked ? "rec" : 'cloud.rec';
        console.log("recType", recType);
        // this.fetchDeviceRec();
        _this.jSPlugin.changePlayUrl({
          type: _this.type,
          begin: "".concat(new Date(_this.date).Format('yyyyMMdd'), "000000")
        }).then(function () {
          console.log("切换类型成功");
          _this.syncTimeLine();
          //xuehb 将播放倍速重置为1
          _this.changeRecSpeed(1);
          //xuehb 重置放大状态
          _this.resetMobileZoomStatus();
        }, function (err) {
          console.log("err", err);
        })["catch"](function (err) {
          console.log(err);
        });
        // document.getElementById("cloudType").setAttribute("checked", true);
        // $("#cloudType").attr("checked", recType == '2');
        // $("#cloudType .device svg").attr("checked", recType == '2');
      });

      this.syncTimeLine();
    }
    _createClass$1(MobileRec, [{
      key: "fetchDeviceRec",
      value: function fetchDeviceRec() {
        var _this2 = this;
        var doRender = function doRender(result) {
          var len = result.length;
          document.getElementById("recCount").innerHTML = len;
          var availArr = [];
          for (var i = len - 1; i >= 0; i--) {
            var res = result[i];
            var et = format(res.endTime);
            var st = format(res.startTime);
            availArr.push({
              st: st,
              et: et
            });
          }
          // document.getElementById("time-line-item").style.display = "block";
          {
            _this2.TimeLineOBJ.setDateLine(availArr);
          }
        };
        var data = new FormData();
        var that = this;
        data.append("deviceSerial", matchEzopenUrl(this.jSPlugin.url).deviceSerial);
        data.append("channelNo", matchEzopenUrl(this.jSPlugin.url).channelNo);
        data.append("accessToken", this.jSPlugin.accessToken);
        data.append("recType", this.type === 'cloud.rec' ? 1 : 2);
        data.append("startTime", new Date(this.begin).getTime());
        data.append("endTime", new Date(this.end).getTime());
        fetch(this.jSPlugin.env.domain + '/api/lapp/video/by/time', {
          method: "POST",
          body: data
        }).then(function (response) {
          return response.json();
        }).then(function (res) {
          // 本地回放
          if (res.code == 200 && res.data) {
            var result = [];
            result = res.data;
            that.recList = result;
            that.lastDate = result[result.length - 1].endTime;
            doRender(result);
          } else {
            doRender([]);
          }
        });
      }
    }, {
      key: "syncTimeLine",
      value: function syncTimeLine() {
        var _this3 = this;
        var dateFormat = function dateFormat(now) {
          var time = new Date(now);
          var h = time.getHours(); //返回日期中的小时数（0到23）
          var m = time.getMinutes(); //返回日期中的分钟数（0到59）
          var s = time.getSeconds(); //返回日期中的秒数（0到59）
          return (h > 9 ? h : '0' + h) + ':' + (m > 9 ? m : '0' + m) + ':' + (s > 9 ? s : '0' + s);
        };
        if (this.jSPlugin.recTimer) {
          clearInterval(this.jSPlugin.recTimer);
        }
        var that = this;
        this.jSPlugin.recTimer = setInterval(function () {
          // 定时器
          if (_this3.operating) {
            console.log("操作中");
            return false;
          }
          _this3.jSPlugin.getOSDTime().then(function (res) {
            if (res.data > 0) {
              that.TimeLineOBJ.stepScrollTimeLine(dateFormat(res.data * 1000));
            }
            if (!!that.lastDate && (res.data > 1000000000000 ? res.data : res.data * 1000) >= that.lastDate) {
              that.jSPlugin.pluginStatus.loadingSetText({
                text: "回放结束",
                color: "red"
              });
            }
          })["catch"](function (err) {
            console.log('err:-----', err);
            console.log("未找到当前获取播放时间，等待中...");
          });
        }, 1000);
      }
    }, {
      key: "unSyncTimeLine",
      value: function unSyncTimeLine() {
        var that = this;
        return new Promise(function (resolve, reject) {
          if (that.jSPlugin.recTimer) {
            clearInterval(that.jSPlugin.recTimer);
          }
          resolve();
        });
      }
    }]);
    return MobileRec;
  }();

  var ptzStart = [
  	{
  		code: 200,
  		msg: "",
  		desc: "请求成功",
  		text: "操作成功",
  		type: "ptzStart"
  	},
  	{
  		code: 10001,
  		msg: "操作失败",
  		desc: "参数为空或格式不正确",
  		text: "参数错误",
  		type: "ptzStart"
  	},
  	{
  		code: 10002,
  		msg: "账号异常，操作失败",
  		desc: "重新获取accessToken",
  		text: "accessToken异常或过期",
  		type: "ptzStart"
  	},
  	{
  		code: 10005,
  		msg: "账号异常，操作失败",
  		desc: "appKey被冻结",
  		text: "appKey异常",
  		type: "ptzStart"
  	},
  	{
  		code: 20002,
  		msg: "设备不存在，请检查设备连接情况",
  		desc: "",
  		text: "设备不存在",
  		type: "ptzStart"
  	},
  	{
  		code: 20006,
  		msg: "操作失败，请检查设备网络情况",
  		desc: "检查设备网络状况，稍后再试",
  		text: "网络异常",
  		type: "ptzStart"
  	},
  	{
  		code: 20007,
  		msg: "操作失败，请检查设备在线情况",
  		desc: "检查设备是否在线",
  		text: "设备不在线",
  		type: "ptzStart"
  	},
  	{
  		code: 20008,
  		msg: "操作过于频繁，稍后再试",
  		desc: "操作过于频繁，稍后再试",
  		text: "设备响应超时",
  		type: "ptzStart"
  	},
  	{
  		code: 20014,
  		msg: "操作失败",
  		desc: "",
  		text: "deviceSerial不合法",
  		type: "ptzStart"
  	},
  	{
  		code: 20032,
  		msg: "通道不存在请检查设备连接情况",
  		desc: "该用户下通道不存在",
  		text: "该用户下通道不存在",
  		type: "ptzStart"
  	},
  	{
  		code: 49999,
  		msg: "操作失败，请重试",
  		desc: "接口调用异常",
  		text: "数据异常",
  		type: "ptzStart"
  	},
  	{
  		code: 60000,
  		msg: "操作失败，设备不支持该操作",
  		desc: "",
  		text: "设备不支持云台控制",
  		type: "ptzStart"
  	},
  	{
  		code: 60001,
  		msg: "操作失败，用户无权限",
  		desc: "",
  		text: "用户无云台控制权限",
  		type: "ptzStart"
  	},
  	{
  		code: 60002,
  		msg: "设备已旋转到上限位",
  		desc: "",
  		text: "设备云台旋转达到上限位",
  		type: "ptzStart"
  	},
  	{
  		code: 60003,
  		msg: "设备已旋转到下限位",
  		desc: "",
  		text: "设备云台旋转达到下限位",
  		type: "ptzStart"
  	},
  	{
  		code: 60004,
  		msg: "设备已旋转到左限位",
  		desc: "",
  		text: "设备云台旋转达到左限位",
  		type: "ptzStart"
  	},
  	{
  		code: 60005,
  		msg: "设备已旋转到右限位",
  		desc: "",
  		text: "设备云台旋转达到右限位",
  		type: "ptzStart"
  	},
  	{
  		code: 60006,
  		msg: "操作失败，请重试",
  		desc: "稍候再试",
  		text: "云台当前操作失败",
  		type: "ptzStart"
  	},
  	{
  		code: 60009,
  		msg: "设备正在操作中",
  		desc: "",
  		text: "正在调用预置点",
  		type: "ptzStart"
  	},
  	{
  		code: 60020,
  		msg: "操作失败",
  		desc: "确认设备是否支持该操作",
  		text: "不支持该命令",
  		type: "ptzStart"
  	}
  ];
  var ptzStop = [
  	{
  		code: 200,
  		msg: "",
  		desc: "请求成功",
  		text: "操作成功",
  		type: "ptzStop"
  	},
  	{
  		code: 10001,
  		msg: "操作失败",
  		desc: "参数为空或格式不正确",
  		text: "参数错误",
  		type: "ptzStop"
  	},
  	{
  		code: 10002,
  		msg: "账号异常，操作失败",
  		desc: "重新获取accessToken",
  		text: "accessToken异常或过期",
  		type: "ptzStop"
  	},
  	{
  		code: 10005,
  		msg: "账号异常，操作失败",
  		desc: "appKey被冻结",
  		text: "appKey异常",
  		type: "ptzStop"
  	},
  	{
  		code: 20002,
  		msg: "设备不存在，请检查设备连接情况",
  		desc: "",
  		text: "设备不存在",
  		type: "ptzStop"
  	},
  	{
  		code: 20006,
  		msg: "操作失败，请检查设备网络情况",
  		desc: "检查设备网络状况，稍后再试",
  		text: "网络异常",
  		type: "ptzStop"
  	},
  	{
  		code: 20007,
  		msg: "操作失败，请检查设备在线情况",
  		desc: "检查设备是否在线",
  		text: "设备不在线",
  		type: "ptzStop"
  	},
  	{
  		code: 20008,
  		msg: "操作过于频繁，稍后再试",
  		desc: "操作过于频繁，稍后再试",
  		text: "设备响应超时",
  		type: "ptzStop"
  	},
  	{
  		code: 20014,
  		msg: "操作失败",
  		desc: "",
  		text: "deviceSerial不合法",
  		type: "ptzStop"
  	},
  	{
  		code: 20032,
  		msg: "通道不存在请检查设备连接情况",
  		desc: "该用户下通道不存在",
  		text: "该用户下通道不存在",
  		type: "ptzStop"
  	},
  	{
  		code: 49999,
  		msg: "操作失败，请重试",
  		desc: "接口调用异常",
  		text: "数据异常",
  		type: "ptzStop"
  	},
  	{
  		code: 60000,
  		msg: "操作失败，设备不支持该操作",
  		desc: "",
  		text: "设备不支持云台控制",
  		type: "ptzStop"
  	},
  	{
  		code: 60001,
  		msg: "操作失败，用户无权限",
  		desc: "",
  		text: "用户无云台控制权限",
  		type: "ptzStop"
  	},
  	{
  		code: 60006,
  		msg: "操作失败，请重试",
  		desc: "稍候再试",
  		text: "云台当前操作失败",
  		type: "ptzStop"
  	},
  	{
  		code: 60009,
  		msg: "设备正在操作中",
  		desc: "",
  		text: "正在调用预置点",
  		type: "ptzStop"
  	},
  	{
  		code: 60020,
  		msg: "操作失败",
  		desc: "确认设备是否支持该操作",
  		text: "不支持该命令",
  		type: "ptzStop"
  	}
  ];
  var talk = [
  	{
  		code: 200,
  		msg: "",
  		desc: "请求成功",
  		text: "操作成功",
  		type: "talk"
  	},
  	{
  		code: 10001,
  		msg: "播放失败",
  		desc: "参数为空或格式不正确",
  		text: "参数错误",
  		type: "talk"
  	},
  	{
  		code: 10002,
  		msg: "账号异常，操作失败",
  		desc: "",
  		text: "accessToken异常或过期",
  		type: "talk"
  	},
  	{
  		code: 10031,
  		msg: "账号异常，操作失败",
  		desc: "",
  		text: "子账户或萤石用户没有权限",
  		type: "talk"
  	},
  	{
  		code: 20002,
  		msg: "设备不存在请检查设备连接情况",
  		desc: "设备序列号输入有误或者设备未被添加或者通道异常",
  		text: "设备不存在",
  		type: "talk"
  	},
  	{
  		code: 60059,
  		msg: "播放失败",
  		desc: "",
  		text: "ezopen地址均不可用",
  		type: "talk"
  	}
  ];
  var time = [
  	{
  		code: 200,
  		msg: "",
  		desc: "",
  		text: "操作成功",
  		type: "time"
  	},
  	{
  		code: 10001,
  		msg: "播放失败",
  		desc: "参数为空或格式不正确",
  		text: "参数错误",
  		type: "time"
  	},
  	{
  		code: 10002,
  		msg: "账号异常，播放失败",
  		desc: "",
  		text: "accessToken异常或过期",
  		type: "time"
  	},
  	{
  		code: 10004,
  		msg: "账号异常，播放失败",
  		desc: "",
  		text: "用户不存在",
  		type: "time"
  	},
  	{
  		code: 10005,
  		msg: "账号异常，播放失败",
  		desc: "",
  		text: "appKey异常",
  		type: "time"
  	},
  	{
  		code: 10011,
  		msg: "播放失败",
  		desc: "设备对应用户未注册至应用下",
  		text: "未开通萤石服务",
  		type: "time"
  	},
  	{
  		code: 10013,
  		msg: "账号异常，播放失败",
  		desc: "",
  		text: "非开发者账号无权限调用",
  		type: "time"
  	},
  	{
  		code: 10030,
  		msg: "播放失败",
  		desc: "",
  		text: "appkey和appsecret不匹配",
  		type: "time"
  	},
  	{
  		code: 20002,
  		msg: "设备不存在请检查设备连接情况",
  		desc: "设备序列号输入有误或者设备未被添加或者通道异常",
  		text: "设备不存在",
  		type: "time"
  	},
  	{
  		code: 20014,
  		msg: "播放失败",
  		desc: "",
  		text: "deviceSerial不合法",
  		type: "time"
  	},
  	{
  		code: 20032,
  		msg: "设备不存在请检查设备连接情况",
  		desc: "",
  		text: "该用户下通道不存在",
  		type: "time"
  	},
  	{
  		code: 60024,
  		msg: "播放失败请重试",
  		desc: "",
  		text: "取消订阅操作失败",
  		type: "time"
  	},
  	{
  		code: 49999,
  		msg: "播放失败请重试",
  		desc: "",
  		text: "操作异常",
  		type: "time"
  	}
  ];
  var uikitCode = {
  	ptzStart: ptzStart,
  	ptzStop: ptzStop,
  	talk: talk,
  	time: time
  };

  /**
   * 构造函数和toString方法没有使用到
   * @class
   * @classdesc Uikit错误码类
   * @private
   * 
   */
  var UikitCode = /*#__PURE__*/function () {
    /**
     * @constructor
     * @param {number} x - x
     * @param {number} y - y
     */
    function UikitCode(x, y) {
      _classCallCheck$1(this, UikitCode);
      this.coreX = x;
      this.coreY = y;
      console.log("uikitCode", uikitCode);
    }
    _createClass$1(UikitCode, [{
      key: "toString",
      value: function toString() {
        return "".concat(this.coreX, "-").concat(this.coreY);
      }

      /**
       * @description 匹配错误信息
       * @param {number} code 
       * @param {string} type 
       * @returns {object}
       */
    }, {
      key: "matchInfo",
      value: function matchInfo(code, type) {
        if (uikitCode[type]) {
          var obj = {};
          uikitCode[type].map(function (item) {
            if (item.code == code) {
              obj = item;
            }
          });
          return obj;
        } else {
          return {
            code: 500,
            msg: "未知错误",
            desc: "未知的错误码，或错误码类型有误",
            text: "",
            type: type
          };
        }
      }
    }]);
    return UikitCode;
  }();

  /**
   * @class Ptz
   * @classdesc 云台控制
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * 
   * @example
   * // 初始化云台控制
   * const ptz = new Ptz(jSPlugin)
   * // 显示云台控制
   * ptz.show()
   * // 隐藏云台控制
   * ptz.hide()
   */
  var Ptz = /*#__PURE__*/function () {
    function Ptz(jSPlugin) {
      var _this = this;
      _classCallCheck$1(this, Ptz);
      this.jSPlugin = jSPlugin;
      this.codeHandler = new UikitCode();
      this.pluginStatus = new Status(this, this.jSPlugin.id);
      this.showPtz = false;
      console.log("云台初始化");
      if (document.getElementById(this.jSPlugin.id + "-ez-ptz-item")) {
        return false;
      }
      var ptzWrap = document.createElement('div');
      ptzWrap.id = this.jSPlugin.id + "-ez-ptz-item";
      ptzWrap.className = "ez-ptz-wrap";
      ptzWrap.style = "display:none";
      var oS = document.createElement('style');
      oS.innerHTML = "\n    .ez-ptz-container {\n      position: relative;\n      width: 80px;\n      height: 80px;\n      background: rgba(255, 255, 255, 0.80);\n      box-shadow: 0px 0px 33px 4px rgb(0 0 0 / 15%);\n      border: 1px solid rgba(255, 255, 255, 0.80);\n      border-radius: 100%;\n      cursor: pointer;\n      overflow: hidden;\n      user-select: none;\n    }\n    .ez-ptz-container .ez-ptz-icon.top {\n      width: 0;\n      height: 0;\n      border-left: 3px solid transparent;\n      border-right: 3px solid transparent;\n      border-bottom: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 3px);\n      top: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.top.active {\n      border-bottom-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.bottom {\n      width: 0;\n      height: 0;\n      border-left: 3px solid transparent;\n      border-right: 3px solid transparent;\n      border-top: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 3px);\n      bottom: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.bottom.active {\n      border-top-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.right {\n      width: 0;\n      height: 0;\n      border-top: 3px solid transparent;\n      border-bottom: 3px solid transparent;\n      border-left: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 3px);\n      right: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.right.active {\n      border-left-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.left {\n      width: 0;\n      height: 0;\n      border-top: 3px solid transparent;\n      border-bottom: 3px solid transparent;\n      border-right: 6px solid #333333;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 3px);\n      left: 2px;\n    }\n\n    .ez-ptz-container .ez-ptz-icon.left.active {\n      border-right-color: #1890FF;\n    }\n\n    .ez-ptz-container .ez-ptz-main.center {\n      width: 23px;\n      height: 23px;\n      background: #1890FF;\n      border-radius: 100%;\n      top: calc(50% - 12.3px);\n      left: calc(50% - 12.3px);\n      position: absolute;\n    }\n\n    .ez-ptz-wrap {\n      position: absolute;\n      right: 20px;\n      top: calc(50% - 50px);\n      width: 100px;\n      height: 100px;\n      z-index: 999;\n    }\n\n    .ez-ptz-close {\n      position: absolute;\n      color: #FFFFFF;\n      top: 0;\n      right: 0px;\n    }";
      document.getElementsByTagName("head")[0].appendChild(oS);
      ptzWrap.innerHTML = "\n      <div class=\"ez-ptz-container\" id=\"".concat(this.jSPlugin.id, "-ez-ptz-container\" style=\"position: relative;width: 80px;height: 80px;background: rgba(255, 255, 255, 0.80);box-shadow: 0px 0px 33px 4px rgba(0, 0, 0, 0.15);border: 1px solid rgba(255, 255, 255, 0.80);border-radius: 100%;cursor: pointer;overflow: hidden;user-select: none;\">\n        <div class=\"ez-ptz-main center\"></div>\n        <div class=\"ez-ptz-icon top active\"></div>\n        <div class=\"ez-ptz-icon left active\"></div>\n        <div class=\"ez-ptz-icon bottom active\"></div>\n        <div class=\"ez-ptz-icon right active\"></div>\n      ");
      document.getElementById("".concat(jSPlugin.id, "-wrap")).appendChild(ptzWrap);
      // 云台控制事件绑定
      // 云台控制
      document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-container")).onmousedown = function (e) {
        e.preventDefault();
        console.log("触摸开始");
        _this._handlePtzTouch(e, 'start');
      };
      document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-container")).onmouseup = function (e) {
        e.preventDefault();
        console.log("触摸结束");
        _this._handlePtzTouch(e, 'stop');
      };
      document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-container")).ontouchstart = function (e) {
        e.preventDefault();
        console.log("触摸开始");
        _this._handlePtzTouch(e, 'start');
      };
      document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-container")).ontouchend = function (e) {
        e.preventDefault();
        console.log("触摸结束", e);
        _this._handlePtzTouch(e, 'stop');
      };
    }
    _createClass$1(Ptz, [{
      key: "show",
      value: function show() {
        if (document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-item"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-item")).style = "display: inline-block";
        }
        this.showPtz = true;
        if (this.jSPlugin.eventEmitter) {
          this.jSPlugin.eventEmitter.emit('openPtz', {
            eventType: 'openPtz',
            code: 0,
            target: this,
            msg: '开启云台'
          });
        }
      }
    }, {
      key: "hide",
      value: function hide() {
        if (document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-item"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-item")).style = "display: none";
        }
        this.showPtz = false;
        if (this.jSPlugin.eventEmitter) {
          this.jSPlugin.eventEmitter.emit('closePtz', {
            eventType: 'closePtz',
            code: 0,
            target: this,
            msg: '关闭云台'
          });
        }
      }
    }, {
      key: "_handlePtzTouch",
      value: function _handlePtzTouch(e, type) {
        var _this2 = this;
        var container = document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-container")).getBoundingClientRect();
        var containerCenterX = container.left + 41;
        var containerCenterY = container.top + 41;
        var eventX = e.x || e.changedTouches[0].clientX;
        var eventY = e.y || e.changedTouches[0].clientY;
        var left = eventX - containerCenterX;
        var top = eventY - containerCenterY;
        var direction = 0; //操作命令：0-上，1-下，2-左，3-右，4-左上，5-左下，6-右上，7-右下，8-放大，9-缩小，10-近焦距，11-远焦距

        var url = this.jSPlugin.env.domain + "/api/lapp/device/ptz/start";
        // var nextPtzImg = ptzNormalImg;
        // var nextPtzImgFailed = ptzNormalImg;
        // 判读方位
        if (Math.abs(left) > Math.abs(top)) {
          if (left > 0) {
            direction = 3;
            // nextPtzImg = ptzRightImgSuccess;
            // nextPtzImgFailed = ptzRightImgFailed;
          } else {
            direction = 2;
            // nextPtzImg = ptzLeftImgSuccess;
            // nextPtzImgFailed = ptzLeftImgFailed;
          }
        } else {
          if (top > 0) {
            direction = 1;
            // nextPtzImg = ptzDownImgSuccess;
            // nextPtzImgFailed = ptzDownImgFailed;
          } else {
            direction = 0;
            // nextPtzImg = ptzTopImgSuccess;
            // nextPtzImgFailed = ptzTopImgFailed;
          }
        }
        // 兼容画面旋转90度
        if (/^rotate\(90/.test(document.getElementById("".concat(this.jSPlugin.id, "-wrap")).style.transform)) {
          switch (direction) {
            case 0:
              direction = 2; // 上转化为左
              break;
            case 1:
              direction = 3; // 下转化为右
              break;
            case 2:
              direction = 1; // 左转化为下
              break;
            case 3:
              direction = 0; // 右转化为上
              break;
          }
        }
        document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-container")).style = "background-image:linear-gradient(".concat(direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270, "deg, #1d8dd8 0%, rgba(100,143,252,0.00) 30%)");
        if (type === 'stop') {
          url = this.jSPlugin.env.domain + '/api/lapp/device/ptz/stop';
          document.getElementById("".concat(this.jSPlugin.id, "-ez-ptz-container")).style = "";
        }
        var data = new FormData();
        data.append("deviceSerial", matchEzopenUrl(this.jSPlugin.url).deviceSerial);
        data.append("channelNo", matchEzopenUrl(this.jSPlugin.url).channelNo);
        data.append("speed", 1);
        data.append("direction", direction);
        data.append("accessToken", this.jSPlugin.accessToken);
        fetch(url, {
          method: "POST",
          body: data
        }).then(function (response) {
          return response.json();
        }).then(function (rt) {
          if (rt.code == 200) ; else {
            //document.getElementById('ptz-img-container').childNodes[0].src = nextPtzImgFailed;
            // layer.msg(data.msg);
            console.log(rt.code, _this2.codeHandler.matchInfo(rt.code, type === 'start' ? 'ptzStart' : 'ptzStop'));
            _this2.pluginStatus.loadingSetText({
              text: _this2.codeHandler.matchInfo(rt.code, type === 'start' ? 'ptzStart' : 'ptzStop').msg,
              color: 'red',
              delayClear: 2000
            });
            if (rt.code == 60005 || rt.code == 60002 || rt.code == 60003 || rt.code == 60004) {
              document.getElementById("".concat(_this2.jSPlugin.id, "-ez-ptz-container")).style = "background-image:linear-gradient(".concat(direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270, "deg, #f45656 0%, rgba(100,143,252,0.00) 30%)");
            }
          }
        })["catch"](function (err) {
          console.log("云台调用异常", err);
        });
      }
    }]);
    return Ptz;
  }();

  function commonjsRequire(path) {
  	throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
  }

  var adapeter = {exports: {}};

  (function (module, exports) {
    (function (f) {
      {
        module.exports = f();
      }
    })(function () {
      return function () {
        function r(e, n, t) {
          function o(i, f) {
            if (!n[i]) {
              if (!e[i]) {
                var c = "function" == typeof commonjsRequire && commonjsRequire;
                if (!f && c) return c(i, !0);
                if (u) return u(i, !0);
                var a = new Error("Cannot find module '" + i + "'");
                throw a.code = "MODULE_NOT_FOUND", a;
              }
              var p = n[i] = {
                exports: {}
              };
              e[i][0].call(p.exports, function (r) {
                var n = e[i][1][r];
                return o(n || r);
              }, p, p.exports, r, e, n, t);
            }
            return n[i].exports;
          }
          for (var u = "function" == typeof commonjsRequire && commonjsRequire, i = 0; i < t.length; i++) o(t[i]);
          return o;
        }
        return r;
      }()({
        1: [function (require, module, exports) {

          var _adapter_factory = require('./adapter_factory.js');
          var adapter = (0, _adapter_factory.adapterFactory)({
            window: window
          });
          window.adapter = adapter;
          module.exports = adapter; // this is the difference from adapter_core.
        }, {
          "./adapter_factory.js": 2
        }],
        2: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.adapterFactory = adapterFactory;
          var _utils = require('./utils');
          var utils = _interopRequireWildcard(_utils);
          var _chrome_shim = require('./chrome/chrome_shim');
          var chromeShim = _interopRequireWildcard(_chrome_shim);
          var _edge_shim = require('./edge/edge_shim');
          var edgeShim = _interopRequireWildcard(_edge_shim);
          var _firefox_shim = require('./firefox/firefox_shim');
          var firefoxShim = _interopRequireWildcard(_firefox_shim);
          var _safari_shim = require('./safari/safari_shim');
          var safariShim = _interopRequireWildcard(_safari_shim);
          var _common_shim = require('./common_shim');
          var commonShim = _interopRequireWildcard(_common_shim);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }

          // Shimming starts here.
          /*
           *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
           *
           *  Use of this source code is governed by a BSD-style license
           *  that can be found in the LICENSE file in the root of the source
           *  tree.
           */
          function adapterFactory() {
            var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
              window = _ref.window;
            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
              shimChrome: true,
              shimFirefox: true,
              shimEdge: true,
              shimSafari: true
            };

            // Utils.
            var logging = utils.log;
            var browserDetails = utils.detectBrowser(window);
            var adapter = {
              browserDetails: browserDetails,
              commonShim: commonShim,
              extractVersion: utils.extractVersion,
              disableLog: utils.disableLog,
              disableWarnings: utils.disableWarnings
            };

            // Shim browser if found.
            switch (browserDetails.browser) {
              case 'chrome':
                if (!chromeShim || !chromeShim.shimPeerConnection || !options.shimChrome) {
                  logging('Chrome shim is not included in this adapter release.');
                  return adapter;
                }
                logging('adapter.js shimming chrome.');
                // Export to the adapter global object visible in the browser.
                adapter.browserShim = chromeShim;
                chromeShim.shimGetUserMedia(window);
                chromeShim.shimMediaStream(window);
                chromeShim.shimPeerConnection(window);
                chromeShim.shimOnTrack(window);
                chromeShim.shimAddTrackRemoveTrack(window);
                chromeShim.shimGetSendersWithDtmf(window);
                chromeShim.shimGetStats(window);
                chromeShim.shimSenderReceiverGetStats(window);
                chromeShim.fixNegotiationNeeded(window);
                commonShim.shimRTCIceCandidate(window);
                commonShim.shimConnectionState(window);
                commonShim.shimMaxMessageSize(window);
                commonShim.shimSendThrowTypeError(window);
                commonShim.removeAllowExtmapMixed(window);
                break;
              case 'firefox':
                if (!firefoxShim || !firefoxShim.shimPeerConnection || !options.shimFirefox) {
                  logging('Firefox shim is not included in this adapter release.');
                  return adapter;
                }
                logging('adapter.js shimming firefox.');
                // Export to the adapter global object visible in the browser.
                adapter.browserShim = firefoxShim;
                firefoxShim.shimGetUserMedia(window);
                firefoxShim.shimPeerConnection(window);
                firefoxShim.shimOnTrack(window);
                firefoxShim.shimRemoveStream(window);
                firefoxShim.shimSenderGetStats(window);
                firefoxShim.shimReceiverGetStats(window);
                firefoxShim.shimRTCDataChannel(window);
                firefoxShim.shimAddTransceiver(window);
                firefoxShim.shimCreateOffer(window);
                firefoxShim.shimCreateAnswer(window);
                commonShim.shimRTCIceCandidate(window);
                commonShim.shimConnectionState(window);
                commonShim.shimMaxMessageSize(window);
                commonShim.shimSendThrowTypeError(window);
                break;
              case 'edge':
                if (!edgeShim || !edgeShim.shimPeerConnection || !options.shimEdge) {
                  logging('MS edge shim is not included in this adapter release.');
                  return adapter;
                }
                logging('adapter.js shimming edge.');
                // Export to the adapter global object visible in the browser.
                adapter.browserShim = edgeShim;
                edgeShim.shimGetUserMedia(window);
                edgeShim.shimGetDisplayMedia(window);
                edgeShim.shimPeerConnection(window);
                edgeShim.shimReplaceTrack(window);

                // the edge shim implements the full RTCIceCandidate object.

                commonShim.shimMaxMessageSize(window);
                commonShim.shimSendThrowTypeError(window);
                break;
              case 'safari':
                if (!safariShim || !options.shimSafari) {
                  logging('Safari shim is not included in this adapter release.');
                  return adapter;
                }
                logging('adapter.js shimming safari.');
                // Export to the adapter global object visible in the browser.
                adapter.browserShim = safariShim;
                safariShim.shimRTCIceServerUrls(window);
                safariShim.shimCreateOfferLegacy(window);
                safariShim.shimCallbacksAPI(window);
                safariShim.shimLocalStreamsAPI(window);
                safariShim.shimRemoteStreamsAPI(window);
                safariShim.shimTrackEventTransceiver(window);
                safariShim.shimGetUserMedia(window);
                commonShim.shimRTCIceCandidate(window);
                commonShim.shimMaxMessageSize(window);
                commonShim.shimSendThrowTypeError(window);
                commonShim.removeAllowExtmapMixed(window);
                break;
              default:
                logging('Unsupported browser!');
                break;
            }
            return adapter;
          }

          // Browser shims.
        }, {
          "./chrome/chrome_shim": 3,
          "./common_shim": 6,
          "./edge/edge_shim": 7,
          "./firefox/firefox_shim": 11,
          "./safari/safari_shim": 14,
          "./utils": 15
        }],
        3: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.shimGetDisplayMedia = exports.shimGetUserMedia = undefined;
          var _typeof$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
            return _typeof(obj);
          } : function (obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
          };
          var _getusermedia = require('./getusermedia');
          Object.defineProperty(exports, 'shimGetUserMedia', {
            enumerable: true,
            get: function get() {
              return _getusermedia.shimGetUserMedia;
            }
          });
          var _getdisplaymedia = require('./getdisplaymedia');
          Object.defineProperty(exports, 'shimGetDisplayMedia', {
            enumerable: true,
            get: function get() {
              return _getdisplaymedia.shimGetDisplayMedia;
            }
          });
          exports.shimMediaStream = shimMediaStream;
          exports.shimOnTrack = shimOnTrack;
          exports.shimGetSendersWithDtmf = shimGetSendersWithDtmf;
          exports.shimGetStats = shimGetStats;
          exports.shimSenderReceiverGetStats = shimSenderReceiverGetStats;
          exports.shimAddTrackRemoveTrackWithNative = shimAddTrackRemoveTrackWithNative;
          exports.shimAddTrackRemoveTrack = shimAddTrackRemoveTrack;
          exports.shimPeerConnection = shimPeerConnection;
          exports.fixNegotiationNeeded = fixNegotiationNeeded;
          var _utils = require('../utils.js');
          var utils = _interopRequireWildcard(_utils);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }
          function _defineProperty(obj, key, value) {
            if (key in obj) {
              Object.defineProperty(obj, key, {
                value: value,
                enumerable: true,
                configurable: true,
                writable: true
              });
            } else {
              obj[key] = value;
            }
            return obj;
          }
          function shimMediaStream(window) {
            window.MediaStream = window.MediaStream || window.webkitMediaStream;
          }
          function shimOnTrack(window) {
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection && !('ontrack' in window.RTCPeerConnection.prototype)) {
              Object.defineProperty(window.RTCPeerConnection.prototype, 'ontrack', {
                get: function get() {
                  return this._ontrack;
                },
                set: function set(f) {
                  if (this._ontrack) {
                    this.removeEventListener('track', this._ontrack);
                  }
                  this.addEventListener('track', this._ontrack = f);
                },
                enumerable: true,
                configurable: true
              });
              var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
              window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
                var _this = this;
                if (!this._ontrackpoly) {
                  this._ontrackpoly = function (e) {
                    // onaddstream does not fire when a track is added to an existing
                    // stream. But stream.onaddtrack is implemented so we use that.
                    e.stream.addEventListener('addtrack', function (te) {
                      var receiver = void 0;
                      if (window.RTCPeerConnection.prototype.getReceivers) {
                        receiver = _this.getReceivers().find(function (r) {
                          return r.track && r.track.id === te.track.id;
                        });
                      } else {
                        receiver = {
                          track: te.track
                        };
                      }
                      var event = new Event('track');
                      event.track = te.track;
                      event.receiver = receiver;
                      event.transceiver = {
                        receiver: receiver
                      };
                      event.streams = [e.stream];
                      _this.dispatchEvent(event);
                    });
                    e.stream.getTracks().forEach(function (track) {
                      var receiver = void 0;
                      if (window.RTCPeerConnection.prototype.getReceivers) {
                        receiver = _this.getReceivers().find(function (r) {
                          return r.track && r.track.id === track.id;
                        });
                      } else {
                        receiver = {
                          track: track
                        };
                      }
                      var event = new Event('track');
                      event.track = track;
                      event.receiver = receiver;
                      event.transceiver = {
                        receiver: receiver
                      };
                      event.streams = [e.stream];
                      _this.dispatchEvent(event);
                    });
                  };
                  this.addEventListener('addstream', this._ontrackpoly);
                }
                return origSetRemoteDescription.apply(this, arguments);
              };
            } else {
              // even if RTCRtpTransceiver is in window, it is only used and
              // emitted in unified-plan. Unfortunately this means we need
              // to unconditionally wrap the event.
              utils.wrapPeerConnectionEvent(window, 'track', function (e) {
                if (!e.transceiver) {
                  Object.defineProperty(e, 'transceiver', {
                    value: {
                      receiver: e.receiver
                    }
                  });
                }
                return e;
              });
            }
          }
          function shimGetSendersWithDtmf(window) {
            // Overrides addTrack/removeTrack, depends on shimAddTrackRemoveTrack.
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection && !('getSenders' in window.RTCPeerConnection.prototype) && 'createDTMFSender' in window.RTCPeerConnection.prototype) {
              var shimSenderWithDtmf = function shimSenderWithDtmf(pc, track) {
                return {
                  track: track,
                  get dtmf() {
                    if (this._dtmf === undefined) {
                      if (track.kind === 'audio') {
                        this._dtmf = pc.createDTMFSender(track);
                      } else {
                        this._dtmf = null;
                      }
                    }
                    return this._dtmf;
                  },
                  _pc: pc
                };
              };

              // augment addTrack when getSenders is not available.
              if (!window.RTCPeerConnection.prototype.getSenders) {
                window.RTCPeerConnection.prototype.getSenders = function getSenders() {
                  this._senders = this._senders || [];
                  return this._senders.slice(); // return a copy of the internal state.
                };

                var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
                window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
                  var sender = origAddTrack.apply(this, arguments);
                  if (!sender) {
                    sender = shimSenderWithDtmf(this, track);
                    this._senders.push(sender);
                  }
                  return sender;
                };
                var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
                window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
                  origRemoveTrack.apply(this, arguments);
                  var idx = this._senders.indexOf(sender);
                  if (idx !== -1) {
                    this._senders.splice(idx, 1);
                  }
                };
              }
              var origAddStream = window.RTCPeerConnection.prototype.addStream;
              window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
                var _this2 = this;
                this._senders = this._senders || [];
                origAddStream.apply(this, [stream]);
                stream.getTracks().forEach(function (track) {
                  _this2._senders.push(shimSenderWithDtmf(_this2, track));
                });
              };
              var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
              window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
                var _this3 = this;
                this._senders = this._senders || [];
                origRemoveStream.apply(this, [stream]);
                stream.getTracks().forEach(function (track) {
                  var sender = _this3._senders.find(function (s) {
                    return s.track === track;
                  });
                  if (sender) {
                    // remove sender
                    _this3._senders.splice(_this3._senders.indexOf(sender), 1);
                  }
                });
              };
            } else if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection && 'getSenders' in window.RTCPeerConnection.prototype && 'createDTMFSender' in window.RTCPeerConnection.prototype && window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {
              var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
              window.RTCPeerConnection.prototype.getSenders = function getSenders() {
                var _this4 = this;
                var senders = origGetSenders.apply(this, []);
                senders.forEach(function (sender) {
                  return sender._pc = _this4;
                });
                return senders;
              };
              Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {
                get: function get() {
                  if (this._dtmf === undefined) {
                    if (this.track.kind === 'audio') {
                      this._dtmf = this._pc.createDTMFSender(this.track);
                    } else {
                      this._dtmf = null;
                    }
                  }
                  return this._dtmf;
                }
              });
            }
          }
          function shimGetStats(window) {
            if (!window.RTCPeerConnection) {
              return;
            }
            var origGetStats = window.RTCPeerConnection.prototype.getStats;
            window.RTCPeerConnection.prototype.getStats = function getStats() {
              var _this5 = this;
              var _arguments = Array.prototype.slice.call(arguments),
                selector = _arguments[0],
                onSucc = _arguments[1],
                onErr = _arguments[2];

              // If selector is a function then we are in the old style stats so just
              // pass back the original getStats format to avoid breaking old users.

              if (arguments.length > 0 && typeof selector === 'function') {
                return origGetStats.apply(this, arguments);
              }

              // When spec-style getStats is supported, return those when called with
              // either no arguments or the selector argument is null.
              if (origGetStats.length === 0 && (arguments.length === 0 || typeof selector !== 'function')) {
                return origGetStats.apply(this, []);
              }
              var fixChromeStats_ = function fixChromeStats_(response) {
                var standardReport = {};
                var reports = response.result();
                reports.forEach(function (report) {
                  var standardStats = {
                    id: report.id,
                    timestamp: report.timestamp,
                    type: {
                      localcandidate: 'local-candidate',
                      remotecandidate: 'remote-candidate'
                    }[report.type] || report.type
                  };
                  report.names().forEach(function (name) {
                    standardStats[name] = report.stat(name);
                  });
                  standardReport[standardStats.id] = standardStats;
                });
                return standardReport;
              };

              // shim getStats with maplike support
              var makeMapStats = function makeMapStats(stats) {
                return new Map(Object.keys(stats).map(function (key) {
                  return [key, stats[key]];
                }));
              };
              if (arguments.length >= 2) {
                var successCallbackWrapper_ = function successCallbackWrapper_(response) {
                  onSucc(makeMapStats(fixChromeStats_(response)));
                };
                return origGetStats.apply(this, [successCallbackWrapper_, selector]);
              }

              // promise-support
              return new Promise(function (resolve, reject) {
                origGetStats.apply(_this5, [function (response) {
                  resolve(makeMapStats(fixChromeStats_(response)));
                }, reject]);
              }).then(onSucc, onErr);
            };
          }
          function shimSenderReceiverGetStats(window) {
            if (!((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection && window.RTCRtpSender && window.RTCRtpReceiver)) {
              return;
            }

            // shim sender stats.
            if (!('getStats' in window.RTCRtpSender.prototype)) {
              var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
              if (origGetSenders) {
                window.RTCPeerConnection.prototype.getSenders = function getSenders() {
                  var _this6 = this;
                  var senders = origGetSenders.apply(this, []);
                  senders.forEach(function (sender) {
                    return sender._pc = _this6;
                  });
                  return senders;
                };
              }
              var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
              if (origAddTrack) {
                window.RTCPeerConnection.prototype.addTrack = function addTrack() {
                  var sender = origAddTrack.apply(this, arguments);
                  sender._pc = this;
                  return sender;
                };
              }
              window.RTCRtpSender.prototype.getStats = function getStats() {
                var sender = this;
                return this._pc.getStats().then(function (result) {
                  return (
                    /* Note: this will include stats of all senders that
                     *   send a track with the same id as sender.track as
                     *   it is not possible to identify the RTCRtpSender.
                     */
                    utils.filterStats(result, sender.track, true)
                  );
                });
              };
            }

            // shim receiver stats.
            if (!('getStats' in window.RTCRtpReceiver.prototype)) {
              var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
              if (origGetReceivers) {
                window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
                  var _this7 = this;
                  var receivers = origGetReceivers.apply(this, []);
                  receivers.forEach(function (receiver) {
                    return receiver._pc = _this7;
                  });
                  return receivers;
                };
              }
              utils.wrapPeerConnectionEvent(window, 'track', function (e) {
                e.receiver._pc = e.srcElement;
                return e;
              });
              window.RTCRtpReceiver.prototype.getStats = function getStats() {
                var receiver = this;
                return this._pc.getStats().then(function (result) {
                  return utils.filterStats(result, receiver.track, false);
                });
              };
            }
            if (!('getStats' in window.RTCRtpSender.prototype && 'getStats' in window.RTCRtpReceiver.prototype)) {
              return;
            }

            // shim RTCPeerConnection.getStats(track).
            var origGetStats = window.RTCPeerConnection.prototype.getStats;
            window.RTCPeerConnection.prototype.getStats = function getStats() {
              if (arguments.length > 0 && arguments[0] instanceof window.MediaStreamTrack) {
                var track = arguments[0];
                var sender = void 0;
                var receiver = void 0;
                var err = void 0;
                this.getSenders().forEach(function (s) {
                  if (s.track === track) {
                    if (sender) {
                      err = true;
                    } else {
                      sender = s;
                    }
                  }
                });
                this.getReceivers().forEach(function (r) {
                  if (r.track === track) {
                    if (receiver) {
                      err = true;
                    } else {
                      receiver = r;
                    }
                  }
                  return r.track === track;
                });
                if (err || sender && receiver) {
                  return Promise.reject(new DOMException('There are more than one sender or receiver for the track.', 'InvalidAccessError'));
                } else if (sender) {
                  return sender.getStats();
                } else if (receiver) {
                  return receiver.getStats();
                }
                return Promise.reject(new DOMException('There is no sender or receiver for the track.', 'InvalidAccessError'));
              }
              return origGetStats.apply(this, arguments);
            };
          }
          function shimAddTrackRemoveTrackWithNative(window) {
            // shim addTrack/removeTrack with native variants in order to make
            // the interactions with legacy getLocalStreams behave as in other browsers.
            // Keeps a mapping stream.id => [stream, rtpsenders...]
            window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
              var _this8 = this;
              this._shimmedLocalStreams = this._shimmedLocalStreams || {};
              return Object.keys(this._shimmedLocalStreams).map(function (streamId) {
                return _this8._shimmedLocalStreams[streamId][0];
              });
            };
            var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
            window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
              if (!stream) {
                return origAddTrack.apply(this, arguments);
              }
              this._shimmedLocalStreams = this._shimmedLocalStreams || {};
              var sender = origAddTrack.apply(this, arguments);
              if (!this._shimmedLocalStreams[stream.id]) {
                this._shimmedLocalStreams[stream.id] = [stream, sender];
              } else if (this._shimmedLocalStreams[stream.id].indexOf(sender) === -1) {
                this._shimmedLocalStreams[stream.id].push(sender);
              }
              return sender;
            };
            var origAddStream = window.RTCPeerConnection.prototype.addStream;
            window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
              var _this9 = this;
              this._shimmedLocalStreams = this._shimmedLocalStreams || {};
              stream.getTracks().forEach(function (track) {
                var alreadyExists = _this9.getSenders().find(function (s) {
                  return s.track === track;
                });
                if (alreadyExists) {
                  throw new DOMException('Track already exists.', 'InvalidAccessError');
                }
              });
              var existingSenders = this.getSenders();
              origAddStream.apply(this, arguments);
              var newSenders = this.getSenders().filter(function (newSender) {
                return existingSenders.indexOf(newSender) === -1;
              });
              this._shimmedLocalStreams[stream.id] = [stream].concat(newSenders);
            };
            var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
            window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
              this._shimmedLocalStreams = this._shimmedLocalStreams || {};
              delete this._shimmedLocalStreams[stream.id];
              return origRemoveStream.apply(this, arguments);
            };
            var origRemoveTrack = window.RTCPeerConnection.prototype.removeTrack;
            window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
              var _this10 = this;
              this._shimmedLocalStreams = this._shimmedLocalStreams || {};
              if (sender) {
                Object.keys(this._shimmedLocalStreams).forEach(function (streamId) {
                  var idx = _this10._shimmedLocalStreams[streamId].indexOf(sender);
                  if (idx !== -1) {
                    _this10._shimmedLocalStreams[streamId].splice(idx, 1);
                  }
                  if (_this10._shimmedLocalStreams[streamId].length === 1) {
                    delete _this10._shimmedLocalStreams[streamId];
                  }
                });
              }
              return origRemoveTrack.apply(this, arguments);
            };
          }
          function shimAddTrackRemoveTrack(window) {
            if (!window.RTCPeerConnection) {
              return;
            }
            var browserDetails = utils.detectBrowser(window);
            // shim addTrack and removeTrack.
            if (window.RTCPeerConnection.prototype.addTrack && browserDetails.version >= 65) {
              return shimAddTrackRemoveTrackWithNative(window);
            }

            // also shim pc.getLocalStreams when addTrack is shimmed
            // to return the original streams.
            var origGetLocalStreams = window.RTCPeerConnection.prototype.getLocalStreams;
            window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
              var _this11 = this;
              var nativeStreams = origGetLocalStreams.apply(this);
              this._reverseStreams = this._reverseStreams || {};
              return nativeStreams.map(function (stream) {
                return _this11._reverseStreams[stream.id];
              });
            };
            var origAddStream = window.RTCPeerConnection.prototype.addStream;
            window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
              var _this12 = this;
              this._streams = this._streams || {};
              this._reverseStreams = this._reverseStreams || {};
              stream.getTracks().forEach(function (track) {
                var alreadyExists = _this12.getSenders().find(function (s) {
                  return s.track === track;
                });
                if (alreadyExists) {
                  throw new DOMException('Track already exists.', 'InvalidAccessError');
                }
              });
              // Add identity mapping for consistency with addTrack.
              // Unless this is being used with a stream from addTrack.
              if (!this._reverseStreams[stream.id]) {
                var newStream = new window.MediaStream(stream.getTracks());
                this._streams[stream.id] = newStream;
                this._reverseStreams[newStream.id] = stream;
                stream = newStream;
              }
              origAddStream.apply(this, [stream]);
            };
            var origRemoveStream = window.RTCPeerConnection.prototype.removeStream;
            window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
              this._streams = this._streams || {};
              this._reverseStreams = this._reverseStreams || {};
              origRemoveStream.apply(this, [this._streams[stream.id] || stream]);
              delete this._reverseStreams[this._streams[stream.id] ? this._streams[stream.id].id : stream.id];
              delete this._streams[stream.id];
            };
            window.RTCPeerConnection.prototype.addTrack = function addTrack(track, stream) {
              var _this13 = this;
              if (this.signalingState === 'closed') {
                throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
              }
              var streams = [].slice.call(arguments, 1);
              if (streams.length !== 1 || !streams[0].getTracks().find(function (t) {
                return t === track;
              })) {
                // this is not fully correct but all we can manage without
                // [[associated MediaStreams]] internal slot.
                throw new DOMException('The adapter.js addTrack polyfill only supports a single ' + ' stream which is associated with the specified track.', 'NotSupportedError');
              }
              var alreadyExists = this.getSenders().find(function (s) {
                return s.track === track;
              });
              if (alreadyExists) {
                throw new DOMException('Track already exists.', 'InvalidAccessError');
              }
              this._streams = this._streams || {};
              this._reverseStreams = this._reverseStreams || {};
              var oldStream = this._streams[stream.id];
              if (oldStream) {
                // this is using odd Chrome behaviour, use with caution:
                // https://bugs.chromium.org/p/webrtc/issues/detail?id=7815
                // Note: we rely on the high-level addTrack/dtmf shim to
                // create the sender with a dtmf sender.
                oldStream.addTrack(track);

                // Trigger ONN async.
                Promise.resolve().then(function () {
                  _this13.dispatchEvent(new Event('negotiationneeded'));
                });
              } else {
                var newStream = new window.MediaStream([track]);
                this._streams[stream.id] = newStream;
                this._reverseStreams[newStream.id] = stream;
                this.addStream(newStream);
              }
              return this.getSenders().find(function (s) {
                return s.track === track;
              });
            };

            // replace the internal stream id with the external one and
            // vice versa.
            function replaceInternalStreamId(pc, description) {
              var sdp = description.sdp;
              Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
                var externalStream = pc._reverseStreams[internalId];
                var internalStream = pc._streams[externalStream.id];
                sdp = sdp.replace(new RegExp(internalStream.id, 'g'), externalStream.id);
              });
              return new RTCSessionDescription({
                type: description.type,
                sdp: sdp
              });
            }
            function replaceExternalStreamId(pc, description) {
              var sdp = description.sdp;
              Object.keys(pc._reverseStreams || []).forEach(function (internalId) {
                var externalStream = pc._reverseStreams[internalId];
                var internalStream = pc._streams[externalStream.id];
                sdp = sdp.replace(new RegExp(externalStream.id, 'g'), internalStream.id);
              });
              return new RTCSessionDescription({
                type: description.type,
                sdp: sdp
              });
            }
            ['createOffer', 'createAnswer'].forEach(function (method) {
              var nativeMethod = window.RTCPeerConnection.prototype[method];
              var methodObj = _defineProperty({}, method, function () {
                var _this14 = this;
                var args = arguments;
                var isLegacyCall = arguments.length && typeof arguments[0] === 'function';
                if (isLegacyCall) {
                  return nativeMethod.apply(this, [function (description) {
                    var desc = replaceInternalStreamId(_this14, description);
                    args[0].apply(null, [desc]);
                  }, function (err) {
                    if (args[1]) {
                      args[1].apply(null, err);
                    }
                  }, arguments[2]]);
                }
                return nativeMethod.apply(this, arguments).then(function (description) {
                  return replaceInternalStreamId(_this14, description);
                });
              });
              window.RTCPeerConnection.prototype[method] = methodObj[method];
            });
            var origSetLocalDescription = window.RTCPeerConnection.prototype.setLocalDescription;
            window.RTCPeerConnection.prototype.setLocalDescription = function setLocalDescription() {
              if (!arguments.length || !arguments[0].type) {
                return origSetLocalDescription.apply(this, arguments);
              }
              arguments[0] = replaceExternalStreamId(this, arguments[0]);
              return origSetLocalDescription.apply(this, arguments);
            };

            // TODO: mangle getStats: https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamstats-streamidentifier

            var origLocalDescription = Object.getOwnPropertyDescriptor(window.RTCPeerConnection.prototype, 'localDescription');
            Object.defineProperty(window.RTCPeerConnection.prototype, 'localDescription', {
              get: function get() {
                var description = origLocalDescription.get.apply(this);
                if (description.type === '') {
                  return description;
                }
                return replaceInternalStreamId(this, description);
              }
            });
            window.RTCPeerConnection.prototype.removeTrack = function removeTrack(sender) {
              var _this15 = this;
              if (this.signalingState === 'closed') {
                throw new DOMException('The RTCPeerConnection\'s signalingState is \'closed\'.', 'InvalidStateError');
              }
              // We can not yet check for sender instanceof RTCRtpSender
              // since we shim RTPSender. So we check if sender._pc is set.
              if (!sender._pc) {
                throw new DOMException('Argument 1 of RTCPeerConnection.removeTrack ' + 'does not implement interface RTCRtpSender.', 'TypeError');
              }
              var isLocal = sender._pc === this;
              if (!isLocal) {
                throw new DOMException('Sender was not created by this connection.', 'InvalidAccessError');
              }

              // Search for the native stream the senders track belongs to.
              this._streams = this._streams || {};
              var stream = void 0;
              Object.keys(this._streams).forEach(function (streamid) {
                var hasTrack = _this15._streams[streamid].getTracks().find(function (track) {
                  return sender.track === track;
                });
                if (hasTrack) {
                  stream = _this15._streams[streamid];
                }
              });
              if (stream) {
                if (stream.getTracks().length === 1) {
                  // if this is the last track of the stream, remove the stream. This
                  // takes care of any shimmed _senders.
                  this.removeStream(this._reverseStreams[stream.id]);
                } else {
                  // relying on the same odd chrome behaviour as above.
                  stream.removeTrack(sender.track);
                }
                this.dispatchEvent(new Event('negotiationneeded'));
              }
            };
          }
          function shimPeerConnection(window) {
            var browserDetails = utils.detectBrowser(window);
            if (!window.RTCPeerConnection && window.webkitRTCPeerConnection) {
              // very basic support for old versions.
              window.RTCPeerConnection = window.webkitRTCPeerConnection;
            }
            if (!window.RTCPeerConnection) {
              return;
            }

            // shim implicit creation of RTCSessionDescription/RTCIceCandidate
            if (browserDetails.version < 53) {
              ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
                var nativeMethod = window.RTCPeerConnection.prototype[method];
                var methodObj = _defineProperty({}, method, function () {
                  arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
                  return nativeMethod.apply(this, arguments);
                });
                window.RTCPeerConnection.prototype[method] = methodObj[method];
              });
            }

            // support for addIceCandidate(null or undefined)
            var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate;
            window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() {
              if (!arguments[0]) {
                if (arguments[1]) {
                  arguments[1].apply(null);
                }
                return Promise.resolve();
              }
              // Firefox 68+ emits and processes {candidate: "", ...}, ignore
              // in older versions. Native support planned for Chrome M77.
              if (browserDetails.version < 78 && arguments[0] && arguments[0].candidate === '') {
                return Promise.resolve();
              }
              return nativeAddIceCandidate.apply(this, arguments);
            };
          }
          function fixNegotiationNeeded(window) {
            utils.wrapPeerConnectionEvent(window, 'negotiationneeded', function (e) {
              var pc = e.target;
              if (pc.signalingState !== 'stable') {
                return;
              }
              return e;
            });
          }
        }, {
          "../utils.js": 15,
          "./getdisplaymedia": 4,
          "./getusermedia": 5
        }],
        4: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.shimGetDisplayMedia = shimGetDisplayMedia;
          function shimGetDisplayMedia(window, getSourceId) {
            if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
              return;
            }
            if (!window.navigator.mediaDevices) {
              return;
            }
            // getSourceId is a function that returns a promise resolving with
            // the sourceId of the screen/window/tab to be shared.
            if (typeof getSourceId !== 'function') {
              console.error('shimGetDisplayMedia: getSourceId argument is not ' + 'a function');
              return;
            }
            window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
              return getSourceId(constraints).then(function (sourceId) {
                var widthSpecified = constraints.video && constraints.video.width;
                var heightSpecified = constraints.video && constraints.video.height;
                var frameRateSpecified = constraints.video && constraints.video.frameRate;
                constraints.video = {
                  mandatory: {
                    chromeMediaSource: 'desktop',
                    chromeMediaSourceId: sourceId,
                    maxFrameRate: frameRateSpecified || 3
                  }
                };
                if (widthSpecified) {
                  constraints.video.mandatory.maxWidth = widthSpecified;
                }
                if (heightSpecified) {
                  constraints.video.mandatory.maxHeight = heightSpecified;
                }
                return window.navigator.mediaDevices.getUserMedia(constraints);
              });
            };
          }
        }, {}],
        5: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          var _typeof$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
            return _typeof(obj);
          } : function (obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
          };
          exports.shimGetUserMedia = shimGetUserMedia;
          var _utils = require('../utils.js');
          var utils = _interopRequireWildcard(_utils);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }
          var logging = utils.log;
          function shimGetUserMedia(window) {
            var navigator = window && window.navigator;
            if (!navigator.mediaDevices) {
              return;
            }
            var browserDetails = utils.detectBrowser(window);
            var constraintsToChrome_ = function constraintsToChrome_(c) {
              if ((typeof c === 'undefined' ? 'undefined' : _typeof$1(c)) !== 'object' || c.mandatory || c.optional) {
                return c;
              }
              var cc = {};
              Object.keys(c).forEach(function (key) {
                if (key === 'require' || key === 'advanced' || key === 'mediaSource') {
                  return;
                }
                var r = _typeof$1(c[key]) === 'object' ? c[key] : {
                  ideal: c[key]
                };
                if (r.exact !== undefined && typeof r.exact === 'number') {
                  r.min = r.max = r.exact;
                }
                var oldname_ = function oldname_(prefix, name) {
                  if (prefix) {
                    return prefix + name.charAt(0).toUpperCase() + name.slice(1);
                  }
                  return name === 'deviceId' ? 'sourceId' : name;
                };
                if (r.ideal !== undefined) {
                  cc.optional = cc.optional || [];
                  var oc = {};
                  if (typeof r.ideal === 'number') {
                    oc[oldname_('min', key)] = r.ideal;
                    cc.optional.push(oc);
                    oc = {};
                    oc[oldname_('max', key)] = r.ideal;
                    cc.optional.push(oc);
                  } else {
                    oc[oldname_('', key)] = r.ideal;
                    cc.optional.push(oc);
                  }
                }
                if (r.exact !== undefined && typeof r.exact !== 'number') {
                  cc.mandatory = cc.mandatory || {};
                  cc.mandatory[oldname_('', key)] = r.exact;
                } else {
                  ['min', 'max'].forEach(function (mix) {
                    if (r[mix] !== undefined) {
                      cc.mandatory = cc.mandatory || {};
                      cc.mandatory[oldname_(mix, key)] = r[mix];
                    }
                  });
                }
              });
              if (c.advanced) {
                cc.optional = (cc.optional || []).concat(c.advanced);
              }
              return cc;
            };
            var shimConstraints_ = function shimConstraints_(constraints, func) {
              if (browserDetails.version >= 61) {
                return func(constraints);
              }
              constraints = JSON.parse(JSON.stringify(constraints));
              if (constraints && _typeof$1(constraints.audio) === 'object') {
                var remap = function remap(obj, a, b) {
                  if (a in obj && !(b in obj)) {
                    obj[b] = obj[a];
                    delete obj[a];
                  }
                };
                constraints = JSON.parse(JSON.stringify(constraints));
                remap(constraints.audio, 'autoGainControl', 'googAutoGainControl');
                remap(constraints.audio, 'noiseSuppression', 'googNoiseSuppression');
                constraints.audio = constraintsToChrome_(constraints.audio);
              }
              if (constraints && _typeof$1(constraints.video) === 'object') {
                // Shim facingMode for mobile & surface pro.
                var face = constraints.video.facingMode;
                face = face && ((typeof face === 'undefined' ? 'undefined' : _typeof$1(face)) === 'object' ? face : {
                  ideal: face
                });
                var getSupportedFacingModeLies = browserDetails.version < 66;
                if (face && (face.exact === 'user' || face.exact === 'environment' || face.ideal === 'user' || face.ideal === 'environment') && !(navigator.mediaDevices.getSupportedConstraints && navigator.mediaDevices.getSupportedConstraints().facingMode && !getSupportedFacingModeLies)) {
                  delete constraints.video.facingMode;
                  var matches = void 0;
                  if (face.exact === 'environment' || face.ideal === 'environment') {
                    matches = ['back', 'rear'];
                  } else if (face.exact === 'user' || face.ideal === 'user') {
                    matches = ['front'];
                  }
                  if (matches) {
                    // Look for matches in label, or use last cam for back (typical).
                    return navigator.mediaDevices.enumerateDevices().then(function (devices) {
                      devices = devices.filter(function (d) {
                        return d.kind === 'videoinput';
                      });
                      var dev = devices.find(function (d) {
                        return matches.some(function (match) {
                          return d.label.toLowerCase().includes(match);
                        });
                      });
                      if (!dev && devices.length && matches.includes('back')) {
                        dev = devices[devices.length - 1]; // more likely the back cam
                      }

                      if (dev) {
                        constraints.video.deviceId = face.exact ? {
                          exact: dev.deviceId
                        } : {
                          ideal: dev.deviceId
                        };
                      }
                      constraints.video = constraintsToChrome_(constraints.video);
                      logging('chrome: ' + JSON.stringify(constraints));
                      return func(constraints);
                    });
                  }
                }
                constraints.video = constraintsToChrome_(constraints.video);
              }
              logging('chrome: ' + JSON.stringify(constraints));
              return func(constraints);
            };
            var shimError_ = function shimError_(e) {
              if (browserDetails.version >= 64) {
                return e;
              }
              return {
                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 toString() {
                  return this.name + (this.message && ': ') + this.message;
                }
              };
            };
            var getUserMedia_ = function getUserMedia_(constraints, onSuccess, onError) {
              shimConstraints_(constraints, function (c) {
                navigator.webkitGetUserMedia(c, onSuccess, function (e) {
                  if (onError) {
                    onError(shimError_(e));
                  }
                });
              });
            };
            navigator.getUserMedia = getUserMedia_.bind(navigator);

            // Even though Chrome 45 has navigator.mediaDevices and a getUserMedia
            // function which returns a Promise, it does not accept spec-style
            // constraints.
            if (navigator.mediaDevices.getUserMedia) {
              var origGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
              navigator.mediaDevices.getUserMedia = function (cs) {
                return shimConstraints_(cs, function (c) {
                  return origGetUserMedia(c).then(function (stream) {
                    if (c.audio && !stream.getAudioTracks().length || c.video && !stream.getVideoTracks().length) {
                      stream.getTracks().forEach(function (track) {
                        track.stop();
                      });
                      throw new DOMException('', 'NotFoundError');
                    }
                    return stream;
                  }, function (e) {
                    return Promise.reject(shimError_(e));
                  });
                });
              };
            }
          }
        }, {
          "../utils.js": 15
        }],
        6: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          var _typeof$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
            return _typeof(obj);
          } : function (obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
          };
          exports.shimRTCIceCandidate = shimRTCIceCandidate;
          exports.shimMaxMessageSize = shimMaxMessageSize;
          exports.shimSendThrowTypeError = shimSendThrowTypeError;
          exports.shimConnectionState = shimConnectionState;
          exports.removeAllowExtmapMixed = removeAllowExtmapMixed;
          var _sdp = require('sdp');
          var _sdp2 = _interopRequireDefault(_sdp);
          var _utils = require('./utils');
          var utils = _interopRequireWildcard(_utils);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }
          function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
              "default": obj
            };
          }
          function shimRTCIceCandidate(window) {
            // foundation is arbitrarily chosen as an indicator for full support for
            // https://w3c.github.io/webrtc-pc/#rtcicecandidate-interface
            if (!window.RTCIceCandidate || window.RTCIceCandidate && 'foundation' in window.RTCIceCandidate.prototype) {
              return;
            }
            var NativeRTCIceCandidate = window.RTCIceCandidate;
            window.RTCIceCandidate = function RTCIceCandidate(args) {
              // Remove the a= which shouldn't be part of the candidate string.
              if ((typeof args === 'undefined' ? 'undefined' : _typeof$1(args)) === 'object' && args.candidate && args.candidate.indexOf('a=') === 0) {
                args = JSON.parse(JSON.stringify(args));
                args.candidate = args.candidate.substr(2);
              }
              if (args.candidate && args.candidate.length) {
                // Augment the native candidate with the parsed fields.
                var nativeCandidate = new NativeRTCIceCandidate(args);
                var parsedCandidate = _sdp2["default"].parseCandidate(args.candidate);
                var augmentedCandidate = Object.assign(nativeCandidate, parsedCandidate);

                // Add a serializer that does not serialize the extra attributes.
                augmentedCandidate.toJSON = function toJSON() {
                  return {
                    candidate: augmentedCandidate.candidate,
                    sdpMid: augmentedCandidate.sdpMid,
                    sdpMLineIndex: augmentedCandidate.sdpMLineIndex,
                    usernameFragment: augmentedCandidate.usernameFragment
                  };
                };
                return augmentedCandidate;
              }
              return new NativeRTCIceCandidate(args);
            };
            window.RTCIceCandidate.prototype = NativeRTCIceCandidate.prototype;

            // Hook up the augmented candidate in onicecandidate and
            // addEventListener('icecandidate', ...)
            utils.wrapPeerConnectionEvent(window, 'icecandidate', function (e) {
              if (e.candidate) {
                Object.defineProperty(e, 'candidate', {
                  value: new window.RTCIceCandidate(e.candidate),
                  writable: 'false'
                });
              }
              return e;
            });
          }
          function shimMaxMessageSize(window) {
            if (!window.RTCPeerConnection) {
              return;
            }
            var browserDetails = utils.detectBrowser(window);
            if (!('sctp' in window.RTCPeerConnection.prototype)) {
              Object.defineProperty(window.RTCPeerConnection.prototype, 'sctp', {
                get: function get() {
                  return typeof this._sctp === 'undefined' ? null : this._sctp;
                }
              });
            }
            var sctpInDescription = function sctpInDescription(description) {
              if (!description || !description.sdp) {
                return false;
              }
              var sections = _sdp2["default"].splitSections(description.sdp);
              sections.shift();
              return sections.some(function (mediaSection) {
                var mLine = _sdp2["default"].parseMLine(mediaSection);
                return mLine && mLine.kind === 'application' && mLine.protocol.indexOf('SCTP') !== -1;
              });
            };
            var getRemoteFirefoxVersion = function getRemoteFirefoxVersion(description) {
              // TODO: Is there a better solution for detecting Firefox?
              var match = description.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);
              if (match === null || match.length < 2) {
                return -1;
              }
              var version = parseInt(match[1], 10);
              // Test for NaN (yes, this is ugly)
              return version !== version ? -1 : version;
            };
            var getCanSendMaxMessageSize = function getCanSendMaxMessageSize(remoteIsFirefox) {
              // Every implementation we know can send at least 64 KiB.
              // Note: Although Chrome is technically able to send up to 256 KiB, the
              //       data does not reach the other peer reliably.
              //       See: https://bugs.chromium.org/p/webrtc/issues/detail?id=8419
              var canSendMaxMessageSize = 65536;
              if (browserDetails.browser === 'firefox') {
                if (browserDetails.version < 57) {
                  if (remoteIsFirefox === -1) {
                    // FF < 57 will send in 16 KiB chunks using the deprecated PPID
                    // fragmentation.
                    canSendMaxMessageSize = 16384;
                  } else {
                    // However, other FF (and RAWRTC) can reassemble PPID-fragmented
                    // messages. Thus, supporting ~2 GiB when sending.
                    canSendMaxMessageSize = 2147483637;
                  }
                } else if (browserDetails.version < 60) {
                  // Currently, all FF >= 57 will reset the remote maximum message size
                  // to the default value when a data channel is created at a later
                  // stage. :(
                  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831
                  canSendMaxMessageSize = browserDetails.version === 57 ? 65535 : 65536;
                } else {
                  // FF >= 60 supports sending ~2 GiB
                  canSendMaxMessageSize = 2147483637;
                }
              }
              return canSendMaxMessageSize;
            };
            var getMaxMessageSize = function getMaxMessageSize(description, remoteIsFirefox) {
              // Note: 65536 bytes is the default value from the SDP spec. Also,
              //       every implementation we know supports receiving 65536 bytes.
              var maxMessageSize = 65536;

              // FF 57 has a slightly incorrect default remote max message size, so
              // we need to adjust it here to avoid a failure when sending.
              // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1425697
              if (browserDetails.browser === 'firefox' && browserDetails.version === 57) {
                maxMessageSize = 65535;
              }
              var match = _sdp2["default"].matchPrefix(description.sdp, 'a=max-message-size:');
              if (match.length > 0) {
                maxMessageSize = parseInt(match[0].substr(19), 10);
              } else if (browserDetails.browser === 'firefox' && remoteIsFirefox !== -1) {
                // If the maximum message size is not present in the remote SDP and
                // both local and remote are Firefox, the remote peer can receive
                // ~2 GiB.
                maxMessageSize = 2147483637;
              }
              return maxMessageSize;
            };
            var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
            window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
              this._sctp = null;
              // Chrome decided to not expose .sctp in plan-b mode.
              // As usual, adapter.js has to do an 'ugly worakaround'
              // to cover up the mess.
              if (browserDetails.browser === 'chrome' && browserDetails.version >= 76) {
                var _getConfiguration = this.getConfiguration(),
                  sdpSemantics = _getConfiguration.sdpSemantics;
                if (sdpSemantics === 'plan-b') {
                  Object.defineProperty(this, 'sctp', {
                    get: function get() {
                      return typeof this._sctp === 'undefined' ? null : this._sctp;
                    },
                    enumerable: true,
                    configurable: true
                  });
                }
              }
              if (sctpInDescription(arguments[0])) {
                // Check if the remote is FF.
                var isFirefox = getRemoteFirefoxVersion(arguments[0]);

                // Get the maximum message size the local peer is capable of sending
                var canSendMMS = getCanSendMaxMessageSize(isFirefox);

                // Get the maximum message size of the remote peer.
                var remoteMMS = getMaxMessageSize(arguments[0], isFirefox);

                // Determine final maximum message size
                var maxMessageSize = void 0;
                if (canSendMMS === 0 && remoteMMS === 0) {
                  maxMessageSize = Number.POSITIVE_INFINITY;
                } else if (canSendMMS === 0 || remoteMMS === 0) {
                  maxMessageSize = Math.max(canSendMMS, remoteMMS);
                } else {
                  maxMessageSize = Math.min(canSendMMS, remoteMMS);
                }

                // Create a dummy RTCSctpTransport object and the 'maxMessageSize'
                // attribute.
                var sctp = {};
                Object.defineProperty(sctp, 'maxMessageSize', {
                  get: function get() {
                    return maxMessageSize;
                  }
                });
                this._sctp = sctp;
              }
              return origSetRemoteDescription.apply(this, arguments);
            };
          }
          function shimSendThrowTypeError(window) {
            if (!(window.RTCPeerConnection && 'createDataChannel' in window.RTCPeerConnection.prototype)) {
              return;
            }

            // Note: Although Firefox >= 57 has a native implementation, the maximum
            //       message size can be reset for all data channels at a later stage.
            //       See: https://bugzilla.mozilla.org/show_bug.cgi?id=1426831

            function wrapDcSend(dc, pc) {
              var origDataChannelSend = dc.send;
              dc.send = function send() {
                var data = arguments[0];
                var length = data.length || data.size || data.byteLength;
                if (dc.readyState === 'open' && pc.sctp && length > pc.sctp.maxMessageSize) {
                  throw new TypeError('Message too large (can send a maximum of ' + pc.sctp.maxMessageSize + ' bytes)');
                }
                return origDataChannelSend.apply(dc, arguments);
              };
            }
            var origCreateDataChannel = window.RTCPeerConnection.prototype.createDataChannel;
            window.RTCPeerConnection.prototype.createDataChannel = function createDataChannel() {
              var dataChannel = origCreateDataChannel.apply(this, arguments);
              wrapDcSend(dataChannel, this);
              return dataChannel;
            };
            utils.wrapPeerConnectionEvent(window, 'datachannel', function (e) {
              wrapDcSend(e.channel, e.target);
              return e;
            });
          }

          /* shims RTCConnectionState by pretending it is the same as iceConnectionState.
           * See https://bugs.chromium.org/p/webrtc/issues/detail?id=6145#c12
           * for why this is a valid hack in Chrome. In Firefox it is slightly incorrect
           * since DTLS failures would be hidden. See
           * https://bugzilla.mozilla.org/show_bug.cgi?id=1265827
           * for the Firefox tracking bug.
           */
          function shimConnectionState(window) {
            if (!window.RTCPeerConnection || 'connectionState' in window.RTCPeerConnection.prototype) {
              return;
            }
            var proto = window.RTCPeerConnection.prototype;
            Object.defineProperty(proto, 'connectionState', {
              get: function get() {
                return {
                  completed: 'connected',
                  checking: 'connecting'
                }[this.iceConnectionState] || this.iceConnectionState;
              },
              enumerable: true,
              configurable: true
            });
            Object.defineProperty(proto, 'onconnectionstatechange', {
              get: function get() {
                return this._onconnectionstatechange || null;
              },
              set: function set(cb) {
                if (this._onconnectionstatechange) {
                  this.removeEventListener('connectionstatechange', this._onconnectionstatechange);
                  delete this._onconnectionstatechange;
                }
                if (cb) {
                  this.addEventListener('connectionstatechange', this._onconnectionstatechange = cb);
                }
              },
              enumerable: true,
              configurable: true
            });
            ['setLocalDescription', 'setRemoteDescription'].forEach(function (method) {
              var origMethod = proto[method];
              proto[method] = function () {
                if (!this._connectionstatechangepoly) {
                  this._connectionstatechangepoly = function (e) {
                    var pc = e.target;
                    if (pc._lastConnectionState !== pc.connectionState) {
                      pc._lastConnectionState = pc.connectionState;
                      var newEvent = new Event('connectionstatechange', e);
                      pc.dispatchEvent(newEvent);
                    }
                    return e;
                  };
                  this.addEventListener('iceconnectionstatechange', this._connectionstatechangepoly);
                }
                return origMethod.apply(this, arguments);
              };
            });
          }
          function removeAllowExtmapMixed(window) {
            /* remove a=extmap-allow-mixed for Chrome < M71 */
            if (!window.RTCPeerConnection) {
              return;
            }
            var browserDetails = utils.detectBrowser(window);
            if (browserDetails.browser === 'chrome' && browserDetails.version >= 71) {
              return;
            }
            var nativeSRD = window.RTCPeerConnection.prototype.setRemoteDescription;
            window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription(desc) {
              if (desc && desc.sdp && desc.sdp.indexOf('\na=extmap-allow-mixed') !== -1) {
                desc.sdp = desc.sdp.split('\n').filter(function (line) {
                  return line.trim() !== 'a=extmap-allow-mixed';
                }).join('\n');
              }
              return nativeSRD.apply(this, arguments);
            };
          }
        }, {
          "./utils": 15,
          "sdp": 17
        }],
        7: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.shimGetDisplayMedia = exports.shimGetUserMedia = undefined;
          var _getusermedia = require('./getusermedia');
          Object.defineProperty(exports, 'shimGetUserMedia', {
            enumerable: true,
            get: function get() {
              return _getusermedia.shimGetUserMedia;
            }
          });
          var _getdisplaymedia = require('./getdisplaymedia');
          Object.defineProperty(exports, 'shimGetDisplayMedia', {
            enumerable: true,
            get: function get() {
              return _getdisplaymedia.shimGetDisplayMedia;
            }
          });
          exports.shimPeerConnection = shimPeerConnection;
          exports.shimReplaceTrack = shimReplaceTrack;
          var _utils = require('../utils');
          var utils = _interopRequireWildcard(_utils);
          var _filtericeservers = require('./filtericeservers');
          var _rtcpeerconnectionShim = require('rtcpeerconnection-shim');
          var _rtcpeerconnectionShim2 = _interopRequireDefault(_rtcpeerconnectionShim);
          function _interopRequireDefault(obj) {
            return obj && obj.__esModule ? obj : {
              "default": obj
            };
          }
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }
          function shimPeerConnection(window) {
            var browserDetails = utils.detectBrowser(window);
            if (window.RTCIceGatherer) {
              if (!window.RTCIceCandidate) {
                window.RTCIceCandidate = function RTCIceCandidate(args) {
                  return args;
                };
              }
              if (!window.RTCSessionDescription) {
                window.RTCSessionDescription = function RTCSessionDescription(args) {
                  return args;
                };
              }
              // this adds an additional event listener to MediaStrackTrack that signals
              // when a tracks enabled property was changed. Workaround for a bug in
              // addStream, see below. No longer required in 15025+
              if (browserDetails.version < 15025) {
                var origMSTEnabled = Object.getOwnPropertyDescriptor(window.MediaStreamTrack.prototype, 'enabled');
                Object.defineProperty(window.MediaStreamTrack.prototype, 'enabled', {
                  set: function set(value) {
                    origMSTEnabled.set.call(this, value);
                    var ev = new Event('enabled');
                    ev.enabled = value;
                    this.dispatchEvent(ev);
                  }
                });
              }
            }

            // ORTC defines the DTMF sender a bit different.
            // https://github.com/w3c/ortc/issues/714
            if (window.RTCRtpSender && !('dtmf' in window.RTCRtpSender.prototype)) {
              Object.defineProperty(window.RTCRtpSender.prototype, 'dtmf', {
                get: function get() {
                  if (this._dtmf === undefined) {
                    if (this.track.kind === 'audio') {
                      this._dtmf = new window.RTCDtmfSender(this);
                    } else if (this.track.kind === 'video') {
                      this._dtmf = null;
                    }
                  }
                  return this._dtmf;
                }
              });
            }
            // Edge currently only implements the RTCDtmfSender, not the
            // RTCDTMFSender alias. See http://draft.ortc.org/#rtcdtmfsender2*
            if (window.RTCDtmfSender && !window.RTCDTMFSender) {
              window.RTCDTMFSender = window.RTCDtmfSender;
            }
            var RTCPeerConnectionShim = (0, _rtcpeerconnectionShim2["default"])(window, browserDetails.version);
            window.RTCPeerConnection = function RTCPeerConnection(config) {
              if (config && config.iceServers) {
                config.iceServers = (0, _filtericeservers.filterIceServers)(config.iceServers, browserDetails.version);
                utils.log('ICE servers after filtering:', config.iceServers);
              }
              return new RTCPeerConnectionShim(config);
            };
            window.RTCPeerConnection.prototype = RTCPeerConnectionShim.prototype;
          }
          function shimReplaceTrack(window) {
            // ORTC has replaceTrack -- https://github.com/w3c/ortc/issues/614
            if (window.RTCRtpSender && !('replaceTrack' in window.RTCRtpSender.prototype)) {
              window.RTCRtpSender.prototype.replaceTrack = window.RTCRtpSender.prototype.setTrack;
            }
          }
        }, {
          "../utils": 15,
          "./filtericeservers": 8,
          "./getdisplaymedia": 9,
          "./getusermedia": 10,
          "rtcpeerconnection-shim": 16
        }],
        8: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.filterIceServers = filterIceServers;
          var _utils = require('../utils');
          var utils = _interopRequireWildcard(_utils);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }

          // Edge does not like
          // 1) stun: filtered after 14393 unless ?transport=udp is present
          // 2) turn: that does not have all of turn:host:port?transport=udp
          // 3) turn: with ipv6 addresses
          // 4) turn: occurring muliple times
          function filterIceServers(iceServers, edgeVersion) {
            var hasTurn = false;
            iceServers = JSON.parse(JSON.stringify(iceServers));
            return iceServers.filter(function (server) {
              if (server && (server.urls || server.url)) {
                var urls = server.urls || server.url;
                if (server.url && !server.urls) {
                  utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');
                }
                var isString = typeof urls === 'string';
                if (isString) {
                  urls = [urls];
                }
                urls = urls.filter(function (url) {
                  // filter STUN unconditionally.
                  if (url.indexOf('stun:') === 0) {
                    return false;
                  }
                  var validTurn = url.startsWith('turn') && !url.startsWith('turn:[') && url.includes('transport=udp');
                  if (validTurn && !hasTurn) {
                    hasTurn = true;
                    return true;
                  }
                  return validTurn && !hasTurn;
                });
                delete server.url;
                server.urls = isString ? urls[0] : urls;
                return !!urls.length;
              }
            });
          }
        }, {
          "../utils": 15
        }],
        9: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.shimGetDisplayMedia = shimGetDisplayMedia;
          function shimGetDisplayMedia(window) {
            if (!('getDisplayMedia' in window.navigator)) {
              return;
            }
            if (!window.navigator.mediaDevices) {
              return;
            }
            if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
              return;
            }
            window.navigator.mediaDevices.getDisplayMedia = window.navigator.getDisplayMedia.bind(window.navigator);
          }
        }, {}],
        10: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.shimGetUserMedia = shimGetUserMedia;
          function shimGetUserMedia(window) {
            var navigator = window && window.navigator;
            var shimError_ = function shimError_(e) {
              return {
                name: {
                  PermissionDeniedError: 'NotAllowedError'
                }[e.name] || e.name,
                message: e.message,
                constraint: e.constraint,
                toString: function toString() {
                  return this.name;
                }
              };
            };

            // getUserMedia error shim.
            var origGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
            navigator.mediaDevices.getUserMedia = function (c) {
              return origGetUserMedia(c)["catch"](function (e) {
                return Promise.reject(shimError_(e));
              });
            };
          }
        }, {}],
        11: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.shimGetDisplayMedia = exports.shimGetUserMedia = undefined;
          var _typeof$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
            return _typeof(obj);
          } : function (obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
          };
          var _getusermedia = require('./getusermedia');
          Object.defineProperty(exports, 'shimGetUserMedia', {
            enumerable: true,
            get: function get() {
              return _getusermedia.shimGetUserMedia;
            }
          });
          var _getdisplaymedia = require('./getdisplaymedia');
          Object.defineProperty(exports, 'shimGetDisplayMedia', {
            enumerable: true,
            get: function get() {
              return _getdisplaymedia.shimGetDisplayMedia;
            }
          });
          exports.shimOnTrack = shimOnTrack;
          exports.shimPeerConnection = shimPeerConnection;
          exports.shimSenderGetStats = shimSenderGetStats;
          exports.shimReceiverGetStats = shimReceiverGetStats;
          exports.shimRemoveStream = shimRemoveStream;
          exports.shimRTCDataChannel = shimRTCDataChannel;
          exports.shimAddTransceiver = shimAddTransceiver;
          exports.shimCreateOffer = shimCreateOffer;
          exports.shimCreateAnswer = shimCreateAnswer;
          var _utils = require('../utils');
          var utils = _interopRequireWildcard(_utils);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }
          function _defineProperty(obj, key, value) {
            if (key in obj) {
              Object.defineProperty(obj, key, {
                value: value,
                enumerable: true,
                configurable: true,
                writable: true
              });
            } else {
              obj[key] = value;
            }
            return obj;
          }
          function shimOnTrack(window) {
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
              Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
                get: function get() {
                  return {
                    receiver: this.receiver
                  };
                }
              });
            }
          }
          function shimPeerConnection(window) {
            var browserDetails = utils.detectBrowser(window);
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) !== 'object' || !(window.RTCPeerConnection || window.mozRTCPeerConnection)) {
              return; // probably media.peerconnection.enabled=false in about:config
            }

            if (!window.RTCPeerConnection && window.mozRTCPeerConnection) {
              // very basic support for old versions.
              window.RTCPeerConnection = window.mozRTCPeerConnection;
            }
            if (browserDetails.version < 53) {
              // shim away need for obsolete RTCIceCandidate/RTCSessionDescription.
              ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'].forEach(function (method) {
                var nativeMethod = window.RTCPeerConnection.prototype[method];
                var methodObj = _defineProperty({}, method, function () {
                  arguments[0] = new (method === 'addIceCandidate' ? window.RTCIceCandidate : window.RTCSessionDescription)(arguments[0]);
                  return nativeMethod.apply(this, arguments);
                });
                window.RTCPeerConnection.prototype[method] = methodObj[method];
              });
            }

            // support for addIceCandidate(null or undefined)
            // as well as ignoring {sdpMid, candidate: ""}
            if (browserDetails.version < 68) {
              var nativeAddIceCandidate = window.RTCPeerConnection.prototype.addIceCandidate;
              window.RTCPeerConnection.prototype.addIceCandidate = function addIceCandidate() {
                if (!arguments[0]) {
                  if (arguments[1]) {
                    arguments[1].apply(null);
                  }
                  return Promise.resolve();
                }
                // Firefox 68+ emits and processes {candidate: "", ...}, ignore
                // in older versions.
                if (arguments[0] && arguments[0].candidate === '') {
                  return Promise.resolve();
                }
                return nativeAddIceCandidate.apply(this, arguments);
              };
            }
            var modernStatsTypes = {
              inboundrtp: 'inbound-rtp',
              outboundrtp: 'outbound-rtp',
              candidatepair: 'candidate-pair',
              localcandidate: 'local-candidate',
              remotecandidate: 'remote-candidate'
            };
            var nativeGetStats = window.RTCPeerConnection.prototype.getStats;
            window.RTCPeerConnection.prototype.getStats = function getStats() {
              var _arguments = Array.prototype.slice.call(arguments),
                selector = _arguments[0],
                onSucc = _arguments[1],
                onErr = _arguments[2];
              return nativeGetStats.apply(this, [selector || null]).then(function (stats) {
                if (browserDetails.version < 53 && !onSucc) {
                  // Shim only promise getStats with spec-hyphens in type names
                  // Leave callback version alone; misc old uses of forEach before Map
                  try {
                    stats.forEach(function (stat) {
                      stat.type = modernStatsTypes[stat.type] || stat.type;
                    });
                  } catch (e) {
                    if (e.name !== 'TypeError') {
                      throw e;
                    }
                    // Avoid TypeError: "type" is read-only, in old versions. 34-43ish
                    stats.forEach(function (stat, i) {
                      stats.set(i, Object.assign({}, stat, {
                        type: modernStatsTypes[stat.type] || stat.type
                      }));
                    });
                  }
                }
                return stats;
              }).then(onSucc, onErr);
            };
          }
          function shimSenderGetStats(window) {
            if (!((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
              return;
            }
            if (window.RTCRtpSender && 'getStats' in window.RTCRtpSender.prototype) {
              return;
            }
            var origGetSenders = window.RTCPeerConnection.prototype.getSenders;
            if (origGetSenders) {
              window.RTCPeerConnection.prototype.getSenders = function getSenders() {
                var _this = this;
                var senders = origGetSenders.apply(this, []);
                senders.forEach(function (sender) {
                  return sender._pc = _this;
                });
                return senders;
              };
            }
            var origAddTrack = window.RTCPeerConnection.prototype.addTrack;
            if (origAddTrack) {
              window.RTCPeerConnection.prototype.addTrack = function addTrack() {
                var sender = origAddTrack.apply(this, arguments);
                sender._pc = this;
                return sender;
              };
            }
            window.RTCRtpSender.prototype.getStats = function getStats() {
              return this.track ? this._pc.getStats(this.track) : Promise.resolve(new Map());
            };
          }
          function shimReceiverGetStats(window) {
            if (!((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection && window.RTCRtpSender)) {
              return;
            }
            if (window.RTCRtpSender && 'getStats' in window.RTCRtpReceiver.prototype) {
              return;
            }
            var origGetReceivers = window.RTCPeerConnection.prototype.getReceivers;
            if (origGetReceivers) {
              window.RTCPeerConnection.prototype.getReceivers = function getReceivers() {
                var _this2 = this;
                var receivers = origGetReceivers.apply(this, []);
                receivers.forEach(function (receiver) {
                  return receiver._pc = _this2;
                });
                return receivers;
              };
            }
            utils.wrapPeerConnectionEvent(window, 'track', function (e) {
              e.receiver._pc = e.srcElement;
              return e;
            });
            window.RTCRtpReceiver.prototype.getStats = function getStats() {
              return this._pc.getStats(this.track);
            };
          }
          function shimRemoveStream(window) {
            if (!window.RTCPeerConnection || 'removeStream' in window.RTCPeerConnection.prototype) {
              return;
            }
            window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
              var _this3 = this;
              utils.deprecated('removeStream', 'removeTrack');
              this.getSenders().forEach(function (sender) {
                if (sender.track && stream.getTracks().includes(sender.track)) {
                  _this3.removeTrack(sender);
                }
              });
            };
          }
          function shimRTCDataChannel(window) {
            // rename DataChannel to RTCDataChannel (native fix in FF60):
            // https://bugzilla.mozilla.org/show_bug.cgi?id=1173851
            if (window.DataChannel && !window.RTCDataChannel) {
              window.RTCDataChannel = window.DataChannel;
            }
          }
          function shimAddTransceiver(window) {
            // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
            // Firefox ignores the init sendEncodings options passed to addTransceiver
            // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
            if (!((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection)) {
              return;
            }
            var origAddTransceiver = window.RTCPeerConnection.prototype.addTransceiver;
            if (origAddTransceiver) {
              window.RTCPeerConnection.prototype.addTransceiver = function addTransceiver() {
                this.setParametersPromises = [];
                var initParameters = arguments[1];
                var shouldPerformCheck = initParameters && 'sendEncodings' in initParameters;
                if (shouldPerformCheck) {
                  // If sendEncodings params are provided, validate grammar
                  initParameters.sendEncodings.forEach(function (encodingParam) {
                    if ('rid' in encodingParam) {
                      var ridRegex = /^[a-z0-9]{0,16}$/i;
                      if (!ridRegex.test(encodingParam.rid)) {
                        throw new TypeError('Invalid RID value provided.');
                      }
                    }
                    if ('scaleResolutionDownBy' in encodingParam) {
                      if (!(parseFloat(encodingParam.scaleResolutionDownBy) >= 1.0)) {
                        throw new RangeError('scale_resolution_down_by must be >= 1.0');
                      }
                    }
                    if ('maxFramerate' in encodingParam) {
                      if (!(parseFloat(encodingParam.maxFramerate) >= 0)) {
                        throw new RangeError('max_framerate must be >= 0.0');
                      }
                    }
                  });
                }
                var transceiver = origAddTransceiver.apply(this, arguments);
                if (shouldPerformCheck) {
                  // Check if the init options were applied. If not we do this in an
                  // asynchronous way and save the promise reference in a global object.
                  // This is an ugly hack, but at the same time is way more robust than
                  // checking the sender parameters before and after the createOffer
                  // Also note that after the createoffer we are not 100% sure that
                  // the params were asynchronously applied so we might miss the
                  // opportunity to recreate offer.
                  var sender = transceiver.sender;
                  var params = sender.getParameters();
                  if (!('encodings' in params)) {
                    params.encodings = initParameters.sendEncodings;
                    this.setParametersPromises.push(sender.setParameters(params)["catch"](function () {}));
                  }
                }
                return transceiver;
              };
            }
          }
          function shimCreateOffer(window) {
            // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
            // Firefox ignores the init sendEncodings options passed to addTransceiver
            // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
            if (!((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection)) {
              return;
            }
            var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
            window.RTCPeerConnection.prototype.createOffer = function createOffer() {
              var _this4 = this,
                _arguments2 = arguments;
              if (this.setParametersPromises && this.setParametersPromises.length) {
                return Promise.all(this.setParametersPromises).then(function () {
                  return origCreateOffer.apply(_this4, _arguments2);
                })["finally"](function () {
                  _this4.setParametersPromises = [];
                });
              }
              return origCreateOffer.apply(this, arguments);
            };
          }
          function shimCreateAnswer(window) {
            // https://github.com/webrtcHacks/adapter/issues/998#issuecomment-516921647
            // Firefox ignores the init sendEncodings options passed to addTransceiver
            // https://bugzilla.mozilla.org/show_bug.cgi?id=1396918
            if (!((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCPeerConnection)) {
              return;
            }
            var origCreateAnswer = window.RTCPeerConnection.prototype.createAnswer;
            window.RTCPeerConnection.prototype.createAnswer = function createAnswer() {
              var _this5 = this,
                _arguments3 = arguments;
              if (this.setParametersPromises && this.setParametersPromises.length) {
                return Promise.all(this.setParametersPromises).then(function () {
                  return origCreateAnswer.apply(_this5, _arguments3);
                })["finally"](function () {
                  _this5.setParametersPromises = [];
                });
              }
              return origCreateAnswer.apply(this, arguments);
            };
          }
        }, {
          "../utils": 15,
          "./getdisplaymedia": 12,
          "./getusermedia": 13
        }],
        12: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          exports.shimGetDisplayMedia = shimGetDisplayMedia;
          function shimGetDisplayMedia(window, preferredMediaSource) {
            if (window.navigator.mediaDevices && 'getDisplayMedia' in window.navigator.mediaDevices) {
              return;
            }
            if (!window.navigator.mediaDevices) {
              return;
            }
            window.navigator.mediaDevices.getDisplayMedia = function getDisplayMedia(constraints) {
              if (!(constraints && constraints.video)) {
                var err = new DOMException('getDisplayMedia without video ' + 'constraints is undefined');
                err.name = 'NotFoundError';
                // from https://heycam.github.io/webidl/#idl-DOMException-error-names
                err.code = 8;
                return Promise.reject(err);
              }
              if (constraints.video === true) {
                constraints.video = {
                  mediaSource: preferredMediaSource
                };
              } else {
                constraints.video.mediaSource = preferredMediaSource;
              }
              return window.navigator.mediaDevices.getUserMedia(constraints);
            };
          }
        }, {}],
        13: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          var _typeof$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
            return _typeof(obj);
          } : function (obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
          };
          exports.shimGetUserMedia = shimGetUserMedia;
          var _utils = require('../utils');
          var utils = _interopRequireWildcard(_utils);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }
          function shimGetUserMedia(window) {
            var browserDetails = utils.detectBrowser(window);
            var navigator = window && window.navigator;
            var MediaStreamTrack = window && window.MediaStreamTrack;
            navigator.getUserMedia = function (constraints, onSuccess, onError) {
              // Replace Firefox 44+'s deprecation warning with unprefixed version.
              utils.deprecated('navigator.getUserMedia', 'navigator.mediaDevices.getUserMedia');
              navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
            };
            if (!(browserDetails.version > 55 && 'autoGainControl' in navigator.mediaDevices.getSupportedConstraints())) {
              var remap = function remap(obj, a, b) {
                if (a in obj && !(b in obj)) {
                  obj[b] = obj[a];
                  delete obj[a];
                }
              };
              var nativeGetUserMedia = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
              navigator.mediaDevices.getUserMedia = function (c) {
                if ((typeof c === 'undefined' ? 'undefined' : _typeof$1(c)) === 'object' && _typeof$1(c.audio) === 'object') {
                  c = JSON.parse(JSON.stringify(c));
                  remap(c.audio, 'autoGainControl', 'mozAutoGainControl');
                  remap(c.audio, 'noiseSuppression', 'mozNoiseSuppression');
                }
                return nativeGetUserMedia(c);
              };
              if (MediaStreamTrack && MediaStreamTrack.prototype.getSettings) {
                var nativeGetSettings = MediaStreamTrack.prototype.getSettings;
                MediaStreamTrack.prototype.getSettings = function () {
                  var obj = nativeGetSettings.apply(this, arguments);
                  remap(obj, 'mozAutoGainControl', 'autoGainControl');
                  remap(obj, 'mozNoiseSuppression', 'noiseSuppression');
                  return obj;
                };
              }
              if (MediaStreamTrack && MediaStreamTrack.prototype.applyConstraints) {
                var nativeApplyConstraints = MediaStreamTrack.prototype.applyConstraints;
                MediaStreamTrack.prototype.applyConstraints = function (c) {
                  if (this.kind === 'audio' && (typeof c === 'undefined' ? 'undefined' : _typeof$1(c)) === 'object') {
                    c = JSON.parse(JSON.stringify(c));
                    remap(c, 'autoGainControl', 'mozAutoGainControl');
                    remap(c, 'noiseSuppression', 'mozNoiseSuppression');
                  }
                  return nativeApplyConstraints.apply(this, [c]);
                };
              }
            }
          }
        }, {
          "../utils": 15
        }],
        14: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          var _typeof$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
            return _typeof(obj);
          } : function (obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
          };
          exports.shimLocalStreamsAPI = shimLocalStreamsAPI;
          exports.shimRemoteStreamsAPI = shimRemoteStreamsAPI;
          exports.shimCallbacksAPI = shimCallbacksAPI;
          exports.shimGetUserMedia = shimGetUserMedia;
          exports.shimConstraints = shimConstraints;
          exports.shimRTCIceServerUrls = shimRTCIceServerUrls;
          exports.shimTrackEventTransceiver = shimTrackEventTransceiver;
          exports.shimCreateOfferLegacy = shimCreateOfferLegacy;
          var _utils = require('../utils');
          var utils = _interopRequireWildcard(_utils);
          function _interopRequireWildcard(obj) {
            if (obj && obj.__esModule) {
              return obj;
            } else {
              var newObj = {};
              if (obj != null) {
                for (var key in obj) {
                  if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
                }
              }
              newObj["default"] = obj;
              return newObj;
            }
          }
          function shimLocalStreamsAPI(window) {
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) !== 'object' || !window.RTCPeerConnection) {
              return;
            }
            if (!('getLocalStreams' in window.RTCPeerConnection.prototype)) {
              window.RTCPeerConnection.prototype.getLocalStreams = function getLocalStreams() {
                if (!this._localStreams) {
                  this._localStreams = [];
                }
                return this._localStreams;
              };
            }
            if (!('addStream' in window.RTCPeerConnection.prototype)) {
              var _addTrack = window.RTCPeerConnection.prototype.addTrack;
              window.RTCPeerConnection.prototype.addStream = function addStream(stream) {
                var _this = this;
                if (!this._localStreams) {
                  this._localStreams = [];
                }
                if (!this._localStreams.includes(stream)) {
                  this._localStreams.push(stream);
                }
                // Try to emulate Chrome's behaviour of adding in audio-video order.
                // Safari orders by track id.
                stream.getAudioTracks().forEach(function (track) {
                  return _addTrack.call(_this, track, stream);
                });
                stream.getVideoTracks().forEach(function (track) {
                  return _addTrack.call(_this, track, stream);
                });
              };
              window.RTCPeerConnection.prototype.addTrack = function addTrack(track) {
                var stream = arguments[1];
                if (stream) {
                  if (!this._localStreams) {
                    this._localStreams = [stream];
                  } else if (!this._localStreams.includes(stream)) {
                    this._localStreams.push(stream);
                  }
                }
                return _addTrack.apply(this, arguments);
              };
            }
            if (!('removeStream' in window.RTCPeerConnection.prototype)) {
              window.RTCPeerConnection.prototype.removeStream = function removeStream(stream) {
                var _this2 = this;
                if (!this._localStreams) {
                  this._localStreams = [];
                }
                var index = this._localStreams.indexOf(stream);
                if (index === -1) {
                  return;
                }
                this._localStreams.splice(index, 1);
                var tracks = stream.getTracks();
                this.getSenders().forEach(function (sender) {
                  if (tracks.includes(sender.track)) {
                    _this2.removeTrack(sender);
                  }
                });
              };
            }
          }
          function shimRemoteStreamsAPI(window) {
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) !== 'object' || !window.RTCPeerConnection) {
              return;
            }
            if (!('getRemoteStreams' in window.RTCPeerConnection.prototype)) {
              window.RTCPeerConnection.prototype.getRemoteStreams = function getRemoteStreams() {
                return this._remoteStreams ? this._remoteStreams : [];
              };
            }
            if (!('onaddstream' in window.RTCPeerConnection.prototype)) {
              Object.defineProperty(window.RTCPeerConnection.prototype, 'onaddstream', {
                get: function get() {
                  return this._onaddstream;
                },
                set: function set(f) {
                  var _this3 = this;
                  if (this._onaddstream) {
                    this.removeEventListener('addstream', this._onaddstream);
                    this.removeEventListener('track', this._onaddstreampoly);
                  }
                  this.addEventListener('addstream', this._onaddstream = f);
                  this.addEventListener('track', this._onaddstreampoly = function (e) {
                    e.streams.forEach(function (stream) {
                      if (!_this3._remoteStreams) {
                        _this3._remoteStreams = [];
                      }
                      if (_this3._remoteStreams.includes(stream)) {
                        return;
                      }
                      _this3._remoteStreams.push(stream);
                      var event = new Event('addstream');
                      event.stream = stream;
                      _this3.dispatchEvent(event);
                    });
                  });
                }
              });
              var origSetRemoteDescription = window.RTCPeerConnection.prototype.setRemoteDescription;
              window.RTCPeerConnection.prototype.setRemoteDescription = function setRemoteDescription() {
                var pc = this;
                if (!this._onaddstreampoly) {
                  this.addEventListener('track', this._onaddstreampoly = function (e) {
                    e.streams.forEach(function (stream) {
                      if (!pc._remoteStreams) {
                        pc._remoteStreams = [];
                      }
                      if (pc._remoteStreams.indexOf(stream) >= 0) {
                        return;
                      }
                      pc._remoteStreams.push(stream);
                      var event = new Event('addstream');
                      event.stream = stream;
                      pc.dispatchEvent(event);
                    });
                  });
                }
                return origSetRemoteDescription.apply(pc, arguments);
              };
            }
          }
          function shimCallbacksAPI(window) {
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) !== 'object' || !window.RTCPeerConnection) {
              return;
            }
            var prototype = window.RTCPeerConnection.prototype;
            var origCreateOffer = prototype.createOffer;
            var origCreateAnswer = prototype.createAnswer;
            var setLocalDescription = prototype.setLocalDescription;
            var setRemoteDescription = prototype.setRemoteDescription;
            var addIceCandidate = prototype.addIceCandidate;
            prototype.createOffer = function createOffer(successCallback, failureCallback) {
              var options = arguments.length >= 2 ? arguments[2] : arguments[0];
              var promise = origCreateOffer.apply(this, [options]);
              if (!failureCallback) {
                return promise;
              }
              promise.then(successCallback, failureCallback);
              return Promise.resolve();
            };
            prototype.createAnswer = function createAnswer(successCallback, failureCallback) {
              var options = arguments.length >= 2 ? arguments[2] : arguments[0];
              var promise = origCreateAnswer.apply(this, [options]);
              if (!failureCallback) {
                return promise;
              }
              promise.then(successCallback, failureCallback);
              return Promise.resolve();
            };
            var withCallback = function withCallback(description, successCallback, failureCallback) {
              var promise = setLocalDescription.apply(this, [description]);
              if (!failureCallback) {
                return promise;
              }
              promise.then(successCallback, failureCallback);
              return Promise.resolve();
            };
            prototype.setLocalDescription = withCallback;
            withCallback = function withCallback(description, successCallback, failureCallback) {
              var promise = setRemoteDescription.apply(this, [description]);
              if (!failureCallback) {
                return promise;
              }
              promise.then(successCallback, failureCallback);
              return Promise.resolve();
            };
            prototype.setRemoteDescription = withCallback;
            withCallback = function withCallback(candidate, successCallback, failureCallback) {
              var promise = addIceCandidate.apply(this, [candidate]);
              if (!failureCallback) {
                return promise;
              }
              promise.then(successCallback, failureCallback);
              return Promise.resolve();
            };
            prototype.addIceCandidate = withCallback;
          }
          function shimGetUserMedia(window) {
            var navigator = window && window.navigator;
            if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
              // shim not needed in Safari 12.1
              var mediaDevices = navigator.mediaDevices;
              var _getUserMedia = mediaDevices.getUserMedia.bind(mediaDevices);
              navigator.mediaDevices.getUserMedia = function (constraints) {
                return _getUserMedia(shimConstraints(constraints));
              };
            }
            if (!navigator.getUserMedia && navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
              navigator.getUserMedia = function getUserMedia(constraints, cb, errcb) {
                navigator.mediaDevices.getUserMedia(constraints).then(cb, errcb);
              }.bind(navigator);
            }
          }
          function shimConstraints(constraints) {
            if (constraints && constraints.video !== undefined) {
              return Object.assign({}, constraints, {
                video: utils.compactObject(constraints.video)
              });
            }
            return constraints;
          }
          function shimRTCIceServerUrls(window) {
            // migrate from non-spec RTCIceServer.url to RTCIceServer.urls
            var OrigPeerConnection = window.RTCPeerConnection;
            window.RTCPeerConnection = function RTCPeerConnection(pcConfig, pcConstraints) {
              if (pcConfig && pcConfig.iceServers) {
                var newIceServers = [];
                for (var i = 0; i < pcConfig.iceServers.length; i++) {
                  var server = pcConfig.iceServers[i];
                  if (!server.hasOwnProperty('urls') && server.hasOwnProperty('url')) {
                    utils.deprecated('RTCIceServer.url', 'RTCIceServer.urls');
                    server = JSON.parse(JSON.stringify(server));
                    server.urls = server.url;
                    delete server.url;
                    newIceServers.push(server);
                  } else {
                    newIceServers.push(pcConfig.iceServers[i]);
                  }
                }
                pcConfig.iceServers = newIceServers;
              }
              return new OrigPeerConnection(pcConfig, pcConstraints);
            };
            window.RTCPeerConnection.prototype = OrigPeerConnection.prototype;
            // wrap static methods. Currently just generateCertificate.
            if ('generateCertificate' in window.RTCPeerConnection) {
              Object.defineProperty(window.RTCPeerConnection, 'generateCertificate', {
                get: function get() {
                  return OrigPeerConnection.generateCertificate;
                }
              });
            }
          }
          function shimTrackEventTransceiver(window) {
            // Add event.transceiver member over deprecated event.receiver
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object' && window.RTCTrackEvent && 'receiver' in window.RTCTrackEvent.prototype && !('transceiver' in window.RTCTrackEvent.prototype)) {
              Object.defineProperty(window.RTCTrackEvent.prototype, 'transceiver', {
                get: function get() {
                  return {
                    receiver: this.receiver
                  };
                }
              });
            }
          }
          function shimCreateOfferLegacy(window) {
            var origCreateOffer = window.RTCPeerConnection.prototype.createOffer;
            window.RTCPeerConnection.prototype.createOffer = function createOffer(offerOptions) {
              if (offerOptions) {
                if (typeof offerOptions.offerToReceiveAudio !== 'undefined') {
                  // support bit values
                  offerOptions.offerToReceiveAudio = !!offerOptions.offerToReceiveAudio;
                }
                var audioTransceiver = this.getTransceivers().find(function (transceiver) {
                  return transceiver.receiver.track.kind === 'audio';
                });
                if (offerOptions.offerToReceiveAudio === false && audioTransceiver) {
                  if (audioTransceiver.direction === 'sendrecv') {
                    if (audioTransceiver.setDirection) {
                      audioTransceiver.setDirection('sendonly');
                    } else {
                      audioTransceiver.direction = 'sendonly';
                    }
                  } else if (audioTransceiver.direction === 'recvonly') {
                    if (audioTransceiver.setDirection) {
                      audioTransceiver.setDirection('inactive');
                    } else {
                      audioTransceiver.direction = 'inactive';
                    }
                  }
                } else if (offerOptions.offerToReceiveAudio === true && !audioTransceiver) {
                  this.addTransceiver('audio');
                }
                if (typeof offerOptions.offerToReceiveVideo !== 'undefined') {
                  // support bit values
                  offerOptions.offerToReceiveVideo = !!offerOptions.offerToReceiveVideo;
                }
                var videoTransceiver = this.getTransceivers().find(function (transceiver) {
                  return transceiver.receiver.track.kind === 'video';
                });
                if (offerOptions.offerToReceiveVideo === false && videoTransceiver) {
                  if (videoTransceiver.direction === 'sendrecv') {
                    if (videoTransceiver.setDirection) {
                      videoTransceiver.setDirection('sendonly');
                    } else {
                      videoTransceiver.direction = 'sendonly';
                    }
                  } else if (videoTransceiver.direction === 'recvonly') {
                    if (videoTransceiver.setDirection) {
                      videoTransceiver.setDirection('inactive');
                    } else {
                      videoTransceiver.direction = 'inactive';
                    }
                  }
                } else if (offerOptions.offerToReceiveVideo === true && !videoTransceiver) {
                  this.addTransceiver('video');
                }
              }
              return origCreateOffer.apply(this, arguments);
            };
          }
        }, {
          "../utils": 15
        }],
        15: [function (require, module, exports) {

          Object.defineProperty(exports, "__esModule", {
            value: true
          });
          var _typeof$1 = typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol" ? function (obj) {
            return _typeof(obj);
          } : function (obj) {
            return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
          };
          exports.extractVersion = extractVersion;
          exports.wrapPeerConnectionEvent = wrapPeerConnectionEvent;
          exports.disableLog = disableLog;
          exports.disableWarnings = disableWarnings;
          exports.log = log;
          exports.deprecated = deprecated;
          exports.detectBrowser = detectBrowser;
          exports.compactObject = compactObject;
          exports.walkStats = walkStats;
          exports.filterStats = filterStats;
          function _defineProperty(obj, key, value) {
            if (key in obj) {
              Object.defineProperty(obj, key, {
                value: value,
                enumerable: true,
                configurable: true,
                writable: true
              });
            } else {
              obj[key] = value;
            }
            return obj;
          }
          var logDisabled_ = true;
          var deprecationWarnings_ = true;

          /**
           * Extract browser version out of the provided user agent string.
           *
           * @param {!string} uastring userAgent string.
           * @param {!string} expr Regular expression used as match criteria.
           * @param {!number} pos position in the version string to be returned.
           * @return {!number} browser version.
           */
          function extractVersion(uastring, expr, pos) {
            var match = uastring.match(expr);
            return match && match.length >= pos && parseInt(match[pos], 10);
          }

          // Wraps the peerconnection event eventNameToWrap in a function
          // which returns the modified event object (or false to prevent
          // the event).
          function wrapPeerConnectionEvent(window, eventNameToWrap, wrapper) {
            if (!window.RTCPeerConnection) {
              return;
            }
            var proto = window.RTCPeerConnection.prototype;
            var nativeAddEventListener = proto.addEventListener;
            proto.addEventListener = function (nativeEventName, cb) {
              if (nativeEventName !== eventNameToWrap) {
                return nativeAddEventListener.apply(this, arguments);
              }
              var wrappedCallback = function wrappedCallback(e) {
                var modifiedEvent = wrapper(e);
                if (modifiedEvent) {
                  cb(modifiedEvent);
                }
              };
              this._eventMap = this._eventMap || {};
              this._eventMap[cb] = wrappedCallback;
              return nativeAddEventListener.apply(this, [nativeEventName, wrappedCallback]);
            };
            var nativeRemoveEventListener = proto.removeEventListener;
            proto.removeEventListener = function (nativeEventName, cb) {
              if (nativeEventName !== eventNameToWrap || !this._eventMap || !this._eventMap[cb]) {
                return nativeRemoveEventListener.apply(this, arguments);
              }
              var unwrappedCb = this._eventMap[cb];
              delete this._eventMap[cb];
              return nativeRemoveEventListener.apply(this, [nativeEventName, unwrappedCb]);
            };
            Object.defineProperty(proto, 'on' + eventNameToWrap, {
              get: function get() {
                return this['_on' + eventNameToWrap];
              },
              set: function set(cb) {
                if (this['_on' + eventNameToWrap]) {
                  this.removeEventListener(eventNameToWrap, this['_on' + eventNameToWrap]);
                  delete this['_on' + eventNameToWrap];
                }
                if (cb) {
                  this.addEventListener(eventNameToWrap, this['_on' + eventNameToWrap] = cb);
                }
              },
              enumerable: true,
              configurable: true
            });
          }
          function disableLog(bool) {
            if (typeof bool !== 'boolean') {
              return new Error('Argument type: ' + (typeof bool === 'undefined' ? 'undefined' : _typeof$1(bool)) + '. Please use a boolean.');
            }
            logDisabled_ = bool;
            return bool ? 'adapter.js logging disabled' : 'adapter.js logging enabled';
          }

          /**
           * Disable or enable deprecation warnings
           * @param {!boolean} bool set to true to disable warnings.
           */
          function disableWarnings(bool) {
            if (typeof bool !== 'boolean') {
              return new Error('Argument type: ' + (typeof bool === 'undefined' ? 'undefined' : _typeof$1(bool)) + '. Please use a boolean.');
            }
            deprecationWarnings_ = !bool;
            return 'adapter.js deprecation warnings ' + (bool ? 'disabled' : 'enabled');
          }
          function log() {
            if ((typeof window === 'undefined' ? 'undefined' : _typeof$1(window)) === 'object') {
              if (logDisabled_) {
                return;
              }
              if (typeof console !== 'undefined' && typeof console.log === 'function') {
                console.log.apply(console, arguments);
              }
            }
          }

          /**
           * Shows a deprecation warning suggesting the modern and spec-compatible API.
           */
          function deprecated(oldMethod, newMethod) {
            if (!deprecationWarnings_) {
              return;
            }
            console.warn(oldMethod + ' is deprecated, please use ' + newMethod + ' instead.');
          }

          /**
           * Browser detector.
           *
           * @return {object} result containing browser and version
           *     properties.
           */
          function detectBrowser(window) {
            var navigator = window.navigator;

            // Returned result object.

            var result = {
              browser: null,
              version: null
            };

            // Fail early if it's not a browser
            if (typeof window === 'undefined' || !window.navigator) {
              result.browser = 'Not a browser.';
              return result;
            }
            if (navigator.mozGetUserMedia) {
              // Firefox.
              result.browser = 'firefox';
              result.version = extractVersion(navigator.userAgent, /Firefox\/(\d+)\./, 1);
            } else if (navigator.webkitGetUserMedia || window.isSecureContext === false && window.webkitRTCPeerConnection && !window.RTCIceGatherer) {
              // Chrome, Chromium, Webview, Opera.
              // Version matches Chrome/WebRTC version.
              // Chrome 74 removed webkitGetUserMedia on http as well so we need the
              // more complicated fallback to webkitRTCPeerConnection.
              result.browser = 'chrome';
              result.version = extractVersion(navigator.userAgent, /Chrom(e|ium)\/(\d+)\./, 2);
            } else if (navigator.mediaDevices && navigator.userAgent.match(/Edge\/(\d+).(\d+)$/)) {
              // Edge.
              result.browser = 'edge';
              result.version = extractVersion(navigator.userAgent, /Edge\/(\d+).(\d+)$/, 2);
            } else if (window.RTCPeerConnection && navigator.userAgent.match(/AppleWebKit\/(\d+)\./)) {
              // Safari.
              result.browser = 'safari';
              result.version = extractVersion(navigator.userAgent, /AppleWebKit\/(\d+)\./, 1);
              result.supportsUnifiedPlan = window.RTCRtpTransceiver && 'currentDirection' in window.RTCRtpTransceiver.prototype;
            } else {
              // Default fallthrough: not supported.
              result.browser = 'Not a supported browser.';
              return result;
            }
            return result;
          }

          /**
           * Checks if something is an object.
           *
           * @param {*} val The something you want to check.
           * @return true if val is an object, false otherwise.
           */
          function isObject(val) {
            return Object.prototype.toString.call(val) === '[object Object]';
          }

          /**
           * Remove all empty objects and undefined values
           * from a nested object -- an enhanced and vanilla version
           * of Lodash's `compact`.
           */
          function compactObject(data) {
            if (!isObject(data)) {
              return data;
            }
            return Object.keys(data).reduce(function (accumulator, key) {
              var isObj = isObject(data[key]);
              var value = isObj ? compactObject(data[key]) : data[key];
              var isEmptyObject = isObj && !Object.keys(value).length;
              if (value === undefined || isEmptyObject) {
                return accumulator;
              }
              return Object.assign(accumulator, _defineProperty({}, key, value));
            }, {});
          }

          /* iterates the stats graph recursively. */
          function walkStats(stats, base, resultSet) {
            if (!base || resultSet.has(base.id)) {
              return;
            }
            resultSet.set(base.id, base);
            Object.keys(base).forEach(function (name) {
              if (name.endsWith('Id')) {
                walkStats(stats, stats.get(base[name]), resultSet);
              } else if (name.endsWith('Ids')) {
                base[name].forEach(function (id) {
                  walkStats(stats, stats.get(id), resultSet);
                });
              }
            });
          }

          /* filter getStats for a sender/receiver track. */
          function filterStats(result, track, outbound) {
            var streamStatsType = outbound ? 'outbound-rtp' : 'inbound-rtp';
            var filteredResult = new Map();
            if (track === null) {
              return filteredResult;
            }
            var trackStats = [];
            result.forEach(function (value) {
              if (value.type === 'track' && value.trackIdentifier === track.id) {
                trackStats.push(value);
              }
            });
            trackStats.forEach(function (trackStat) {
              result.forEach(function (stats) {
                if (stats.type === streamStatsType && stats.trackId === trackStat.id) {
                  walkStats(result, stats, filteredResult);
                }
              });
            });
            return filteredResult;
          }
        }, {}],
        16: [function (require, module, exports) {

          var SDPUtils = require('sdp');
          function fixStatsType(stat) {
            return {
              inboundrtp: 'inbound-rtp',
              outboundrtp: 'outbound-rtp',
              candidatepair: 'candidate-pair',
              localcandidate: 'local-candidate',
              remotecandidate: 'remote-candidate'
            }[stat.type] || stat.type;
          }
          function writeMediaSection(transceiver, caps, type, stream, dtlsRole) {
            var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);

            // Map ICE parameters (ufrag, pwd) to SDP.
            sdp += SDPUtils.writeIceParameters(transceiver.iceGatherer.getLocalParameters());

            // Map DTLS parameters to SDP.
            sdp += SDPUtils.writeDtlsParameters(transceiver.dtlsTransport.getLocalParameters(), type === 'offer' ? 'actpass' : dtlsRole || 'active');
            sdp += 'a=mid:' + transceiver.mid + '\r\n';
            if (transceiver.rtpSender && transceiver.rtpReceiver) {
              sdp += 'a=sendrecv\r\n';
            } else if (transceiver.rtpSender) {
              sdp += 'a=sendonly\r\n';
            } else if (transceiver.rtpReceiver) {
              sdp += 'a=recvonly\r\n';
            } else {
              sdp += 'a=inactive\r\n';
            }
            if (transceiver.rtpSender) {
              var trackId = transceiver.rtpSender._initialTrackId || transceiver.rtpSender.track.id;
              transceiver.rtpSender._initialTrackId = trackId;
              // spec.
              var msid = 'msid:' + (stream ? stream.id : '-') + ' ' + trackId + '\r\n';
              sdp += 'a=' + msid;
              // for Chrome. Legacy should no longer be required.
              sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc + ' ' + msid;

              // RTX
              if (transceiver.sendEncodingParameters[0].rtx) {
                sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc + ' ' + msid;
                sdp += 'a=ssrc-group:FID ' + transceiver.sendEncodingParameters[0].ssrc + ' ' + transceiver.sendEncodingParameters[0].rtx.ssrc + '\r\n';
              }
            }
            // FIXME: this should be written by writeRtpDescription.
            sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc + ' cname:' + SDPUtils.localCName + '\r\n';
            if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {
              sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc + ' cname:' + SDPUtils.localCName + '\r\n';
            }
            return sdp;
          }

          // Edge does not like
          // 1) stun: filtered after 14393 unless ?transport=udp is present
          // 2) turn: that does not have all of turn:host:port?transport=udp
          // 3) turn: with ipv6 addresses
          // 4) turn: occurring muliple times
          function filterIceServers(iceServers, edgeVersion) {
            var hasTurn = false;
            iceServers = JSON.parse(JSON.stringify(iceServers));
            return iceServers.filter(function (server) {
              if (server && (server.urls || server.url)) {
                var urls = server.urls || server.url;
                if (server.url && !server.urls) {
                  console.warn('RTCIceServer.url is deprecated! Use urls instead.');
                }
                var isString = typeof urls === 'string';
                if (isString) {
                  urls = [urls];
                }
                urls = urls.filter(function (url) {
                  var validTurn = url.indexOf('turn:') === 0 && url.indexOf('transport=udp') !== -1 && url.indexOf('turn:[') === -1 && !hasTurn;
                  if (validTurn) {
                    hasTurn = true;
                    return true;
                  }
                  return url.indexOf('stun:') === 0 && edgeVersion >= 14393 && url.indexOf('?transport=udp') === -1;
                });
                delete server.url;
                server.urls = isString ? urls[0] : urls;
                return !!urls.length;
              }
            });
          }

          // Determines the intersection of local and remote capabilities.
          function getCommonCapabilities(localCapabilities, remoteCapabilities) {
            var commonCapabilities = {
              codecs: [],
              headerExtensions: [],
              fecMechanisms: []
            };
            var findCodecByPayloadType = function findCodecByPayloadType(pt, codecs) {
              pt = parseInt(pt, 10);
              for (var i = 0; i < codecs.length; i++) {
                if (codecs[i].payloadType === pt || codecs[i].preferredPayloadType === pt) {
                  return codecs[i];
                }
              }
            };
            var rtxCapabilityMatches = function rtxCapabilityMatches(lRtx, rRtx, lCodecs, rCodecs) {
              var lCodec = findCodecByPayloadType(lRtx.parameters.apt, lCodecs);
              var rCodec = findCodecByPayloadType(rRtx.parameters.apt, rCodecs);
              return lCodec && rCodec && lCodec.name.toLowerCase() === rCodec.name.toLowerCase();
            };
            localCapabilities.codecs.forEach(function (lCodec) {
              for (var i = 0; i < remoteCapabilities.codecs.length; i++) {
                var rCodec = remoteCapabilities.codecs[i];
                if (lCodec.name.toLowerCase() === rCodec.name.toLowerCase() && lCodec.clockRate === rCodec.clockRate) {
                  if (lCodec.name.toLowerCase() === 'rtx' && lCodec.parameters && rCodec.parameters.apt) {
                    // for RTX we need to find the local rtx that has a apt
                    // which points to the same local codec as the remote one.
                    if (!rtxCapabilityMatches(lCodec, rCodec, localCapabilities.codecs, remoteCapabilities.codecs)) {
                      continue;
                    }
                  }
                  rCodec = JSON.parse(JSON.stringify(rCodec)); // deepcopy
                  // number of channels is the highest common number of channels
                  rCodec.numChannels = Math.min(lCodec.numChannels, rCodec.numChannels);
                  // push rCodec so we reply with offerer payload type
                  commonCapabilities.codecs.push(rCodec);

                  // determine common feedback mechanisms
                  rCodec.rtcpFeedback = rCodec.rtcpFeedback.filter(function (fb) {
                    for (var j = 0; j < lCodec.rtcpFeedback.length; j++) {
                      if (lCodec.rtcpFeedback[j].type === fb.type && lCodec.rtcpFeedback[j].parameter === fb.parameter) {
                        return true;
                      }
                    }
                    return false;
                  });
                  // FIXME: also need to determine .parameters
                  //  see https://github.com/openpeer/ortc/issues/569
                  break;
                }
              }
            });
            localCapabilities.headerExtensions.forEach(function (lHeaderExtension) {
              for (var i = 0; i < remoteCapabilities.headerExtensions.length; i++) {
                var rHeaderExtension = remoteCapabilities.headerExtensions[i];
                if (lHeaderExtension.uri === rHeaderExtension.uri) {
                  commonCapabilities.headerExtensions.push(rHeaderExtension);
                  break;
                }
              }
            });

            // FIXME: fecMechanisms
            return commonCapabilities;
          }

          // is action=setLocalDescription with type allowed in signalingState
          function isActionAllowedInSignalingState(action, type, signalingState) {
            return {
              offer: {
                setLocalDescription: ['stable', 'have-local-offer'],
                setRemoteDescription: ['stable', 'have-remote-offer']
              },
              answer: {
                setLocalDescription: ['have-remote-offer', 'have-local-pranswer'],
                setRemoteDescription: ['have-local-offer', 'have-remote-pranswer']
              }
            }[type][action].indexOf(signalingState) !== -1;
          }
          function maybeAddCandidate(iceTransport, candidate) {
            // Edge's internal representation adds some fields therefore
            // not all fieldѕ are taken into account.
            var alreadyAdded = iceTransport.getRemoteCandidates().find(function (remoteCandidate) {
              return candidate.foundation === remoteCandidate.foundation && candidate.ip === remoteCandidate.ip && candidate.port === remoteCandidate.port && candidate.priority === remoteCandidate.priority && candidate.protocol === remoteCandidate.protocol && candidate.type === remoteCandidate.type;
            });
            if (!alreadyAdded) {
              iceTransport.addRemoteCandidate(candidate);
            }
            return !alreadyAdded;
          }
          function makeError(name, description) {
            var e = new Error(description);
            e.name = name;
            // legacy error codes from https://heycam.github.io/webidl/#idl-DOMException-error-names
            e.code = {
              NotSupportedError: 9,
              InvalidStateError: 11,
              InvalidAccessError: 15,
              TypeError: undefined,
              OperationError: undefined
            }[name];
            return e;
          }
          module.exports = function (window, edgeVersion) {
            // https://w3c.github.io/mediacapture-main/#mediastream
            // Helper function to add the track to the stream and
            // dispatch the event ourselves.
            function addTrackToStreamAndFireEvent(track, stream) {
              stream.addTrack(track);
              stream.dispatchEvent(new window.MediaStreamTrackEvent('addtrack', {
                track: track
              }));
            }
            function removeTrackFromStreamAndFireEvent(track, stream) {
              stream.removeTrack(track);
              stream.dispatchEvent(new window.MediaStreamTrackEvent('removetrack', {
                track: track
              }));
            }
            function fireAddTrack(pc, track, receiver, streams) {
              var trackEvent = new Event('track');
              trackEvent.track = track;
              trackEvent.receiver = receiver;
              trackEvent.transceiver = {
                receiver: receiver
              };
              trackEvent.streams = streams;
              window.setTimeout(function () {
                pc._dispatchEvent('track', trackEvent);
              });
            }
            var RTCPeerConnection = function RTCPeerConnection(config) {
              var pc = this;
              var _eventTarget = document.createDocumentFragment();
              ['addEventListener', 'removeEventListener', 'dispatchEvent'].forEach(function (method) {
                pc[method] = _eventTarget[method].bind(_eventTarget);
              });
              this.canTrickleIceCandidates = null;
              this.needNegotiation = false;
              this.localStreams = [];
              this.remoteStreams = [];
              this._localDescription = null;
              this._remoteDescription = null;
              this.signalingState = 'stable';
              this.iceConnectionState = 'new';
              this.connectionState = 'new';
              this.iceGatheringState = 'new';
              config = JSON.parse(JSON.stringify(config || {}));
              this.usingBundle = config.bundlePolicy === 'max-bundle';
              if (config.rtcpMuxPolicy === 'negotiate') {
                throw makeError('NotSupportedError', 'rtcpMuxPolicy \'negotiate\' is not supported');
              } else if (!config.rtcpMuxPolicy) {
                config.rtcpMuxPolicy = 'require';
              }
              switch (config.iceTransportPolicy) {
                case 'all':
                case 'relay':
                  break;
                default:
                  config.iceTransportPolicy = 'all';
                  break;
              }
              switch (config.bundlePolicy) {
                case 'balanced':
                case 'max-compat':
                case 'max-bundle':
                  break;
                default:
                  config.bundlePolicy = 'balanced';
                  break;
              }
              config.iceServers = filterIceServers(config.iceServers || [], edgeVersion);
              this._iceGatherers = [];
              if (config.iceCandidatePoolSize) {
                for (var i = config.iceCandidatePoolSize; i > 0; i--) {
                  this._iceGatherers.push(new window.RTCIceGatherer({
                    iceServers: config.iceServers,
                    gatherPolicy: config.iceTransportPolicy
                  }));
                }
              } else {
                config.iceCandidatePoolSize = 0;
              }
              this._config = config;

              // per-track iceGathers, iceTransports, dtlsTransports, rtpSenders, ...
              // everything that is needed to describe a SDP m-line.
              this.transceivers = [];
              this._sdpSessionId = SDPUtils.generateSessionId();
              this._sdpSessionVersion = 0;
              this._dtlsRole = undefined; // role for a=setup to use in answers.

              this._isClosed = false;
            };
            Object.defineProperty(RTCPeerConnection.prototype, 'localDescription', {
              configurable: true,
              get: function get() {
                return this._localDescription;
              }
            });
            Object.defineProperty(RTCPeerConnection.prototype, 'remoteDescription', {
              configurable: true,
              get: function get() {
                return this._remoteDescription;
              }
            });

            // set up event handlers on prototype
            RTCPeerConnection.prototype.onicecandidate = null;
            RTCPeerConnection.prototype.onaddstream = null;
            RTCPeerConnection.prototype.ontrack = null;
            RTCPeerConnection.prototype.onremovestream = null;
            RTCPeerConnection.prototype.onsignalingstatechange = null;
            RTCPeerConnection.prototype.oniceconnectionstatechange = null;
            RTCPeerConnection.prototype.onconnectionstatechange = null;
            RTCPeerConnection.prototype.onicegatheringstatechange = null;
            RTCPeerConnection.prototype.onnegotiationneeded = null;
            RTCPeerConnection.prototype.ondatachannel = null;
            RTCPeerConnection.prototype._dispatchEvent = function (name, event) {
              if (this._isClosed) {
                return;
              }
              this.dispatchEvent(event);
              if (typeof this['on' + name] === 'function') {
                this['on' + name](event);
              }
            };
            RTCPeerConnection.prototype._emitGatheringStateChange = function () {
              var event = new Event('icegatheringstatechange');
              this._dispatchEvent('icegatheringstatechange', event);
            };
            RTCPeerConnection.prototype.getConfiguration = function () {
              return this._config;
            };
            RTCPeerConnection.prototype.getLocalStreams = function () {
              return this.localStreams;
            };
            RTCPeerConnection.prototype.getRemoteStreams = function () {
              return this.remoteStreams;
            };

            // internal helper to create a transceiver object.
            // (which is not yet the same as the WebRTC 1.0 transceiver)
            RTCPeerConnection.prototype._createTransceiver = function (kind, doNotAdd) {
              var hasBundleTransport = this.transceivers.length > 0;
              var transceiver = {
                track: null,
                iceGatherer: null,
                iceTransport: null,
                dtlsTransport: null,
                localCapabilities: null,
                remoteCapabilities: null,
                rtpSender: null,
                rtpReceiver: null,
                kind: kind,
                mid: null,
                sendEncodingParameters: null,
                recvEncodingParameters: null,
                stream: null,
                associatedRemoteMediaStreams: [],
                wantReceive: true
              };
              if (this.usingBundle && hasBundleTransport) {
                transceiver.iceTransport = this.transceivers[0].iceTransport;
                transceiver.dtlsTransport = this.transceivers[0].dtlsTransport;
              } else {
                var transports = this._createIceAndDtlsTransports();
                transceiver.iceTransport = transports.iceTransport;
                transceiver.dtlsTransport = transports.dtlsTransport;
              }
              if (!doNotAdd) {
                this.transceivers.push(transceiver);
              }
              return transceiver;
            };
            RTCPeerConnection.prototype.addTrack = function (track, stream) {
              if (this._isClosed) {
                throw makeError('InvalidStateError', 'Attempted to call addTrack on a closed peerconnection.');
              }
              var alreadyExists = this.transceivers.find(function (s) {
                return s.track === track;
              });
              if (alreadyExists) {
                throw makeError('InvalidAccessError', 'Track already exists.');
              }
              var transceiver;
              for (var i = 0; i < this.transceivers.length; i++) {
                if (!this.transceivers[i].track && this.transceivers[i].kind === track.kind) {
                  transceiver = this.transceivers[i];
                }
              }
              if (!transceiver) {
                transceiver = this._createTransceiver(track.kind);
              }
              this._maybeFireNegotiationNeeded();
              if (this.localStreams.indexOf(stream) === -1) {
                this.localStreams.push(stream);
              }
              transceiver.track = track;
              transceiver.stream = stream;
              transceiver.rtpSender = new window.RTCRtpSender(track, transceiver.dtlsTransport);
              return transceiver.rtpSender;
            };
            RTCPeerConnection.prototype.addStream = function (stream) {
              var pc = this;
              if (edgeVersion >= 15025) {
                stream.getTracks().forEach(function (track) {
                  pc.addTrack(track, stream);
                });
              } else {
                // Clone is necessary for local demos mostly, attaching directly
                // to two different senders does not work (build 10547).
                // Fixed in 15025 (or earlier)
                var clonedStream = stream.clone();
                stream.getTracks().forEach(function (track, idx) {
                  var clonedTrack = clonedStream.getTracks()[idx];
                  track.addEventListener('enabled', function (event) {
                    clonedTrack.enabled = event.enabled;
                  });
                });
                clonedStream.getTracks().forEach(function (track) {
                  pc.addTrack(track, clonedStream);
                });
              }
            };
            RTCPeerConnection.prototype.removeTrack = function (sender) {
              if (this._isClosed) {
                throw makeError('InvalidStateError', 'Attempted to call removeTrack on a closed peerconnection.');
              }
              if (!(sender instanceof window.RTCRtpSender)) {
                throw new TypeError('Argument 1 of RTCPeerConnection.removeTrack ' + 'does not implement interface RTCRtpSender.');
              }
              var transceiver = this.transceivers.find(function (t) {
                return t.rtpSender === sender;
              });
              if (!transceiver) {
                throw makeError('InvalidAccessError', 'Sender was not created by this connection.');
              }
              var stream = transceiver.stream;
              transceiver.rtpSender.stop();
              transceiver.rtpSender = null;
              transceiver.track = null;
              transceiver.stream = null;

              // remove the stream from the set of local streams
              var localStreams = this.transceivers.map(function (t) {
                return t.stream;
              });
              if (localStreams.indexOf(stream) === -1 && this.localStreams.indexOf(stream) > -1) {
                this.localStreams.splice(this.localStreams.indexOf(stream), 1);
              }
              this._maybeFireNegotiationNeeded();
            };
            RTCPeerConnection.prototype.removeStream = function (stream) {
              var pc = this;
              stream.getTracks().forEach(function (track) {
                var sender = pc.getSenders().find(function (s) {
                  return s.track === track;
                });
                if (sender) {
                  pc.removeTrack(sender);
                }
              });
            };
            RTCPeerConnection.prototype.getSenders = function () {
              return this.transceivers.filter(function (transceiver) {
                return !!transceiver.rtpSender;
              }).map(function (transceiver) {
                return transceiver.rtpSender;
              });
            };
            RTCPeerConnection.prototype.getReceivers = function () {
              return this.transceivers.filter(function (transceiver) {
                return !!transceiver.rtpReceiver;
              }).map(function (transceiver) {
                return transceiver.rtpReceiver;
              });
            };
            RTCPeerConnection.prototype._createIceGatherer = function (sdpMLineIndex, usingBundle) {
              var pc = this;
              if (usingBundle && sdpMLineIndex > 0) {
                return this.transceivers[0].iceGatherer;
              } else if (this._iceGatherers.length) {
                return this._iceGatherers.shift();
              }
              var iceGatherer = new window.RTCIceGatherer({
                iceServers: this._config.iceServers,
                gatherPolicy: this._config.iceTransportPolicy
              });
              Object.defineProperty(iceGatherer, 'state', {
                value: 'new',
                writable: true
              });
              this.transceivers[sdpMLineIndex].bufferedCandidateEvents = [];
              this.transceivers[sdpMLineIndex].bufferCandidates = function (event) {
                var end = !event.candidate || Object.keys(event.candidate).length === 0;
                // polyfill since RTCIceGatherer.state is not implemented in
                // Edge 10547 yet.
                iceGatherer.state = end ? 'completed' : 'gathering';
                if (pc.transceivers[sdpMLineIndex].bufferedCandidateEvents !== null) {
                  pc.transceivers[sdpMLineIndex].bufferedCandidateEvents.push(event);
                }
              };
              iceGatherer.addEventListener('localcandidate', this.transceivers[sdpMLineIndex].bufferCandidates);
              return iceGatherer;
            };

            // start gathering from an RTCIceGatherer.
            RTCPeerConnection.prototype._gather = function (mid, sdpMLineIndex) {
              var pc = this;
              var iceGatherer = this.transceivers[sdpMLineIndex].iceGatherer;
              if (iceGatherer.onlocalcandidate) {
                return;
              }
              var bufferedCandidateEvents = this.transceivers[sdpMLineIndex].bufferedCandidateEvents;
              this.transceivers[sdpMLineIndex].bufferedCandidateEvents = null;
              iceGatherer.removeEventListener('localcandidate', this.transceivers[sdpMLineIndex].bufferCandidates);
              iceGatherer.onlocalcandidate = function (evt) {
                if (pc.usingBundle && sdpMLineIndex > 0) {
                  // if we know that we use bundle we can drop candidates with
                  // ѕdpMLineIndex > 0. If we don't do this then our state gets
                  // confused since we dispose the extra ice gatherer.
                  return;
                }
                var event = new Event('icecandidate');
                event.candidate = {
                  sdpMid: mid,
                  sdpMLineIndex: sdpMLineIndex
                };
                var cand = evt.candidate;
                // Edge emits an empty object for RTCIceCandidateComplete‥
                var end = !cand || Object.keys(cand).length === 0;
                if (end) {
                  // polyfill since RTCIceGatherer.state is not implemented in
                  // Edge 10547 yet.
                  if (iceGatherer.state === 'new' || iceGatherer.state === 'gathering') {
                    iceGatherer.state = 'completed';
                  }
                } else {
                  if (iceGatherer.state === 'new') {
                    iceGatherer.state = 'gathering';
                  }
                  // RTCIceCandidate doesn't have a component, needs to be added
                  cand.component = 1;
                  // also the usernameFragment. TODO: update SDP to take both variants.
                  cand.ufrag = iceGatherer.getLocalParameters().usernameFragment;
                  var serializedCandidate = SDPUtils.writeCandidate(cand);
                  event.candidate = Object.assign(event.candidate, SDPUtils.parseCandidate(serializedCandidate));
                  event.candidate.candidate = serializedCandidate;
                  event.candidate.toJSON = function () {
                    return {
                      candidate: event.candidate.candidate,
                      sdpMid: event.candidate.sdpMid,
                      sdpMLineIndex: event.candidate.sdpMLineIndex,
                      usernameFragment: event.candidate.usernameFragment
                    };
                  };
                }

                // update local description.
                var sections = SDPUtils.getMediaSections(pc._localDescription.sdp);
                if (!end) {
                  sections[event.candidate.sdpMLineIndex] += 'a=' + event.candidate.candidate + '\r\n';
                } else {
                  sections[event.candidate.sdpMLineIndex] += 'a=end-of-candidates\r\n';
                }
                pc._localDescription.sdp = SDPUtils.getDescription(pc._localDescription.sdp) + sections.join('');
                var complete = pc.transceivers.every(function (transceiver) {
                  return transceiver.iceGatherer && transceiver.iceGatherer.state === 'completed';
                });
                if (pc.iceGatheringState !== 'gathering') {
                  pc.iceGatheringState = 'gathering';
                  pc._emitGatheringStateChange();
                }

                // Emit candidate. Also emit null candidate when all gatherers are
                // complete.
                if (!end) {
                  pc._dispatchEvent('icecandidate', event);
                }
                if (complete) {
                  pc._dispatchEvent('icecandidate', new Event('icecandidate'));
                  pc.iceGatheringState = 'complete';
                  pc._emitGatheringStateChange();
                }
              };

              // emit already gathered candidates.
              window.setTimeout(function () {
                bufferedCandidateEvents.forEach(function (e) {
                  iceGatherer.onlocalcandidate(e);
                });
              }, 0);
            };

            // Create ICE transport and DTLS transport.
            RTCPeerConnection.prototype._createIceAndDtlsTransports = function () {
              var pc = this;
              var iceTransport = new window.RTCIceTransport(null);
              iceTransport.onicestatechange = function () {
                pc._updateIceConnectionState();
                pc._updateConnectionState();
              };
              var dtlsTransport = new window.RTCDtlsTransport(iceTransport);
              dtlsTransport.ondtlsstatechange = function () {
                pc._updateConnectionState();
              };
              dtlsTransport.onerror = function () {
                // onerror does not set state to failed by itself.
                Object.defineProperty(dtlsTransport, 'state', {
                  value: 'failed',
                  writable: true
                });
                pc._updateConnectionState();
              };
              return {
                iceTransport: iceTransport,
                dtlsTransport: dtlsTransport
              };
            };

            // Destroy ICE gatherer, ICE transport and DTLS transport.
            // Without triggering the callbacks.
            RTCPeerConnection.prototype._disposeIceAndDtlsTransports = function (sdpMLineIndex) {
              var iceGatherer = this.transceivers[sdpMLineIndex].iceGatherer;
              if (iceGatherer) {
                delete iceGatherer.onlocalcandidate;
                delete this.transceivers[sdpMLineIndex].iceGatherer;
              }
              var iceTransport = this.transceivers[sdpMLineIndex].iceTransport;
              if (iceTransport) {
                delete iceTransport.onicestatechange;
                delete this.transceivers[sdpMLineIndex].iceTransport;
              }
              var dtlsTransport = this.transceivers[sdpMLineIndex].dtlsTransport;
              if (dtlsTransport) {
                delete dtlsTransport.ondtlsstatechange;
                delete dtlsTransport.onerror;
                delete this.transceivers[sdpMLineIndex].dtlsTransport;
              }
            };

            // Start the RTP Sender and Receiver for a transceiver.
            RTCPeerConnection.prototype._transceive = function (transceiver, send, recv) {
              var params = getCommonCapabilities(transceiver.localCapabilities, transceiver.remoteCapabilities);
              if (send && transceiver.rtpSender) {
                params.encodings = transceiver.sendEncodingParameters;
                params.rtcp = {
                  cname: SDPUtils.localCName,
                  compound: transceiver.rtcpParameters.compound
                };
                if (transceiver.recvEncodingParameters.length) {
                  params.rtcp.ssrc = transceiver.recvEncodingParameters[0].ssrc;
                }
                transceiver.rtpSender.send(params);
              }
              if (recv && transceiver.rtpReceiver && params.codecs.length > 0) {
                // remove RTX field in Edge 14942
                if (transceiver.kind === 'video' && transceiver.recvEncodingParameters && edgeVersion < 15019) {
                  transceiver.recvEncodingParameters.forEach(function (p) {
                    delete p.rtx;
                  });
                }
                if (transceiver.recvEncodingParameters.length) {
                  params.encodings = transceiver.recvEncodingParameters;
                } else {
                  params.encodings = [{}];
                }
                params.rtcp = {
                  compound: transceiver.rtcpParameters.compound
                };
                if (transceiver.rtcpParameters.cname) {
                  params.rtcp.cname = transceiver.rtcpParameters.cname;
                }
                if (transceiver.sendEncodingParameters.length) {
                  params.rtcp.ssrc = transceiver.sendEncodingParameters[0].ssrc;
                }
                transceiver.rtpReceiver.receive(params);
              }
            };
            RTCPeerConnection.prototype.setLocalDescription = function (description) {
              var pc = this;

              // Note: pranswer is not supported.
              if (['offer', 'answer'].indexOf(description.type) === -1) {
                return Promise.reject(makeError('TypeError', 'Unsupported type "' + description.type + '"'));
              }
              if (!isActionAllowedInSignalingState('setLocalDescription', description.type, pc.signalingState) || pc._isClosed) {
                return Promise.reject(makeError('InvalidStateError', 'Can not set local ' + description.type + ' in state ' + pc.signalingState));
              }
              var sections;
              var sessionpart;
              if (description.type === 'offer') {
                // VERY limited support for SDP munging. Limited to:
                // * changing the order of codecs
                sections = SDPUtils.splitSections(description.sdp);
                sessionpart = sections.shift();
                sections.forEach(function (mediaSection, sdpMLineIndex) {
                  var caps = SDPUtils.parseRtpParameters(mediaSection);
                  pc.transceivers[sdpMLineIndex].localCapabilities = caps;
                });
                pc.transceivers.forEach(function (transceiver, sdpMLineIndex) {
                  pc._gather(transceiver.mid, sdpMLineIndex);
                });
              } else if (description.type === 'answer') {
                sections = SDPUtils.splitSections(pc._remoteDescription.sdp);
                sessionpart = sections.shift();
                var isIceLite = SDPUtils.matchPrefix(sessionpart, 'a=ice-lite').length > 0;
                sections.forEach(function (mediaSection, sdpMLineIndex) {
                  var transceiver = pc.transceivers[sdpMLineIndex];
                  var iceGatherer = transceiver.iceGatherer;
                  var iceTransport = transceiver.iceTransport;
                  var dtlsTransport = transceiver.dtlsTransport;
                  var localCapabilities = transceiver.localCapabilities;
                  var remoteCapabilities = transceiver.remoteCapabilities;

                  // treat bundle-only as not-rejected.
                  var rejected = SDPUtils.isRejected(mediaSection) && SDPUtils.matchPrefix(mediaSection, 'a=bundle-only').length === 0;
                  if (!rejected && !transceiver.rejected) {
                    var remoteIceParameters = SDPUtils.getIceParameters(mediaSection, sessionpart);
                    var remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection, sessionpart);
                    if (isIceLite) {
                      remoteDtlsParameters.role = 'server';
                    }
                    if (!pc.usingBundle || sdpMLineIndex === 0) {
                      pc._gather(transceiver.mid, sdpMLineIndex);
                      if (iceTransport.state === 'new') {
                        iceTransport.start(iceGatherer, remoteIceParameters, isIceLite ? 'controlling' : 'controlled');
                      }
                      if (dtlsTransport.state === 'new') {
                        dtlsTransport.start(remoteDtlsParameters);
                      }
                    }

                    // Calculate intersection of capabilities.
                    var params = getCommonCapabilities(localCapabilities, remoteCapabilities);

                    // Start the RTCRtpSender. The RTCRtpReceiver for this
                    // transceiver has already been started in setRemoteDescription.
                    pc._transceive(transceiver, params.codecs.length > 0, false);
                  }
                });
              }
              pc._localDescription = {
                type: description.type,
                sdp: description.sdp
              };
              if (description.type === 'offer') {
                pc._updateSignalingState('have-local-offer');
              } else {
                pc._updateSignalingState('stable');
              }
              return Promise.resolve();
            };
            RTCPeerConnection.prototype.setRemoteDescription = function (description) {
              var pc = this;

              // Note: pranswer is not supported.
              if (['offer', 'answer'].indexOf(description.type) === -1) {
                return Promise.reject(makeError('TypeError', 'Unsupported type "' + description.type + '"'));
              }
              if (!isActionAllowedInSignalingState('setRemoteDescription', description.type, pc.signalingState) || pc._isClosed) {
                return Promise.reject(makeError('InvalidStateError', 'Can not set remote ' + description.type + ' in state ' + pc.signalingState));
              }
              var streams = {};
              pc.remoteStreams.forEach(function (stream) {
                streams[stream.id] = stream;
              });
              var receiverList = [];
              var sections = SDPUtils.splitSections(description.sdp);
              var sessionpart = sections.shift();
              var isIceLite = SDPUtils.matchPrefix(sessionpart, 'a=ice-lite').length > 0;
              var usingBundle = SDPUtils.matchPrefix(sessionpart, 'a=group:BUNDLE ').length > 0;
              pc.usingBundle = usingBundle;
              var iceOptions = SDPUtils.matchPrefix(sessionpart, 'a=ice-options:')[0];
              if (iceOptions) {
                pc.canTrickleIceCandidates = iceOptions.substr(14).split(' ').indexOf('trickle') >= 0;
              } else {
                pc.canTrickleIceCandidates = false;
              }
              sections.forEach(function (mediaSection, sdpMLineIndex) {
                var lines = SDPUtils.splitLines(mediaSection);
                var kind = SDPUtils.getKind(mediaSection);
                // treat bundle-only as not-rejected.
                var rejected = SDPUtils.isRejected(mediaSection) && SDPUtils.matchPrefix(mediaSection, 'a=bundle-only').length === 0;
                var protocol = lines[0].substr(2).split(' ')[2];
                var direction = SDPUtils.getDirection(mediaSection, sessionpart);
                var remoteMsid = SDPUtils.parseMsid(mediaSection);
                var mid = SDPUtils.getMid(mediaSection) || SDPUtils.generateIdentifier();

                // Reject datachannels which are not implemented yet.
                if (rejected || kind === 'application' && (protocol === 'DTLS/SCTP' || protocol === 'UDP/DTLS/SCTP')) {
                  // TODO: this is dangerous in the case where a non-rejected m-line
                  //     becomes rejected.
                  pc.transceivers[sdpMLineIndex] = {
                    mid: mid,
                    kind: kind,
                    protocol: protocol,
                    rejected: true
                  };
                  return;
                }
                if (!rejected && pc.transceivers[sdpMLineIndex] && pc.transceivers[sdpMLineIndex].rejected) {
                  // recycle a rejected transceiver.
                  pc.transceivers[sdpMLineIndex] = pc._createTransceiver(kind, true);
                }
                var transceiver;
                var iceGatherer;
                var iceTransport;
                var dtlsTransport;
                var rtpReceiver;
                var sendEncodingParameters;
                var recvEncodingParameters;
                var localCapabilities;
                var track;
                // FIXME: ensure the mediaSection has rtcp-mux set.
                var remoteCapabilities = SDPUtils.parseRtpParameters(mediaSection);
                var remoteIceParameters;
                var remoteDtlsParameters;
                if (!rejected) {
                  remoteIceParameters = SDPUtils.getIceParameters(mediaSection, sessionpart);
                  remoteDtlsParameters = SDPUtils.getDtlsParameters(mediaSection, sessionpart);
                  remoteDtlsParameters.role = 'client';
                }
                recvEncodingParameters = SDPUtils.parseRtpEncodingParameters(mediaSection);
                var rtcpParameters = SDPUtils.parseRtcpParameters(mediaSection);
                var isComplete = SDPUtils.matchPrefix(mediaSection, 'a=end-of-candidates', sessionpart).length > 0;
                var cands = SDPUtils.matchPrefix(mediaSection, 'a=candidate:').map(function (cand) {
                  return SDPUtils.parseCandidate(cand);
                }).filter(function (cand) {
                  return cand.component === 1;
                });

                // Check if we can use BUNDLE and dispose transports.
                if ((description.type === 'offer' || description.type === 'answer') && !rejected && usingBundle && sdpMLineIndex > 0 && pc.transceivers[sdpMLineIndex]) {
                  pc._disposeIceAndDtlsTransports(sdpMLineIndex);
                  pc.transceivers[sdpMLineIndex].iceGatherer = pc.transceivers[0].iceGatherer;
                  pc.transceivers[sdpMLineIndex].iceTransport = pc.transceivers[0].iceTransport;
                  pc.transceivers[sdpMLineIndex].dtlsTransport = pc.transceivers[0].dtlsTransport;
                  if (pc.transceivers[sdpMLineIndex].rtpSender) {
                    pc.transceivers[sdpMLineIndex].rtpSender.setTransport(pc.transceivers[0].dtlsTransport);
                  }
                  if (pc.transceivers[sdpMLineIndex].rtpReceiver) {
                    pc.transceivers[sdpMLineIndex].rtpReceiver.setTransport(pc.transceivers[0].dtlsTransport);
                  }
                }
                if (description.type === 'offer' && !rejected) {
                  transceiver = pc.transceivers[sdpMLineIndex] || pc._createTransceiver(kind);
                  transceiver.mid = mid;
                  if (!transceiver.iceGatherer) {
                    transceiver.iceGatherer = pc._createIceGatherer(sdpMLineIndex, usingBundle);
                  }
                  if (cands.length && transceiver.iceTransport.state === 'new') {
                    if (isComplete && (!usingBundle || sdpMLineIndex === 0)) {
                      transceiver.iceTransport.setRemoteCandidates(cands);
                    } else {
                      cands.forEach(function (candidate) {
                        maybeAddCandidate(transceiver.iceTransport, candidate);
                      });
                    }
                  }
                  localCapabilities = window.RTCRtpReceiver.getCapabilities(kind);

                  // filter RTX until additional stuff needed for RTX is implemented
                  // in adapter.js
                  if (edgeVersion < 15019) {
                    localCapabilities.codecs = localCapabilities.codecs.filter(function (codec) {
                      return codec.name !== 'rtx';
                    });
                  }
                  sendEncodingParameters = transceiver.sendEncodingParameters || [{
                    ssrc: (2 * sdpMLineIndex + 2) * 1001
                  }];

                  // TODO: rewrite to use http://w3c.github.io/webrtc-pc/#set-associated-remote-streams
                  var isNewTrack = false;
                  if (direction === 'sendrecv' || direction === 'sendonly') {
                    isNewTrack = !transceiver.rtpReceiver;
                    rtpReceiver = transceiver.rtpReceiver || new window.RTCRtpReceiver(transceiver.dtlsTransport, kind);
                    if (isNewTrack) {
                      var stream;
                      track = rtpReceiver.track;
                      // FIXME: does not work with Plan B.
                      if (remoteMsid && remoteMsid.stream === '-') ; else if (remoteMsid) {
                        if (!streams[remoteMsid.stream]) {
                          streams[remoteMsid.stream] = new window.MediaStream();
                          Object.defineProperty(streams[remoteMsid.stream], 'id', {
                            get: function get() {
                              return remoteMsid.stream;
                            }
                          });
                        }
                        Object.defineProperty(track, 'id', {
                          get: function get() {
                            return remoteMsid.track;
                          }
                        });
                        stream = streams[remoteMsid.stream];
                      } else {
                        if (!streams["default"]) {
                          streams["default"] = new window.MediaStream();
                        }
                        stream = streams["default"];
                      }
                      if (stream) {
                        addTrackToStreamAndFireEvent(track, stream);
                        transceiver.associatedRemoteMediaStreams.push(stream);
                      }
                      receiverList.push([track, rtpReceiver, stream]);
                    }
                  } else if (transceiver.rtpReceiver && transceiver.rtpReceiver.track) {
                    transceiver.associatedRemoteMediaStreams.forEach(function (s) {
                      var nativeTrack = s.getTracks().find(function (t) {
                        return t.id === transceiver.rtpReceiver.track.id;
                      });
                      if (nativeTrack) {
                        removeTrackFromStreamAndFireEvent(nativeTrack, s);
                      }
                    });
                    transceiver.associatedRemoteMediaStreams = [];
                  }
                  transceiver.localCapabilities = localCapabilities;
                  transceiver.remoteCapabilities = remoteCapabilities;
                  transceiver.rtpReceiver = rtpReceiver;
                  transceiver.rtcpParameters = rtcpParameters;
                  transceiver.sendEncodingParameters = sendEncodingParameters;
                  transceiver.recvEncodingParameters = recvEncodingParameters;

                  // Start the RTCRtpReceiver now. The RTPSender is started in
                  // setLocalDescription.
                  pc._transceive(pc.transceivers[sdpMLineIndex], false, isNewTrack);
                } else if (description.type === 'answer' && !rejected) {
                  transceiver = pc.transceivers[sdpMLineIndex];
                  iceGatherer = transceiver.iceGatherer;
                  iceTransport = transceiver.iceTransport;
                  dtlsTransport = transceiver.dtlsTransport;
                  rtpReceiver = transceiver.rtpReceiver;
                  sendEncodingParameters = transceiver.sendEncodingParameters;
                  localCapabilities = transceiver.localCapabilities;
                  pc.transceivers[sdpMLineIndex].recvEncodingParameters = recvEncodingParameters;
                  pc.transceivers[sdpMLineIndex].remoteCapabilities = remoteCapabilities;
                  pc.transceivers[sdpMLineIndex].rtcpParameters = rtcpParameters;
                  if (cands.length && iceTransport.state === 'new') {
                    if ((isIceLite || isComplete) && (!usingBundle || sdpMLineIndex === 0)) {
                      iceTransport.setRemoteCandidates(cands);
                    } else {
                      cands.forEach(function (candidate) {
                        maybeAddCandidate(transceiver.iceTransport, candidate);
                      });
                    }
                  }
                  if (!usingBundle || sdpMLineIndex === 0) {
                    if (iceTransport.state === 'new') {
                      iceTransport.start(iceGatherer, remoteIceParameters, 'controlling');
                    }
                    if (dtlsTransport.state === 'new') {
                      dtlsTransport.start(remoteDtlsParameters);
                    }
                  }

                  // If the offer contained RTX but the answer did not,
                  // remove RTX from sendEncodingParameters.
                  var commonCapabilities = getCommonCapabilities(transceiver.localCapabilities, transceiver.remoteCapabilities);
                  var hasRtx = commonCapabilities.codecs.filter(function (c) {
                    return c.name.toLowerCase() === 'rtx';
                  }).length;
                  if (!hasRtx && transceiver.sendEncodingParameters[0].rtx) {
                    delete transceiver.sendEncodingParameters[0].rtx;
                  }
                  pc._transceive(transceiver, direction === 'sendrecv' || direction === 'recvonly', direction === 'sendrecv' || direction === 'sendonly');

                  // TODO: rewrite to use http://w3c.github.io/webrtc-pc/#set-associated-remote-streams
                  if (rtpReceiver && (direction === 'sendrecv' || direction === 'sendonly')) {
                    track = rtpReceiver.track;
                    if (remoteMsid) {
                      if (!streams[remoteMsid.stream]) {
                        streams[remoteMsid.stream] = new window.MediaStream();
                      }
                      addTrackToStreamAndFireEvent(track, streams[remoteMsid.stream]);
                      receiverList.push([track, rtpReceiver, streams[remoteMsid.stream]]);
                    } else {
                      if (!streams["default"]) {
                        streams["default"] = new window.MediaStream();
                      }
                      addTrackToStreamAndFireEvent(track, streams["default"]);
                      receiverList.push([track, rtpReceiver, streams["default"]]);
                    }
                  } else {
                    // FIXME: actually the receiver should be created later.
                    delete transceiver.rtpReceiver;
                  }
                }
              });
              if (pc._dtlsRole === undefined) {
                pc._dtlsRole = description.type === 'offer' ? 'active' : 'passive';
              }
              pc._remoteDescription = {
                type: description.type,
                sdp: description.sdp
              };
              if (description.type === 'offer') {
                pc._updateSignalingState('have-remote-offer');
              } else {
                pc._updateSignalingState('stable');
              }
              Object.keys(streams).forEach(function (sid) {
                var stream = streams[sid];
                if (stream.getTracks().length) {
                  if (pc.remoteStreams.indexOf(stream) === -1) {
                    pc.remoteStreams.push(stream);
                    var event = new Event('addstream');
                    event.stream = stream;
                    window.setTimeout(function () {
                      pc._dispatchEvent('addstream', event);
                    });
                  }
                  receiverList.forEach(function (item) {
                    var track = item[0];
                    var receiver = item[1];
                    if (stream.id !== item[2].id) {
                      return;
                    }
                    fireAddTrack(pc, track, receiver, [stream]);
                  });
                }
              });
              receiverList.forEach(function (item) {
                if (item[2]) {
                  return;
                }
                fireAddTrack(pc, item[0], item[1], []);
              });

              // check whether addIceCandidate({}) was called within four seconds after
              // setRemoteDescription.
              window.setTimeout(function () {
                if (!(pc && pc.transceivers)) {
                  return;
                }
                pc.transceivers.forEach(function (transceiver) {
                  if (transceiver.iceTransport && transceiver.iceTransport.state === 'new' && transceiver.iceTransport.getRemoteCandidates().length > 0) {
                    console.warn('Timeout for addRemoteCandidate. Consider sending ' + 'an end-of-candidates notification');
                    transceiver.iceTransport.addRemoteCandidate({});
                  }
                });
              }, 4000);
              return Promise.resolve();
            };
            RTCPeerConnection.prototype.close = function () {
              this.transceivers.forEach(function (transceiver) {
                /* not yet
                if (transceiver.iceGatherer) {
                  transceiver.iceGatherer.close();
                }
                */
                if (transceiver.iceTransport) {
                  transceiver.iceTransport.stop();
                }
                if (transceiver.dtlsTransport) {
                  transceiver.dtlsTransport.stop();
                }
                if (transceiver.rtpSender) {
                  transceiver.rtpSender.stop();
                }
                if (transceiver.rtpReceiver) {
                  transceiver.rtpReceiver.stop();
                }
              });
              // FIXME: clean up tracks, local streams, remote streams, etc
              this._isClosed = true;
              this._updateSignalingState('closed');
            };

            // Update the signaling state.
            RTCPeerConnection.prototype._updateSignalingState = function (newState) {
              this.signalingState = newState;
              var event = new Event('signalingstatechange');
              this._dispatchEvent('signalingstatechange', event);
            };

            // Determine whether to fire the negotiationneeded event.
            RTCPeerConnection.prototype._maybeFireNegotiationNeeded = function () {
              var pc = this;
              if (this.signalingState !== 'stable' || this.needNegotiation === true) {
                return;
              }
              this.needNegotiation = true;
              window.setTimeout(function () {
                if (pc.needNegotiation) {
                  pc.needNegotiation = false;
                  var event = new Event('negotiationneeded');
                  pc._dispatchEvent('negotiationneeded', event);
                }
              }, 0);
            };

            // Update the ice connection state.
            RTCPeerConnection.prototype._updateIceConnectionState = function () {
              var newState;
              var states = {
                'new': 0,
                closed: 0,
                checking: 0,
                connected: 0,
                completed: 0,
                disconnected: 0,
                failed: 0
              };
              this.transceivers.forEach(function (transceiver) {
                if (transceiver.iceTransport && !transceiver.rejected) {
                  states[transceiver.iceTransport.state]++;
                }
              });
              newState = 'new';
              if (states.failed > 0) {
                newState = 'failed';
              } else if (states.checking > 0) {
                newState = 'checking';
              } else if (states.disconnected > 0) {
                newState = 'disconnected';
              } else if (states["new"] > 0) {
                newState = 'new';
              } else if (states.connected > 0) {
                newState = 'connected';
              } else if (states.completed > 0) {
                newState = 'completed';
              }
              if (newState !== this.iceConnectionState) {
                this.iceConnectionState = newState;
                var event = new Event('iceconnectionstatechange');
                this._dispatchEvent('iceconnectionstatechange', event);
              }
            };

            // Update the connection state.
            RTCPeerConnection.prototype._updateConnectionState = function () {
              var newState;
              var states = {
                'new': 0,
                closed: 0,
                connecting: 0,
                connected: 0,
                completed: 0,
                disconnected: 0,
                failed: 0
              };
              this.transceivers.forEach(function (transceiver) {
                if (transceiver.iceTransport && transceiver.dtlsTransport && !transceiver.rejected) {
                  states[transceiver.iceTransport.state]++;
                  states[transceiver.dtlsTransport.state]++;
                }
              });
              // ICETransport.completed and connected are the same for this purpose.
              states.connected += states.completed;
              newState = 'new';
              if (states.failed > 0) {
                newState = 'failed';
              } else if (states.connecting > 0) {
                newState = 'connecting';
              } else if (states.disconnected > 0) {
                newState = 'disconnected';
              } else if (states["new"] > 0) {
                newState = 'new';
              } else if (states.connected > 0) {
                newState = 'connected';
              }
              if (newState !== this.connectionState) {
                this.connectionState = newState;
                var event = new Event('connectionstatechange');
                this._dispatchEvent('connectionstatechange', event);
              }
            };
            RTCPeerConnection.prototype.createOffer = function () {
              var pc = this;
              if (pc._isClosed) {
                return Promise.reject(makeError('InvalidStateError', 'Can not call createOffer after close'));
              }
              var numAudioTracks = pc.transceivers.filter(function (t) {
                return t.kind === 'audio';
              }).length;
              var numVideoTracks = pc.transceivers.filter(function (t) {
                return t.kind === 'video';
              }).length;

              // Determine number of audio and video tracks we need to send/recv.
              var offerOptions = arguments[0];
              if (offerOptions) {
                // Reject Chrome legacy constraints.
                if (offerOptions.mandatory || offerOptions.optional) {
                  throw new TypeError('Legacy mandatory/optional constraints not supported.');
                }
                if (offerOptions.offerToReceiveAudio !== undefined) {
                  if (offerOptions.offerToReceiveAudio === true) {
                    numAudioTracks = 1;
                  } else if (offerOptions.offerToReceiveAudio === false) {
                    numAudioTracks = 0;
                  } else {
                    numAudioTracks = offerOptions.offerToReceiveAudio;
                  }
                }
                if (offerOptions.offerToReceiveVideo !== undefined) {
                  if (offerOptions.offerToReceiveVideo === true) {
                    numVideoTracks = 1;
                  } else if (offerOptions.offerToReceiveVideo === false) {
                    numVideoTracks = 0;
                  } else {
                    numVideoTracks = offerOptions.offerToReceiveVideo;
                  }
                }
              }
              pc.transceivers.forEach(function (transceiver) {
                if (transceiver.kind === 'audio') {
                  numAudioTracks--;
                  if (numAudioTracks < 0) {
                    transceiver.wantReceive = false;
                  }
                } else if (transceiver.kind === 'video') {
                  numVideoTracks--;
                  if (numVideoTracks < 0) {
                    transceiver.wantReceive = false;
                  }
                }
              });

              // Create M-lines for recvonly streams.
              while (numAudioTracks > 0 || numVideoTracks > 0) {
                if (numAudioTracks > 0) {
                  pc._createTransceiver('audio');
                  numAudioTracks--;
                }
                if (numVideoTracks > 0) {
                  pc._createTransceiver('video');
                  numVideoTracks--;
                }
              }
              var sdp = SDPUtils.writeSessionBoilerplate(pc._sdpSessionId, pc._sdpSessionVersion++);
              pc.transceivers.forEach(function (transceiver, sdpMLineIndex) {
                // For each track, create an ice gatherer, ice transport,
                // dtls transport, potentially rtpsender and rtpreceiver.
                var track = transceiver.track;
                var kind = transceiver.kind;
                var mid = transceiver.mid || SDPUtils.generateIdentifier();
                transceiver.mid = mid;
                if (!transceiver.iceGatherer) {
                  transceiver.iceGatherer = pc._createIceGatherer(sdpMLineIndex, pc.usingBundle);
                }
                var localCapabilities = window.RTCRtpSender.getCapabilities(kind);
                // filter RTX until additional stuff needed for RTX is implemented
                // in adapter.js
                if (edgeVersion < 15019) {
                  localCapabilities.codecs = localCapabilities.codecs.filter(function (codec) {
                    return codec.name !== 'rtx';
                  });
                }
                localCapabilities.codecs.forEach(function (codec) {
                  // work around https://bugs.chromium.org/p/webrtc/issues/detail?id=6552
                  // by adding level-asymmetry-allowed=1
                  if (codec.name === 'H264' && codec.parameters['level-asymmetry-allowed'] === undefined) {
                    codec.parameters['level-asymmetry-allowed'] = '1';
                  }

                  // for subsequent offers, we might have to re-use the payload
                  // type of the last offer.
                  if (transceiver.remoteCapabilities && transceiver.remoteCapabilities.codecs) {
                    transceiver.remoteCapabilities.codecs.forEach(function (remoteCodec) {
                      if (codec.name.toLowerCase() === remoteCodec.name.toLowerCase() && codec.clockRate === remoteCodec.clockRate) {
                        codec.preferredPayloadType = remoteCodec.payloadType;
                      }
                    });
                  }
                });
                localCapabilities.headerExtensions.forEach(function (hdrExt) {
                  var remoteExtensions = transceiver.remoteCapabilities && transceiver.remoteCapabilities.headerExtensions || [];
                  remoteExtensions.forEach(function (rHdrExt) {
                    if (hdrExt.uri === rHdrExt.uri) {
                      hdrExt.id = rHdrExt.id;
                    }
                  });
                });

                // generate an ssrc now, to be used later in rtpSender.send
                var sendEncodingParameters = transceiver.sendEncodingParameters || [{
                  ssrc: (2 * sdpMLineIndex + 1) * 1001
                }];
                if (track) {
                  // add RTX
                  if (edgeVersion >= 15019 && kind === 'video' && !sendEncodingParameters[0].rtx) {
                    sendEncodingParameters[0].rtx = {
                      ssrc: sendEncodingParameters[0].ssrc + 1
                    };
                  }
                }
                if (transceiver.wantReceive) {
                  transceiver.rtpReceiver = new window.RTCRtpReceiver(transceiver.dtlsTransport, kind);
                }
                transceiver.localCapabilities = localCapabilities;
                transceiver.sendEncodingParameters = sendEncodingParameters;
              });

              // always offer BUNDLE and dispose on return if not supported.
              if (pc._config.bundlePolicy !== 'max-compat') {
                sdp += 'a=group:BUNDLE ' + pc.transceivers.map(function (t) {
                  return t.mid;
                }).join(' ') + '\r\n';
              }
              sdp += 'a=ice-options:trickle\r\n';
              pc.transceivers.forEach(function (transceiver, sdpMLineIndex) {
                sdp += writeMediaSection(transceiver, transceiver.localCapabilities, 'offer', transceiver.stream, pc._dtlsRole);
                sdp += 'a=rtcp-rsize\r\n';
                if (transceiver.iceGatherer && pc.iceGatheringState !== 'new' && (sdpMLineIndex === 0 || !pc.usingBundle)) {
                  transceiver.iceGatherer.getLocalCandidates().forEach(function (cand) {
                    cand.component = 1;
                    sdp += 'a=' + SDPUtils.writeCandidate(cand) + '\r\n';
                  });
                  if (transceiver.iceGatherer.state === 'completed') {
                    sdp += 'a=end-of-candidates\r\n';
                  }
                }
              });
              var desc = new window.RTCSessionDescription({
                type: 'offer',
                sdp: sdp
              });
              return Promise.resolve(desc);
            };
            RTCPeerConnection.prototype.createAnswer = function () {
              var pc = this;
              if (pc._isClosed) {
                return Promise.reject(makeError('InvalidStateError', 'Can not call createAnswer after close'));
              }
              if (!(pc.signalingState === 'have-remote-offer' || pc.signalingState === 'have-local-pranswer')) {
                return Promise.reject(makeError('InvalidStateError', 'Can not call createAnswer in signalingState ' + pc.signalingState));
              }
              var sdp = SDPUtils.writeSessionBoilerplate(pc._sdpSessionId, pc._sdpSessionVersion++);
              if (pc.usingBundle) {
                sdp += 'a=group:BUNDLE ' + pc.transceivers.map(function (t) {
                  return t.mid;
                }).join(' ') + '\r\n';
              }
              sdp += 'a=ice-options:trickle\r\n';
              var mediaSectionsInOffer = SDPUtils.getMediaSections(pc._remoteDescription.sdp).length;
              pc.transceivers.forEach(function (transceiver, sdpMLineIndex) {
                if (sdpMLineIndex + 1 > mediaSectionsInOffer) {
                  return;
                }
                if (transceiver.rejected) {
                  if (transceiver.kind === 'application') {
                    if (transceiver.protocol === 'DTLS/SCTP') {
                      // legacy fmt
                      sdp += 'm=application 0 DTLS/SCTP 5000\r\n';
                    } else {
                      sdp += 'm=application 0 ' + transceiver.protocol + ' webrtc-datachannel\r\n';
                    }
                  } else if (transceiver.kind === 'audio') {
                    sdp += 'm=audio 0 UDP/TLS/RTP/SAVPF 0\r\n' + 'a=rtpmap:0 PCMU/8000\r\n';
                  } else if (transceiver.kind === 'video') {
                    sdp += 'm=video 0 UDP/TLS/RTP/SAVPF 120\r\n' + 'a=rtpmap:120 VP8/90000\r\n';
                  }
                  sdp += 'c=IN IP4 0.0.0.0\r\n' + 'a=inactive\r\n' + 'a=mid:' + transceiver.mid + '\r\n';
                  return;
                }

                // FIXME: look at direction.
                if (transceiver.stream) {
                  var localTrack;
                  if (transceiver.kind === 'audio') {
                    localTrack = transceiver.stream.getAudioTracks()[0];
                  } else if (transceiver.kind === 'video') {
                    localTrack = transceiver.stream.getVideoTracks()[0];
                  }
                  if (localTrack) {
                    // add RTX
                    if (edgeVersion >= 15019 && transceiver.kind === 'video' && !transceiver.sendEncodingParameters[0].rtx) {
                      transceiver.sendEncodingParameters[0].rtx = {
                        ssrc: transceiver.sendEncodingParameters[0].ssrc + 1
                      };
                    }
                  }
                }

                // Calculate intersection of capabilities.
                var commonCapabilities = getCommonCapabilities(transceiver.localCapabilities, transceiver.remoteCapabilities);
                var hasRtx = commonCapabilities.codecs.filter(function (c) {
                  return c.name.toLowerCase() === 'rtx';
                }).length;
                if (!hasRtx && transceiver.sendEncodingParameters[0].rtx) {
                  delete transceiver.sendEncodingParameters[0].rtx;
                }
                sdp += writeMediaSection(transceiver, commonCapabilities, 'answer', transceiver.stream, pc._dtlsRole);
                if (transceiver.rtcpParameters && transceiver.rtcpParameters.reducedSize) {
                  sdp += 'a=rtcp-rsize\r\n';
                }
              });
              var desc = new window.RTCSessionDescription({
                type: 'answer',
                sdp: sdp
              });
              return Promise.resolve(desc);
            };
            RTCPeerConnection.prototype.addIceCandidate = function (candidate) {
              var pc = this;
              var sections;
              if (candidate && !(candidate.sdpMLineIndex !== undefined || candidate.sdpMid)) {
                return Promise.reject(new TypeError('sdpMLineIndex or sdpMid required'));
              }

              // TODO: needs to go into ops queue.
              return new Promise(function (resolve, reject) {
                if (!pc._remoteDescription) {
                  return reject(makeError('InvalidStateError', 'Can not add ICE candidate without a remote description'));
                } else if (!candidate || candidate.candidate === '') {
                  for (var j = 0; j < pc.transceivers.length; j++) {
                    if (pc.transceivers[j].rejected) {
                      continue;
                    }
                    pc.transceivers[j].iceTransport.addRemoteCandidate({});
                    sections = SDPUtils.getMediaSections(pc._remoteDescription.sdp);
                    sections[j] += 'a=end-of-candidates\r\n';
                    pc._remoteDescription.sdp = SDPUtils.getDescription(pc._remoteDescription.sdp) + sections.join('');
                    if (pc.usingBundle) {
                      break;
                    }
                  }
                } else {
                  var sdpMLineIndex = candidate.sdpMLineIndex;
                  if (candidate.sdpMid) {
                    for (var i = 0; i < pc.transceivers.length; i++) {
                      if (pc.transceivers[i].mid === candidate.sdpMid) {
                        sdpMLineIndex = i;
                        break;
                      }
                    }
                  }
                  var transceiver = pc.transceivers[sdpMLineIndex];
                  if (transceiver) {
                    if (transceiver.rejected) {
                      return resolve();
                    }
                    var cand = Object.keys(candidate.candidate).length > 0 ? SDPUtils.parseCandidate(candidate.candidate) : {};
                    // Ignore Chrome's invalid candidates since Edge does not like them.
                    if (cand.protocol === 'tcp' && (cand.port === 0 || cand.port === 9)) {
                      return resolve();
                    }
                    // Ignore RTCP candidates, we assume RTCP-MUX.
                    if (cand.component && cand.component !== 1) {
                      return resolve();
                    }
                    // when using bundle, avoid adding candidates to the wrong
                    // ice transport. And avoid adding candidates added in the SDP.
                    if (sdpMLineIndex === 0 || sdpMLineIndex > 0 && transceiver.iceTransport !== pc.transceivers[0].iceTransport) {
                      if (!maybeAddCandidate(transceiver.iceTransport, cand)) {
                        return reject(makeError('OperationError', 'Can not add ICE candidate'));
                      }
                    }

                    // update the remoteDescription.
                    var candidateString = candidate.candidate.trim();
                    if (candidateString.indexOf('a=') === 0) {
                      candidateString = candidateString.substr(2);
                    }
                    sections = SDPUtils.getMediaSections(pc._remoteDescription.sdp);
                    sections[sdpMLineIndex] += 'a=' + (cand.type ? candidateString : 'end-of-candidates') + '\r\n';
                    pc._remoteDescription.sdp = SDPUtils.getDescription(pc._remoteDescription.sdp) + sections.join('');
                  } else {
                    return reject(makeError('OperationError', 'Can not add ICE candidate'));
                  }
                }
                resolve();
              });
            };
            RTCPeerConnection.prototype.getStats = function (selector) {
              if (selector && selector instanceof window.MediaStreamTrack) {
                var senderOrReceiver = null;
                this.transceivers.forEach(function (transceiver) {
                  if (transceiver.rtpSender && transceiver.rtpSender.track === selector) {
                    senderOrReceiver = transceiver.rtpSender;
                  } else if (transceiver.rtpReceiver && transceiver.rtpReceiver.track === selector) {
                    senderOrReceiver = transceiver.rtpReceiver;
                  }
                });
                if (!senderOrReceiver) {
                  throw makeError('InvalidAccessError', 'Invalid selector.');
                }
                return senderOrReceiver.getStats();
              }
              var promises = [];
              this.transceivers.forEach(function (transceiver) {
                ['rtpSender', 'rtpReceiver', 'iceGatherer', 'iceTransport', 'dtlsTransport'].forEach(function (method) {
                  if (transceiver[method]) {
                    promises.push(transceiver[method].getStats());
                  }
                });
              });
              return Promise.all(promises).then(function (allStats) {
                var results = new Map();
                allStats.forEach(function (stats) {
                  stats.forEach(function (stat) {
                    results.set(stat.id, stat);
                  });
                });
                return results;
              });
            };

            // fix low-level stat names and return Map instead of object.
            var ortcObjects = ['RTCRtpSender', 'RTCRtpReceiver', 'RTCIceGatherer', 'RTCIceTransport', 'RTCDtlsTransport'];
            ortcObjects.forEach(function (ortcObjectName) {
              var obj = window[ortcObjectName];
              if (obj && obj.prototype && obj.prototype.getStats) {
                var nativeGetstats = obj.prototype.getStats;
                obj.prototype.getStats = function () {
                  return nativeGetstats.apply(this).then(function (nativeStats) {
                    var mapStats = new Map();
                    Object.keys(nativeStats).forEach(function (id) {
                      nativeStats[id].type = fixStatsType(nativeStats[id]);
                      mapStats.set(id, nativeStats[id]);
                    });
                    return mapStats;
                  });
                };
              }
            });

            // legacy callback shims. Should be moved to adapter.js some days.
            var methods = ['createOffer', 'createAnswer'];
            methods.forEach(function (method) {
              var nativeMethod = RTCPeerConnection.prototype[method];
              RTCPeerConnection.prototype[method] = function () {
                var args = arguments;
                if (typeof args[0] === 'function' || typeof args[1] === 'function') {
                  // legacy
                  return nativeMethod.apply(this, [arguments[2]]).then(function (description) {
                    if (typeof args[0] === 'function') {
                      args[0].apply(null, [description]);
                    }
                  }, function (error) {
                    if (typeof args[1] === 'function') {
                      args[1].apply(null, [error]);
                    }
                  });
                }
                return nativeMethod.apply(this, arguments);
              };
            });
            methods = ['setLocalDescription', 'setRemoteDescription', 'addIceCandidate'];
            methods.forEach(function (method) {
              var nativeMethod = RTCPeerConnection.prototype[method];
              RTCPeerConnection.prototype[method] = function () {
                var args = arguments;
                if (typeof args[1] === 'function' || typeof args[2] === 'function') {
                  // legacy
                  return nativeMethod.apply(this, arguments).then(function () {
                    if (typeof args[1] === 'function') {
                      args[1].apply(null);
                    }
                  }, function (error) {
                    if (typeof args[2] === 'function') {
                      args[2].apply(null, [error]);
                    }
                  });
                }
                return nativeMethod.apply(this, arguments);
              };
            });

            // getStats is special. It doesn't have a spec legacy method yet we support
            // getStats(something, cb) without error callbacks.
            ['getStats'].forEach(function (method) {
              var nativeMethod = RTCPeerConnection.prototype[method];
              RTCPeerConnection.prototype[method] = function () {
                var args = arguments;
                if (typeof args[1] === 'function') {
                  return nativeMethod.apply(this, arguments).then(function () {
                    if (typeof args[1] === 'function') {
                      args[1].apply(null);
                    }
                  });
                }
                return nativeMethod.apply(this, arguments);
              };
            });
            return RTCPeerConnection;
          };
        }, {
          "sdp": 17
        }],
        17: [function (require, module, exports) {

          // SDP helpers.
          var SDPUtils = {};

          // Generate an alphanumeric identifier for cname or mids.
          // TODO: use UUIDs instead? https://gist.github.com/jed/982883
          SDPUtils.generateIdentifier = function () {
            return Math.random().toString(36).substr(2, 10);
          };

          // The RTCP CNAME used by all peerconnections from the same JS.
          SDPUtils.localCName = SDPUtils.generateIdentifier();

          // Splits SDP into lines, dealing with both CRLF and LF.
          SDPUtils.splitLines = function (blob) {
            return blob.trim().split('\n').map(function (line) {
              return line.trim();
            });
          };
          // Splits SDP into sessionpart and mediasections. Ensures CRLF.
          SDPUtils.splitSections = function (blob) {
            var parts = blob.split('\nm=');
            return parts.map(function (part, index) {
              return (index > 0 ? 'm=' + part : part).trim() + '\r\n';
            });
          };

          // returns the session description.
          SDPUtils.getDescription = function (blob) {
            var sections = SDPUtils.splitSections(blob);
            return sections && sections[0];
          };

          // returns the individual media sections.
          SDPUtils.getMediaSections = function (blob) {
            var sections = SDPUtils.splitSections(blob);
            sections.shift();
            return sections;
          };

          // Returns lines that start with a certain prefix.
          SDPUtils.matchPrefix = function (blob, prefix) {
            return SDPUtils.splitLines(blob).filter(function (line) {
              return line.indexOf(prefix) === 0;
            });
          };

          // Parses an ICE candidate line. Sample input:
          // candidate:702786350 2 udp 41819902 8.8.8.8 60769 typ relay raddr 8.8.8.8
          // rport 55996"
          SDPUtils.parseCandidate = function (line) {
            var parts;
            // Parse both variants.
            if (line.indexOf('a=candidate:') === 0) {
              parts = line.substring(12).split(' ');
            } else {
              parts = line.substring(10).split(' ');
            }
            var candidate = {
              foundation: parts[0],
              component: parseInt(parts[1], 10),
              protocol: parts[2].toLowerCase(),
              priority: parseInt(parts[3], 10),
              ip: parts[4],
              address: parts[4],
              // address is an alias for ip.
              port: parseInt(parts[5], 10),
              // skip parts[6] == 'typ'
              type: parts[7]
            };
            for (var i = 8; i < parts.length; i += 2) {
              switch (parts[i]) {
                case 'raddr':
                  candidate.relatedAddress = parts[i + 1];
                  break;
                case 'rport':
                  candidate.relatedPort = parseInt(parts[i + 1], 10);
                  break;
                case 'tcptype':
                  candidate.tcpType = parts[i + 1];
                  break;
                case 'ufrag':
                  candidate.ufrag = parts[i + 1]; // for backward compability.
                  candidate.usernameFragment = parts[i + 1];
                  break;
                default:
                  // extension handling, in particular ufrag
                  candidate[parts[i]] = parts[i + 1];
                  break;
              }
            }
            return candidate;
          };

          // Translates a candidate object into SDP candidate attribute.
          SDPUtils.writeCandidate = function (candidate) {
            var sdp = [];
            sdp.push(candidate.foundation);
            sdp.push(candidate.component);
            sdp.push(candidate.protocol.toUpperCase());
            sdp.push(candidate.priority);
            sdp.push(candidate.address || candidate.ip);
            sdp.push(candidate.port);
            var type = candidate.type;
            sdp.push('typ');
            sdp.push(type);
            if (type !== 'host' && candidate.relatedAddress && candidate.relatedPort) {
              sdp.push('raddr');
              sdp.push(candidate.relatedAddress);
              sdp.push('rport');
              sdp.push(candidate.relatedPort);
            }
            if (candidate.tcpType && candidate.protocol.toLowerCase() === 'tcp') {
              sdp.push('tcptype');
              sdp.push(candidate.tcpType);
            }
            if (candidate.usernameFragment || candidate.ufrag) {
              sdp.push('ufrag');
              sdp.push(candidate.usernameFragment || candidate.ufrag);
            }
            return 'candidate:' + sdp.join(' ');
          };

          // Parses an ice-options line, returns an array of option tags.
          // a=ice-options:foo bar
          SDPUtils.parseIceOptions = function (line) {
            return line.substr(14).split(' ');
          };

          // Parses an rtpmap line, returns RTCRtpCoddecParameters. Sample input:
          // a=rtpmap:111 opus/48000/2
          SDPUtils.parseRtpMap = function (line) {
            var parts = line.substr(9).split(' ');
            var parsed = {
              payloadType: parseInt(parts.shift(), 10) // was: id
            };

            parts = parts[0].split('/');
            parsed.name = parts[0];
            parsed.clockRate = parseInt(parts[1], 10); // was: clockrate
            parsed.channels = parts.length === 3 ? parseInt(parts[2], 10) : 1;
            // legacy alias, got renamed back to channels in ORTC.
            parsed.numChannels = parsed.channels;
            return parsed;
          };

          // Generate an a=rtpmap line from RTCRtpCodecCapability or
          // RTCRtpCodecParameters.
          SDPUtils.writeRtpMap = function (codec) {
            var pt = codec.payloadType;
            if (codec.preferredPayloadType !== undefined) {
              pt = codec.preferredPayloadType;
            }
            var channels = codec.channels || codec.numChannels || 1;
            return 'a=rtpmap:' + pt + ' ' + codec.name + '/' + codec.clockRate + (channels !== 1 ? '/' + channels : '') + '\r\n';
          };

          // Parses an a=extmap line (headerextension from RFC 5285). Sample input:
          // a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
          // a=extmap:2/sendonly urn:ietf:params:rtp-hdrext:toffset
          SDPUtils.parseExtmap = function (line) {
            var parts = line.substr(9).split(' ');
            return {
              id: parseInt(parts[0], 10),
              direction: parts[0].indexOf('/') > 0 ? parts[0].split('/')[1] : 'sendrecv',
              uri: parts[1]
            };
          };

          // Generates a=extmap line from RTCRtpHeaderExtensionParameters or
          // RTCRtpHeaderExtension.
          SDPUtils.writeExtmap = function (headerExtension) {
            return 'a=extmap:' + (headerExtension.id || headerExtension.preferredId) + (headerExtension.direction && headerExtension.direction !== 'sendrecv' ? '/' + headerExtension.direction : '') + ' ' + headerExtension.uri + '\r\n';
          };

          // Parses an ftmp line, returns dictionary. Sample input:
          // a=fmtp:96 vbr=on;cng=on
          // Also deals with vbr=on; cng=on
          SDPUtils.parseFmtp = function (line) {
            var parsed = {};
            var kv;
            var parts = line.substr(line.indexOf(' ') + 1).split(';');
            for (var j = 0; j < parts.length; j++) {
              kv = parts[j].trim().split('=');
              parsed[kv[0].trim()] = kv[1];
            }
            return parsed;
          };

          // Generates an a=ftmp line from RTCRtpCodecCapability or RTCRtpCodecParameters.
          SDPUtils.writeFmtp = function (codec) {
            var line = '';
            var pt = codec.payloadType;
            if (codec.preferredPayloadType !== undefined) {
              pt = codec.preferredPayloadType;
            }
            if (codec.parameters && Object.keys(codec.parameters).length) {
              var params = [];
              Object.keys(codec.parameters).forEach(function (param) {
                if (codec.parameters[param]) {
                  params.push(param + '=' + codec.parameters[param]);
                } else {
                  params.push(param);
                }
              });
              line += 'a=fmtp:' + pt + ' ' + params.join(';') + '\r\n';
            }
            return line;
          };

          // Parses an rtcp-fb line, returns RTCPRtcpFeedback object. Sample input:
          // a=rtcp-fb:98 nack rpsi
          SDPUtils.parseRtcpFb = function (line) {
            var parts = line.substr(line.indexOf(' ') + 1).split(' ');
            return {
              type: parts.shift(),
              parameter: parts.join(' ')
            };
          };
          // Generate a=rtcp-fb lines from RTCRtpCodecCapability or RTCRtpCodecParameters.
          SDPUtils.writeRtcpFb = function (codec) {
            var lines = '';
            var pt = codec.payloadType;
            if (codec.preferredPayloadType !== undefined) {
              pt = codec.preferredPayloadType;
            }
            if (codec.rtcpFeedback && codec.rtcpFeedback.length) {
              // FIXME: special handling for trr-int?
              codec.rtcpFeedback.forEach(function (fb) {
                lines += 'a=rtcp-fb:' + pt + ' ' + fb.type + (fb.parameter && fb.parameter.length ? ' ' + fb.parameter : '') + '\r\n';
              });
            }
            return lines;
          };

          // Parses an RFC 5576 ssrc media attribute. Sample input:
          // a=ssrc:3735928559 cname:something
          SDPUtils.parseSsrcMedia = function (line) {
            var sp = line.indexOf(' ');
            var parts = {
              ssrc: parseInt(line.substr(7, sp - 7), 10)
            };
            var colon = line.indexOf(':', sp);
            if (colon > -1) {
              parts.attribute = line.substr(sp + 1, colon - sp - 1);
              parts.value = line.substr(colon + 1);
            } else {
              parts.attribute = line.substr(sp + 1);
            }
            return parts;
          };
          SDPUtils.parseSsrcGroup = function (line) {
            var parts = line.substr(13).split(' ');
            return {
              semantics: parts.shift(),
              ssrcs: parts.map(function (ssrc) {
                return parseInt(ssrc, 10);
              })
            };
          };

          // Extracts the MID (RFC 5888) from a media section.
          // returns the MID or undefined if no mid line was found.
          SDPUtils.getMid = function (mediaSection) {
            var mid = SDPUtils.matchPrefix(mediaSection, 'a=mid:')[0];
            if (mid) {
              return mid.substr(6);
            }
          };
          SDPUtils.parseFingerprint = function (line) {
            var parts = line.substr(14).split(' ');
            return {
              algorithm: parts[0].toLowerCase(),
              // algorithm is case-sensitive in Edge.
              value: parts[1]
            };
          };

          // Extracts DTLS parameters from SDP media section or sessionpart.
          // FIXME: for consistency with other functions this should only
          //   get the fingerprint line as input. See also getIceParameters.
          SDPUtils.getDtlsParameters = function (mediaSection, sessionpart) {
            var lines = SDPUtils.matchPrefix(mediaSection + sessionpart, 'a=fingerprint:');
            // Note: a=setup line is ignored since we use the 'auto' role.
            // Note2: 'algorithm' is not case sensitive except in Edge.
            return {
              role: 'auto',
              fingerprints: lines.map(SDPUtils.parseFingerprint)
            };
          };

          // Serializes DTLS parameters to SDP.
          SDPUtils.writeDtlsParameters = function (params, setupType) {
            var sdp = 'a=setup:' + setupType + '\r\n';
            params.fingerprints.forEach(function (fp) {
              sdp += 'a=fingerprint:' + fp.algorithm + ' ' + fp.value + '\r\n';
            });
            return sdp;
          };
          // Parses ICE information from SDP media section or sessionpart.
          // FIXME: for consistency with other functions this should only
          //   get the ice-ufrag and ice-pwd lines as input.
          SDPUtils.getIceParameters = function (mediaSection, sessionpart) {
            var lines = SDPUtils.splitLines(mediaSection);
            // Search in session part, too.
            lines = lines.concat(SDPUtils.splitLines(sessionpart));
            var iceParameters = {
              usernameFragment: lines.filter(function (line) {
                return line.indexOf('a=ice-ufrag:') === 0;
              })[0].substr(12),
              password: lines.filter(function (line) {
                return line.indexOf('a=ice-pwd:') === 0;
              })[0].substr(10)
            };
            return iceParameters;
          };

          // Serializes ICE parameters to SDP.
          SDPUtils.writeIceParameters = function (params) {
            return 'a=ice-ufrag:' + params.usernameFragment + '\r\n' + 'a=ice-pwd:' + params.password + '\r\n';
          };

          // Parses the SDP media section and returns RTCRtpParameters.
          SDPUtils.parseRtpParameters = function (mediaSection) {
            var description = {
              codecs: [],
              headerExtensions: [],
              fecMechanisms: [],
              rtcp: []
            };
            var lines = SDPUtils.splitLines(mediaSection);
            var mline = lines[0].split(' ');
            for (var i = 3; i < mline.length; i++) {
              // find all codecs from mline[3..]
              var pt = mline[i];
              var rtpmapline = SDPUtils.matchPrefix(mediaSection, 'a=rtpmap:' + pt + ' ')[0];
              if (rtpmapline) {
                var codec = SDPUtils.parseRtpMap(rtpmapline);
                var fmtps = SDPUtils.matchPrefix(mediaSection, 'a=fmtp:' + pt + ' ');
                // Only the first a=fmtp:<pt> is considered.
                codec.parameters = fmtps.length ? SDPUtils.parseFmtp(fmtps[0]) : {};
                codec.rtcpFeedback = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-fb:' + pt + ' ').map(SDPUtils.parseRtcpFb);
                description.codecs.push(codec);
                // parse FEC mechanisms from rtpmap lines.
                switch (codec.name.toUpperCase()) {
                  case 'RED':
                  case 'ULPFEC':
                    description.fecMechanisms.push(codec.name.toUpperCase());
                    break;
                }
              }
            }
            SDPUtils.matchPrefix(mediaSection, 'a=extmap:').forEach(function (line) {
              description.headerExtensions.push(SDPUtils.parseExtmap(line));
            });
            // FIXME: parse rtcp.
            return description;
          };

          // Generates parts of the SDP media section describing the capabilities /
          // parameters.
          SDPUtils.writeRtpDescription = function (kind, caps) {
            var sdp = '';

            // Build the mline.
            sdp += 'm=' + kind + ' ';
            sdp += caps.codecs.length > 0 ? '9' : '0'; // reject if no codecs.
            sdp += ' UDP/TLS/RTP/SAVPF ';
            sdp += caps.codecs.map(function (codec) {
              if (codec.preferredPayloadType !== undefined) {
                return codec.preferredPayloadType;
              }
              return codec.payloadType;
            }).join(' ') + '\r\n';
            sdp += 'c=IN IP4 0.0.0.0\r\n';
            sdp += 'a=rtcp:9 IN IP4 0.0.0.0\r\n';

            // Add a=rtpmap lines for each codec. Also fmtp and rtcp-fb.
            caps.codecs.forEach(function (codec) {
              sdp += SDPUtils.writeRtpMap(codec);
              sdp += SDPUtils.writeFmtp(codec);
              sdp += SDPUtils.writeRtcpFb(codec);
            });
            var maxptime = 0;
            caps.codecs.forEach(function (codec) {
              if (codec.maxptime > maxptime) {
                maxptime = codec.maxptime;
              }
            });
            if (maxptime > 0) {
              sdp += 'a=maxptime:' + maxptime + '\r\n';
            }
            sdp += 'a=rtcp-mux\r\n';
            if (caps.headerExtensions) {
              caps.headerExtensions.forEach(function (extension) {
                sdp += SDPUtils.writeExtmap(extension);
              });
            }
            // FIXME: write fecMechanisms.
            return sdp;
          };

          // Parses the SDP media section and returns an array of
          // RTCRtpEncodingParameters.
          SDPUtils.parseRtpEncodingParameters = function (mediaSection) {
            var encodingParameters = [];
            var description = SDPUtils.parseRtpParameters(mediaSection);
            var hasRed = description.fecMechanisms.indexOf('RED') !== -1;
            var hasUlpfec = description.fecMechanisms.indexOf('ULPFEC') !== -1;

            // filter a=ssrc:... cname:, ignore PlanB-msid
            var ssrcs = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
              return SDPUtils.parseSsrcMedia(line);
            }).filter(function (parts) {
              return parts.attribute === 'cname';
            });
            var primarySsrc = ssrcs.length > 0 && ssrcs[0].ssrc;
            var secondarySsrc;
            var flows = SDPUtils.matchPrefix(mediaSection, 'a=ssrc-group:FID').map(function (line) {
              var parts = line.substr(17).split(' ');
              return parts.map(function (part) {
                return parseInt(part, 10);
              });
            });
            if (flows.length > 0 && flows[0].length > 1 && flows[0][0] === primarySsrc) {
              secondarySsrc = flows[0][1];
            }
            description.codecs.forEach(function (codec) {
              if (codec.name.toUpperCase() === 'RTX' && codec.parameters.apt) {
                var encParam = {
                  ssrc: primarySsrc,
                  codecPayloadType: parseInt(codec.parameters.apt, 10)
                };
                if (primarySsrc && secondarySsrc) {
                  encParam.rtx = {
                    ssrc: secondarySsrc
                  };
                }
                encodingParameters.push(encParam);
                if (hasRed) {
                  encParam = JSON.parse(JSON.stringify(encParam));
                  encParam.fec = {
                    ssrc: primarySsrc,
                    mechanism: hasUlpfec ? 'red+ulpfec' : 'red'
                  };
                  encodingParameters.push(encParam);
                }
              }
            });
            if (encodingParameters.length === 0 && primarySsrc) {
              encodingParameters.push({
                ssrc: primarySsrc
              });
            }

            // we support both b=AS and b=TIAS but interpret AS as TIAS.
            var bandwidth = SDPUtils.matchPrefix(mediaSection, 'b=');
            if (bandwidth.length) {
              if (bandwidth[0].indexOf('b=TIAS:') === 0) {
                bandwidth = parseInt(bandwidth[0].substr(7), 10);
              } else if (bandwidth[0].indexOf('b=AS:') === 0) {
                // use formula from JSEP to convert b=AS to TIAS value.
                bandwidth = parseInt(bandwidth[0].substr(5), 10) * 1000 * 0.95 - 50 * 40 * 8;
              } else {
                bandwidth = undefined;
              }
              encodingParameters.forEach(function (params) {
                params.maxBitrate = bandwidth;
              });
            }
            return encodingParameters;
          };

          // parses http://draft.ortc.org/#rtcrtcpparameters*
          SDPUtils.parseRtcpParameters = function (mediaSection) {
            var rtcpParameters = {};

            // Gets the first SSRC. Note tha with RTX there might be multiple
            // SSRCs.
            var remoteSsrc = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
              return SDPUtils.parseSsrcMedia(line);
            }).filter(function (obj) {
              return obj.attribute === 'cname';
            })[0];
            if (remoteSsrc) {
              rtcpParameters.cname = remoteSsrc.value;
              rtcpParameters.ssrc = remoteSsrc.ssrc;
            }

            // Edge uses the compound attribute instead of reducedSize
            // compound is !reducedSize
            var rsize = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-rsize');
            rtcpParameters.reducedSize = rsize.length > 0;
            rtcpParameters.compound = rsize.length === 0;

            // parses the rtcp-mux attrіbute.
            // Note that Edge does not support unmuxed RTCP.
            var mux = SDPUtils.matchPrefix(mediaSection, 'a=rtcp-mux');
            rtcpParameters.mux = mux.length > 0;
            return rtcpParameters;
          };

          // parses either a=msid: or a=ssrc:... msid lines and returns
          // the id of the MediaStream and MediaStreamTrack.
          SDPUtils.parseMsid = function (mediaSection) {
            var parts;
            var spec = SDPUtils.matchPrefix(mediaSection, 'a=msid:');
            if (spec.length === 1) {
              parts = spec[0].substr(7).split(' ');
              return {
                stream: parts[0],
                track: parts[1]
              };
            }
            var planB = SDPUtils.matchPrefix(mediaSection, 'a=ssrc:').map(function (line) {
              return SDPUtils.parseSsrcMedia(line);
            }).filter(function (msidParts) {
              return msidParts.attribute === 'msid';
            });
            if (planB.length > 0) {
              parts = planB[0].value.split(' ');
              return {
                stream: parts[0],
                track: parts[1]
              };
            }
          };

          // SCTP
          // parses draft-ietf-mmusic-sctp-sdp-26 first and falls back
          // to draft-ietf-mmusic-sctp-sdp-05
          SDPUtils.parseSctpDescription = function (mediaSection) {
            var mline = SDPUtils.parseMLine(mediaSection);
            var maxSizeLine = SDPUtils.matchPrefix(mediaSection, 'a=max-message-size:');
            var maxMessageSize;
            if (maxSizeLine.length > 0) {
              maxMessageSize = parseInt(maxSizeLine[0].substr(19), 10);
            }
            if (isNaN(maxMessageSize)) {
              maxMessageSize = 65536;
            }
            var sctpPort = SDPUtils.matchPrefix(mediaSection, 'a=sctp-port:');
            if (sctpPort.length > 0) {
              return {
                port: parseInt(sctpPort[0].substr(12), 10),
                protocol: mline.fmt,
                maxMessageSize: maxMessageSize
              };
            }
            var sctpMapLines = SDPUtils.matchPrefix(mediaSection, 'a=sctpmap:');
            if (sctpMapLines.length > 0) {
              var parts = SDPUtils.matchPrefix(mediaSection, 'a=sctpmap:')[0].substr(10).split(' ');
              return {
                port: parseInt(parts[0], 10),
                protocol: parts[1],
                maxMessageSize: maxMessageSize
              };
            }
          };

          // SCTP
          // outputs the draft-ietf-mmusic-sctp-sdp-26 version that all browsers
          // support by now receiving in this format, unless we originally parsed
          // as the draft-ietf-mmusic-sctp-sdp-05 format (indicated by the m-line
          // protocol of DTLS/SCTP -- without UDP/ or TCP/)
          SDPUtils.writeSctpDescription = function (media, sctp) {
            var output = [];
            if (media.protocol !== 'DTLS/SCTP') {
              output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.protocol + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctp-port:' + sctp.port + '\r\n'];
            } else {
              output = ['m=' + media.kind + ' 9 ' + media.protocol + ' ' + sctp.port + '\r\n', 'c=IN IP4 0.0.0.0\r\n', 'a=sctpmap:' + sctp.port + ' ' + sctp.protocol + ' 65535\r\n'];
            }
            if (sctp.maxMessageSize !== undefined) {
              output.push('a=max-message-size:' + sctp.maxMessageSize + '\r\n');
            }
            return output.join('');
          };

          // Generate a session ID for SDP.
          // https://tools.ietf.org/html/draft-ietf-rtcweb-jsep-20#section-5.2.1
          // recommends using a cryptographically random +ve 64-bit value
          // but right now this should be acceptable and within the right range
          SDPUtils.generateSessionId = function () {
            return Math.random().toString().substr(2, 21);
          };

          // Write boilder plate for start of SDP
          // sessId argument is optional - if not supplied it will
          // be generated randomly
          // sessVersion is optional and defaults to 2
          // sessUser is optional and defaults to 'thisisadapterortc'
          SDPUtils.writeSessionBoilerplate = function (sessId, sessVer, sessUser) {
            var sessionId;
            var version = sessVer !== undefined ? sessVer : 2;
            if (sessId) {
              sessionId = sessId;
            } else {
              sessionId = SDPUtils.generateSessionId();
            }
            var user = sessUser || 'thisisadapterortc';
            // FIXME: sess-id should be an NTP timestamp.
            return 'v=0\r\n' + 'o=' + user + ' ' + sessionId + ' ' + version + ' IN IP4 127.0.0.1\r\n' + 's=-\r\n' + 't=0 0\r\n';
          };
          SDPUtils.writeMediaSection = function (transceiver, caps, type, stream) {
            var sdp = SDPUtils.writeRtpDescription(transceiver.kind, caps);

            // Map ICE parameters (ufrag, pwd) to SDP.
            sdp += SDPUtils.writeIceParameters(transceiver.iceGatherer.getLocalParameters());

            // Map DTLS parameters to SDP.
            sdp += SDPUtils.writeDtlsParameters(transceiver.dtlsTransport.getLocalParameters(), type === 'offer' ? 'actpass' : 'active');
            sdp += 'a=mid:' + transceiver.mid + '\r\n';
            if (transceiver.direction) {
              sdp += 'a=' + transceiver.direction + '\r\n';
            } else if (transceiver.rtpSender && transceiver.rtpReceiver) {
              sdp += 'a=sendrecv\r\n';
            } else if (transceiver.rtpSender) {
              sdp += 'a=sendonly\r\n';
            } else if (transceiver.rtpReceiver) {
              sdp += 'a=recvonly\r\n';
            } else {
              sdp += 'a=inactive\r\n';
            }
            if (transceiver.rtpSender) {
              // spec.
              var msid = 'msid:' + stream.id + ' ' + transceiver.rtpSender.track.id + '\r\n';
              sdp += 'a=' + msid;

              // for Chrome.
              sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc + ' ' + msid;
              if (transceiver.sendEncodingParameters[0].rtx) {
                sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc + ' ' + msid;
                sdp += 'a=ssrc-group:FID ' + transceiver.sendEncodingParameters[0].ssrc + ' ' + transceiver.sendEncodingParameters[0].rtx.ssrc + '\r\n';
              }
            }
            // FIXME: this should be written by writeRtpDescription.
            sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].ssrc + ' cname:' + SDPUtils.localCName + '\r\n';
            if (transceiver.rtpSender && transceiver.sendEncodingParameters[0].rtx) {
              sdp += 'a=ssrc:' + transceiver.sendEncodingParameters[0].rtx.ssrc + ' cname:' + SDPUtils.localCName + '\r\n';
            }
            return sdp;
          };

          // Gets the direction from the mediaSection or the sessionpart.
          SDPUtils.getDirection = function (mediaSection, sessionpart) {
            // Look for sendrecv, sendonly, recvonly, inactive, default to sendrecv.
            var lines = SDPUtils.splitLines(mediaSection);
            for (var i = 0; i < lines.length; i++) {
              switch (lines[i]) {
                case 'a=sendrecv':
                case 'a=sendonly':
                case 'a=recvonly':
                case 'a=inactive':
                  return lines[i].substr(2);
                // FIXME: What should happen here?
              }
            }

            if (sessionpart) {
              return SDPUtils.getDirection(sessionpart);
            }
            return 'sendrecv';
          };
          SDPUtils.getKind = function (mediaSection) {
            var lines = SDPUtils.splitLines(mediaSection);
            var mline = lines[0].split(' ');
            return mline[0].substr(2);
          };
          SDPUtils.isRejected = function (mediaSection) {
            return mediaSection.split(' ', 2)[1] === '0';
          };
          SDPUtils.parseMLine = function (mediaSection) {
            var lines = SDPUtils.splitLines(mediaSection);
            var parts = lines[0].substr(2).split(' ');
            return {
              kind: parts[0],
              port: parseInt(parts[1], 10),
              protocol: parts[2],
              fmt: parts.slice(3).join(' ')
            };
          };
          SDPUtils.parseOLine = function (mediaSection) {
            var line = SDPUtils.matchPrefix(mediaSection, 'o=')[0];
            var parts = line.substr(2).split(' ');
            return {
              username: parts[0],
              sessionId: parts[1],
              sessionVersion: parseInt(parts[2], 10),
              netType: parts[3],
              addressType: parts[4],
              address: parts[5]
            };
          };

          // a very naive interpretation of a valid SDP.
          SDPUtils.isValidSDP = function (blob) {
            if (typeof blob !== 'string' || blob.length === 0) {
              return false;
            }
            var lines = SDPUtils.splitLines(blob);
            for (var i = 0; i < lines.length; i++) {
              if (lines[i].length < 2 || lines[i].charAt(1) !== '=') {
                return false;
              }
              // TODO: check the modifier a bit more.
            }

            return true;
          };

          // Expose public methods.
          if (_typeof(module) === 'object') {
            module.exports = SDPUtils;
          }
        }, {}]
      }, {}, [1])(1);
    });
  })(adapeter);

  /*
  	The MIT License (MIT)

  	Copyright (c) 2016 Meetecho

  	Permission is hereby granted, free of charge, to any person obtaining
  	a copy of this software and associated documentation files (the "Software"),
  	to deal in the Software without restriction, including without limitation
  	the rights to use, copy, modify, merge, publish, distribute, sublicense,
  	and/or sell copies of the Software, and to permit persons to whom the
  	Software is furnished to do so, subject to the following conditions:

  	The above copyright notice and this permission notice shall be included
  	in all copies or substantial portions of the Software.

  	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  	OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  	THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  	ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  	OTHER DEALINGS IN THE SOFTWARE.
   */

  // List of sessions
  Janus$3.sessions = {};
  Janus$3.isExtensionEnabled = function () {
    if (navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia) {
      // No need for the extension, getDisplayMedia is supported
      return true;
    }
    if (window.navigator.userAgent.match('Chrome')) {
      var chromever = parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1], 10);
      var maxver = 33;
      if (window.navigator.userAgent.match('Linux')) maxver = 35; // "known" crash in chrome 34 and 35 on linux
      if (chromever >= 26 && chromever <= maxver) {
        // Older versions of Chrome don't support this extension-based approach, so lie
        return true;
      }
      return Janus$3.extension.isInstalled();
    } else {
      // Firefox of others, no need for the extension (but this doesn't mean it will work)
      return true;
    }
  };
  var defaultExtension$1 = {
    // Screensharing Chrome Extension ID
    extensionId: 'hapfgfdkleiggjjpfpenajgdnfckjpaj',
    isInstalled: function isInstalled() {
      return document.querySelector('#janus-extension-installed') !== null;
    },
    getScreen: function getScreen(callback) {
      var pending = window.setTimeout(function () {
        var error = new Error('NavigatorUserMediaError');
        error.name = 'The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)';
        return callback(error);
      }, 1000);
      this.cache[pending] = callback;
      window.postMessage({
        type: 'janusGetScreen',
        id: pending
      }, '*');
    },
    init: function init() {
      var cache = {};
      this.cache = cache;
      // Wait for events from the Chrome Extension
      window.addEventListener('message', function (event) {
        if (event.origin != window.location.origin) return;
        if (event.data.type == 'janusGotScreen' && cache[event.data.id]) {
          var callback = cache[event.data.id];
          delete cache[event.data.id];
          if (event.data.sourceId === '') {
            // user canceled
            var error = new Error('NavigatorUserMediaError');
            error.name = 'You cancelled the request for permission, giving up...';
            callback(error);
          } else {
            callback(null, event.data.sourceId);
          }
        } else if (event.data.type == 'janusGetScreenPending') {
          console.log('clearing ', event.data.id);
          window.clearTimeout(event.data.id);
        }
      });
    }
  };
  Janus$3.useDefaultDependencies = function (deps) {
    var f = deps && deps.fetch || fetch;
    var p = deps && deps.Promise || Promise;
    var socketCls = deps && deps.WebSocket || WebSocket;
    return {
      newWebSocket: function newWebSocket(server, proto) {
        return new socketCls(server, proto);
      },
      extension: deps && deps.extension || defaultExtension$1,
      isArray: function isArray(arr) {
        return Array.isArray(arr);
      },
      webRTCAdapter: deps && deps.adapter || window.adapter,
      httpAPICall: function httpAPICall(url, options) {
        var fetchOptions = {
          method: options.verb,
          headers: {
            'Accept': 'application/json, text/plain, */*'
          },
          cache: 'no-cache'
        };
        if (options.verb === "POST") {
          fetchOptions.headers['Content-Type'] = 'application/json';
        }
        if (options.withCredentials !== undefined) {
          fetchOptions.credentials = options.withCredentials === true ? 'include' : options.withCredentials ? options.withCredentials : 'omit';
        }
        if (options.body !== undefined) {
          fetchOptions.body = JSON.stringify(options.body);
        }
        var fetching = f(url, fetchOptions)["catch"](function (error) {
          return p.reject({
            message: 'Probably a network error, is the server down?',
            error: error
          });
        });

        /*
         * fetch() does not natively support timeouts.
         * Work around this by starting a timeout manually, and racing it agains the fetch() to see which thing resolves first.
         */

        if (options.timeout !== undefined) {
          var timeout = new p(function (resolve, reject) {
            var timerId = setTimeout(function () {
              clearTimeout(timerId);
              return reject({
                message: 'Request timed out',
                timeout: options.timeout
              });
            }, options.timeout);
          });
          fetching = p.race([fetching, timeout]);
        }
        fetching.then(function (response) {
          if (response.ok) {
            if (_typeof(options.success) === _typeof(Janus$3.noop)) {
              return response.json().then(function (parsed) {
                options.success(parsed);
              })["catch"](function (error) {
                return p.reject({
                  message: 'Failed to parse response body',
                  error: error,
                  response: response
                });
              });
            }
          } else {
            return p.reject({
              message: 'API call failed',
              response: response
            });
          }
        })["catch"](function (error) {
          if (_typeof(options.error) === _typeof(Janus$3.noop)) {
            options.error(error.message || '<< internal error >>', error);
          }
        });
        return fetching;
      }
    };
  };
  Janus$3.useOldDependencies = function (deps) {
    var jq = deps && deps.jQuery || jQuery;
    var socketCls = deps && deps.WebSocket || WebSocket;
    return {
      newWebSocket: function newWebSocket(server, proto) {
        return new socketCls(server, proto);
      },
      isArray: function isArray(arr) {
        return jq.isArray(arr);
      },
      extension: deps && deps.extension || defaultExtension$1,
      webRTCAdapter: deps && deps.adapter || adapter,
      httpAPICall: function httpAPICall(url, options) {
        var payload = options.body !== undefined ? {
          contentType: 'application/json',
          data: JSON.stringify(options.body)
        } : {};
        var credentials = options.withCredentials !== undefined ? {
          xhrFields: {
            withCredentials: options.withCredentials
          }
        } : {};
        return jq.ajax(jq.extend(payload, credentials, {
          url: url,
          type: options.verb,
          cache: false,
          dataType: 'json',
          async: options.async,
          timeout: options.timeout,
          success: function success(result) {
            if (_typeof(options.success) === _typeof(Janus$3.noop)) {
              options.success(result);
            }
          },
          error: function error(xhr, status, err) {
            if (_typeof(options.error) === _typeof(Janus$3.noop)) {
              options.error(status, err);
            }
          }
        }));
      }
    };
  };
  Janus$3.noop = function () {};
  Janus$3.dataChanDefaultLabel = "JanusDataChannel";

  // Note: in the future we may want to change this, e.g., as was
  // attempted in https://github.com/meetecho/janus-gateway/issues/1670
  Janus$3.endOfCandidates = null;

  // Initialization
  Janus$3.init = function (options) {
    options = options || {};
    options.callback = typeof options.callback == "function" ? options.callback : Janus$3.noop;
    if (Janus$3.initDone === true) {
      // Already initialized
      options.callback();
    } else {
      if (typeof console == "undefined" || typeof console.log == "undefined") console = {
        log: function log() {}
      };
      // Console logging (all debugging disabled by default)
      Janus$3.trace = Janus$3.noop;
      Janus$3.debug = Janus$3.noop;
      Janus$3.vdebug = Janus$3.noop;
      Janus$3.log = Janus$3.noop;
      Janus$3.warn = Janus$3.noop;
      Janus$3.error = Janus$3.noop;
      if (options.debug === true || options.debug === "all") {
        // Enable all debugging levels
        Janus$3.trace = console.trace.bind(console);
        Janus$3.debug = console.debug.bind(console);
        Janus$3.vdebug = console.debug.bind(console);
        Janus$3.log = console.log.bind(console);
        Janus$3.warn = console.warn.bind(console);
        Janus$3.error = console.error.bind(console);
      } else if (Array.isArray(options.debug)) {
        for (var i in options.debug) {
          var d = options.debug[i];
          switch (d) {
            case "trace":
              Janus$3.trace = console.trace.bind(console);
              break;
            case "debug":
              Janus$3.debug = console.debug.bind(console);
              break;
            case "vdebug":
              Janus$3.vdebug = console.debug.bind(console);
              break;
            case "log":
              Janus$3.log = console.log.bind(console);
              break;
            case "warn":
              Janus$3.warn = console.warn.bind(console);
              break;
            case "error":
              Janus$3.error = console.error.bind(console);
              break;
            default:
              console.error("Unknown debugging option '" + d + "' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");
              break;
          }
        }
      }
      Janus$3.log("Initializing library");
      var usedDependencies = options.dependencies || Janus$3.useDefaultDependencies();
      Janus$3.isArray = usedDependencies.isArray;
      Janus$3.webRTCAdapter = usedDependencies.webRTCAdapter;
      Janus$3.httpAPICall = usedDependencies.httpAPICall;
      Janus$3.newWebSocket = usedDependencies.newWebSocket;
      Janus$3.extension = usedDependencies.extension;
      Janus$3.extension.init();

      // Helper method to enumerate devices
      Janus$3.listDevices = function (callback, config) {
        callback = typeof callback == "function" ? callback : Janus$3.noop;
        if (config == null) config = {
          audio: true,
          video: true
        };
        if (Janus$3.isGetUserMediaAvailable()) {
          navigator.mediaDevices.getUserMedia(config).then(function (stream) {
            navigator.mediaDevices.enumerateDevices().then(function (devices) {
              Janus$3.debug(devices);
              callback(devices);
              // Get rid of the now useless stream
              try {
                var tracks = stream.getTracks();
                for (var i in tracks) {
                  var mst = tracks[i];
                  if (mst !== null && mst !== undefined) mst.stop();
                }
              } catch (e) {}
            });
          })["catch"](function (err) {
            Janus$3.error(err);
            callback([]);
          });
        } else {
          Janus$3.warn("navigator.mediaDevices unavailable");
          callback([]);
        }
      };
      // Helper methods to attach/reattach a stream to a video element (previously part of adapter.js)
      Janus$3.attachMediaStream = function (element, stream) {
        if (Janus$3.webRTCAdapter.browserDetails.browser === 'chrome') {
          var chromever = Janus$3.webRTCAdapter.browserDetails.version;
          // if(chromever >= 52) {
          // 	element.srcObject = stream;
          // } else if(typeof element.src !== 'undefined') {
          // 	element.src = URL.createObjectURL(stream);
          // } else {
          // 	Janus.error("Error attaching stream to element");
          // }
          if (chromever >= 52) {
            element.srcObject = stream;
          } else {
            Janus$3.error("Error attaching stream to element");
          }
        } else {
          element.srcObject = stream;
        }
      };
      Janus$3.reattachMediaStream = function (to, from) {
        if (Janus$3.webRTCAdapter.browserDetails.browser === 'chrome') {
          var chromever = Janus$3.webRTCAdapter.browserDetails.version;
          if (chromever >= 52) {
            to.srcObject = from.srcObject;
          } else if (typeof to.src !== 'undefined') {
            to.src = from.src;
          } else {
            Janus$3.error("Error reattaching stream to element");
          }
        } else {
          to.srcObject = from.srcObject;
        }
      };
      // Detect tab close: make sure we don't loose existing onbeforeunload handlers
      // (note: for iOS we need to subscribe to a different event, 'pagehide', see
      // https://gist.github.com/thehunmonkgroup/6bee8941a49b86be31a787fe8f4b8cfe)
      var iOS = ['iPad', 'iPhone', 'iPod'].indexOf(navigator.platform) >= 0;
      var eventName = iOS ? 'pagehide' : 'beforeunload';
      var oldOBF = window["on" + eventName];
      window.addEventListener(eventName, function (event) {
        Janus$3.log("Closing window");
        for (var s in Janus$3.sessions) {
          if (Janus$3.sessions[s] !== null && Janus$3.sessions[s] !== undefined && Janus$3.sessions[s].destroyOnUnload) {
            Janus$3.log("Destroying session " + s);
            Janus$3.sessions[s].destroy({
              asyncRequest: false,
              notifyDestroyed: false
            });
          }
        }
        if (oldOBF && typeof oldOBF == "function") oldOBF();
      });
      // If this is a Safari Technology Preview, check if VP8 is supported
      Janus$3.safariVp8 = false;
      if (Janus$3.webRTCAdapter.browserDetails.browser === 'safari' && Janus$3.webRTCAdapter.browserDetails.version >= 605) {
        // Let's see if RTCRtpSender.getCapabilities() is there
        if (RTCRtpSender && RTCRtpSender.getCapabilities && RTCRtpSender.getCapabilities("video") && RTCRtpSender.getCapabilities("video").codecs && RTCRtpSender.getCapabilities("video").codecs.length) {
          for (var i in RTCRtpSender.getCapabilities("video").codecs) {
            var codec = RTCRtpSender.getCapabilities("video").codecs[i];
            if (codec && codec.mimeType && codec.mimeType.toLowerCase() === "video/vp8") {
              Janus$3.safariVp8 = true;
              break;
            }
          }
          if (Janus$3.safariVp8) {
            Janus$3.log("This version of Safari supports VP8");
          } else {
            Janus$3.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, " + "try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu");
          }
        } else {
          // We do it in a very ugly way, as there's no alternative...
          // We create a PeerConnection to see if VP8 is in an offer
          var testpc = new RTCPeerConnection({}, {});
          testpc.createOffer({
            offerToReceiveVideo: true
          }).then(function (offer) {
            Janus$3.safariVp8 = offer.sdp.indexOf("VP8") !== -1;
            if (Janus$3.safariVp8) {
              Janus$3.log("This version of Safari supports VP8");
            } else {
              Janus$3.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, " + "try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu");
            }
            testpc.close();
            testpc = null;
          });
        }
      }
      // Check if this browser supports Unified Plan and transceivers
      // Based on https://codepen.io/anon/pen/ZqLwWV?editors=0010
      Janus$3.unifiedPlan = false;
      if (Janus$3.webRTCAdapter.browserDetails.browser === 'firefox' && Janus$3.webRTCAdapter.browserDetails.version >= 59) {
        // Firefox definitely does, starting from version 59
        Janus$3.unifiedPlan = true;
      } else if (Janus$3.webRTCAdapter.browserDetails.browser === 'chrome' && Janus$3.webRTCAdapter.browserDetails.version < 72) {
        // Chrome does, but it's only usable from version 72 on
        Janus$3.unifiedPlan = false;
      } else if (typeof RTCRtpTransceiver !== 'undefined' && !('currentDirection' in RTCRtpTransceiver.prototype)) {
        // Safari supports addTransceiver() but not Unified Plan when
        // currentDirection is not defined (see codepen above)
        Janus$3.unifiedPlan = false;
      } else {
        // Check if addTransceiver() throws an exception
        var tempPc = new RTCPeerConnection();
        try {
          tempPc.addTransceiver('audio');
          Janus$3.unifiedPlan = true;
        } catch (e) {}
        tempPc.close();
      }
      Janus$3.initDone = true;
      options.callback();
    }
  };

  // Helper method to check whether WebRTC is supported by this browser
  Janus$3.isWebrtcSupported = function () {
    return window.RTCPeerConnection !== undefined && window.RTCPeerConnection !== null;
  };
  // Helper method to check whether devices can be accessed by this browser (e.g., not possible via plain HTTP)
  Janus$3.isGetUserMediaAvailable = function () {
    return navigator.mediaDevices !== undefined && navigator.mediaDevices !== null && navigator.mediaDevices.getUserMedia !== undefined && navigator.mediaDevices.getUserMedia !== null;
  };

  // Helper method to create random identifiers (e.g., transaction)
  Janus$3.randomString = function (len) {
    var charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    var randomString = '';
    for (var i = 0; i < len; i++) {
      var randomPoz = Math.floor(Math.random() * charSet.length);
      randomString += charSet.substring(randomPoz, randomPoz + 1);
    }
    return randomString;
  };
  function Janus$3(gatewayCallbacks) {
    if (Janus$3.initDone === undefined) {
      gatewayCallbacks.error("Library not initialized");
      return {};
    }
    if (!Janus$3.isWebrtcSupported()) {
      gatewayCallbacks.error("WebRTC not supported by this browser");
      return {};
    }
    Janus$3.log("Library initialized: " + Janus$3.initDone);
    gatewayCallbacks = gatewayCallbacks || {};
    gatewayCallbacks.success = typeof gatewayCallbacks.success == "function" ? gatewayCallbacks.success : Janus$3.noop;
    gatewayCallbacks.error = typeof gatewayCallbacks.error == "function" ? gatewayCallbacks.error : Janus$3.noop;
    gatewayCallbacks.destroyed = typeof gatewayCallbacks.destroyed == "function" ? gatewayCallbacks.destroyed : Janus$3.noop;
    if (gatewayCallbacks.server === null || gatewayCallbacks.server === undefined) {
      gatewayCallbacks.error("Invalid server url");
      return {};
    }
    var websockets = false;
    var ws = null;
    var wsHandlers = {};
    var wsKeepaliveTimeoutId = null;
    var servers = null,
      serversIndex = 0;
    var server = gatewayCallbacks.server;
    if (Janus$3.isArray(server)) {
      Janus$3.log("Multiple servers provided (" + server.length + "), will use the first that works");
      server = null;
      servers = gatewayCallbacks.server;
      Janus$3.debug(servers);
    } else {
      if (server.indexOf("ws") === 0) {
        websockets = true;
        Janus$3.log("Using WebSockets to contact Janus: " + server);
      } else {
        websockets = false;
        Janus$3.log("Using REST API to contact Janus: " + server);
      }
    }
    var iceServers = gatewayCallbacks.iceServers;
    if (iceServers === undefined || iceServers === null) iceServers = [{
      urls: "stun:stun.l.google.com:19302"
    }];
    var iceTransportPolicy = gatewayCallbacks.iceTransportPolicy;
    var bundlePolicy = gatewayCallbacks.bundlePolicy;
    // Whether IPv6 candidates should be gathered
    var ipv6Support = gatewayCallbacks.ipv6;
    if (ipv6Support === undefined || ipv6Support === null) ipv6Support = false;
    // Whether we should enable the withCredentials flag for XHR requests
    var withCredentials = false;
    if (gatewayCallbacks.withCredentials !== undefined && gatewayCallbacks.withCredentials !== null) withCredentials = gatewayCallbacks.withCredentials === true;
    // Optional max events
    var maxev = 10;
    if (gatewayCallbacks.max_poll_events !== undefined && gatewayCallbacks.max_poll_events !== null) maxev = gatewayCallbacks.max_poll_events;
    if (maxev < 1) maxev = 1;
    // Token to use (only if the token based authentication mechanism is enabled)
    var token = null;
    if (gatewayCallbacks.token !== undefined && gatewayCallbacks.token !== null) token = gatewayCallbacks.token;
    // API secret to use (only if the shared API secret is enabled)
    var apisecret = null;
    if (gatewayCallbacks.apisecret !== undefined && gatewayCallbacks.apisecret !== null) apisecret = gatewayCallbacks.apisecret;
    // Whether we should destroy this session when onbeforeunload is called
    this.destroyOnUnload = true;
    if (gatewayCallbacks.destroyOnUnload !== undefined && gatewayCallbacks.destroyOnUnload !== null) this.destroyOnUnload = gatewayCallbacks.destroyOnUnload === true;
    // Some timeout-related values
    var keepAlivePeriod = 25000;
    if (gatewayCallbacks.keepAlivePeriod !== undefined && gatewayCallbacks.keepAlivePeriod !== null) keepAlivePeriod = gatewayCallbacks.keepAlivePeriod;
    if (isNaN(keepAlivePeriod)) keepAlivePeriod = 25000;
    var longPollTimeout = 60000;
    if (gatewayCallbacks.longPollTimeout !== undefined && gatewayCallbacks.longPollTimeout !== null) longPollTimeout = gatewayCallbacks.longPollTimeout;
    if (isNaN(longPollTimeout)) longPollTimeout = 60000;

    // overrides for default maxBitrate values for simulcasting
    function getMaxBitrates(simulcastMaxBitrates) {
      var maxBitrates = {
        high: 900000,
        medium: 300000,
        low: 100000
      };
      if (simulcastMaxBitrates !== undefined && simulcastMaxBitrates !== null) {
        if (simulcastMaxBitrates.high) maxBitrates.high = simulcastMaxBitrates.high;
        if (simulcastMaxBitrates.medium) maxBitrates.medium = simulcastMaxBitrates.medium;
        if (simulcastMaxBitrates.low) maxBitrates.low = simulcastMaxBitrates.low;
      }
      return maxBitrates;
    }
    var connected = false;
    var sessionId = null;
    var pluginHandles = {};
    var that = this;
    var retries = 0;
    var transactions = {};
    createSession(gatewayCallbacks);

    // Public methods
    this.getServer = function () {
      return server;
    };
    this.isConnected = function () {
      return connected;
    };
    this.reconnect = function (callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      callbacks["reconnect"] = true;
      createSession(callbacks);
    };
    this.getSessionId = function () {
      return sessionId;
    };
    this.destroy = function (callbacks) {
      destroySession(callbacks);
    };
    this.attach = function (callbacks) {
      createHandle(callbacks);
    };
    function eventHandler() {
      if (sessionId == null) return;
      Janus$3.debug('Long poll...');
      if (!connected) {
        Janus$3.warn("Is the server down? (connected=false)");
        return;
      }
      var longpoll = server + "/" + sessionId + "?rid=" + new Date().getTime();
      if (maxev !== undefined && maxev !== null) longpoll = longpoll + "&maxev=" + maxev;
      if (token !== null && token !== undefined) longpoll = longpoll + "&token=" + encodeURIComponent(token);
      if (apisecret !== null && apisecret !== undefined) longpoll = longpoll + "&apisecret=" + encodeURIComponent(apisecret);
      Janus$3.httpAPICall(longpoll, {
        verb: 'GET',
        withCredentials: withCredentials,
        success: handleEvent,
        timeout: longPollTimeout,
        error: function error(textStatus, errorThrown) {
          Janus$3.error(textStatus + ":", errorThrown);
          retries++;
          if (retries > 3) {
            // Did we just lose the server? :-(
            connected = false;
            gatewayCallbacks.error("Lost connection to the server (is it down?)");
            return;
          }
          eventHandler();
        }
      });
    }

    // Private event handler: this will trigger plugin callbacks, if set
    function handleEvent(json, skipTimeout) {
      retries = 0;
      if (!websockets && sessionId !== undefined && sessionId !== null && skipTimeout !== true) eventHandler();
      if (!websockets && Janus$3.isArray(json)) {
        // We got an array: it means we passed a maxev > 1, iterate on all objects
        for (var i = 0; i < json.length; i++) {
          handleEvent(json[i], true);
        }
        return;
      }
      if (json["rtcgw"] === "keepalive") {
        // Nothing happened
        Janus$3.vdebug("Got a keepalive on session " + sessionId);
        return;
      } else if (json["rtcgw"] === "ack") {
        // Just an ack, we can probably ignore
        Janus$3.debug("Got an ack on session " + sessionId);
        Janus$3.debug(json);
        var transaction = json["transaction"];
        if (transaction !== null && transaction !== undefined) {
          var reportSuccess = transactions[transaction];
          if (reportSuccess !== null && reportSuccess !== undefined) {
            reportSuccess(json);
          }
          delete transactions[transaction];
        }
        return;
      } else if (json["rtcgw"] === "success") {
        // Success!
        Janus$3.debug("Got a success on session " + sessionId);
        Janus$3.debug(json);
        var transaction = json["transaction"];
        if (transaction !== null && transaction !== undefined) {
          var reportSuccess = transactions[transaction];
          if (reportSuccess !== null && reportSuccess !== undefined) {
            reportSuccess(json);
          }
          delete transactions[transaction];
        }
        return;
      } else if (json["rtcgw"] === "trickle") {
        // We got a trickle candidate from Janus
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$3.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$3.debug("This handle is not attached to this session");
          return;
        }
        var candidate = json["candidate"];
        Janus$3.debug("Got a trickled candidate on session " + sessionId);
        Janus$3.debug(candidate);
        var config = pluginHandle.webrtcStuff;
        if (config.pc && config.remoteSdp) {
          // Add candidate right now
          Janus$3.debug("Adding remote candidate:", candidate);
          if (!candidate || candidate.completed === true) {
            // end-of-candidates
            config.pc.addIceCandidate(Janus$3.endOfCandidates);
          } else {
            // New candidate
            config.pc.addIceCandidate(candidate);
          }
        } else {
          // We didn't do setRemoteDescription (trickle got here before the offer?)
          Janus$3.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate");
          if (!config.candidates) config.candidates = [];
          config.candidates.push(candidate);
          Janus$3.debug(config.candidates);
        }
      } else if (json["rtcgw"] === "webrtcup") {
        // The PeerConnection with the server is up! Notify this
        Janus$3.debug("Got a webrtcup event on session " + sessionId);
        Janus$3.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$3.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$3.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.webrtcState(true);
        return;
      } else if (json["rtcgw"] === "hangup") {
        // A plugin asked the core to hangup a PeerConnection on one of our handles
        Janus$3.debug("Got a hangup event on session " + sessionId);
        Janus$3.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$3.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$3.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.webrtcState(false, json["reason"]);
        pluginHandle.hangup();
      } else if (json["rtcgw"] === "detached") {
        // A plugin asked the core to detach one of our handles
        Janus$3.debug("Got a detached event on session " + sessionId);
        Janus$3.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$3.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          // Don't warn here because destroyHandle causes this situation.
          return;
        }
        pluginHandle.detached = true;
        pluginHandle.ondetached();
        pluginHandle.detach();
      } else if (json["rtcgw"] === "media") {
        // Media started/stopped flowing
        Janus$3.debug("Got a media event on session " + sessionId);
        Janus$3.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$3.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$3.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.mediaState(json["type"], json["receiving"]);
      } else if (json["rtcgw"] === "slowlink") {
        Janus$3.debug("Got a slowlink event on session " + sessionId);
        Janus$3.debug(json);
        // Trouble uplink or downlink
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$3.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$3.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.slowLink(json["uplink"], json["lost"]);
      } else if (json["rtcgw"] === "error") {
        // Oops, something wrong happened
        Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
        Janus$3.debug(json);
        var transaction = json["transaction"];
        if (transaction !== null && transaction !== undefined) {
          var reportSuccess = transactions[transaction];
          if (reportSuccess !== null && reportSuccess !== undefined) {
            reportSuccess(json);
          }
          delete transactions[transaction];
        }
        return;
      } else if (json["rtcgw"] === "event") {
        Janus$3.debug("Got a plugin event on session " + sessionId);
        Janus$3.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$3.warn("Missing sender...");
          return;
        }
        var plugindata = json["plugindata"];
        if (plugindata === undefined || plugindata === null) {
          Janus$3.warn("Missing plugindata...");
          return;
        }
        Janus$3.debug("  -- Event is coming from " + sender + " (" + plugindata["plugin"] + ")");
        var data = plugindata["data"];
        Janus$3.debug(data);
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$3.warn("This handle is not attached to this session");
          return;
        }
        var jsep = json["jsep"];
        if (jsep !== undefined && jsep !== null) {
          Janus$3.debug("Handling SDP as well...");
          Janus$3.debug(jsep);
        }
        var callback = pluginHandle.onmessage;
        if (callback !== null && callback !== undefined) {
          Janus$3.debug("Notifying application...");
          // Send to callback specified when attaching plugin handle
          callback(data, jsep);
        } else {
          // Send to generic callback (?)
          Janus$3.debug("No provided notification callback");
        }
      } else if (json["rtcgw"] === "timeout") {
        Janus$3.error("Timeout on session " + sessionId);
        Janus$3.debug(json);
        if (websockets) {
          ws.close(3504, "Gateway timeout");
        }
        return;
      } else {
        Janus$3.warn("Unknown message/event  '" + json["rtcgw"] + "' on session " + sessionId);
        Janus$3.debug(json);
      }
    }

    // Private helper to send keep-alive messages on WebSockets
    function keepAlive() {
      if (server === null || !websockets || !connected) return;
      wsKeepaliveTimeoutId = setTimeout(keepAlive, keepAlivePeriod);
      var request = {
        "rtcgw": "keepalive",
        "session_id": sessionId,
        "transaction": Janus$3.randomString(12)
      };
      if (token !== null && token !== undefined) request["token"] = token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      ws.send(JSON.stringify(request));
    }

    // Private method to create a session
    function createSession(callbacks) {
      var transaction = Janus$3.randomString(12);
      // console.log("jannus create_token",stream);
      var request = {
        "rtcgw": "create",
        "transaction": transaction,
        "token": window.EZUIKit.opt.stream,
        "device": window.EZUIKit.opt.deviceSerial,
        "channel": window.EZUIKit.opt.channelNo
      };
      if (callbacks["reconnect"]) {
        // We're reconnecting, claim the session
        connected = false;
        request["rtcgw"] = "claim";
        request["session_id"] = sessionId;
        // If we were using websockets, ignore the old connection
        if (ws) {
          ws.onopen = null;
          ws.onerror = null;
          ws.onclose = null;
          if (wsKeepaliveTimeoutId) {
            clearTimeout(wsKeepaliveTimeoutId);
            wsKeepaliveTimeoutId = null;
          }
        }
      }
      if (token !== null && token !== undefined) request["token"] = token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (server === null && Janus$3.isArray(servers)) {
        // We still need to find a working server from the list we were given
        server = servers[serversIndex];
        if (server.indexOf("ws") === 0) {
          websockets = true;
          Janus$3.log("Server #" + (serversIndex + 1) + ": trying WebSockets to contact Janus (" + server + ")");
        } else {
          websockets = false;
          Janus$3.log("Server #" + (serversIndex + 1) + ": trying REST API to contact Janus (" + server + ")");
        }
      }
      if (websockets) {
        ws = Janus$3.newWebSocket(server, 'rtcgw-protocol');
        wsHandlers = {
          'error': function error() {
            Janus$3.error("Error connecting to the Janus WebSockets server... " + server);
            if (Janus$3.isArray(servers) && !callbacks["reconnect"]) {
              serversIndex++;
              if (serversIndex == servers.length) {
                // We tried all the servers the user gave us and they all failed
                callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");
                return;
              }
              // Let's try the next server
              server = null;
              setTimeout(function () {
                createSession(callbacks);
              }, 200);
              return;
            }
            callbacks.error("Error connecting to the Janus WebSockets server: Is the server down?");
          },
          'open': function open() {
            // We need to be notified about the success
            transactions[transaction] = function (json) {
              Janus$3.debug(json);
              if (json["rtcgw"] !== "success") {
                Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
                callbacks.error(json["error"].reason);
                return;
              }
              wsKeepaliveTimeoutId = setTimeout(keepAlive, keepAlivePeriod);
              connected = true;
              sessionId = json["session_id"] ? json["session_id"] : json.data["id"];
              if (callbacks["reconnect"]) {
                Janus$3.log("Claimed session: " + sessionId);
              } else {
                Janus$3.log("Created session: " + sessionId);
              }
              Janus$3.sessions[sessionId] = that;
              callbacks.success();
            };
            ws.send(JSON.stringify(request));
          },
          'message': function message(event) {
            handleEvent(JSON.parse(event.data));
          },
          'close': function close() {
            if (server === null || !connected) {
              return;
            }
            connected = false;
            // FIXME What if this is called when the page is closed?
            gatewayCallbacks.error("Lost connection to the server (is it down?)");
          }
        };
        for (var eventName in wsHandlers) {
          ws.addEventListener(eventName, wsHandlers[eventName]);
        }
        return;
      }
      Janus$3.httpAPICall(server, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$3.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            callbacks.error(json["error"].reason);
            return;
          }
          connected = true;
          sessionId = json["session_id"] ? json["session_id"] : json.data["id"];
          if (callbacks["reconnect"]) {
            Janus$3.log("Claimed session: " + sessionId);
          } else {
            Janus$3.log("Created session: " + sessionId);
          }
          Janus$3.sessions[sessionId] = that;
          eventHandler();
          callbacks.success();
        },
        error: function error(textStatus, errorThrown) {
          Janus$3.error(textStatus + ":", errorThrown); // FIXME
          if (Janus$3.isArray(servers) && !callbacks["reconnect"]) {
            serversIndex++;
            if (serversIndex == servers.length) {
              // We tried all the servers the user gave us and they all failed
              callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");
              return;
            }
            // Let's try the next server
            server = null;
            setTimeout(function () {
              createSession(callbacks);
            }, 200);
            return;
          }
          if (errorThrown === "") callbacks.error(textStatus + ": Is the server down?");else callbacks.error(textStatus + ": " + errorThrown);
        }
      });
    }

    // Private method to destroy a session
    function destroySession(callbacks) {
      callbacks = callbacks || {};
      // FIXME This method triggers a success even when we fail
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      var asyncRequest = true;
      if (callbacks.asyncRequest !== undefined && callbacks.asyncRequest !== null) asyncRequest = callbacks.asyncRequest === true;
      var notifyDestroyed = true;
      if (callbacks.notifyDestroyed !== undefined && callbacks.notifyDestroyed !== null) notifyDestroyed = callbacks.notifyDestroyed === true;
      var cleanupHandles = false;
      if (callbacks.cleanupHandles !== undefined && callbacks.cleanupHandles !== null) cleanupHandles = callbacks.cleanupHandles === true;
      Janus$3.log("Destroying session " + sessionId + " (async=" + asyncRequest + ")");
      if (!connected) {
        Janus$3.warn("Is the server down? (connected=false)");
        callbacks.success();
        return;
      }
      if (sessionId === undefined || sessionId === null) {
        Janus$3.warn("No session to destroy");
        callbacks.success();
        if (notifyDestroyed) gatewayCallbacks.destroyed();
        return;
      }
      if (cleanupHandles) {
        for (var handleId in pluginHandles) destroyHandle(handleId, {
          noRequest: true
        });
      }
      // No need to destroy all handles first, Janus will do that itself
      var request = {
        "rtcgw": "destroy",
        "transaction": Janus$3.randomString(12)
      };
      if (token !== null && token !== undefined) request["token"] = token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (websockets) {
        request["session_id"] = sessionId;
        var unbindWebSocket = function unbindWebSocket() {
          for (var eventName in wsHandlers) {
            ws.removeEventListener(eventName, wsHandlers[eventName]);
          }
          ws.removeEventListener('message', onUnbindMessage);
          ws.removeEventListener('error', onUnbindError);
          if (wsKeepaliveTimeoutId) {
            clearTimeout(wsKeepaliveTimeoutId);
          }
          ws.close();
        };
        var onUnbindMessage = function onUnbindMessage(event) {
          var data = JSON.parse(event.data);
          if (data.session_id == request.session_id && data.transaction == request.transaction) {
            unbindWebSocket();
            callbacks.success();
            if (notifyDestroyed) gatewayCallbacks.destroyed();
          }
        };
        var onUnbindError = function onUnbindError(event) {
          unbindWebSocket();
          callbacks.error("Failed to destroy the server: Is the server down?");
          if (notifyDestroyed) gatewayCallbacks.destroyed();
        };
        ws.addEventListener('message', onUnbindMessage);
        ws.addEventListener('error', onUnbindError);
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$3.httpAPICall(server + "/" + sessionId, {
        verb: 'POST',
        async: asyncRequest,
        // Sometimes we need false here, or destroying in onbeforeunload won't work
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$3.log("Destroyed session:");
          Janus$3.debug(json);
          sessionId = null;
          connected = false;
          if (json["rtcgw"] !== "success") {
            Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
          }

          callbacks.success();
          if (notifyDestroyed) gatewayCallbacks.destroyed();
        },
        error: function error(textStatus, errorThrown) {
          Janus$3.error(textStatus + ":", errorThrown); // FIXME
          // Reset everything anyway
          sessionId = null;
          connected = false;
          callbacks.success();
          if (notifyDestroyed) gatewayCallbacks.destroyed();
        }
      });
    }

    // Private method to create a plugin handle
    function createHandle(callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      callbacks.consentDialog = typeof callbacks.consentDialog == "function" ? callbacks.consentDialog : Janus$3.noop;
      callbacks.iceState = typeof callbacks.iceState == "function" ? callbacks.iceState : Janus$3.noop;
      callbacks.mediaState = typeof callbacks.mediaState == "function" ? callbacks.mediaState : Janus$3.noop;
      callbacks.webrtcState = typeof callbacks.webrtcState == "function" ? callbacks.webrtcState : Janus$3.noop;
      callbacks.slowLink = typeof callbacks.slowLink == "function" ? callbacks.slowLink : Janus$3.noop;
      callbacks.onmessage = typeof callbacks.onmessage == "function" ? callbacks.onmessage : Janus$3.noop;
      callbacks.onlocalstream = typeof callbacks.onlocalstream == "function" ? callbacks.onlocalstream : Janus$3.noop;
      callbacks.onremotestream = typeof callbacks.onremotestream == "function" ? callbacks.onremotestream : Janus$3.noop;
      callbacks.ondata = typeof callbacks.ondata == "function" ? callbacks.ondata : Janus$3.noop;
      callbacks.ondataopen = typeof callbacks.ondataopen == "function" ? callbacks.ondataopen : Janus$3.noop;
      callbacks.oncleanup = typeof callbacks.oncleanup == "function" ? callbacks.oncleanup : Janus$3.noop;
      callbacks.ondetached = typeof callbacks.ondetached == "function" ? callbacks.ondetached : Janus$3.noop;
      if (!connected) {
        Janus$3.warn("Is the server down? (connected=false)");
        callbacks.error("Is the server down? (connected=false)");
        return;
      }
      var plugin = callbacks.plugin;
      if (plugin === undefined || plugin === null) {
        Janus$3.error("Invalid plugin");
        callbacks.error("Invalid plugin");
        return;
      }
      var opaqueId = callbacks.opaqueId;
      var handleToken = callbacks.token ? callbacks.token : token;
      var transaction = Janus$3.randomString(12);
      var request = {
        "rtcgw": "attach",
        "plugin": plugin,
        "opaque_id": opaqueId,
        "transaction": transaction
      };
      if (handleToken !== null && handleToken !== undefined) request["token"] = handleToken;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (websockets) {
        transactions[transaction] = function (json) {
          Janus$3.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            callbacks.error("Ooops: " + json["error"].code + " " + json["error"].reason);
            return;
          }
          var handleId = json.data["id"];
          Janus$3.log("Created handle: " + handleId);
          var pluginHandle = {
            session: that,
            plugin: plugin,
            id: handleId,
            token: handleToken,
            detached: false,
            webrtcStuff: {
              started: false,
              myStream: null,
              streamExternal: false,
              remoteStream: null,
              mySdp: null,
              mediaConstraints: null,
              pc: null,
              dataChannel: {},
              dtmfSender: null,
              trickle: true,
              iceDone: false,
              volume: {
                value: null,
                timer: null
              },
              bitrate: {
                value: null,
                bsnow: null,
                bsbefore: null,
                tsnow: null,
                tsbefore: null,
                timer: null
              }
            },
            getId: function getId() {
              return handleId;
            },
            getPlugin: function getPlugin() {
              return plugin;
            },
            getVolume: function getVolume() {
              return _getVolume(handleId, true);
            },
            getRemoteVolume: function getRemoteVolume() {
              return _getVolume(handleId, true);
            },
            getLocalVolume: function getLocalVolume() {
              return _getVolume(handleId, false);
            },
            isAudioMuted: function isAudioMuted() {
              return isMuted(handleId, false);
            },
            muteAudio: function muteAudio() {
              return mute(handleId, false, true);
            },
            unmuteAudio: function unmuteAudio() {
              return mute(handleId, false, false);
            },
            isVideoMuted: function isVideoMuted() {
              return isMuted(handleId, true);
            },
            muteVideo: function muteVideo() {
              return mute(handleId, true, true);
            },
            unmuteVideo: function unmuteVideo() {
              return mute(handleId, true, false);
            },
            getBitrate: function getBitrate() {
              return _getBitrate(handleId);
            },
            send: function send(callbacks) {
              sendMessage(handleId, callbacks);
            },
            data: function data(callbacks) {
              sendData(handleId, callbacks);
            },
            dtmf: function dtmf(callbacks) {
              sendDtmf(handleId, callbacks);
            },
            consentDialog: callbacks.consentDialog,
            iceState: callbacks.iceState,
            mediaState: callbacks.mediaState,
            webrtcState: callbacks.webrtcState,
            slowLink: callbacks.slowLink,
            onmessage: callbacks.onmessage,
            createOffer: function createOffer(callbacks) {
              prepareWebrtc(handleId, true, callbacks);
            },
            createAnswer: function createAnswer(callbacks) {
              prepareWebrtc(handleId, false, callbacks);
            },
            handleRemoteJsep: function handleRemoteJsep(callbacks) {
              prepareWebrtcPeer(handleId, callbacks);
            },
            onlocalstream: callbacks.onlocalstream,
            onremotestream: callbacks.onremotestream,
            ondata: callbacks.ondata,
            ondataopen: callbacks.ondataopen,
            oncleanup: callbacks.oncleanup,
            ondetached: callbacks.ondetached,
            hangup: function hangup(sendRequest) {
              cleanupWebrtc(handleId, sendRequest === true);
            },
            detach: function detach(callbacks) {
              destroyHandle(handleId, callbacks);
            }
          };
          pluginHandles[handleId] = pluginHandle;
          callbacks.success(pluginHandle);
        };
        request["session_id"] = sessionId;
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$3.httpAPICall(server + "/" + sessionId, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$3.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            callbacks.error("Ooops: " + json["error"].code + " " + json["error"].reason);
            return;
          }
          var handleId = json.data["id"];
          Janus$3.log("Created handle: " + handleId);
          var pluginHandle = {
            session: that,
            plugin: plugin,
            id: handleId,
            token: handleToken,
            detached: false,
            webrtcStuff: {
              started: false,
              myStream: null,
              streamExternal: false,
              remoteStream: null,
              mySdp: null,
              mediaConstraints: null,
              pc: null,
              dataChannel: {},
              dtmfSender: null,
              trickle: true,
              iceDone: false,
              volume: {
                value: null,
                timer: null
              },
              bitrate: {
                value: null,
                bsnow: null,
                bsbefore: null,
                tsnow: null,
                tsbefore: null,
                timer: null
              }
            },
            getId: function getId() {
              return handleId;
            },
            getPlugin: function getPlugin() {
              return plugin;
            },
            getVolume: function getVolume() {
              return _getVolume(handleId, true);
            },
            getRemoteVolume: function getRemoteVolume() {
              return _getVolume(handleId, true);
            },
            getLocalVolume: function getLocalVolume() {
              return _getVolume(handleId, false);
            },
            isAudioMuted: function isAudioMuted() {
              return isMuted(handleId, false);
            },
            muteAudio: function muteAudio() {
              return mute(handleId, false, true);
            },
            unmuteAudio: function unmuteAudio() {
              return mute(handleId, false, false);
            },
            isVideoMuted: function isVideoMuted() {
              return isMuted(handleId, true);
            },
            muteVideo: function muteVideo() {
              return mute(handleId, true, true);
            },
            unmuteVideo: function unmuteVideo() {
              return mute(handleId, true, false);
            },
            getBitrate: function getBitrate() {
              return _getBitrate(handleId);
            },
            send: function send(callbacks) {
              sendMessage(handleId, callbacks);
            },
            data: function data(callbacks) {
              sendData(handleId, callbacks);
            },
            dtmf: function dtmf(callbacks) {
              sendDtmf(handleId, callbacks);
            },
            consentDialog: callbacks.consentDialog,
            iceState: callbacks.iceState,
            mediaState: callbacks.mediaState,
            webrtcState: callbacks.webrtcState,
            slowLink: callbacks.slowLink,
            onmessage: callbacks.onmessage,
            createOffer: function createOffer(callbacks) {
              prepareWebrtc(handleId, true, callbacks);
            },
            createAnswer: function createAnswer(callbacks) {
              prepareWebrtc(handleId, false, callbacks);
            },
            handleRemoteJsep: function handleRemoteJsep(callbacks) {
              prepareWebrtcPeer(handleId, callbacks);
            },
            onlocalstream: callbacks.onlocalstream,
            onremotestream: callbacks.onremotestream,
            ondata: callbacks.ondata,
            ondataopen: callbacks.ondataopen,
            oncleanup: callbacks.oncleanup,
            ondetached: callbacks.ondetached,
            hangup: function hangup(sendRequest) {
              cleanupWebrtc(handleId, sendRequest === true);
            },
            detach: function detach(callbacks) {
              destroyHandle(handleId, callbacks);
            }
          };
          pluginHandles[handleId] = pluginHandle;
          callbacks.success(pluginHandle);
        },
        error: function error(textStatus, errorThrown) {
          Janus$3.error(textStatus + ":", errorThrown); // FIXME
        }
      });
    }

    // Private method to send a message
    function sendMessage(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      if (!connected) {
        Janus$3.warn("Is the server down? (connected=false)");
        callbacks.error("Is the server down? (connected=false)");
        return;
      }
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var message = callbacks.message;
      var jsep = callbacks.jsep;
      var transaction = Janus$3.randomString(12);
      var request = {
        "rtcgw": "message",
        "body": message,
        "transaction": transaction
      };
      if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (jsep !== null && jsep !== undefined) request.jsep = jsep;
      Janus$3.debug("Sending message to plugin (handle=" + handleId + "):");
      Janus$3.debug(request);
      if (websockets) {
        request["session_id"] = sessionId;
        request["handle_id"] = handleId;
        transactions[transaction] = function (json) {
          Janus$3.debug("Message sent!");
          Janus$3.debug(json);
          if (json["rtcgw"] === "success") {
            // We got a success, must have been a synchronous transaction
            var plugindata = json["plugindata"];
            if (plugindata === undefined || plugindata === null) {
              Janus$3.warn("Request succeeded, but missing plugindata...");
              callbacks.success();
              return;
            }
            Janus$3.log("Synchronous transaction successful (" + plugindata["plugin"] + ")");
            var data = plugindata["data"];
            Janus$3.debug(data);
            callbacks.success(data);
            return;
          } else if (json["rtcgw"] !== "ack") {
            // Not a success and not an ack, must be an error
            if (json["error"] !== undefined && json["error"] !== null) {
              Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
              callbacks.error(json["error"].code + " " + json["error"].reason);
            } else {
              Janus$3.error("Unknown error"); // FIXME
              callbacks.error("Unknown error");
            }
            return;
          }
          // If we got here, the plugin decided to handle the request asynchronously
          callbacks.success();
        };
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$3.httpAPICall(server + "/" + sessionId + "/" + handleId, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$3.debug("Message sent!");
          Janus$3.debug(json);
          if (json["rtcgw"] === "success") {
            // We got a success, must have been a synchronous transaction
            var plugindata = json["plugindata"];
            if (plugindata === undefined || plugindata === null) {
              Janus$3.warn("Request succeeded, but missing plugindata...");
              callbacks.success();
              return;
            }
            Janus$3.log("Synchronous transaction successful (" + plugindata["plugin"] + ")");
            var data = plugindata["data"];
            Janus$3.debug(data);
            callbacks.success(data);
            return;
          } else if (json["rtcgw"] !== "ack") {
            // Not a success and not an ack, must be an error
            if (json["error"] !== undefined && json["error"] !== null) {
              Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
              callbacks.error(json["error"].code + " " + json["error"].reason);
            } else {
              Janus$3.error("Unknown error"); // FIXME
              callbacks.error("Unknown error");
            }
            return;
          }
          // If we got here, the plugin decided to handle the request asynchronously
          callbacks.success();
        },
        error: function error(textStatus, errorThrown) {
          Janus$3.error(textStatus + ":", errorThrown); // FIXME
          callbacks.error(textStatus + ": " + errorThrown);
        }
      });
    }

    // Private method to send a trickle candidate
    function sendTrickleCandidate(handleId, candidate) {
      if (!connected) {
        Janus$3.warn("Is the server down? (connected=false)");
        return;
      }
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        return;
      }
      var request = {
        "rtcgw": "trickle",
        "candidate": candidate,
        "transaction": Janus$3.randomString(12)
      };
      if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      Janus$3.vdebug("Sending trickle candidate (handle=" + handleId + "):");
      Janus$3.vdebug(request);
      if (websockets) {
        request["session_id"] = sessionId;
        request["handle_id"] = handleId;
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$3.httpAPICall(server + "/" + sessionId + "/" + handleId, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$3.vdebug("Candidate sent!");
          Janus$3.vdebug(json);
          if (json["rtcgw"] !== "ack") {
            Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            return;
          }
        },
        error: function error(textStatus, errorThrown) {
          Janus$3.error(textStatus + ":", errorThrown); // FIXME
        }
      });
    }

    // Private method to create a data channel
    function createDataChannel(handleId, dclabel, incoming, pendingText) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var onDataChannelMessage = function onDataChannelMessage(event) {
        Janus$3.log('Received message on data channel:', event);
        var label = event.target.label;
        pluginHandle.ondata(event.data, label);
      };
      var onDataChannelStateChange = function onDataChannelStateChange(event) {
        Janus$3.log('Received state change on data channel:', event);
        var label = event.target.label;
        var dcState = config.dataChannel[label] ? config.dataChannel[label].readyState : "null";
        Janus$3.log('State change on <' + label + '> data channel: ' + dcState);
        if (dcState === 'open') {
          // Any pending messages to send?
          if (config.dataChannel[label].pending && config.dataChannel[label].pending.length > 0) {
            Janus$3.log("Sending pending messages on <" + label + ">:", config.dataChannel[label].pending.length);
            for (var i in config.dataChannel[label].pending) {
              var text = config.dataChannel[label].pending[i];
              Janus$3.log("Sending string on data channel <" + label + ">: " + text);
              config.dataChannel[label].send(text);
            }
            config.dataChannel[label].pending = [];
          }
          // Notify the open data channel
          pluginHandle.ondataopen(label);
        }
      };
      var onDataChannelError = function onDataChannelError(error) {
        Janus$3.error('Got error on data channel:', error);
        // TODO
      };

      if (!incoming) {
        // FIXME Add options (ordered, maxRetransmits, etc.)
        config.dataChannel[dclabel] = config.pc.createDataChannel(dclabel, {
          ordered: false
        });
      } else {
        // The channel was created by Janus
        config.dataChannel[dclabel] = incoming;
      }
      config.dataChannel[dclabel].onmessage = onDataChannelMessage;
      config.dataChannel[dclabel].onopen = onDataChannelStateChange;
      config.dataChannel[dclabel].onclose = onDataChannelStateChange;
      config.dataChannel[dclabel].onerror = onDataChannelError;
      config.dataChannel[dclabel].pending = [];
      if (pendingText) config.dataChannel[dclabel].pending.push(pendingText);
    }

    // Private method to send a data channel message
    function sendData(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var text = callbacks.text;
      if (text === null || text === undefined) {
        Janus$3.warn("Invalid text");
        callbacks.error("Invalid text");
        return;
      }
      var label = callbacks.label ? callbacks.label : Janus$3.dataChanDefaultLabel;
      if (!config.dataChannel[label]) {
        // Create new data channel and wait for it to open
        createDataChannel(handleId, label, false, text);
        callbacks.success();
        return;
      }
      if (config.dataChannel[label].readyState !== "open") {
        config.dataChannel[label].pending.push(text);
        callbacks.success();
        return;
      }
      Janus$3.log("Sending string on data channel <" + label + ">: " + text);
      config.dataChannel[label].send(text);
      callbacks.success();
    }

    // Private method to send a DTMF tone
    function sendDtmf(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      if (config.dtmfSender === null || config.dtmfSender === undefined) {
        // Create the DTMF sender the proper way, if possible
        if (config.pc !== undefined && config.pc !== null) {
          var senders = config.pc.getSenders();
          var audioSender = senders.find(function (sender) {
            return sender.track && sender.track.kind === 'audio';
          });
          if (!audioSender) {
            Janus$3.warn("Invalid DTMF configuration (no audio track)");
            callbacks.error("Invalid DTMF configuration (no audio track)");
            return;
          }
          config.dtmfSender = audioSender.dtmf;
          if (config.dtmfSender) {
            Janus$3.log("Created DTMF Sender");
            config.dtmfSender.ontonechange = function (tone) {
              Janus$3.debug("Sent DTMF tone: " + tone.tone);
            };
          }
        }
        if (config.dtmfSender === null || config.dtmfSender === undefined) {
          Janus$3.warn("Invalid DTMF configuration");
          callbacks.error("Invalid DTMF configuration");
          return;
        }
      }
      var dtmf = callbacks.dtmf;
      if (dtmf === null || dtmf === undefined) {
        Janus$3.warn("Invalid DTMF parameters");
        callbacks.error("Invalid DTMF parameters");
        return;
      }
      var tones = dtmf.tones;
      if (tones === null || tones === undefined) {
        Janus$3.warn("Invalid DTMF string");
        callbacks.error("Invalid DTMF string");
        return;
      }
      var duration = dtmf.duration;
      if (duration === null || duration === undefined) duration = 500; // We choose 500ms as the default duration for a tone
      var gap = dtmf.gap;
      if (gap === null || gap === undefined) gap = 50; // We choose 50ms as the default gap between tones
      Janus$3.debug("Sending DTMF string " + tones + " (duration " + duration + "ms, gap " + gap + "ms)");
      config.dtmfSender.insertDTMF(tones, duration, gap);
      callbacks.success();
    }

    // Private method to destroy a plugin handle
    function destroyHandle(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      var asyncRequest = true;
      if (callbacks.asyncRequest !== undefined && callbacks.asyncRequest !== null) asyncRequest = callbacks.asyncRequest === true;
      var noRequest = true;
      if (callbacks.noRequest !== undefined && callbacks.noRequest !== null) noRequest = callbacks.noRequest === true;
      Janus$3.log("Destroying handle " + handleId + " (async=" + asyncRequest + ")");
      cleanupWebrtc(handleId);
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.detached) {
        // Plugin was already detached by Janus, calling detach again will return a handle not found error, so just exit here
        delete pluginHandles[handleId];
        callbacks.success();
        return;
      }
      if (noRequest) {
        // We're only removing the handle locally
        delete pluginHandles[handleId];
        callbacks.success();
        return;
      }
      if (!connected) {
        Janus$3.warn("Is the server down? (connected=false)");
        callbacks.error("Is the server down? (connected=false)");
        return;
      }
      var request = {
        "rtcgw": "detach",
        "transaction": Janus$3.randomString(12)
      };
      if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (websockets) {
        request["session_id"] = sessionId;
        request["handle_id"] = handleId;
        ws.send(JSON.stringify(request));
        delete pluginHandles[handleId];
        callbacks.success();
        return;
      }
      Janus$3.httpAPICall(server + "/" + sessionId + "/" + handleId, {
        verb: 'POST',
        async: asyncRequest,
        // Sometimes we need false here, or destroying in onbeforeunload won't work
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$3.log("Destroyed handle:");
          Janus$3.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$3.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
          }

          delete pluginHandles[handleId];
          callbacks.success();
        },
        error: function error(textStatus, errorThrown) {
          Janus$3.error(textStatus + ":", errorThrown); // FIXME
          // We cleanup anyway
          delete pluginHandles[handleId];
          callbacks.success();
        }
      });
    }

    // WebRTC stuff
    function streamsDone(handleId, jsep, media, callbacks, stream) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      Janus$3.debug("streamsDone:", stream);
      if (stream) {
        Janus$3.debug("  -- Audio tracks:", stream.getAudioTracks());
        Janus$3.debug("  -- Video tracks:", stream.getVideoTracks());
      }
      // We're now capturing the new stream: check if we're updating or if it's a new thing
      var addTracks = false;
      if (!config.myStream || !media.update || config.streamExternal) {
        config.myStream = stream;
        addTracks = true;
      } else {
        // We only need to update the existing stream
        if ((!media.update && isAudioSendEnabled(media) || media.update && (media.addAudio || media.replaceAudio)) && stream.getAudioTracks() && stream.getAudioTracks().length) {
          config.myStream.addTrack(stream.getAudioTracks()[0]);
          if (Janus$3.unifiedPlan) {
            // Use Transceivers
            Janus$3.log((media.replaceAudio ? "Replacing" : "Adding") + " audio track:", stream.getAudioTracks()[0]);
            var audioTransceiver = null;
            var transceivers = config.pc.getTransceivers();
            if (transceivers && transceivers.length > 0) {
              for (var i in transceivers) {
                var t = transceivers[i];
                if (t.sender && t.sender.track && t.sender.track.kind === "audio" || t.receiver && t.receiver.track && t.receiver.track.kind === "audio") {
                  audioTransceiver = t;
                  break;
                }
              }
            }
            if (audioTransceiver && audioTransceiver.sender) {
              audioTransceiver.sender.replaceTrack(stream.getAudioTracks()[0]);
            } else {
              config.pc.addTrack(stream.getAudioTracks()[0], stream);
            }
          } else {
            Janus$3.log((media.replaceAudio ? "Replacing" : "Adding") + " audio track:", stream.getAudioTracks()[0]);
            config.pc.addTrack(stream.getAudioTracks()[0], stream);
          }
        }
        if ((!media.update && isVideoSendEnabled(media) || media.update && (media.addVideo || media.replaceVideo)) && stream.getVideoTracks() && stream.getVideoTracks().length) {
          config.myStream.addTrack(stream.getVideoTracks()[0]);
          if (Janus$3.unifiedPlan) {
            // Use Transceivers
            Janus$3.log((media.replaceVideo ? "Replacing" : "Adding") + " video track:", stream.getVideoTracks()[0]);
            var videoTransceiver = null;
            var transceivers = config.pc.getTransceivers();
            if (transceivers && transceivers.length > 0) {
              for (var i in transceivers) {
                var t = transceivers[i];
                if (t.sender && t.sender.track && t.sender.track.kind === "video" || t.receiver && t.receiver.track && t.receiver.track.kind === "video") {
                  videoTransceiver = t;
                  break;
                }
              }
            }
            if (videoTransceiver && videoTransceiver.sender) {
              videoTransceiver.sender.replaceTrack(stream.getVideoTracks()[0]);
            } else {
              config.pc.addTrack(stream.getVideoTracks()[0], stream);
            }
          } else {
            Janus$3.log((media.replaceVideo ? "Replacing" : "Adding") + " video track:", stream.getVideoTracks()[0]);
            config.pc.addTrack(stream.getVideoTracks()[0], stream);
          }
        }
      }
      // If we still need to create a PeerConnection, let's do that
      if (!config.pc) {
        var pc_config = {
          "iceServers": iceServers,
          "iceTransportPolicy": iceTransportPolicy,
          "bundlePolicy": bundlePolicy
        };
        if (Janus$3.webRTCAdapter.browserDetails.browser === "chrome") {
          // For Chrome versions before 72, we force a plan-b semantic, and unified-plan otherwise
          pc_config["sdpSemantics"] = Janus$3.webRTCAdapter.browserDetails.version < 72 ? "plan-b" : "unified-plan";
        }
        var pc_constraints = {
          "optional": [{
            "DtlsSrtpKeyAgreement": true
          }]
        };
        if (ipv6Support === true) {
          pc_constraints.optional.push({
            "googIPv6": true
          });
        }
        // Any custom constraint to add?
        if (callbacks.rtcConstraints && _typeof(callbacks.rtcConstraints) === 'object') {
          Janus$3.debug("Adding custom PeerConnection constraints:", callbacks.rtcConstraints);
          for (var i in callbacks.rtcConstraints) {
            pc_constraints.optional.push(callbacks.rtcConstraints[i]);
          }
        }
        if (Janus$3.webRTCAdapter.browserDetails.browser === "edge") {
          // This is Edge, enable BUNDLE explicitly
          pc_config.bundlePolicy = "max-bundle";
        }
        Janus$3.log("Creating PeerConnection");
        Janus$3.debug(pc_constraints);
        config.pc = new RTCPeerConnection(pc_config, pc_constraints);
        Janus$3.debug(config.pc);
        if (config.pc.getStats) {
          // FIXME
          config.volume = {};
          config.bitrate.value = "0 kbits/sec";
        }
        Janus$3.log("Preparing local SDP and gathering candidates (trickle=" + config.trickle + ")");
        config.pc.oniceconnectionstatechange = function (e) {
          if (config.pc) pluginHandle.iceState(config.pc.iceConnectionState);
        };
        config.pc.onicecandidate = function (event) {
          if (event.candidate == null || Janus$3.webRTCAdapter.browserDetails.browser === 'edge' && event.candidate.candidate.indexOf('endOfCandidates') > 0) {
            Janus$3.log("End of candidates.");
            config.iceDone = true;
            if (config.trickle === true) {
              // Notify end of candidates
              sendTrickleCandidate(handleId, {
                "completed": true
              });
            } else {
              // No trickle, time to send the complete SDP (including all candidates)
              sendSDP(handleId, callbacks);
            }
          } else {
            // JSON.stringify doesn't work on some WebRTC objects anymore
            // See https://code.google.com/p/chromium/issues/detail?id=467366
            var candidate = {
              "candidate": event.candidate.candidate,
              "sdpMid": event.candidate.sdpMid,
              "sdpMLineIndex": event.candidate.sdpMLineIndex
            };
            if (config.trickle === true) {
              // Send candidate
              sendTrickleCandidate(handleId, candidate);
            }
          }
        };
        config.pc.ontrack = function (event) {
          Janus$3.log("Handling Remote Track");
          Janus$3.debug(event);
          if (!event.streams) return;
          config.remoteStream = event.streams[0];
          pluginHandle.onremotestream(config.remoteStream);
          if (event.track.onended) return;
          Janus$3.log("Adding onended callback to track:", event.track);
          event.track.onended = function (ev) {
            Janus$3.log("Remote track muted/removed:", ev);
            if (config.remoteStream) {
              config.remoteStream.removeTrack(ev.target);
              pluginHandle.onremotestream(config.remoteStream);
            }
          };
          event.track.onmute = event.track.onended;
          event.track.onunmute = function (ev) {
            Janus$3.log("Remote track flowing again:", ev);
            try {
              config.remoteStream.addTrack(ev.target);
              pluginHandle.onremotestream(config.remoteStream);
            } catch (e) {
              Janus$3.error(e);
            }
          };
        };
      }
      if (addTracks && stream !== null && stream !== undefined) {
        Janus$3.log('Adding local stream');
        var simulcast2 = callbacks.simulcast2 === true ? true : false;
        stream.getTracks().forEach(function (track) {
          Janus$3.log('Adding local track:', track);
          if (!simulcast2) {
            config.pc.addTrack(track, stream);
          } else {
            if (track.kind === "audio") {
              config.pc.addTrack(track, stream);
            } else {
              Janus$3.log('Enabling rid-based simulcasting:', track);
              var maxBitrates = getMaxBitrates(callbacks.simulcastMaxBitrates);
              config.pc.addTransceiver(track, {
                direction: "sendrecv",
                streams: [stream],
                sendEncodings: [{
                  rid: "h",
                  active: true,
                  maxBitrate: maxBitrates.high
                }, {
                  rid: "m",
                  active: true,
                  maxBitrate: maxBitrates.medium,
                  scaleResolutionDownBy: 2
                }, {
                  rid: "l",
                  active: true,
                  maxBitrate: maxBitrates.low,
                  scaleResolutionDownBy: 4
                }]
              });
            }
          }
        });
      }
      // Any data channel to create?
      if (isDataEnabled(media) && !config.dataChannel[Janus$3.dataChanDefaultLabel]) {
        Janus$3.log("Creating data channel");
        createDataChannel(handleId, Janus$3.dataChanDefaultLabel, false);
        config.pc.ondatachannel = function (event) {
          Janus$3.log("Data channel created by Janus:", event);
          createDataChannel(handleId, event.channel.label, event.channel);
        };
      }
      // If there's a new local stream, let's notify the application
      if (config.myStream) pluginHandle.onlocalstream(config.myStream);
      // Create offer/answer now
      if (jsep === null || jsep === undefined) {
        createOffer(handleId, media, callbacks);
      } else {
        config.pc.setRemoteDescription(jsep).then(function () {
          Janus$3.log("Remote description accepted!");
          config.remoteSdp = jsep.sdp;
          // Any trickle candidate we cached?
          if (config.candidates && config.candidates.length > 0) {
            for (var i = 0; i < config.candidates.length; i++) {
              var candidate = config.candidates[i];
              Janus$3.debug("Adding remote candidate:", candidate);
              if (!candidate || candidate.completed === true) {
                // end-of-candidates
                config.pc.addIceCandidate(Janus$3.endOfCandidates);
              } else {
                // New candidate
                config.pc.addIceCandidate(candidate);
              }
            }
            config.candidates = [];
          }
          // Create the answer now
          createAnswer(handleId, media, callbacks);
        }, callbacks.error);
      }
    }
    function prepareWebrtc(handleId, offer, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : webrtcError;
      var jsep = callbacks.jsep;
      if (offer && jsep) {
        Janus$3.error("Provided a JSEP to a createOffer");
        callbacks.error("Provided a JSEP to a createOffer");
        return;
      } else if (!offer && (!jsep || !jsep.type || !jsep.sdp)) {
        Janus$3.error("A valid JSEP is required for createAnswer");
        callbacks.error("A valid JSEP is required for createAnswer");
        return;
      }
      callbacks.media = callbacks.media || {
        audio: true,
        video: true
      };
      var media = callbacks.media;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      config.trickle = isTrickleEnabled(callbacks.trickle);
      // Are we updating a session?
      if (config.pc === undefined || config.pc === null) {
        // Nope, new PeerConnection
        media.update = false;
        media.keepAudio = false;
        media.keepVideo = false;
      } else if (config.pc !== undefined && config.pc !== null) {
        Janus$3.log("Updating existing media session");
        media.update = true;
        // Check if there's anything to add/remove/replace, or if we
        // can go directly to preparing the new SDP offer or answer
        if (callbacks.stream !== null && callbacks.stream !== undefined) {
          // External stream: is this the same as the one we were using before?
          if (callbacks.stream !== config.myStream) {
            Janus$3.log("Renegotiation involves a new external stream");
          }
        } else {
          // Check if there are changes on audio
          if (media.addAudio) {
            media.keepAudio = false;
            media.replaceAudio = false;
            media.removeAudio = false;
            media.audioSend = true;
            if (config.myStream && config.myStream.getAudioTracks() && config.myStream.getAudioTracks().length) {
              Janus$3.error("Can't add audio stream, there already is one");
              callbacks.error("Can't add audio stream, there already is one");
              return;
            }
          } else if (media.removeAudio) {
            media.keepAudio = false;
            media.replaceAudio = false;
            media.addAudio = false;
            media.audioSend = false;
          } else if (media.replaceAudio) {
            media.keepAudio = false;
            media.addAudio = false;
            media.removeAudio = false;
            media.audioSend = true;
          }
          if (config.myStream === null || config.myStream === undefined) {
            // No media stream: if we were asked to replace, it's actually an "add"
            if (media.replaceAudio) {
              media.keepAudio = false;
              media.replaceAudio = false;
              media.addAudio = true;
              media.audioSend = true;
            }
            if (isAudioSendEnabled(media)) {
              media.keepAudio = false;
              media.addAudio = true;
            }
          } else {
            if (config.myStream.getAudioTracks() === null || config.myStream.getAudioTracks() === undefined || config.myStream.getAudioTracks().length === 0) {
              // No audio track: if we were asked to replace, it's actually an "add"
              if (media.replaceAudio) {
                media.keepAudio = false;
                media.replaceAudio = false;
                media.addAudio = true;
                media.audioSend = true;
              }
              if (isAudioSendEnabled(media)) {
                media.keepVideo = false;
                media.addAudio = true;
              }
            } else {
              // We have an audio track: should we keep it as it is?
              if (isAudioSendEnabled(media) && !media.removeAudio && !media.replaceAudio) {
                media.keepAudio = true;
              }
            }
          }
          // Check if there are changes on video
          if (media.addVideo) {
            media.keepVideo = false;
            media.replaceVideo = false;
            media.removeVideo = false;
            media.videoSend = true;
            if (config.myStream && config.myStream.getVideoTracks() && config.myStream.getVideoTracks().length) {
              Janus$3.error("Can't add video stream, there already is one");
              callbacks.error("Can't add video stream, there already is one");
              return;
            }
          } else if (media.removeVideo) {
            media.keepVideo = false;
            media.replaceVideo = false;
            media.addVideo = false;
            media.videoSend = false;
          } else if (media.replaceVideo) {
            media.keepVideo = false;
            media.addVideo = false;
            media.removeVideo = false;
            media.videoSend = true;
          }
          if (config.myStream === null || config.myStream === undefined) {
            // No media stream: if we were asked to replace, it's actually an "add"
            if (media.replaceVideo) {
              media.keepVideo = false;
              media.replaceVideo = false;
              media.addVideo = true;
              media.videoSend = true;
            }
            if (isVideoSendEnabled(media)) {
              media.keepVideo = false;
              media.addVideo = true;
            }
          } else {
            if (config.myStream.getVideoTracks() === null || config.myStream.getVideoTracks() === undefined || config.myStream.getVideoTracks().length === 0) {
              // No video track: if we were asked to replace, it's actually an "add"
              if (media.replaceVideo) {
                media.keepVideo = false;
                media.replaceVideo = false;
                media.addVideo = true;
                media.videoSend = true;
              }
              if (isVideoSendEnabled(media)) {
                media.keepVideo = false;
                media.addVideo = true;
              }
            } else {
              // We have a video track: should we keep it as it is?
              if (isVideoSendEnabled(media) && !media.removeVideo && !media.replaceVideo) {
                media.keepVideo = true;
              }
            }
          }
          // Data channels can only be added
          if (media.addData) media.data = true;
        }
        // If we're updating and keeping all tracks, let's skip the getUserMedia part
        if (isAudioSendEnabled(media) && media.keepAudio && isVideoSendEnabled(media) && media.keepVideo) {
          pluginHandle.consentDialog(false);
          streamsDone(handleId, jsep, media, callbacks, config.myStream);
          return;
        }
      }
      // If we're updating, check if we need to remove/replace one of the tracks
      if (media.update && !config.streamExternal) {
        if (media.removeAudio || media.replaceAudio) {
          if (config.myStream && config.myStream.getAudioTracks() && config.myStream.getAudioTracks().length) {
            var s = config.myStream.getAudioTracks()[0];
            Janus$3.log("Removing audio track:", s);
            config.myStream.removeTrack(s);
            try {
              s.stop();
            } catch (e) {}
          }
          if (config.pc.getSenders() && config.pc.getSenders().length) {
            var ra = true;
            if (media.replaceAudio && Janus$3.unifiedPlan) {
              // We can use replaceTrack
              ra = false;
            }
            if (ra) {
              for (var index in config.pc.getSenders()) {
                var s = config.pc.getSenders()[index];
                if (s && s.track && s.track.kind === "audio") {
                  Janus$3.log("Removing audio sender:", s);
                  config.pc.removeTrack(s);
                }
              }
            }
          }
        }
        if (media.removeVideo || media.replaceVideo) {
          if (config.myStream && config.myStream.getVideoTracks() && config.myStream.getVideoTracks().length) {
            var s = config.myStream.getVideoTracks()[0];
            Janus$3.log("Removing video track:", s);
            config.myStream.removeTrack(s);
            try {
              s.stop();
            } catch (e) {}
          }
          if (config.pc.getSenders() && config.pc.getSenders().length) {
            var rv = true;
            if (media.replaceVideo && Janus$3.unifiedPlan) {
              // We can use replaceTrack
              rv = false;
            }
            if (rv) {
              for (var index in config.pc.getSenders()) {
                var s = config.pc.getSenders()[index];
                if (s && s.track && s.track.kind === "video") {
                  Janus$3.log("Removing video sender:", s);
                  config.pc.removeTrack(s);
                }
              }
            }
          }
        }
      }
      // Was a MediaStream object passed, or do we need to take care of that?
      if (callbacks.stream !== null && callbacks.stream !== undefined) {
        var stream = callbacks.stream;
        Janus$3.log("MediaStream provided by the application");
        Janus$3.debug(stream);
        // If this is an update, let's check if we need to release the previous stream
        if (media.update) {
          if (config.myStream && config.myStream !== callbacks.stream && !config.streamExternal) {
            // We're replacing a stream we captured ourselves with an external one
            try {
              // Try a MediaStreamTrack.stop() for each track
              var tracks = config.myStream.getTracks();
              for (var i in tracks) {
                var mst = tracks[i];
                Janus$3.log(mst);
                if (mst !== null && mst !== undefined) mst.stop();
              }
            } catch (e) {
              // Do nothing if this fails
            }
            config.myStream = null;
          }
        }
        // Skip the getUserMedia part
        config.streamExternal = true;
        pluginHandle.consentDialog(false);
        streamsDone(handleId, jsep, media, callbacks, stream);
        return;
      }
      if (isAudioSendEnabled(media) || isVideoSendEnabled(media)) {
        if (!Janus$3.isGetUserMediaAvailable()) {
          callbacks.error("getUserMedia not available");
          return;
        }
        var constraints = {
          mandatory: {},
          optional: []
        };
        pluginHandle.consentDialog(true);
        var audioSupport = isAudioSendEnabled(media);
        if (audioSupport === true && media != undefined && media != null) {
          if (_typeof(media.audio) === 'object') {
            audioSupport = media.audio;
          }
        }
        var videoSupport = isVideoSendEnabled(media);
        if (videoSupport === true && media != undefined && media != null) {
          var simulcast = callbacks.simulcast === true ? true : false;
          var simulcast2 = callbacks.simulcast2 === true ? true : false;
          if ((simulcast || simulcast2) && !jsep && (media.video === undefined || media.video === false)) media.video = "hires";
          if (media.video && media.video != 'screen' && media.video != 'window') {
            if (_typeof(media.video) === 'object') {
              videoSupport = media.video;
            } else {
              var width = 0;
              var height = 0;
              if (media.video === 'lowres') {
                // Small resolution, 4:3
                height = 240;
                width = 320;
              } else if (media.video === 'lowres-16:9') {
                // Small resolution, 16:9
                height = 180;
                width = 320;
              } else if (media.video === 'hires' || media.video === 'hires-16:9' || media.video === 'hdres') {
                // High(HD) resolution is only 16:9
                height = 720;
                width = 1280;
              } else if (media.video === 'fhdres') {
                // Full HD resolution is only 16:9
                height = 1080;
                width = 1920;
              } else if (media.video === '4kres') {
                // 4K resolution is only 16:9
                height = 2160;
                width = 3840;
              } else if (media.video === 'stdres') {
                // Normal resolution, 4:3
                height = 480;
                width = 640;
              } else if (media.video === 'stdres-16:9') {
                // Normal resolution, 16:9
                height = 360;
                width = 640;
              } else {
                Janus$3.log("Default video setting is stdres 4:3");
                height = 480;
                width = 640;
              }
              Janus$3.log("Adding media constraint:", media.video);
              videoSupport = {
                'height': {
                  'ideal': height
                },
                'width': {
                  'ideal': width
                }
              };
              Janus$3.log("Adding video constraint:", videoSupport);
            }
          } else if (media.video === 'screen' || media.video === 'window') {
            // We're going to try and use the extension for Chrome 34+, the old approach
            // for older versions of Chrome, or the experimental support in Firefox 33+
            var callbackUserMedia = function callbackUserMedia(error, stream) {
              pluginHandle.consentDialog(false);
              if (error) {
                callbacks.error(error);
              } else {
                streamsDone(handleId, jsep, media, callbacks, stream);
              }
            };
            var getScreenMedia = function getScreenMedia(constraints, gsmCallback, useAudio) {
              Janus$3.log("Adding media constraint (screen capture)");
              Janus$3.debug(constraints);
              navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
                if (useAudio) {
                  navigator.mediaDevices.getUserMedia({
                    audio: true,
                    video: false
                  }).then(function (audioStream) {
                    stream.addTrack(audioStream.getAudioTracks()[0]);
                    gsmCallback(null, stream);
                  });
                } else {
                  gsmCallback(null, stream);
                }
              })["catch"](function (error) {
                pluginHandle.consentDialog(false);
                gsmCallback(error);
              });
            };
            if (!media.screenshareFrameRate) {
              media.screenshareFrameRate = 3;
            }
            if (navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia) {
              // The new experimental getDisplayMedia API is available, let's use that
              // https://groups.google.com/forum/#!topic/discuss-webrtc/Uf0SrR4uxzk
              // https://webrtchacks.com/chrome-screensharing-getdisplaymedia/
              navigator.mediaDevices.getDisplayMedia({
                video: true
              }).then(function (stream) {
                pluginHandle.consentDialog(false);
                if (isAudioSendEnabled(media) && !media.keepAudio) {
                  navigator.mediaDevices.getUserMedia({
                    audio: true,
                    video: false
                  }).then(function (audioStream) {
                    stream.addTrack(audioStream.getAudioTracks()[0]);
                    streamsDone(handleId, jsep, media, callbacks, stream);
                  });
                } else {
                  streamsDone(handleId, jsep, media, callbacks, stream);
                }
              }, function (error) {
                pluginHandle.consentDialog(false);
                callbacks.error(error);
              });
              return;
            }
            if (Janus$3.webRTCAdapter.browserDetails.browser === 'chrome') {
              var chromever = Janus$3.webRTCAdapter.browserDetails.version;
              var maxver = 33;
              if (window.navigator.userAgent.match('Linux')) maxver = 35; // "known" crash in chrome 34 and 35 on linux
              if (chromever >= 26 && chromever <= maxver) {
                // Chrome 26->33 requires some awkward chrome://flags manipulation
                constraints = {
                  video: {
                    mandatory: {
                      googLeakyBucket: true,
                      maxWidth: window.screen.width,
                      maxHeight: window.screen.height,
                      minFrameRate: media.screenshareFrameRate,
                      maxFrameRate: media.screenshareFrameRate,
                      chromeMediaSource: 'screen'
                    }
                  },
                  audio: isAudioSendEnabled(media) && !media.keepAudio
                };
                getScreenMedia(constraints, callbackUserMedia);
              } else {
                // Chrome 34+ requires an extension
                Janus$3.extension.getScreen(function (error, sourceId) {
                  if (error) {
                    pluginHandle.consentDialog(false);
                    return callbacks.error(error);
                  }
                  constraints = {
                    audio: false,
                    video: {
                      mandatory: {
                        chromeMediaSource: 'desktop',
                        maxWidth: window.screen.width,
                        maxHeight: window.screen.height,
                        minFrameRate: media.screenshareFrameRate,
                        maxFrameRate: media.screenshareFrameRate
                      },
                      optional: [{
                        googLeakyBucket: true
                      }, {
                        googTemporalLayeredScreencast: true
                      }]
                    }
                  };
                  constraints.video.mandatory.chromeMediaSourceId = sourceId;
                  getScreenMedia(constraints, callbackUserMedia, isAudioSendEnabled(media) && !media.keepAudio);
                });
              }
            } else if (Janus$3.webRTCAdapter.browserDetails.browser === 'firefox') {
              if (Janus$3.webRTCAdapter.browserDetails.version >= 33) {
                // Firefox 33+ has experimental support for screen sharing
                constraints = {
                  video: {
                    mozMediaSource: media.video,
                    mediaSource: media.video
                  },
                  audio: isAudioSendEnabled(media) && !media.keepAudio
                };
                getScreenMedia(constraints, function (err, stream) {
                  callbackUserMedia(err, stream);
                  // Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1045810
                  if (!err) {
                    var lastTime = stream.currentTime;
                    var polly = window.setInterval(function () {
                      if (!stream) window.clearInterval(polly);
                      if (stream.currentTime == lastTime) {
                        window.clearInterval(polly);
                        if (stream.onended) {
                          stream.onended();
                        }
                      }
                      lastTime = stream.currentTime;
                    }, 500);
                  }
                });
              } else {
                var error = new Error('NavigatorUserMediaError');
                error.name = 'Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)';
                pluginHandle.consentDialog(false);
                callbacks.error(error);
                return;
              }
            }
            return;
          }
        }
        // If we got here, we're not screensharing
        if (media === null || media === undefined || media.video !== 'screen') {
          // Check whether all media sources are actually available or not
          navigator.mediaDevices.enumerateDevices().then(function (devices) {
            var audioExist = devices.some(function (device) {
                return device.kind === 'audioinput';
              }),
              videoExist = isScreenSendEnabled(media) || devices.some(function (device) {
                return device.kind === 'videoinput';
              });

            // Check whether a missing device is really a problem
            var audioSend = isAudioSendEnabled(media);
            var videoSend = isVideoSendEnabled(media);
            var needAudioDevice = isAudioSendRequired(media);
            var needVideoDevice = isVideoSendRequired(media);
            if (audioSend || videoSend || needAudioDevice || needVideoDevice) {
              // We need to send either audio or video
              var haveAudioDevice = audioSend ? audioExist : false;
              var haveVideoDevice = videoSend ? videoExist : false;
              if (!haveAudioDevice && !haveVideoDevice) {
                // FIXME Should we really give up, or just assume recvonly for both?
                pluginHandle.consentDialog(false);
                callbacks.error('No capture device found');
                return false;
              } else if (!haveAudioDevice && needAudioDevice) {
                pluginHandle.consentDialog(false);
                callbacks.error('Audio capture is required, but no capture device found');
                return false;
              } else if (!haveVideoDevice && needVideoDevice) {
                pluginHandle.consentDialog(false);
                callbacks.error('Video capture is required, but no capture device found');
                return false;
              }
            }
            var gumConstraints = {
              audio: audioExist && !media.keepAudio ? audioSupport : false,
              video: videoExist && !media.keepVideo ? videoSupport : false
            };
            Janus$3.debug("getUserMedia constraints", gumConstraints);
            if (!gumConstraints.audio && !gumConstraints.video) {
              pluginHandle.consentDialog(false);
              streamsDone(handleId, jsep, media, callbacks, stream);
            } else {
              navigator.mediaDevices.getUserMedia(gumConstraints).then(function (stream) {
                pluginHandle.consentDialog(false);
                streamsDone(handleId, jsep, media, callbacks, stream);
              })["catch"](function (error) {
                pluginHandle.consentDialog(false);
                callbacks.error({
                  code: error.code,
                  name: error.name,
                  message: error.message
                });
              });
            }
          })["catch"](function (error) {
            pluginHandle.consentDialog(false);
            callbacks.error('enumerateDevices error', error);
          });
        }
      } else {
        // No need to do a getUserMedia, create offer/answer right away
        streamsDone(handleId, jsep, media, callbacks);
      }
    }
    function prepareWebrtcPeer(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : webrtcError;
      var jsep = callbacks.jsep;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      if (jsep !== undefined && jsep !== null) {
        if (config.pc === null) {
          Janus$3.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep");
          callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");
          return;
        }
        config.pc.setRemoteDescription(jsep).then(function () {
          Janus$3.log("Remote description accepted!");
          config.remoteSdp = jsep.sdp;
          // Any trickle candidate we cached?
          if (config.candidates && config.candidates.length > 0) {
            for (var i = 0; i < config.candidates.length; i++) {
              var candidate = config.candidates[i];
              Janus$3.debug("Adding remote candidate:", candidate);
              if (!candidate || candidate.completed === true) {
                // end-of-candidates
                config.pc.addIceCandidate(Janus$3.endOfCandidates);
              } else {
                // New candidate
                config.pc.addIceCandidate(candidate);
              }
            }
            config.candidates = [];
          }
          // Done
          callbacks.success();
        }, callbacks.error);
      } else {
        callbacks.error("Invalid JSEP");
      }
    }
    function createOffer(handleId, media, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      callbacks.customizeSdp = typeof callbacks.customizeSdp == "function" ? callbacks.customizeSdp : Janus$3.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var simulcast = callbacks.simulcast === true ? true : false;
      if (!simulcast) {
        Janus$3.log("Creating offer (iceDone=" + config.iceDone + ")");
      } else {
        Janus$3.log("Creating offer (iceDone=" + config.iceDone + ", simulcast=" + simulcast + ")");
      }
      // https://code.google.com/p/webrtc/issues/detail?id=3508
      var mediaConstraints = {};
      if (Janus$3.unifiedPlan) {
        // We can use Transceivers
        var audioTransceiver = null,
          videoTransceiver = null;
        var transceivers = config.pc.getTransceivers();
        if (transceivers && transceivers.length > 0) {
          for (var i in transceivers) {
            var t = transceivers[i];
            if (t.sender && t.sender.track && t.sender.track.kind === "audio" || t.receiver && t.receiver.track && t.receiver.track.kind === "audio") {
              if (!audioTransceiver) audioTransceiver = t;
              continue;
            }
            if (t.sender && t.sender.track && t.sender.track.kind === "video" || t.receiver && t.receiver.track && t.receiver.track.kind === "video") {
              if (!videoTransceiver) videoTransceiver = t;
              continue;
            }
          }
        }
        // Handle audio (and related changes, if any)
        var audioSend = isAudioSendEnabled(media);
        var audioRecv = isAudioRecvEnabled(media);
        if (!audioSend && !audioRecv) {
          // Audio disabled: have we removed it?
          if (media.removeAudio && audioTransceiver) {
            if (audioTransceiver.setDirection) {
              audioTransceiver.setDirection("inactive");
            } else {
              audioTransceiver.direction = "inactive";
            }
            Janus$3.log("Setting audio transceiver to inactive:", audioTransceiver);
          }
        } else {
          // Take care of audio m-line
          if (audioSend && audioRecv) {
            if (audioTransceiver) {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("sendrecv");
              } else {
                audioTransceiver.direction = "sendrecv";
              }
              Janus$3.log("Setting audio transceiver to sendrecv:", audioTransceiver);
            }
          } else if (audioSend && !audioRecv) {
            if (audioTransceiver) {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("sendonly");
              } else {
                audioTransceiver.direction = "sendonly";
              }
              Janus$3.log("Setting audio transceiver to sendonly:", audioTransceiver);
            }
          } else if (!audioSend && audioRecv) {
            if (audioTransceiver) {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("recvonly");
              } else {
                audioTransceiver.direction = "recvonly";
              }
              Janus$3.log("Setting audio transceiver to recvonly:", audioTransceiver);
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              audioTransceiver = config.pc.addTransceiver("audio", {
                direction: "recvonly"
              });
              Janus$3.log("Adding recvonly audio transceiver:", audioTransceiver);
            }
          }
        }
        // Handle video (and related changes, if any)
        var videoSend = isVideoSendEnabled(media);
        var videoRecv = isVideoRecvEnabled(media);
        if (!videoSend && !videoRecv) {
          // Video disabled: have we removed it?
          if (media.removeVideo && videoTransceiver) {
            if (videoTransceiver.setDirection) {
              videoTransceiver.setDirection("inactive");
            } else {
              videoTransceiver.direction = "inactive";
            }
            Janus$3.log("Setting video transceiver to inactive:", videoTransceiver);
          }
        } else {
          // Take care of video m-line
          if (videoSend && videoRecv) {
            if (videoTransceiver) {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("sendrecv");
              } else {
                videoTransceiver.direction = "sendrecv";
              }
              Janus$3.log("Setting video transceiver to sendrecv:", videoTransceiver);
            }
          } else if (videoSend && !videoRecv) {
            if (videoTransceiver) {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("sendonly");
              } else {
                videoTransceiver.direction = "sendonly";
              }
              Janus$3.log("Setting video transceiver to sendonly:", videoTransceiver);
            }
          } else if (!videoSend && videoRecv) {
            if (videoTransceiver) {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("recvonly");
              } else {
                videoTransceiver.direction = "recvonly";
              }
              Janus$3.log("Setting video transceiver to recvonly:", videoTransceiver);
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              videoTransceiver = config.pc.addTransceiver("video", {
                direction: "recvonly"
              });
              Janus$3.log("Adding recvonly video transceiver:", videoTransceiver);
            }
          }
        }
      } else {
        mediaConstraints["offerToReceiveAudio"] = isAudioRecvEnabled(media);
        mediaConstraints["offerToReceiveVideo"] = isVideoRecvEnabled(media);
      }
      var iceRestart = callbacks.iceRestart === true ? true : false;
      if (iceRestart) {
        mediaConstraints["iceRestart"] = true;
      }
      Janus$3.debug(mediaConstraints);
      // Check if this is Firefox and we've been asked to do simulcasting
      var sendVideo = isVideoSendEnabled(media);
      if (sendVideo && simulcast && Janus$3.webRTCAdapter.browserDetails.browser === "firefox") {
        // FIXME Based on https://gist.github.com/voluntas/088bc3cc62094730647b
        Janus$3.log("Enabling Simulcasting for Firefox (RID)");
        var sender = config.pc.getSenders().find(function (s) {
          return s.track.kind == "video";
        });
        if (sender) {
          var parameters = sender.getParameters();
          if (!parameters) parameters = {};
          var maxBitrates = getMaxBitrates(callbacks.simulcastMaxBitrates);
          parameters.encodings = [{
            rid: "h",
            active: true,
            maxBitrate: maxBitrates.high
          }, {
            rid: "m",
            active: true,
            maxBitrate: maxBitrates.medium,
            scaleResolutionDownBy: 2
          }, {
            rid: "l",
            active: true,
            maxBitrate: maxBitrates.low,
            scaleResolutionDownBy: 4
          }];
          sender.setParameters(parameters);
        }
      }
      config.pc.createOffer(mediaConstraints).then(function (offer) {
        Janus$3.debug(offer);
        // JSON.stringify doesn't work on some WebRTC objects anymore
        // See https://code.google.com/p/chromium/issues/detail?id=467366
        var jsep = {
          "type": offer.type,
          "sdp": offer.sdp
        };
        callbacks.customizeSdp(jsep);
        offer.sdp = jsep.sdp;
        Janus$3.log("Setting local description");
        if (sendVideo && simulcast) {
          // This SDP munging only works with Chrome (Safari STP may support it too)
          if (Janus$3.webRTCAdapter.browserDetails.browser === "chrome" || Janus$3.webRTCAdapter.browserDetails.browser === "safari") {
            Janus$3.log("Enabling Simulcasting for Chrome (SDP munging)");
            offer.sdp = mungeSdpForSimulcasting(offer.sdp);
          } else if (Janus$3.webRTCAdapter.browserDetails.browser !== "firefox") {
            Janus$3.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring");
          }
        }
        config.mySdp = offer.sdp;
        config.pc.setLocalDescription(offer)["catch"](callbacks.error);
        config.mediaConstraints = mediaConstraints;
        if (!config.iceDone && !config.trickle) {
          // Don't do anything until we have all candidates
          Janus$3.log("Waiting for all candidates...");
          return;
        }
        Janus$3.log("Offer ready");
        Janus$3.debug(callbacks);
        callbacks.success(offer);
      }, callbacks.error);
    }
    function createAnswer(handleId, media, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      callbacks.customizeSdp = typeof callbacks.customizeSdp == "function" ? callbacks.customizeSdp : Janus$3.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var simulcast = callbacks.simulcast === true ? true : false;
      if (!simulcast) {
        Janus$3.log("Creating answer (iceDone=" + config.iceDone + ")");
      } else {
        Janus$3.log("Creating answer (iceDone=" + config.iceDone + ", simulcast=" + simulcast + ")");
      }
      var mediaConstraints = null;
      if (Janus$3.unifiedPlan) {
        // We can use Transceivers
        mediaConstraints = {};
        var audioTransceiver = null,
          videoTransceiver = null;
        var transceivers = config.pc.getTransceivers();
        if (transceivers && transceivers.length > 0) {
          for (var i in transceivers) {
            var t = transceivers[i];
            if (t.sender && t.sender.track && t.sender.track.kind === "audio" || t.receiver && t.receiver.track && t.receiver.track.kind === "audio") {
              if (!audioTransceiver) audioTransceiver = t;
              continue;
            }
            if (t.sender && t.sender.track && t.sender.track.kind === "video" || t.receiver && t.receiver.track && t.receiver.track.kind === "video") {
              if (!videoTransceiver) videoTransceiver = t;
              continue;
            }
          }
        }
        // Handle audio (and related changes, if any)
        var audioSend = isAudioSendEnabled(media);
        var audioRecv = isAudioRecvEnabled(media);
        if (!audioSend && !audioRecv) {
          // Audio disabled: have we removed it?
          if (media.removeAudio && audioTransceiver) {
            try {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("inactive");
              } else {
                audioTransceiver.direction = "inactive";
              }
              Janus$3.log("Setting audio transceiver to inactive:", audioTransceiver);
            } catch (e) {
              Janus$3.error(e);
            }
          }
        } else {
          // Take care of audio m-line
          if (audioSend && audioRecv) {
            if (audioTransceiver) {
              try {
                if (audioTransceiver.setDirection) {
                  audioTransceiver.setDirection("sendrecv");
                } else {
                  audioTransceiver.direction = "sendrecv";
                }
                Janus$3.log("Setting audio transceiver to sendrecv:", audioTransceiver);
              } catch (e) {
                Janus$3.error(e);
              }
            }
          } else if (audioSend && !audioRecv) {
            try {
              if (audioTransceiver) {
                if (audioTransceiver.setDirection) {
                  audioTransceiver.setDirection("sendonly");
                } else {
                  audioTransceiver.direction = "sendonly";
                }
                Janus$3.log("Setting audio transceiver to sendonly:", audioTransceiver);
              }
            } catch (e) {
              Janus$3.error(e);
            }
          } else if (!audioSend && audioRecv) {
            if (audioTransceiver) {
              try {
                if (audioTransceiver.setDirection) {
                  audioTransceiver.setDirection("recvonly");
                } else {
                  audioTransceiver.direction = "recvonly";
                }
                Janus$3.log("Setting audio transceiver to recvonly:", audioTransceiver);
              } catch (e) {
                Janus$3.error(e);
              }
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              audioTransceiver = config.pc.addTransceiver("audio", {
                direction: "recvonly"
              });
              Janus$3.log("Adding recvonly audio transceiver:", audioTransceiver);
            }
          }
        }
        // Handle video (and related changes, if any)
        var videoSend = isVideoSendEnabled(media);
        var videoRecv = isVideoRecvEnabled(media);
        if (!videoSend && !videoRecv) {
          // Video disabled: have we removed it?
          if (media.removeVideo && videoTransceiver) {
            try {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("inactive");
              } else {
                videoTransceiver.direction = "inactive";
              }
              Janus$3.log("Setting video transceiver to inactive:", videoTransceiver);
            } catch (e) {
              Janus$3.error(e);
            }
          }
        } else {
          // Take care of video m-line
          if (videoSend && videoRecv) {
            if (videoTransceiver) {
              try {
                if (videoTransceiver.setDirection) {
                  videoTransceiver.setDirection("sendrecv");
                } else {
                  videoTransceiver.direction = "sendrecv";
                }
                Janus$3.log("Setting video transceiver to sendrecv:", videoTransceiver);
              } catch (e) {
                Janus$3.error(e);
              }
            }
          } else if (videoSend && !videoRecv) {
            if (videoTransceiver) {
              try {
                if (videoTransceiver.setDirection) {
                  videoTransceiver.setDirection("sendonly");
                } else {
                  videoTransceiver.direction = "sendonly";
                }
                Janus$3.log("Setting video transceiver to sendonly:", videoTransceiver);
              } catch (e) {
                Janus$3.error(e);
              }
            }
          } else if (!videoSend && videoRecv) {
            if (videoTransceiver) {
              try {
                if (videoTransceiver.setDirection) {
                  videoTransceiver.setDirection("recvonly");
                } else {
                  videoTransceiver.direction = "recvonly";
                }
                Janus$3.log("Setting video transceiver to recvonly:", videoTransceiver);
              } catch (e) {
                Janus$3.error(e);
              }
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              videoTransceiver = config.pc.addTransceiver("video", {
                direction: "recvonly"
              });
              Janus$3.log("Adding recvonly video transceiver:", videoTransceiver);
            }
          }
        }
      } else {
        if (Janus$3.webRTCAdapter.browserDetails.browser == "firefox" || Janus$3.webRTCAdapter.browserDetails.browser == "edge") {
          mediaConstraints = {
            offerToReceiveAudio: isAudioRecvEnabled(media),
            offerToReceiveVideo: isVideoRecvEnabled(media)
          };
        } else {
          mediaConstraints = {
            mandatory: {
              OfferToReceiveAudio: isAudioRecvEnabled(media),
              OfferToReceiveVideo: isVideoRecvEnabled(media)
            }
          };
        }
      }
      Janus$3.debug(mediaConstraints);
      // Check if this is Firefox and we've been asked to do simulcasting
      var sendVideo = isVideoSendEnabled(media);
      if (sendVideo && simulcast && Janus$3.webRTCAdapter.browserDetails.browser === "firefox") {
        // FIXME Based on https://gist.github.com/voluntas/088bc3cc62094730647b
        Janus$3.log("Enabling Simulcasting for Firefox (RID)");
        var sender = config.pc.getSenders()[1];
        Janus$3.log(sender);
        var parameters = sender.getParameters();
        Janus$3.log(parameters);
        var maxBitrates = getMaxBitrates(callbacks.simulcastMaxBitrates);
        sender.setParameters({
          encodings: [{
            rid: "high",
            active: true,
            priority: "high",
            maxBitrate: maxBitrates.high
          }, {
            rid: "medium",
            active: true,
            priority: "medium",
            maxBitrate: maxBitrates.medium
          }, {
            rid: "low",
            active: true,
            priority: "low",
            maxBitrate: maxBitrates.low
          }]
        });
      }
      config.pc.createAnswer(mediaConstraints).then(function (answer) {
        Janus$3.debug(answer);
        // JSON.stringify doesn't work on some WebRTC objects anymore
        // See https://code.google.com/p/chromium/issues/detail?id=467366
        var jsep = {
          "type": answer.type,
          "sdp": answer.sdp
        };
        callbacks.customizeSdp(jsep);
        answer.sdp = jsep.sdp;
        Janus$3.log("Setting local description");
        if (sendVideo && simulcast) {
          // This SDP munging only works with Chrome
          if (Janus$3.webRTCAdapter.browserDetails.browser === "chrome") {
            // FIXME Apparently trying to simulcast when answering breaks video in Chrome...
            //~ Janus.log("Enabling Simulcasting for Chrome (SDP munging)");
            //~ answer.sdp = mungeSdpForSimulcasting(answer.sdp);
            Janus$3.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it");
          } else if (Janus$3.webRTCAdapter.browserDetails.browser !== "firefox") {
            Janus$3.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring");
          }
        }
        config.mySdp = answer.sdp;
        config.pc.setLocalDescription(answer)["catch"](callbacks.error);
        config.mediaConstraints = mediaConstraints;
        if (!config.iceDone && !config.trickle) {
          // Don't do anything until we have all candidates
          Janus$3.log("Waiting for all candidates...");
          return;
        }
        callbacks.success(answer);
      }, callbacks.error);
    }
    function sendSDP(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$3.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$3.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle, not sending anything");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      Janus$3.log("Sending offer/answer SDP...");
      if (config.mySdp === null || config.mySdp === undefined) {
        Janus$3.warn("Local SDP instance is invalid, not sending anything...");
        return;
      }
      config.mySdp = {
        "type": config.pc.localDescription.type,
        "sdp": config.pc.localDescription.sdp
      };
      if (config.trickle === false) config.mySdp["trickle"] = false;
      Janus$3.debug(callbacks);
      config.sdpSent = true;
      callbacks.success(config.mySdp);
    }
    function _getVolume(handleId, remote) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        return 0;
      }
      var stream = remote ? "remote" : "local";
      var config = pluginHandle.webrtcStuff;
      if (!config.volume[stream]) config.volume[stream] = {
        value: 0
      };
      // Start getting the volume, if getStats is supported
      if (config.pc.getStats && Janus$3.webRTCAdapter.browserDetails.browser === "chrome") {
        if (remote && (config.remoteStream === null || config.remoteStream === undefined)) {
          Janus$3.warn("Remote stream unavailable");
          return 0;
        } else if (!remote && (config.myStream === null || config.myStream === undefined)) {
          Janus$3.warn("Local stream unavailable");
          return 0;
        }
        if (config.volume[stream].timer === null || config.volume[stream].timer === undefined) {
          Janus$3.log("Starting " + stream + " volume monitor");
          config.volume[stream].timer = setInterval(function () {
            config.pc.getStats(function (stats) {
              var results = stats.result();
              for (var i = 0; i < results.length; i++) {
                var res = results[i];
                if (res.type == 'ssrc') {
                  if (remote && res.stat('audioOutputLevel')) config.volume[stream].value = parseInt(res.stat('audioOutputLevel'));else if (!remote && res.stat('audioInputLevel')) config.volume[stream].value = parseInt(res.stat('audioInputLevel'));
                }
              }
            });
          }, 200);
          return 0; // We don't have a volume to return yet
        }

        return config.volume[stream].value;
      } else {
        // audioInputLevel and audioOutputLevel seem only available in Chrome? audioLevel
        // seems to be available on Chrome and Firefox, but they don't seem to work
        Janus$3.warn("Getting the " + stream + " volume unsupported by browser");
        return 0;
      }
    }
    function isMuted(handleId, video) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        return true;
      }
      var config = pluginHandle.webrtcStuff;
      if (config.pc === null || config.pc === undefined) {
        Janus$3.warn("Invalid PeerConnection");
        return true;
      }
      if (config.myStream === undefined || config.myStream === null) {
        Janus$3.warn("Invalid local MediaStream");
        return true;
      }
      if (video) {
        // Check video track
        if (config.myStream.getVideoTracks() === null || config.myStream.getVideoTracks() === undefined || config.myStream.getVideoTracks().length === 0) {
          Janus$3.warn("No video track");
          return true;
        }
        return !config.myStream.getVideoTracks()[0].enabled;
      } else {
        // Check audio track
        if (config.myStream.getAudioTracks() === null || config.myStream.getAudioTracks() === undefined || config.myStream.getAudioTracks().length === 0) {
          Janus$3.warn("No audio track");
          return true;
        }
        return !config.myStream.getAudioTracks()[0].enabled;
      }
    }
    function mute(handleId, video, mute) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        return false;
      }
      var config = pluginHandle.webrtcStuff;
      if (config.pc === null || config.pc === undefined) {
        Janus$3.warn("Invalid PeerConnection");
        return false;
      }
      if (config.myStream === undefined || config.myStream === null) {
        Janus$3.warn("Invalid local MediaStream");
        return false;
      }
      if (video) {
        // Mute/unmute video track
        if (config.myStream.getVideoTracks() === null || config.myStream.getVideoTracks() === undefined || config.myStream.getVideoTracks().length === 0) {
          Janus$3.warn("No video track");
          return false;
        }
        config.myStream.getVideoTracks()[0].enabled = mute ? false : true;
        return true;
      } else {
        // Mute/unmute audio track
        if (config.myStream.getAudioTracks() === null || config.myStream.getAudioTracks() === undefined || config.myStream.getAudioTracks().length === 0) {
          Janus$3.warn("No audio track");
          return false;
        }
        config.myStream.getAudioTracks()[0].enabled = mute ? false : true;
        return true;
      }
    }
    function _getBitrate(handleId) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$3.warn("Invalid handle");
        return "Invalid handle";
      }
      var config = pluginHandle.webrtcStuff;
      if (config.pc === null || config.pc === undefined) return "Invalid PeerConnection";
      // Start getting the bitrate, if getStats is supported
      if (config.pc.getStats) {
        if (config.bitrate.timer === null || config.bitrate.timer === undefined) {
          Janus$3.log("Starting bitrate timer (via getStats)");
          config.bitrate.timer = setInterval(function () {
            config.pc.getStats().then(function (stats) {
              stats.forEach(function (res) {
                if (!res) return;
                var inStats = false;
                // Check if these are statistics on incoming media
                if ((res.mediaType === "video" || res.id.toLowerCase().indexOf("video") > -1) && res.type === "inbound-rtp" && res.id.indexOf("rtcp") < 0) {
                  // New stats
                  inStats = true;
                } else if (res.type == 'ssrc' && res.bytesReceived && (res.googCodecName === "VP8" || res.googCodecName === "")) {
                  // Older Chromer versions
                  inStats = true;
                }
                // Parse stats now
                if (inStats) {
                  config.bitrate.bsnow = res.bytesReceived;
                  config.bitrate.tsnow = res.timestamp;
                  if (config.bitrate.bsbefore === null || config.bitrate.tsbefore === null) {
                    // Skip this round
                    config.bitrate.bsbefore = config.bitrate.bsnow;
                    config.bitrate.tsbefore = config.bitrate.tsnow;
                  } else {
                    // Calculate bitrate
                    var timePassed = config.bitrate.tsnow - config.bitrate.tsbefore;
                    if (Janus$3.webRTCAdapter.browserDetails.browser == "safari") timePassed = timePassed / 1000; // Apparently the timestamp is in microseconds, in Safari
                    var bitRate = Math.round((config.bitrate.bsnow - config.bitrate.bsbefore) * 8 / timePassed);
                    if (Janus$3.webRTCAdapter.browserDetails.browser === 'safari') bitRate = parseInt(bitRate / 1000);
                    config.bitrate.value = bitRate + ' kbits/sec';
                    //~ Janus.log("Estimated bitrate is " + config.bitrate.value);
                    config.bitrate.bsbefore = config.bitrate.bsnow;
                    config.bitrate.tsbefore = config.bitrate.tsnow;
                  }
                }
              });
            });
          }, 1000);
          return "0 kbits/sec"; // We don't have a bitrate value yet
        }

        return config.bitrate.value;
      } else {
        Janus$3.warn("Getting the video bitrate unsupported by browser");
        return "Feature unsupported by browser";
      }
    }
    function webrtcError(error) {
      Janus$3.error("WebRTC error:", error);
    }
    function cleanupWebrtc(handleId, hangupRequest) {
      Janus$3.log("Cleaning WebRTC stuff");
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined) {
        // Nothing to clean
        return;
      }
      var config = pluginHandle.webrtcStuff;
      if (config !== null && config !== undefined) {
        if (hangupRequest === true) {
          // Send a hangup request (we don't really care about the response)
          var request = {
            "rtcgw": "hangup",
            "transaction": Janus$3.randomString(12)
          };
          if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
          if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
          Janus$3.debug("Sending hangup request (handle=" + handleId + "):");
          Janus$3.debug(request);
          if (websockets) {
            request["session_id"] = sessionId;
            request["handle_id"] = handleId;
            ws.send(JSON.stringify(request));
          } else {
            Janus$3.httpAPICall(server + "/" + sessionId + "/" + handleId, {
              verb: 'POST',
              withCredentials: withCredentials,
              body: request
            });
          }
        }
        // Cleanup stack
        config.remoteStream = null;
        if (config.volume) {
          if (config.volume["local"] && config.volume["local"].timer) clearInterval(config.volume["local"].timer);
          if (config.volume["remote"] && config.volume["remote"].timer) clearInterval(config.volume["remote"].timer);
        }
        config.volume = {};
        if (config.bitrate.timer) clearInterval(config.bitrate.timer);
        config.bitrate.timer = null;
        config.bitrate.bsnow = null;
        config.bitrate.bsbefore = null;
        config.bitrate.tsnow = null;
        config.bitrate.tsbefore = null;
        config.bitrate.value = null;
        try {
          // Try a MediaStreamTrack.stop() for each track
          if (!config.streamExternal && config.myStream !== null && config.myStream !== undefined) {
            Janus$3.log("Stopping local stream tracks");
            var tracks = config.myStream.getTracks();
            for (var i in tracks) {
              var mst = tracks[i];
              Janus$3.log(mst);
              if (mst !== null && mst !== undefined) mst.stop();
            }
          }
        } catch (e) {
          // Do nothing if this fails
        }
        config.streamExternal = false;
        config.myStream = null;
        // Close PeerConnection
        try {
          config.pc.close();
        } catch (e) {
          // Do nothing
        }
        config.pc = null;
        config.candidates = null;
        config.mySdp = null;
        config.remoteSdp = null;
        config.iceDone = false;
        config.dataChannel = {};
        config.dtmfSender = null;
      }
      pluginHandle.oncleanup();
    }

    // Helper method to munge an SDP to enable simulcasting (Chrome only)
    function mungeSdpForSimulcasting(sdp) {
      // Let's munge the SDP to add the attributes for enabling simulcasting
      // (based on https://gist.github.com/ggarber/a19b4c33510028b9c657)
      var lines = sdp.split("\r\n");
      var video = false;
      var ssrc = [-1],
        ssrc_fid = [-1];
      var cname = null,
        msid = null,
        mslabel = null,
        label = null;
      var insertAt = -1;
      for (var i = 0; i < lines.length; i++) {
        var mline = lines[i].match(/m=(\w+) */);
        if (mline) {
          var medium = mline[1];
          if (medium === "video") {
            // New video m-line: make sure it's the first one
            if (ssrc[0] < 0) {
              video = true;
            } else {
              // We're done, let's add the new attributes here
              insertAt = i;
              break;
            }
          } else {
            // New non-video m-line: do we have what we were looking for?
            if (ssrc[0] > -1) {
              // We're done, let's add the new attributes here
              insertAt = i;
              break;
            }
          }
          continue;
        }
        if (!video) continue;
        var fid = lines[i].match(/a=ssrc-group:FID (\d+) (\d+)/);
        if (fid) {
          ssrc[0] = fid[1];
          ssrc_fid[0] = fid[2];
          lines.splice(i, 1);
          i--;
          continue;
        }
        if (ssrc[0]) {
          var match = lines[i].match('a=ssrc:' + ssrc[0] + ' cname:(.+)');
          if (match) {
            cname = match[1];
          }
          match = lines[i].match('a=ssrc:' + ssrc[0] + ' msid:(.+)');
          if (match) {
            msid = match[1];
          }
          match = lines[i].match('a=ssrc:' + ssrc[0] + ' mslabel:(.+)');
          if (match) {
            mslabel = match[1];
          }
          match = lines[i].match('a=ssrc:' + ssrc[0] + ' label:(.+)');
          if (match) {
            label = match[1];
          }
          if (lines[i].indexOf('a=ssrc:' + ssrc_fid[0]) === 0) {
            lines.splice(i, 1);
            i--;
            continue;
          }
          if (lines[i].indexOf('a=ssrc:' + ssrc[0]) === 0) {
            lines.splice(i, 1);
            i--;
            continue;
          }
        }
        if (lines[i].length == 0) {
          lines.splice(i, 1);
          i--;
          continue;
        }
      }
      if (ssrc[0] < 0) {
        // Couldn't find a FID attribute, let's just take the first video SSRC we find
        insertAt = -1;
        video = false;
        for (var i = 0; i < lines.length; i++) {
          var mline = lines[i].match(/m=(\w+) */);
          if (mline) {
            var medium = mline[1];
            if (medium === "video") {
              // New video m-line: make sure it's the first one
              if (ssrc[0] < 0) {
                video = true;
              } else {
                // We're done, let's add the new attributes here
                insertAt = i;
                break;
              }
            } else {
              // New non-video m-line: do we have what we were looking for?
              if (ssrc[0] > -1) {
                // We're done, let's add the new attributes here
                insertAt = i;
                break;
              }
            }
            continue;
          }
          if (!video) continue;
          if (ssrc[0] < 0) {
            var value = lines[i].match(/a=ssrc:(\d+)/);
            if (value) {
              ssrc[0] = value[1];
              lines.splice(i, 1);
              i--;
              continue;
            }
          } else {
            var match = lines[i].match('a=ssrc:' + ssrc[0] + ' cname:(.+)');
            if (match) {
              cname = match[1];
            }
            match = lines[i].match('a=ssrc:' + ssrc[0] + ' msid:(.+)');
            if (match) {
              msid = match[1];
            }
            match = lines[i].match('a=ssrc:' + ssrc[0] + ' mslabel:(.+)');
            if (match) {
              mslabel = match[1];
            }
            match = lines[i].match('a=ssrc:' + ssrc[0] + ' label:(.+)');
            if (match) {
              label = match[1];
            }
            if (lines[i].indexOf('a=ssrc:' + ssrc_fid[0]) === 0) {
              lines.splice(i, 1);
              i--;
              continue;
            }
            if (lines[i].indexOf('a=ssrc:' + ssrc[0]) === 0) {
              lines.splice(i, 1);
              i--;
              continue;
            }
          }
          if (lines[i].length == 0) {
            lines.splice(i, 1);
            i--;
            continue;
          }
        }
      }
      if (ssrc[0] < 0) {
        // Still nothing, let's just return the SDP we were asked to munge
        Janus$3.warn("Couldn't find the video SSRC, simulcasting NOT enabled");
        return sdp;
      }
      if (insertAt < 0) {
        // Append at the end
        insertAt = lines.length;
      }
      // Generate a couple of SSRCs (for retransmissions too)
      // Note: should we check if there are conflicts, here?
      ssrc[1] = Math.floor(Math.random() * 0xFFFFFFFF);
      ssrc[2] = Math.floor(Math.random() * 0xFFFFFFFF);
      ssrc_fid[1] = Math.floor(Math.random() * 0xFFFFFFFF);
      ssrc_fid[2] = Math.floor(Math.random() * 0xFFFFFFFF);
      // Add attributes to the SDP
      for (var i = 0; i < ssrc.length; i++) {
        if (cname) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' cname:' + cname);
          insertAt++;
        }
        if (msid) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' msid:' + msid);
          insertAt++;
        }
        if (mslabel) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' mslabel:' + mslabel);
          insertAt++;
        }
        if (label) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' label:' + label);
          insertAt++;
        }
        // Add the same info for the retransmission SSRC
        if (cname) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' cname:' + cname);
          insertAt++;
        }
        if (msid) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' msid:' + msid);
          insertAt++;
        }
        if (mslabel) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' mslabel:' + mslabel);
          insertAt++;
        }
        if (label) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' label:' + label);
          insertAt++;
        }
      }
      lines.splice(insertAt, 0, 'a=ssrc-group:FID ' + ssrc[2] + ' ' + ssrc_fid[2]);
      lines.splice(insertAt, 0, 'a=ssrc-group:FID ' + ssrc[1] + ' ' + ssrc_fid[1]);
      lines.splice(insertAt, 0, 'a=ssrc-group:FID ' + ssrc[0] + ' ' + ssrc_fid[0]);
      lines.splice(insertAt, 0, 'a=ssrc-group:SIM ' + ssrc[0] + ' ' + ssrc[1] + ' ' + ssrc[2]);
      sdp = lines.join("\r\n");
      if (!sdp.endsWith("\r\n")) sdp += "\r\n";
      return sdp;
    }

    // Helper methods to parse a media object
    function isAudioSendEnabled(media) {
      Janus$3.debug("isAudioSendEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.audio === false) return false; // Generic audio has precedence
      if (media.audioSend === undefined || media.audioSend === null) return true; // Default
      return media.audioSend === true;
    }
    function isAudioSendRequired(media) {
      Janus$3.debug("isAudioSendRequired:", media);
      if (media === undefined || media === null) return false; // Default
      if (media.audio === false || media.audioSend === false) return false; // If we're not asking to capture audio, it's not required
      if (media.failIfNoAudio === undefined || media.failIfNoAudio === null) return false; // Default
      return media.failIfNoAudio === true;
    }
    function isAudioRecvEnabled(media) {
      Janus$3.debug("isAudioRecvEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.audio === false) return false; // Generic audio has precedence
      if (media.audioRecv === undefined || media.audioRecv === null) return true; // Default
      return media.audioRecv === true;
    }
    function isVideoSendEnabled(media) {
      Janus$3.debug("isVideoSendEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.video === false) return false; // Generic video has precedence
      if (media.videoSend === undefined || media.videoSend === null) return true; // Default
      return media.videoSend === true;
    }
    function isVideoSendRequired(media) {
      Janus$3.debug("isVideoSendRequired:", media);
      if (media === undefined || media === null) return false; // Default
      if (media.video === false || media.videoSend === false) return false; // If we're not asking to capture video, it's not required
      if (media.failIfNoVideo === undefined || media.failIfNoVideo === null) return false; // Default
      return media.failIfNoVideo === true;
    }
    function isVideoRecvEnabled(media) {
      Janus$3.debug("isVideoRecvEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.video === false) return false; // Generic video has precedence
      if (media.videoRecv === undefined || media.videoRecv === null) return true; // Default
      return media.videoRecv === true;
    }
    function isScreenSendEnabled(media) {
      Janus$3.debug("isScreenSendEnabled:", media);
      if (media === undefined || media === null) return false;
      if (_typeof(media.video) !== 'object' || _typeof(media.video.mandatory) !== 'object') return false;
      var constraints = media.video.mandatory;
      if (constraints.chromeMediaSource) return constraints.chromeMediaSource === 'desktop' || constraints.chromeMediaSource === 'screen';else if (constraints.mozMediaSource) return constraints.mozMediaSource === 'window' || constraints.mozMediaSource === 'screen';else if (constraints.mediaSource) return constraints.mediaSource === 'window' || constraints.mediaSource === 'screen';
      return false;
    }
    function isDataEnabled(media) {
      Janus$3.debug("isDataEnabled:", media);
      if (Janus$3.webRTCAdapter.browserDetails.browser == "edge") {
        Janus$3.warn("Edge doesn't support data channels yet");
        return false;
      }
      if (media === undefined || media === null) return false; // Default
      return media.data === true;
    }
    function isTrickleEnabled(trickle) {
      Janus$3.debug("isTrickleEnabled:", trickle);
      if (trickle === undefined || trickle === null) return true; // Default is true
      return trickle === true;
    }
  }
  window.Janus_Talk = Janus$3;

  // We make use of this 'server' variable to provide the address of the
  // REST Janus API. By default, in this example we assume that Janus is
  // co-located with the web server hosting the HTML pages but listening
  // on a different port (8088, the default for HTTP in Janus), which is
  // why we make use of the 'window.location.hostname' base address. Since
  // Janus can also do HTTPS, and considering we don't really want to make
  // use of HTTP for Janus if your demos are served on HTTPS, we also rely
  // on the 'window.location.protocol' prefix to build the variable, in
  // particular to also change the port used to contact Janus (8088 for
  // HTTP and 8089 for HTTPS, if enabled).
  // In case you place Janus behind an Apache frontend (as we did on the
  // online demos at http://janus.conf.meetecho.com) you can just use a
  // relative path for the variable, e.g.:
  //
  // 		var server = "/janus";
  //
  // which will take care of this on its own.
  //
  //
  // If you want to use the WebSockets frontend to Janus, instead, you'll
  // have to pass a different kind of address, e.g.:
  //
  // 		var server = "ws://" + window.location.hostname + ":8188";
  //
  // Of course this assumes that support for WebSockets has been built in
  // when compiling the server. WebSockets support has not been tested
  // as much as the REST API, so handle with care!
  //
  //
  // If you have multiple options available, and want to let the library
  // autodetect the best way to contact your server (or pool of servers),
  // you can also pass an array of servers, e.g., to provide alternative
  // means of access (e.g., try WebSockets first and, if that fails, fall
  // back to plain HTTP) or just have failover servers:
  //
  //		var server = [
  //			"ws://" + window.location.hostname + ":8188",
  //			"/janus"
  //		];
  //
  // This will tell the library to try connecting to each of the servers
  // in the presented order. The first working server will be used for
  // the whole session.
  //
  var Janus$2 = window.Janus_Talk;
  var janus = null;
  var tts = null;
  var opaqueId = "tts-" + Janus_Talk.randomString(12);
  var spinner = null;

  // Initialize the library (all console debuggers enabled)
  Janus$2.init({
    debug: "all",
    callback: function callback() {
      window.stopTalk = function () {
        janus.destroy();
      };
      // debugger;
      window.startTalk = function () {
        // Make sure the browser supports WebRTC
        if (!Janus$2.isWebrtcSupported()) {
          bootbox.alert("No WebRTC support... ");
          return;
        }

        // if($('#tts_url').val().length == 0){
        // 	bootbox.alert("Please input tts url... ");
        // 	return;
        // }

        // $(this).attr('disabled', true).unbind('click');

        // Create session
        janus = new Janus$2({
          server: window.EZUIKit.opt.rtcUrl,
          // No "iceServers" is provided, meaning janus.js will use a default STUN server
          // Here are some examples of how an iceServers field may look like to support TURN
          // 		iceServers: [{urls: "turn:yourturnserver.com:3478", username: "janususer", credential: "januspwd"}],
          // 		iceServers: [{urls: "turn:yourturnserver.com:443?transport=tcp", username: "janususer", credential: "januspwd"}],
          // 		iceServers: [{urls: "turns:yourturnserver.com:443?transport=tcp", username: "janususer", credential: "januspwd"}],
          // Should the Janus API require authentication, you can specify either the API secret or user token here too
          //		token: "mytoken",
          //	or
          //		apisecret: "serversecret",
          success: function success() {
            // Attach to tts plugin
            janus.attach({
              plugin: "rtcgw.plugin.tts",
              opaqueId: opaqueId,
              success: function success(pluginHandle) {
                // $('#details').remove();
                tts = pluginHandle;
                Janus$2.log("Plugin attached! (" + tts.getPlugin() + ", id=" + tts.getId() + ")");
                // Negotiate WebRTC
                //var url = "tts://61.130.6.23:8664/talk://D13781761:0:1:cas.ys7.com:6500?97fbd2a75fa94b7682c994d3d1fac8ca:ut.5porslgu79e9r7ca48z32k8abgl3rp58-77bhb6i7xr-1kmumtg-jkhy7pvfr:0:3"

                //var url = "tts://10.86.15.209:8664/talk://D13781761:0:1:cas.ys7.com:6500?32db2578ba7c4a84be22ecc0bcd0f8db:ut.5lqpkhim5m7cdk2y5w60g7hm9vd7i3v0-3d2pwhxe2t-11wx2ge-sh4yazbll:0:3"
                //var url = "tts://10.86.15.209:8664/talk://D13781761:0:1:cas.ys7.com:6500"
                //test12.ys.com
                //var url = "tts://10.86.15.209:8664/talk://D08197169:0:1:cas.ys7.com:6500"
                //test10.ys.com
                //var url = "tts://10.86.29.210:8664/talk://D08197169:0:1:cas.ys7.com:6500"
                var url = window.EZUIKit.opt.talkLink;
                console.log("ttsUlr", url);
                var body = {
                  "request": "start",
                  "url": url,
                  "codec": "opus",
                  "dir": "sendrecv",
                  "audio_debug": 1,
                  "url_version": "1"
                };
                if (window.EZUIKit.opt.talkType === 'gb28181') {
                  body['devProto'] = 'gb28181';
                }
                //tts.send({"message": body});
                Janus$2.debug("Trying a createOffer too (audio/video sendrecv)");
                tts.createOffer({
                  // No media provided: by default, it's sendrecv for audio and video
                  media: {
                    audio: true,
                    video: false,
                    data: false
                  },
                  // Audio only
                  // If you want to test simulcasting (Chrome and Firefox only), then
                  // pass a ?simulcast=true when opening this demo page: it will turn
                  // the following 'simulcast' property to pass to janus.js to true
                  simulcast: false,
                  simulcast2: false,
                  success: function success(jsep) {
                    Janus$2.debug("Got SDP!");
                    Janus$2.debug(jsep);
                    tts.send({
                      "message": body,
                      "jsep": jsep
                    });
                    if (typeof window.EZUIKit.handleTalkSuccess !== 'undefined') {
                      window.EZUIKit.handleTalkSuccess();
                    }
                  },
                  error: function error(_error) {
                    Janus$2.error("WebRTC error:", _error);
                    //	bootbox.alert("WebRTC error... " + JSON.stringify(error));
                    if (typeof window.EZUIKit.handleTalkError !== 'undefined') {
                      window.EZUIKit.handleTalkError(_error);
                    }
                  }
                });
                // $('#start').removeAttr('disabled').html("Stop")
                // 	.click(function() {
                // 		$(this).attr('disabled', true);
                // 		janus.destroy();
                // 	});
              },

              error: function error(_error2) {
                console.error("  -- Error attaching plugin...", _error2);
                bootbox.alert("Error attaching plugin... " + _error2);
                if (window.EZUIKit.handleTalkError !== 'undefined') {
                  window.EZUIKit.handleTalkError(_error2);
                }
              },
              consentDialog: function consentDialog(on) {
                Janus$2.debug("Consent dialog should be " + (on ? "on" : "off") + " now");
              },
              iceState: function iceState(state) {
                Janus$2.log("ICE state changed to " + state);
              },
              mediaState: function mediaState(medium, on) {
                Janus$2.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium);
              },
              webrtcState: function webrtcState(on) {
                Janus$2.log("Janus says our WebRTC PeerConnection is " + (on ? "up" : "down") + " now");
                // $("#audioleft").parent().unblock();
              },

              slowLink: function slowLink(uplink, lost) {
                Janus$2.warn("Janus reports problems " + (uplink ? "sending" : "receiving") + " packets on this PeerConnection (" + lost + " lost packets)");
              },
              onmessage: function onmessage(msg, jsep) {
                Janus$2.debug(" ::: Got a message :::");
                Janus$2.debug(msg);
                if (jsep !== undefined && jsep !== null) {
                  Janus$2.debug("Handling SDP as well...");
                  Janus$2.debug(jsep);
                  tts.handleRemoteJsep({
                    jsep: jsep
                  });
                }
                var result = msg["result"];
                if (result !== null && result !== undefined) {
                  if (result === "done") {
                    // The plugin closed
                    bootbox.alert("The TTS Test is over");
                    if (spinner !== null && spinner !== undefined) spinner.stop();
                    spinner = null;
                    // $('#myaudio').remove();
                    //$('#waitingvideo').remove();
                    // $('#peeraudio').remove();
                    return;
                  }
                  if (result === "msg") {
                    if (typeof window.EZUIKit.handleTalkMessage !== 'undefined') {
                      window.EZUIKit.handleTalkMessage(msg);
                    }
                  }
                  // Any loss?
                  var status = result["status"];
                  if (status === "slow_link") {
                    //~ var bitrate = result["bitrate"];
                    //~ toastr.warning("The bitrate has been cut to " + (bitrate/1000) + "kbps", "Packet loss?", {timeOut: 2000});
                    toastr.warning("Janus apparently missed many packets we sent, maybe we should reduce the bitrate", "Packet loss?", {
                      timeOut: 2000
                    });
                  }
                }
              },
              onlocalstream: function onlocalstream(stream) {
                Janus$2.debug(" ::: Got a local stream :::");
                Janus$2.debug(stream);

                // if($('#myaudio').length === 0) {
                // 	$('#audios').removeClass('hide').show();
                // 	$('#audioleft').append('<audio id="myaudio" autoplay controls muted>Your browser does not support audio tag</audio>');
                // }
                Janus$2.attachMediaStream(document.getElementById("myaudio"), stream);
                //$("#myaudio").get(0).muted = "muted";
                if (tts.webrtcStuff.pc.iceConnectionState !== "completed" && tts.webrtcStuff.pc.iceConnectionState !== "connected") {
                  // $("#audioleft").parent().block({
                  // 	message: '<b>Publishing...</b>',
                  // 	css: {
                  // 		border: 'none',
                  // 		backgroundColor: 'transparent',
                  // 		color: 'white'
                  // 	}
                  // });
                  // No remote video yet
                  //$('#audioright').append('<video class="rounded centered" id="waitingvideo" width=320 height=240 />');
                  if (spinner == null) {
                    document.getElementById('audioright');
                    //spinner = new Spinner({top:100}).spin(target);
                  } else {
                    spinner.spin();
                  }
                }
                var audioTracks = stream.getAudioTracks();
                if (audioTracks === null || audioTracks === undefined || audioTracks.length === 0) ;
              },
              onremotestream: function onremotestream(stream) {
                Janus$2.debug(" ::: Got a remote stream :::");
                Janus$2.debug(stream);
                // if($('#peeraudio').length === 0) {
                // 	$('#audios').removeClass('hide').show();
                // 	// $('#audioright').append('<audio id="peeraudio" autoplay controls>Your browser does not support audio tag</audio>');
                // 	// Show the video, hide the spinner and show the resolution when we get a playing event
                // 	var audio = $('<audio id="peeraudio" autoplay controls playsinline preload="preload" loop="true"></audio>');
                // 	audio = audio.get(0);
                // 	audio.setAttribute("id", 'peeraudio');
                // 	audio.setAttribute("preload","preload");
                // 	// 自动播放解决苹果不兼容autoplay属性
                // 	audio.setAttribute("loop",true);
                // 	$('#audioright').append(audio);
                // 	$("#peeraudio").bind("playing", function () {
                // 		//$('#waitingvideo').remove();
                // 		$('#peeraudio').removeClass('hide').show();
                // 		if(spinner !== null && spinner !== undefined)
                // 			spinner.stop();
                // 		spinner = null;
                // 	});
                // }
                Janus$2.attachMediaStream(document.getElementById("peeraudio"), stream);
                var audioTracks = stream.getAudioTracks();
                if (audioTracks === null || audioTracks === undefined || audioTracks.length === 0) ; else {
                  //	$('#peeraudio').removeClass('hide').show();
                  document.getElementById('peeraudio').play();
                }
              },
              ondataopen: function ondataopen(data) {
                Janus$2.log("The DataChannel is available!");
              },
              ondata: function ondata(data) {
                Janus$2.debug("We got data from the DataChannel! " + data);
              },
              oncleanup: function oncleanup() {
                Janus$2.log(" ::: Got a cleanup notification :::");
                if (spinner !== null && spinner !== undefined) spinner.stop();
                spinner = null;
                // $('#myaudio').remove();
                // //$('#waitingvideo').remove();
                // $("#audioleft").parent().unblock();
                // $('#peeraudio').remove();
              }
            });
          },

          error: function error(_error3) {
            Janus$2.error(_error3);
            if (window.EZUIKit.handleTalkError !== 'undefined') {
              window.EZUIKit.handleTalkError(_error3);
            }
          },
          destroyed: function destroyed() {
            // window.location.reload();
          }
        });
      };
    }
  });
  window.janus = janus;
  window.tts = tts;

  /**
   * @class Talk
   * @classdesc 语音对讲
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * 
   * @example
   * // 初始化语音对讲
   * const talk = new Talk(jSPlugin)
   * talk.startTalk() // 开始语音对讲
   */
  var Talk = /*#__PURE__*/function () {
    function Talk(jSPlugin) {
      var _this = this;
      _classCallCheck$1(this, Talk);
      this.jSPlugin = jSPlugin;
      this.codeHandler = new UikitCode();
      this.pluginStatus = new Status(this, this.jSPlugin.params.id);
      this.talkChannelNo = jSPlugin.talkChannelNo;
      var audioLeft = document.createElement('div');
      audioLeft.id = "audioleft";
      var audioRight = document.createElement('div');
      audioRight.id = "audioright";
      audioRight.style = "display:none;";
      var audioLeftDOM = document.createElement('audio');
      audioLeftDOM.id = "myaudio";
      audioLeftDOM.muted = true;
      audioLeftDOM.setAttribute("autoplay", true);
      audioLeftDOM.setAttribute("controls", true);
      audioLeft.appendChild(audioLeftDOM);
      audioLeft.style = "display:none;";
      var audioRightDOM = document.createElement('audio');
      audioRightDOM.id = "peeraudio";
      audioRightDOM.setAttribute("autoplay", true);
      audioRightDOM.setAttribute("controls", true);
      audioRight.appendChild(audioRightDOM);

      // addJs(`${this.jSPlugin.staticPath}/talk/adapeter.js`, () => {
      //   addJs(`${this.jSPlugin.staticPath}/talk/janus.js`, () => {
      //     addJs(`${this.jSPlugin.staticPath}/talk/tts-v4.js`, () => {
      // 临时处理
      window.EZUIKit["handleTalkError"] = function (err) {
        console.log("talk err", err);
        if (typeof _this.jSPlugin.handleTalkError !== 'undefined') {
          _this.jSPlugin.handleTalkError(err);
        }
      };
      window.EZUIKit["handleTalkSuccess"] = function (data) {
        console.log("talk success", data);
        if (typeof _this.jSPlugin.handleTalkSuccess !== 'undefined') {
          _this.jSPlugin.handleTalkSuccess(data);
        }
      };
      window.EZUIKit.opt = {
        rtcUrl: "",
        talkLink: "",
        ttsUrl: "",
        stream: "",
        deviceSerial: matchEzopenUrl(this.jSPlugin.url).deviceSerial,
        channelNo: matchEzopenUrl(this.jSPlugin.url).channelNo
      };
      document.body.appendChild(audioLeft);
      document.body.appendChild(audioRight);
      //     });
      //   });
      // });
    }
    _createClass$1(Talk, [{
      key: "toString",
      value: function toString() {
        return "".concat(this.coreX, "-").concat(this.coreY);
      }
    }, {
      key: "startTalk",
      value: function startTalk(callback) {
        var _this2 = this;
        if (this.jSPlugin.capacity && this.jSPlugin.capacity.support_talk && !(this.jSPlugin.capacity && (this.jSPlugin.capacity.support_talk === '3' || this.jSPlugin.capacity.support_talk === '1'))) {
          if (typeof this.jSPlugin.params.handleError === 'function') {
            this.pluginStatus.loadingSetText({
              text: "设备不支持对讲",
              color: 'red',
              delayClear: 2000
            });
            this.jSPlugin.params.handleError({
              msg: "设备不支持对讲",
              retcode: -1000,
              id: this.jSPlugin.params.id,
              type: "handleError"
            });
          }
          console.log("设备不支持对讲");
          return false;
        }
        var formData = new FormData();
        formData.append("accessToken", this.jSPlugin.accessToken);
        formData.append("deviceSerial", matchEzopenUrl(this.jSPlugin.url).deviceSerial);
        formData.append("channelNo", this.talkChannelNo || '0');
        //扩展参数拼接
        if (this.jSPlugin.params.extraParams && this.jSPlugin.params.extraParams.talkParams) {
          if (_typeof(this.jSPlugin.params.extraParams.talkParams) === 'object') {
            for (var key in this.jSPlugin.params.extraParams.talkParams) {
              data.append(key, this.jSPlugin.params.extraParams.talkParams[key]);
            }
          }
        }
        fetch(this.jSPlugin.env.domain + "/api/lapp/live/talk/url", {
          method: "POST",
          // headers: {
          //   'Content-Type': 'application/json'
          // },
          body: formData
        }).then(function (response) {
          return response.json();
        }).then(function (data) {
          if (data.code == 200) {
            var apiResult = data.data;
            if (apiResult) {
              // 临时将https转换为websocket
              var rtcTrunk = apiResult.rtcUrl;
              if (rtcTrunk.indexOf("ws") === -1) {
                rtcTrunk = rtcTrunk.replace("https", "wss").replace("rtcgw", "rtcgw-ws");
              }
              window.EZUIKit.opt.rtcUrl = rtcTrunk;
              window.EZUIKit.opt.ttsUrl = "tts://" + apiResult.ttsUrl;

              //扩展参数拼接
              if (_this2.jSPlugin.params.extraParams && _this2.jSPlugin.params.extraParams.ttsParams) {
                if (typeof _this2.jSPlugin.params.extraParams.ttsParams === 'string') {
                  window.EZUIKit.opt.ttsUrl += '&' + _this2.jSPlugin.params.extraParams.ttsParams;
                } else if (_typeof(_this2.jSPlugin.params.extraParams.ttsParams) === 'object') {
                  for (var key in _this2.jSPlugin.params.extraParams.ttsParams) {
                    window.EZUIKit.opt.ttsUrl += '&' + key + '=' + _this2.jSPlugin.params.extraParams.ttsParams[key];
                  }
                }
              }
              if (apiResult.ttsUrl.indexOf('gb28181') > -1 && apiResult.ttsUrl.indexOf('8664') > -1) {
                //国标设备使用8665端口
                window.EZUIKit.opt.ttsUrl = window.EZUIKit.opt.ttsUrl.replace('8664', '8665');
              }
              window.EZUIKit.opt.deviceSerial = matchEzopenUrl(_this2.jSPlugin.url).deviceSerial;
              window.EZUIKit.opt.channelNo = _this2.talkChannelNo || '0';
              // var urlList = window.EZUIKit.opt.ttsUrl.split("?");
              // if (urlList.length === 2 || window.EZUIKit.opt.deviceSerial.indexOf(":") !== -1) {
              //   // 国标设备、第三方对讲设备使用新的对讲格式
              //   var talk = "talk?dev=" + window.EZUIKit.opt.deviceSerial + "&chann=" + window.EZUIKit.opt.channelNo + "&encodetype=2";
              //   // var talk = "talk?dev=" + window.EZUIKit.opt.deviceSerial + "&chann=0" + "&encodetype=2";
              //   window.EZUIKit.opt.talkLink = window.EZUIKit.opt.ttsUrl.split("?")[0] + "/" + talk;
              //   if (apiResult.ttsUrl.indexOf('gb28181') > -1) {
              //     window.EZUIKit.opt.talkType = "gb28181";
              //   }
              // } else {
              //   // 普通设备
              //   var talk = "talk://" + window.EZUIKit.opt.deviceSerial + ":0:" + window.EZUIKit.opt.channelNo + ":cas.ys7.com:6500";
              //   window.EZUIKit.opt.talkLink = window.EZUIKit.opt.ttsUrl.split("?")[0] + "/" + talk;
              // }

              //所有设备都使用新的参数拼接格式
              var talk = "talk?dev=" + window.EZUIKit.opt.deviceSerial + "&chann=" + window.EZUIKit.opt.channelNo + "&encodetype=2";
              window.EZUIKit.opt.talkLink = window.EZUIKit.opt.ttsUrl.split("?")[0] + "/" + talk;
              if (apiResult.ttsUrl.indexOf('gb28181') > -1) {
                window.EZUIKit.opt.talkType = "gb28181";
              }
              if (callback) {
                callback(apiResult.ttsUrl.indexOf('gb28181') > -1 || window.EZUIKit.opt.deviceSerial.indexOf(":") !== -1);
              }
              window.EZUIKit.opt.stream = apiResult.stream;
              window.startTalk();
              if (_this2.jSPlugin.eventEmitter) {
                _this2.jSPlugin.eventEmitter.emit('startTalk', {
                  eventType: 'startTalk',
                  code: 0,
                  target: _this2,
                  msg: '开启对讲'
                });
              }
            }
          } else {
            console.log(data.code, _this2.codeHandler.matchInfo(data.code, 'talk'));
            _this2.pluginStatus.loadingSetText({
              text: _this2.codeHandler.matchInfo(data.code, 'talk').msg || data.msg,
              color: 'red',
              delayClear: 2000
            });
            if (_this2.jSPlugin.eventEmitter) {
              _this2.jSPlugin.eventEmitter.emit('startTalk', {
                eventType: 'startTalk',
                code: -1,
                target: _this2,
                msg: _this2.codeHandler.matchInfo(data.code, 'talk').msg || data.msg
              });
            }
            if (typeof _this2.jSPlugin.params.handleError === 'function') {
              _this2.jSPlugin.params.handleError({
                msg: data.msg,
                retcode: data.code,
                id: _this2.jSPlugin.params.id,
                type: "handleError"
              });
            }
          }
        })["catch"](function (err) {
          console.log("err", err);
        });
      }
    }, {
      key: "stopTalk",
      value: function stopTalk() {
        window.stopTalk();
        if (this.jSPlugin.eventEmitter) {
          this.jSPlugin.eventEmitter.emit('stopTalk', {
            eventType: 'stopTalk',
            code: 0,
            target: this,
            msg: '结束对讲'
          });
        }
        if (document.getElementById("myaudio") && document.getElementById("myaudio").srcObject) {
          document.getElementById("myaudio").srcObject.getTracks()[0].stop();
        }
      }
    }, {
      key: "changeTalkChannelNo",
      value: function changeTalkChannelNo(channelNo) {
        if (window.EZUIKit.opt && !!window.EZUIKit.opt.channelNo) {
          this.talkChannelNo = channelNo;
          window.EZUIKit.opt.channelNo = channelNo;
        }
      }
    }]);
    return Talk;
  }();

  /**
   * @class MobilePtz
   * @classdesc 移动端云台控制
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @example
   * // 初始化MobilePtz
   * const mobilePtz = new MobilePtz(jSPlugin)
   * // 展示MobilePtz
   * mobilePtz.show()
   */
  var MobilePtz = /*#__PURE__*/function () {
    function MobilePtz(jSPlugin) {
      var _this = this;
      _classCallCheck$1(this, MobilePtz);
      this.jSPlugin = jSPlugin;
      var oS = document.createElement('style');
      oS.innerHTML = "\n    body{\n      padding: 0;\n      margin: 0;\n    }\n    #mobile-ez-ptz-container {\n      display: inline-block;\n      width: 375px;\n      text-align: center;\n    }\n    .live-ptz-title{\n      height: 25px;\n      font-size: 18px;\n      color: #2c2c2c;\n      text-align: center;\n      font-weight: 700;\n      margin: 24px 0 12px;\n    }\n    .live-ptz-intro {\n      margin-bottom: 24px;\n      color: #aaaaaa;\n    }\n    .mobile-ez-ptz-wrap {\n      background-image: linear-gradient(180deg, #f6f8ff 0%, #ededed6b 50%)\n    }\n    #mobile-ez-ptz-container .mobile-ez-ptz-container {\n      position: relative;\n      width: 260px;\n      height: 260px;\n      background: rgba(255, 255, 255, 0.80);\n      border: 1px solid rgba(255, 255, 255, 0.80);\n      border-radius: 100%;\n      cursor: pointer;\n      overflow: hidden;\n      margin: auto;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top {\n      width: 0;\n      height: 0;\n      border-left: 6px solid transparent;\n      border-right: 6px solid transparent;\n      border-bottom: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 6px);\n      top: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.top.active {\n      border-bottom-color: #1890FF;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom {\n      width: 0;\n      height: 0;\n      border-left: 6px solid transparent;\n      border-right: 6px solid transparent;\n      border-top: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      left: calc(50% - 6px);\n      bottom: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.bottom.active {\n      border-top-color: #1890FF;\n\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right {\n      width: 0;\n      height: 0;\n      border-top: 6px solid transparent;\n      border-bottom: 6px solid transparent;\n      border-left: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 6px);\n      right: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.right.active {\n      border-left-color: #1890FF;\n\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left {\n      width: 0;\n      height: 0;\n      border-top: 6px solid transparent;\n      border-bottom: 6px solid transparent;\n      border-right: 6px solid #aaaaaa;\n      position: absolute;\n      display: inline-block;\n      top: calc(50% - 6px);\n      left: 10px;\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .mobile-ez-ptz-icon.left.active {\n      border-right-color: #1890FF;\n\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-container .ez-ptz-main.center {\n      width: 52px;\n      height: 52px;\n      background: #FFFFFF;\n      border: 2px solid #eee;\n      border-radius: 100%;\n      top: calc(50% - 26px);\n      left: calc(50% - 26px);\n      position: absolute;\n      /* box-shadow: 0px -39px 40px 6px #1890ff; */\n    }\n\n    #mobile-ez-ptz-container .mobile-ez-ptz-wrap {\n      display: inline-block;\n      padding: 24px 24px;\n      border-radius: 100%;\n      overflow: hidden;\n    }\n\n    #mobile-ez-ptz-container .ez-ptz-close {\n      position: absolute;\n      color: #FFFFFF;\n      top: 0;\n      right: 0px;\n    }";
      document.getElementsByTagName("head")[0].appendChild(oS);
      var mobileContainer = document.createElement('div');
      mobileContainer.className = "mobile-ez-ptz-container";
      mobileContainer.id = "mobile-ez-ptz-container";
      mobileContainer.style = "display:inline-block;width: ".concat(this.jSPlugin.width, "px;text-align:center;");
      var mobileContainerTitle = document.createElement('div');
      mobileContainerTitle.className = "live-ptz-title";
      mobileContainerTitle.id = "live-ptz-title";
      mobileContainerTitle.innerHTML = "云台控制";
      if (!document.getElementById("live-ptz-title")) {
        mobileContainer.appendChild(mobileContainerTitle);
      }
      var mobileContainerIntro = document.createElement('div');
      mobileContainerIntro.className = "live-ptz-intro";
      mobileContainerIntro.id = "live-ptz-intro";
      mobileContainerIntro.innerHTML = "请通过操控云台来调整摄像机视角";
      if (!document.getElementById("live-ptz-intro")) {
        mobileContainer.appendChild(mobileContainerIntro);
      }
      var ptzWrap = document.createElement('div');
      ptzWrap.id = "mobile-ez-ptz-item";
      ptzWrap.className = "mobile-ez-ptz-wrap";
      ptzWrap.innerHTML = "\n    <div class=\"mobile-ez-ptz-container\" id=\"mobile-ez-ptz-container\">\n      <div class=\"ez-ptz-main center\"></div>\n      <div class=\"mobile-ez-ptz-icon top default\"></div>\n      <div class=\"mobile-ez-ptz-icon left default\"></div>\n      <div class=\"mobile-ez-ptz-icon bottom default\"></div>\n      <div class=\"mobile-ez-ptz-icon right default\"></div>\n    </div>\n      ";
      if (!document.getElementById("mobile-ez-ptz-item")) {
        mobileContainer.appendChild(ptzWrap);
      }
      //document.getElementById(jSPlugin.id).appendChild(mobileContainer);
      insertAfter(mobileContainer, document.getElementById("".concat(this.jSPlugin.id, "-wrap")));
      // 云台控制事件绑定
      // 云台控制
      document.getElementById("mobile-ez-ptz-item").ontouchstart = function (e) {
        e.preventDefault();
        console.log("触摸开始");
        _this._handlePtzTouch(e, 'start');
      };
      document.getElementById("mobile-ez-ptz-item").ontouchend = function (e) {
        e.preventDefault();
        console.log("触摸结束", e);
        _this._handlePtzTouch(e, 'stop');
      };
      // 云台控制
      document.getElementById("mobile-ez-ptz-item").onmousedown = function (e) {
        e.preventDefault();
        console.log("触摸开始");
        _this._handlePtzTouch(e, 'start');
      };
      document.getElementById("mobile-ez-ptz-item").onmouseup = function (e) {
        e.preventDefault();
        console.log("触摸结束", e);
        _this._handlePtzTouch(e, 'stop');
      };
    }
    _createClass$1(MobilePtz, [{
      key: "show",
      value: function show() {
        document.getElementById("mobile-ez-ptz-item").style = "display: inline-block";
      }
    }, {
      key: "hide",
      value: function hide() {
        document.getElementById("mobile-ez-ptz-item").style = "display: none";
      }
    }, {
      key: "_handlePtzTouch",
      value: function _handlePtzTouch(e, type) {
        var container = document.getElementById('mobile-ez-ptz-item').getBoundingClientRect();
        var containerCenterX = container.left + 130;
        var containerCenterY = container.top + 130;
        var eventX = e.x || e.changedTouches[0].clientX;
        var eventY = e.y || e.changedTouches[0].clientY;
        var left = eventX - containerCenterX;
        var top = eventY - containerCenterY;
        var direction = 0; //操作命令：0-上，1-下，2-左，3右，4-左上，5-左下，6-右上，7-右下，8-放大，9-缩小，10-近焦距，11-远焦距

        var url = this.jSPlugin.env.domain + "/api/lapp/device/ptz/start";
        // var nextPtzImg = ptzNormalImg;
        // var nextPtzImgFailed = ptzNormalImg;
        // 判读方位
        if (Math.abs(left) > Math.abs(top)) {
          if (left > 0) {
            direction = 3;
            document.getElementsByClassName("mobile-ez-ptz-icon")[3].className = document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("default", "active");
          } else {
            direction = 2;
            document.getElementsByClassName("mobile-ez-ptz-icon")[1].className = document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("default", "active");
          }
        } else {
          if (top > 0) {
            direction = 1;
            document.getElementsByClassName("mobile-ez-ptz-icon")[2].className = document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("default", "active");
          } else {
            direction = 0;
            document.getElementsByClassName("mobile-ez-ptz-icon")[0].className = document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("default", "active");
          }
        }
        document.getElementById("mobile-ez-ptz-item").style = "background-image:linear-gradient(".concat(direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270, "deg, #c0ddf1 0%, rgba(100,143,252,0.00) 50%)");
        if (type === 'stop') {
          url = this.jSPlugin.env.domain + '/api/lapp/device/ptz/stop';
          document.getElementById("mobile-ez-ptz-item").style = "";
          document.getElementsByClassName("mobile-ez-ptz-icon")[3].className = document.getElementsByClassName("mobile-ez-ptz-icon")[3].className.replace("active", "default");
          document.getElementsByClassName("mobile-ez-ptz-icon")[1].className = document.getElementsByClassName("mobile-ez-ptz-icon")[1].className.replace("active", "default");
          document.getElementsByClassName("mobile-ez-ptz-icon")[2].className = document.getElementsByClassName("mobile-ez-ptz-icon")[2].className.replace("active", "default");
          document.getElementsByClassName("mobile-ez-ptz-icon")[0].className = document.getElementsByClassName("mobile-ez-ptz-icon")[0].className.replace("active", "default");
        }
        var data = new FormData();
        data.append("deviceSerial", matchEzopenUrl(this.jSPlugin.url).deviceSerial);
        data.append("channelNo", matchEzopenUrl(this.jSPlugin.url).channelNo);
        data.append("speed", 1);
        data.append("direction", direction);
        data.append("accessToken", this.jSPlugin.accessToken);
        fetch(url, {
          method: "POST",
          body: data
        }).then(function (response) {
          return response.json();
        }).then(function (rt) {
          if (rt.code == 200) ; else {
            //document.getElementById('ptz-img-container').childNodes[0].src = nextPtzImgFailed;
            // layer.msg(data.msg);
            if (rt.code == 60005 || rt.code == 60002 || rt.code == 60003 || rt.code == 60004) {
              document.getElementById("mobile-ez-ptz-item").style = "background-image:linear-gradient(".concat(direction === 0 ? 180 : direction === 1 ? 0 : direction === 2 ? 90 : 270, "deg, #f45656 0%, rgba(100,143,252,0.00) 50%)");
            }
          }
        })["catch"](function (err) {
          console.log("云台调用异常", err);
        });
      }
    }]);
    return MobilePtz;
  }();

  var retcode = 0;
  var msg = "成功";
  var data$c = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "rgb(0 0 0 / 0%)",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-0",
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-1",
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-2",
  				iconId: "sound",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-3",
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-4",
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-5",
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-6",
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-7",
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-footer-8",
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0,
  				themeId: "f7896c8942c9476fb439370dd974f1c0"
  			}
  		]
  	}
  };
  var emptyData = {
  	retcode: retcode,
  	msg: msg,
  	data: data$c
  };

  var data$b = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#00000080",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	}
  };
  var mobileLiveFullData = {
  	data: data$b
  };

  var data$a = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#00000080",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "speed",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	}
  };
  var mobileRecFullData = {
  	data: data$a
  };

  var data$9 = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#00000080",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "speed",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	}
  };
  var pcLiveFullData = {
  	data: data$9
  };

  var data$8 = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-0",
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-1",
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-2",
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				btnKey: "c1cbc1d4e86d49a0981f54beea95280a-f7896c8942c9476fb439370dd974f1c0-header-3",
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#00000080",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	}
  };
  var pcLiveSecurityData = {
  	data: data$8
  };

  var data$7 = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 0
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 0
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	}
  };
  var pcLiveSimpleData = {
  	data: data$7
  };

  var data$6 = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#00000080",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	}
  };
  var pcLiveVoiceData = {
  	data: data$6
  };

  var data$5 = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#00000080",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "speed",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1
  			}
  		]
  	}
  };
  var pcRecFullDataData = {
  	data: data$5
  };

  var data$4 = {
  	header: {
  		color: "#FFFFFF",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "deviceID",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "cloudRec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "rec",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	},
  	footer: {
  		color: "#FFFFFF",
  		backgroundColor: "#00000080",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				iconId: "play",
  				part: "left",
  				defaultActive: 1,
  				isrender: 0
  			},
  			{
  				iconId: "capturePicture",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 0
  			},
  			{
  				iconId: "pantile",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "recordvideo",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "talk",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "zoom",
  				part: "left",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "speed",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "hd",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "webExpend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			},
  			{
  				iconId: "expend",
  				part: "right",
  				defaultActive: 0,
  				isrender: 0
  			}
  		]
  	}
  };
  var miniRecData = {
  	data: data$4
  };

  var officeTemplateList = [{
    autoFocus: 5,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'pcLive',
    themeIntro: 'PC直播全量版',
    themeName: 'PC直播全量版',
    themeType: 'webLive',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",
    poster: "https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",
    header: pcLiveFullData.data.header,
    footer: pcLiveFullData.data.footer
  }, {
    autoFocus: 5,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'security',
    themeIntro: 'PC直播安防版',
    themeName: 'PC直播安防版',
    themeType: 'webLive',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",
    poster: "https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",
    header: pcLiveSecurityData.data.header,
    footer: pcLiveSecurityData.data.footer
  }, {
    autoFocus: 5,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'voice',
    themeIntro: 'PC直播语音版',
    themeName: 'PC直播语音版',
    themeType: 'webLive',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",
    poster: "https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",
    header: pcLiveVoiceData.data.header,
    footer: pcLiveVoiceData.data.footer
  }, {
    autoFocus: 5,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'simple',
    themeIntro: 'PC直播极简版',
    themeName: 'PC直播极简版',
    themeType: 'webLive',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",
    poster: "",
    header: pcLiveSimpleData.data.header,
    footer: pcLiveSimpleData.data.footer
  }, {
    autoFocus: 5,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'pcRec',
    themeIntro: 'PC回放全量版',
    themeName: 'PC回放全量版',
    themeType: 'webRec',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_DmANlElAAA-xyivSaw030.png",
    poster: "https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",
    header: pcRecFullDataData.data.header,
    footer: pcRecFullDataData.data.footer
  }, {
    autoFocus: 5,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'mobileLive',
    themeIntro: 'Mobile直播全量版',
    themeName: 'Mobile直播全量版',
    themeType: 'mobileLive',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",
    poster: "https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",
    header: mobileLiveFullData.data.header,
    footer: mobileLiveFullData.data.footer
  }, {
    autoFocus: 5,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'mobileRec',
    themeIntro: 'Mobile回放全量版',
    themeName: 'Mobile回放全量版',
    themeType: 'mobileRec',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",
    poster: "https://resource.eziot.com/group1/M00/00/89/CtwQEmLl8r-AZU7wAAETKlvgerU237.png",
    header: mobileRecFullData.data.header,
    footer: mobileRecFullData.data.footer
  }, {
    autoFocus: 0,
    createTime: '2021-06-14T08:04:37.000Z',
    themeId: 'miniRec',
    themeIntro: 'Mobile回放全量版',
    themeName: 'Mobile回放全量版',
    themeType: 'mobileRec',
    updateTime: '2021-06-14T08:04:37.000Z',
    label: '官方',
    labelPic: "https://resource.eziot.com/group1/M00/00/8A/CtwQEmLr_GmAL5IhAABZs1vUK0s564.png",
    poster: "",
    header: miniRecData.data.header,
    footer: miniRecData.data.footer
  }];

  /**
   * @class Zoom
   * @classdesc 缩放
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * 
   * @example
   * // 初始化缩放
   * const zoom = new Zoom(jSPlugin)
   * zoom.startZoom() // 开始缩放
   */
  var Zoom = /*#__PURE__*/function () {
    function Zoom(jSPlugin) {
      var _this = this;
      _classCallCheck$1(this, Zoom);
      this.jSPlugin = jSPlugin;
      this.enableZoom = false;
      this.videoWidth = 1920;
      this.videoHeight = 1080;
      this.currentScale = 1;
      this.currentPosition = {
        x: 0,
        //操作点 -x
        y: 0,
        //
        xPercent: 0.10,
        // 百分比 -x
        yPercent: 0.10,
        // 百分比
        xCurrentVideo: 0,
        // 当前放大后可视视频左上角起点
        yCurrentVideo: 0,
        left: 0,
        top: 0,
        right: 1920,
        bottom: 1080
      };
      this.clientRect = document.getElementById(jSPlugin.id).getBoundingClientRect();
      this.DOM = document.getElementById(jSPlugin.id);
      this.isFullScreen = false; //是否全屏
      //audioControls-left
      var scaleDOMContainer = document.createElement('div');
      scaleDOMContainer.id = "".concat(jSPlugin.id, "-zoom-container");
      scaleDOMContainer.style = "position: absolute;\n    display:none;\n    left: 12px;\n    bottom: 80px;\n    zoom: ".concat(jSPlugin.isMobile ? '0.8' : '1');
      var scaleDOMHTML = "\n    <div\n    style=\"display: inline-flex;justify-content: space-between;flex-direction: column;width: 36px;height: 160px;background:rgba(0,0,0,0.60);border-radius: 2px;align-items: center;\">\n    <div id=\"".concat(this.jSPlugin.id, "-scale-value\" style=\"font-size: 12px;color:#FFFFFF;margin:10px 0;\">2.0X</div>\n    <div style=\"width: 20px;height: 20px;margin-bottom:4px;\" id=\"").concat(this.jSPlugin.id, "-addScale\">\n      <?xml version=\"1.0\" encoding=\"utf-8\"?>\n      <svg version=\"1.1\" fill=\"#FFFFFF\" id=\"\u56FE\u5C42_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n         viewBox=\"0 0 20 20\" style=\"enable-background:new 0 0 20 20;\" xml:space=\"preserve\">\n      <title>\u653E\u5927</title>\n      <g id=\"\u77E9\u5F62\">\n        <rect class=\"st0\" width=\"20\" height=\"20\" fill=\"none\"/>\n      </g>\n      <g id=\"\u5F62\u72B6\u7ED3\u5408\">\n        <path class=\"st1\" d=\"M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n          s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z\"/>\n      </g>\n      <g id=\"\u8DEF\u5F84-4\">\n        <path class=\"st2\" d=\"M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z\"/>\n      </g>\n      <g id=\"\u8DEF\u5F84-4\u5907\u4EFD\">\n        <path class=\"st2\" d=\"M10,13.2c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C10.6,12.9,10.3,13.2,10,13.2z\"/>\n      </g>\n      </svg>\n    </div>\n    <div style=\"\n    position: relative;\n    width: 2px;\n    height: 64px;\n    border-radius: 2px;\n    background: rgba(255,255,255,0.75);\n    display: flex;\n    flex-direction: column;\n    align-items: center;\n    justify-content: flex-end;\">\n    <div class=\"scale-body-line-dot\" id=\"").concat(this.jSPlugin.id, "-scale-body-line-dot\" style=\"width: 6px;\n      height: 6px;\n      background: #FFFFFF;\n      border-radius: 100%;\n      position: absolute;\n      border: 1px solid #407AFF;\"></div>\n      <div id=\"").concat(this.jSPlugin.id, "-line-dot\" style=\"width: 2px;\n      height: 0%;\n      border-radius: 2px;\n      background: #407AFF;\n      bottom: 0;\"></div>\n    </div>\n    <div style=\"width: 20px;height: 20px;margin: 4px 0 10px;\" id=\"").concat(this.jSPlugin.id, "-subScale\">\n      <?xml version=\"1.0\" encoding=\"utf-8\"?>\n      <svg fill=\"#FFFFFF\" version=\"1.1\" id=\"\u56FE\u5C42_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n        viewBox=\"0 0 20 20\" style=\"enable-background:new 0 0 20 20;\" xml:space=\"preserve\">\n        <title>\u7F29\u5C0F</title>\n        <g id=\"\u77E9\u5F62\">\n          <rect class=\"st0\" width=\"20\" height=\"20\" fill=\"none\"/>\n        </g>\n        <g id=\"\u5F62\u72B6\u7ED3\u5408\">\n          <path class=\"st1\" d=\"M10,3.8c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2S3.8,13.5,3.8,10S6.5,3.8,10,3.8z M10,5c-2.8,0-5,2.2-5,5\n            s2.2,5,5,5s5-2.2,5-5S12.8,5,10,5z\"/>\n        </g>\n        <g id=\"\u8DEF\u5F84-4\">\n          <path class=\"st2\" d=\"M12.5,10.7h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S12.8,10.7,12.5,10.7z\"/>\n        </g>\n      </svg>\n    </div>\n  </div>\n    ");
      scaleDOMContainer.innerHTML = scaleDOMHTML;
      if (document.getElementById("".concat(jSPlugin.id, "-audioControls-left"))) {
        document.getElementById("".concat(jSPlugin.id, "-audioControls-left")).parentNode.appendChild(scaleDOMContainer);
        document.getElementById("".concat(jSPlugin.id, "-addScale")).onclick = function () {
          _this.addScale();
        };
        document.getElementById("".concat(jSPlugin.id, "-subScale")).onclick = function () {
          _this.subScale();
        };
      }
      if (!!jSPlugin.jSPlugin) {
        var info = jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);
        this.videoWidth = info.width || jSPlugin.width;
        this.videoHeight = info.height || jSPlugin.height;
        this.currentPosition.right = info.width;
        this.currentPosition.bottom = info.height;
        jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0, this.videoWidth, 0, this.videoHeight, false);
        jSPlugin.jSPlugin.bEZoom = true;
      }
      var timer = setInterval(function () {
        var canvasDom = document.getElementById("".concat(jSPlugin.id, "canvas0"));
        var canvasDrawDom = document.getElementById("".concat(jSPlugin.id, "canvas_draw0"));
        var playerDom = document.getElementById("".concat(jSPlugin.id, "-player"));
        if (jSPlugin.isMobile) {
          if (canvasDom) {
            canvasDom.addEventListener("touchstart", function (event) {
              return _this.onTouchstart(event);
            });
            canvasDom.addEventListener("touchend", function (event) {
              return _this.onTouchend(event);
            });
          }
          if (canvasDrawDom) {
            canvasDrawDom.addEventListener("touchstart", function (event) {
              return _this.onTouchstart(event);
            });
            canvasDrawDom.addEventListener("touchend", function (event) {
              return _this.onTouchend(event);
            });
          }
          if (playerDom) {
            playerDom.addEventListener("touchstart", function (event) {
              return _this.onTouchstart(event);
            });
            playerDom.addEventListener("touchend", function (event) {
              return _this.onTouchend(event);
            });
          }
        } else {
          if (canvasDom) {
            canvasDom.addEventListener("mousedown", function (event) {
              return _this.onMouseDown(event);
            });
            canvasDom.addEventListener("mouseup", function (event) {
              return _this.onMouseUp(event);
            });
          }
          if (canvasDrawDom) {
            canvasDrawDom.addEventListener("mousedown", function (event) {
              return _this.onMouseDown(event);
            });
            canvasDrawDom.addEventListener("mouseup", function (event) {
              return _this.onMouseUp(event);
            });
          }
          if (playerDom) {
            playerDom.addEventListener("mousedown", function (event) {
              return _this.onMouseDown(event);
            });
            playerDom.addEventListener("mouseup", function (event) {
              return _this.onMouseUp(event);
            });
          }
        }
        clearInterval(timer);
      }, 100);
    }
    _createClass$1(Zoom, [{
      key: "onMouseDown",
      value: function onMouseDown(event) {
        if (this.currentScale === 1) {
          return false;
        }
        this.moveX = event.clientX;
        this.moveY = event.clientY;
      }
    }, {
      key: "onMouseUp",
      value: function onMouseUp(event) {
        var currentPosition = this.currentPosition;
        if (this.currentScale === 1) {
          return false;
        }
        currentPosition.left = currentPosition.left - (event.clientX - this.moveX);
        currentPosition.top = currentPosition.top - (event.clientY - this.moveY);
        this.doScale();
      }
    }, {
      key: "onTouchstart",
      value: function onTouchstart(event) {
        if (this.currentScale === 1) {
          return false;
        }
        if (this.jSPlugin.use3DZoom || this.currentScale === 1) {
          return false;
        }
        var verifyStatus = this.jSPlugin.beforeMobileZoomVerify();
        if (!verifyStatus) {
          return false;
        }
        if (!this.inited) {
          var info = this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);
          this.videoWidth = info.width;
          this.videoHeight = info.height;
          this.currentPosition.left = 0;
          this.currentPosition.top = 0;
          if (this.isFullScreen) {
            this.currentPosition.right = info.height;
            this.currentPosition.bottom = info.width;
          } else {
            this.currentPosition.right = info.width;
            this.currentPosition.bottom = info.height;
          }
          this.inited = true;
        }
        var touches = event.touches;
        var events = touches[0];
        if (events) {
          var point = {
            clientX: 0,
            clientY: 0
          };
          if (this.isFullScreen) {
            point.clientX = events.clientY;
            point.clientY = this.videoHeight - events.clientX;
          } else {
            point.clientX = events.clientX;
            point.clientY = events.clientY;
          }
          this.point1 = point;
        }
      }
    }, {
      key: "onTouchend",
      value: function onTouchend(event) {
        var that = this;
        var currentPosition = this.currentPosition;
        if (this.currentScale === 1) {
          return false;
        }
        var touches = event.changedTouches;
        var events = touches[0];
        if (this.isFullScreen) {
          // 获取的触摸点按横屏之后的坐标记录
          // currentPosition按横屏之前的坐标记录
          // 偏移量按横屏之后的坐标输出

          // console.log('X轴偏移量', events.clientY - this.point1.clientX);
          // console.log('Y轴偏移量', (this.videoHeight - events.clientX) - this.point1.clientY);
          currentPosition.top = currentPosition.top - (events.clientY - this.point1.clientX);
          currentPosition.left = currentPosition.left - (this.videoHeight - events.clientX - this.point1.clientY);
        } else {
          // console.log('X轴偏移量', events.clientX - that.point1.clientX);
          // console.log('Y轴偏移量', events.clientY - that.point1.clientY);
          currentPosition.left = currentPosition.left - (events.clientX - that.point1.clientX);
          currentPosition.top = currentPosition.top - (events.clientY - that.point1.clientY);
        }
        that.doScale();
      }
    }, {
      key: "renderDot",
      value: function renderDot() {
        var currentScale = this.currentScale;
        if (document.getElementById("".concat(this.jSPlugin.id, "-scale-value"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-scale-value")).innerHTML = "".concat(currentScale, ".0X");
        }
        if (document.getElementById("".concat(this.jSPlugin.id, "-line-dot"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-line-dot")).style.height = "".concat((currentScale - 1) / 7 * 100, "%");
        }
        if (document.getElementById("".concat(this.jSPlugin.id, "-scale-body-line-dot"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-scale-body-line-dot")).style.bottom = "calc(".concat((currentScale - 1) / 7 * 100, "% - 3px)");
        }
      }
    }, {
      key: "getTopMostElement",
      value: function getTopMostElement(elm1, elm2, elm3) {
        //判断三个dom元素的位置，返回最上层的元素
        var rect1 = elm1 ? elm1.getBoundingClientRect() : null;
        var rect2 = elm2 ? elm2.getBoundingClientRect() : null;
        var rect3 = elm3 ? elm3.getBoundingClientRect() : null;
        if (!rect1 && !rect2 && !rect3) {
          return null;
        }
        if (!rect1) {
          return rect2.top < rect3.top ? elm2 : elm3;
        }
        if (!rect2) {
          return rect1.top < rect3.top ? elm1 : elm3;
        }
        if (!rect3) {
          return rect1.top < rect2.top ? elm1 : elm2;
        }
        var tops = [rect1.top, rect2.top, rect3.top];
        var maxTop = Math.max.apply(Math, tops);
        if (rect1.top === maxTop) {
          return elm1;
        } else if (rect2.top === maxTop) {
          return elm2;
        } else {
          return elm3;
        }
      }
    }, {
      key: "handleFullscreen",
      value: function handleFullscreen(flag, width, height) {
        this.isFullScreen = flag;
        this.clientRect = {
          width: width,
          height: height
        };
      }
    }, {
      key: "startZoom",
      value: function startZoom() {
        var info = this.jSPlugin.jSPlugin._JSPlayM4_GetFrameInfo(0);
        this.videoWidth = info.width || this.jSPlugin.width;
        this.videoHeight = info.height || this.jSPlugin.height;
        this.currentPosition.left = 0;
        this.currentPosition.top = 0;
        if (this.isFullScreen) {
          this.currentPosition.right = info.height;
          this.currentPosition.bottom = info.width;
          this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(this.videoWidth, 0, 0, this.videoHeight, false);
        } else {
          this.currentPosition.right = info.width;
          this.currentPosition.bottom = info.height;
          this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0, this.videoWidth, 0, this.videoHeight, false);
        }
        this.currentScale = 1;
        if (document.getElementById("".concat(this.jSPlugin.id, "-zoom-container"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-zoom-container")).style.display = "block";
        }
        try {
          this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0, this.videoWidth, 0, this.videoHeight, false);
          this.jSPlugin.jSPlugin.bEZoom = true;
          if (this.jSPlugin.eventEmitter) {
            this.jSPlugin.eventEmitter.emit('startZoom', {
              eventType: 'startZoom',
              code: 0,
              target: this,
              msg: '开启电子放大'
            });
          }
        } catch (error) {
          console.log(error);
          if (this.jSPlugin.eventEmitter) {
            this.jSPlugin.eventEmitter.emit('startZoom', {
              eventType: 'startZoom',
              code: -1,
              target: this,
              msg: error || '开启电子放大失败'
            });
          }
        }
        this.renderDot();
        this.enableZoom = true;
      }
    }, {
      key: "stopZoom",
      value: function stopZoom() {
        this.currentScale = 1;
        try {
          this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(0, this.videoWidth, 0, this.videoHeight, false);
          if (this.jSPlugin.eventEmitter) {
            this.jSPlugin.eventEmitter.emit('stopZoom', {
              eventType: 'stopZoom',
              code: 0,
              target: this,
              msg: '关闭电子放大'
            });
          }
        } catch (error) {
          console.log(error);
          if (this.jSPlugin.eventEmitter) {
            this.jSPlugin.eventEmitter.emit('stopZoom', {
              eventType: 'stopZoom',
              code: -1,
              target: this,
              msg: error || '关闭电子放大失败'
            });
          }
        }
        if (document.getElementById("".concat(this.jSPlugin.id, "-zoom-container"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-zoom-container")).style.display = "none";
        }
        this.renderDot();
        this.enableZoom = false;
      }
    }, {
      key: "doScale",
      value: function doScale() {
        var currentPosition = this.currentPosition,
          currentScale = this.currentScale;
        if (this.isFullScreen) {
          currentPosition.left = currentPosition.left + 0.5 * (currentPosition.right - currentPosition.left) - 0.5 * (this.videoWidth / (currentScale * 2));
          if (currentPosition.left < 0) {
            currentPosition.left = 0;
          } else if (currentPosition.left > this.videoWidth - this.videoWidth / (currentScale * 2)) {
            currentPosition.left = this.videoWidth - this.videoWidth / (currentScale * 2);
          }
          currentPosition.right = currentPosition.left + this.videoWidth / (currentScale * 2);
          currentPosition.top = currentPosition.top + 0.5 * (currentPosition.bottom - currentPosition.top) - 0.5 * (this.videoHeight / (currentScale * 2));
          if (currentPosition.top < 0) {
            currentPosition.top = 0;
          } else if (currentPosition.top > this.videoHeight - this.videoHeight / (currentScale * 2)) {
            currentPosition.top = this.videoHeight - this.videoHeight / (currentScale * 2);
          }
          currentPosition.bottom = currentPosition.top + this.videoHeight / (currentScale * 2);
        } else {
          currentPosition.left = currentPosition.left + currentPosition.xPercent * (currentPosition.right - currentPosition.left) - 0.5 * (this.videoWidth / currentScale);
          if (currentPosition.left < 0) {
            currentPosition.left = 0;
          } else if (currentPosition.left > this.videoWidth - this.videoWidth / currentScale) {
            currentPosition.left = this.videoWidth - this.videoWidth / currentScale;
          }
          currentPosition.right = currentPosition.left + this.videoWidth / currentScale;
          currentPosition.top = currentPosition.top + currentPosition.yPercent * (currentPosition.bottom - currentPosition.top) - 0.5 * (this.videoHeight / currentScale);
          if (currentPosition.top < 0) {
            currentPosition.top = 0;
          } else if (currentPosition.top > this.videoHeight - this.videoHeight / currentScale) {
            currentPosition.top = this.videoHeight - this.videoHeight / currentScale;
          }
          currentPosition.bottom = currentPosition.top + this.videoHeight / currentScale;
        }

        //整数化
        currentPosition.left = parseInt(currentPosition.left, 10);
        currentPosition.right = parseInt(currentPosition.right, 10);
        currentPosition.top = parseInt(currentPosition.top, 10);
        currentPosition.bottom = parseInt(currentPosition.bottom, 10);
        // console.log("计算后，", currentPosition.left, currentPosition.right, currentPosition.top, currentPosition.bottom, currentPosition.xPercent, currentPosition.yPercent);

        try {
          if (this.isFullScreen) {
            // 按横屏前坐标的左、右、上、下、顺序
            // this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(currentPosition.left, currentPosition.right, currentPosition.top, currentPosition.bottom, currentScale != 1, true);
            this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(currentPosition.top, currentPosition.bottom, currentPosition.left, currentPosition.right, currentScale != 1, true);
          } else {
            if (currentPosition.left < currentPosition.right && currentPosition.top < currentPosition.bottom && currentPosition.bottom <= this.videoHeight && currentPosition.right <= this.videoWidth) {
              this.jSPlugin.jSPlugin._JSPlayM4_SetDisplayRegion(currentPosition.left, currentPosition.right, currentPosition.top, currentPosition.bottom, currentScale != 1);
            }
          }
        } catch (error) {
          console.log(error);
        }
        this.renderDot();
      }
    }, {
      key: "addScale",
      value: function addScale() {
        var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
        var currentScale = this.currentScale,
          currentPosition = this.currentPosition;
        if (currentScale >= 8) {
          console.log("达到最大倍率了");
          if (this.jSPlugin.Message) {
            this.jSPlugin.Message["default"]("已经放大到最大倍数8.0X", document.getElementById("".concat(this.jSPlugin.id)));
          }
          return false;
        }
        this.currentScale = this.currentScale + scale;
        if (this.currentScale > 8) {
          console.log("超出最大倍率");
          if (this.jSPlugin.Message) {
            this.jSPlugin.Message["default"]("超出最大倍率8.0X", document.getElementById("".concat(this.jSPlugin.id)));
          }
          return false;
        }
        currentPosition.xPercent = 0.5;
        currentPosition.yPercent = 0.5;
        this.doScale();
      }
    }, {
      key: "subScale",
      value: function subScale() {
        var scale = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
        var currentScale = this.currentScale,
          currentPosition = this.currentPosition;
        if (currentScale <= 1) {
          console.log("达到最小倍率了");
          if (this.jSPlugin.Message) {
            this.jSPlugin.Message["default"]("已经缩小到最小倍数1.0X", document.getElementById("".concat(this.jSPlugin.id)));
          }
          return false;
        }
        if (currentScale <= 1) {
          console.log("达到最小倍率了");
          return false;
        }
        this.currentScale = this.currentScale - scale;
        if (this.currentScale < 1) {
          console.log("超出最小倍率");
          if (this.jSPlugin.Message) {
            this.jSPlugin.Message["default"]("超出最小倍率1.0X", document.getElementById("".concat(this.jSPlugin.id)));
          }
          return false;
        }
        currentPosition.xPercent = 0.5;
        currentPosition.yPercent = 0.5;
        this.doScale();
      }
    }]);
    return Zoom;
  }();

  /* eslint-disable prefer-destructuring */
  /**
   * @method FethchData GET POST 请求处理函数
   * @param { String } url      请求地址 (必选)
   * @param { String } method   请求方式 默认 GET 可选'GET'、'POST' (必选)
   * @param { Object } params   请求参数 GET,POST 请求统一为对象格式,如无参数填写{}, 如{ key0: value0, key1: value1 } (必选)
   * @param { Function } success 请求成功回调(必选),
   * @param { Function } error 请求失败回调(可选)
   */

  var FetchData = function FetchData(url) {
    var method = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'GET';
    var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
    var callback = arguments.length > 3 ? arguments[3] : undefined;
    var errFun = arguments.length > 4 ? arguments[4] : undefined;
    var headerOptions = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    };

    // test11环境多版本部署配置
    //  if (window.location.host === 'test11open.ys7.com' && /^\/api/.test(url)) {
    //    url = url.replace('/api/', '/console/test12api/');
    //  }
    var paramsStr = '';
    headers = Object.assign(headers, headerOptions);
    var myHeaders = new Headers();
    Object.keys(headers).map(function (item) {
      myHeaders.append(item, headers[item]);
    });
    headers = myHeaders;

    // 参数处理
    Object.keys(Object.assign({}, params)).forEach(function (item) {
      var value = params[item];
      if (typeof params[item] === 'string') {
        value = params[item].replace('%', '%25'); // decodeURIComponent 无法解析%
      }

      if (typeof params[item] === 'undefined') {
        return;
      }
      paramsStr += "&".concat(item, "=").concat(encodeURIComponent(value));
    });
    if (paramsStr.length > 0) {
      paramsStr = ['GET', 'PUT', 'DELETE'].indexOf(method.toUpperCase()) !== -1 ? "?".concat(paramsStr.slice(1)) : paramsStr.slice(1);
    }
    var fetchUrl = url + (['GET', 'PUT', 'DELETE'].indexOf(method.toUpperCase()) !== -1 ? paramsStr : '');
    var requestObj = {
      //  cache: 'no-cache', // 禁用缓存
      headers: headers,
      method: method
    };
    if (method === 'POST') {
      requestObj.body = paramsStr;
    }
    if (method === 'POST' && headerOptions && headerOptions['Content-Type'] === 'application/json') {
      requestObj.body = JSON.stringify(params);
    }

    // GET请求增加随机参数 _r
    if (method === 'GET') {
      if (fetchUrl.indexOf('?') === -1) {
        fetchUrl += "?_r=".concat(Math.random());
      } else {
        fetchUrl += "&_r=".concat(Math.random());
      }
    }

    //  requestObj.credentials = 'include'

    fetch(fetchUrl, requestObj).then(function (response) {
      var contentType = response.headers.get("content-type");
      if (contentType && contentType.indexOf("application/json") !== -1) {
        return response.json();
      } else {
        return response.text();
      }
      // response.json()
    }).then(function (data) {
      callback && callback(data);
    })["catch"](function (err) {
      errFun && errFun(err);
    });
  };

  /** 视频质量 只有一种码流时  报备平台*/
  // export const VIDEO_LEVEL2 = [
  //     {
  //        name: "流畅",
  //        level: 0,
  //     },
  //     {
  //         name: "均衡",
  //         level: 1,
  //     },
  //     {
  //         name: "高清",
  //         level: 2,
  //     },
  //     {
  //         name: "超清",
  //         level: 3,
  //     },
  //     {
  //         name: "极清",
  //         level: 4,
  //     },
  //     {
  //         name: "3K",
  //         level: 5,
  //     },
  //     {
  //         name: "4K",
  //         level: 6,
  //     }
  // ]

  var hdIcon = function hdIcon(id, clsPrefix, color, playerWidth, MEDIAWIDTH, hd) {
    return "\n<svg  id=\"".concat(id, "-hdSelect-icon\" class=\"theme-icon-item-icon ").concat(clsPrefix, "-btn\" data-type='hd' style=\"display: ").concat(['hd', '0'].includes(hd.level) ? 'flex' : 'none', "\"  fill=\"").concat(color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(playerWidth > MEDIAWIDTH ? 48 : 32, "\" height=\"").concat(playerWidth > MEDIAWIDTH ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">\n    <path d=\"M17.4,16.5H3.1c-0.8,0-1.4-0.6-1.4-1.4V5.4c0-0.9,0.7-1.6,1.6-1.6h14.1c0.8,0,1.4,0.6,1.4,1.4v9.8 C18.8,15.9,18.2,16.5,17.4,16.5z M3.3,5C3.1,5,2.9,5.2,2.9,5.4v9.7c0,0.2,0.1,0.3,0.3,0.3h14.3c0.2,0,0.3-0.1,0.3-0.3V5.3 c0-0.2-0.1-0.3-0.3-0.3H3.3z\" />\n    <path d=\"M13.3,13.6h-1.6c-0.4,0-0.7-0.3-0.7-0.7V7.4c0-0.4,0.3-0.7,0.7-0.7h1.6c1.2,0,2.2,1,2.2,2.2v2.4 C15.6,12.6,14.6,13.6,13.3,13.6z M12.2,12.5h1.1c0.6,0,1.1-0.5,1.1-1.1V9c0-0.6-0.5-1.1-1.1-1.1h-1.1V12.5z\" />\n    <path d=\"M5.5,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3C5,7,5.2,6.8,5.5,6.8S6.1,7,6.1,7.3v5.7C6.1,13.4,5.8,13.6,5.5,13.6z\" />\n    <path d=\"M9.2,13.6c-0.3,0-0.6-0.2-0.6-0.6V7.3c0-0.3,0.2-0.6,0.6-0.6S9.8,7,9.8,7.3v5.7C9.8,13.4,9.5,13.6,9.2,13.6z\" />\n    <rect x=\"5.6\" y=\"9.6\" width=\"3.6\" height=\"1.1\" />\n</svg>\n");
  };
  var sdIcon = function sdIcon(id, clsPrefix, color, playerWidth, MEDIAWIDTH, hd) {
    return "\n<svg id=\"".concat(id, "-sdSelect-icon\" class=\"theme-icon-item-icon ").concat(clsPrefix, "-btn\" data-type='sd' style=\"display: ").concat(['sd', '1'].includes(hd.level) ? 'flex' : 'none', "\"  fill=\"").concat(color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(playerWidth > MEDIAWIDTH ? 48 : 32, "\" height=\"").concat(playerWidth > MEDIAWIDTH ? 48 : 32, "\" viewBox=\"-6 -8 40 44\">\n    <path d=\"M24.1,23.8h-20c-1.1,0-1.9-0.9-1.9-1.9V8.4c0-1.2,1-2.2,2.1-2.2h19.7c1.1,0,1.9,0.9,1.9,1.9v13.8\n        C26,23,25.1,23.8,24.1,23.8z M4.3,7.7C4,7.7,3.7,8,3.7,8.4v13.5c0,0.2,0.2,0.4,0.4,0.4h20c0.2,0,0.4-0.2,0.4-0.4V8.2\n        c0-0.2-0.2-0.4-0.4-0.4H4.3z\"/>\n    <path d=\"M18.4,19.8h-2.2c-0.5,0-0.9-0.4-0.9-0.9v-7.8c0-0.5,0.4-0.9,0.9-0.9h2.2c1.7,0,3.1,1.4,3.1,3.1v3.3\n    C21.5,18.4,20.1,19.8,18.4,19.8z M16.7,18.3h1.6c0.9,0,1.6-0.7,1.6-1.6v-3.3c0-0.9-0.7-1.6-1.6-1.6h-1.6V18.3z\"/>\n    <path d=\"M10.5,19.8c1.2,0,2.1-0.3,2.7-0.9c0.6-0.6,0.9-1.3,0.9-2.1c0-0.8-0.3-1.4-0.9-1.8c-0.4-0.2-1.1-0.5-2.2-0.8\n        l0,0l-1-0.2c-0.4-0.1-0.8-0.2-1-0.4c-0.4-0.2-0.6-0.5-0.6-0.9c0-0.4,0.1-0.6,0.4-0.9s0.7-0.3,1.3-0.3c0.8,0,1.4,0.2,1.8,0.6\n        c0.2,0.3,0.3,0.6,0.4,0.9l0,0h1.4c0-0.6-0.2-1.1-0.5-1.6c-0.6-0.8-1.6-1.2-2.9-1.2c-1,0-1.8,0.3-2.4,0.8c-0.6,0.5-0.9,1.2-0.9,2\n        c0,0.7,0.3,1.3,1,1.7c0.4,0.2,0.9,0.4,1.7,0.6l0,0l1.2,0.3c0.6,0.2,1.1,0.3,1.3,0.4c0.3,0.2,0.5,0.5,0.5,0.9c0,0.5-0.2,0.9-0.6,1.1\n        s-0.9,0.4-1.5,0.4c-0.9,0-1.6-0.2-2-0.7c-0.2-0.3-0.3-0.6-0.4-1.1l0,0H6.8c0,0.9,0.3,1.6,0.9,2.2C8.2,19.5,9.2,19.8,10.5,19.8z\"/>\n    <defs>\n    <filter id=\"Adobe_OpacityMaskFilter\" filterUnits=\"userSpaceOnUse\" x=\"15.2\" y=\"10.3\" width=\"6.2\" height=\"9.5\">\n        <feColorMatrix  type=\"matrix\" values=\"1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0\"/>\n    </filter>\n    </defs>\n    <mask maskUnits=\"userSpaceOnUse\" x=\"15.2\" y=\"10.3\" width=\"6.2\" height=\"9.5\" id=\"mask-2_2_\">\n    <g class=\"st2\">\n        <path id=\"path-1_2_\" class=\"st3\" d=\"M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4\n        v13.5C25.2,22.6,24.7,23.1,24.1,23.1z\"/>\n    </g>\n    </mask>\n    <defs>\n    <filter id=\"Adobe_OpacityMaskFilter_1_\" filterUnits=\"userSpaceOnUse\" x=\"6.8\" y=\"10.3\" width=\"7.3\" height=\"9.5\">\n        <feColorMatrix  type=\"matrix\" values=\"1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 1 0\"/>\n    </filter>\n    </defs>\n    <mask maskUnits=\"userSpaceOnUse\" x=\"6.8\" y=\"10.3\" width=\"7.3\" height=\"9.5\" id=\"mask-2_3_\">\n    <g class=\"st5\">\n        <path id=\"path-1_3_\" class=\"st3\" d=\"M24.1,23.1h-20c-0.6,0-1.2-0.5-1.2-1.2V8.2C2.9,7.5,3.5,7,4.1,7h19.7c0.8,0,1.4,0.6,1.4,1.4\n        v13.5C25.2,22.6,24.7,23.1,24.1,23.1z\"/>\n    </g>\n    </mask>\n</svg>\n");
  };

  /** 无子码流的报备 不根据设备判断 */
  var VIDEO_LEVEL2 = [{
    name: "高清",
    level: '0',
    streamType: 1,
    //  1-主码流，2-子码流
    // hd svg icon
    icon: hdIcon
  }, {
    name: "标清",
    level: '1',
    streamType: 1,
    //  1-主码流，2-子码流
    // sd svg icon
    icon: sdIcon
  }];

  /** 视频质量 有子码流的设备 顺序不要变更 不根据设备判断*/
  var VIDEO_LEVEL = [{
    name: "高清",
    level: 'hd',
    streamType: 1,
    //  1-主码流，2-子码流
    // hd svg icon
    icon: hdIcon
  }, {
    name: "标清",
    level: 'sd',
    streamType: 2,
    //  1-主码流，2-子码流
    // sd svg icon
    icon: sdIcon
  }];

  // todo 临时本地ip调试
  // const prefixUrl = `http://10.8.139.117:8081`

  /**
   * @description 模板详情查询接口
   * @private
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {string} id 模板id 
   * @param {Function} successCallback  成功回调 (data) => void
   * @param {Function} errorCallback  失败回调 (err) => void
   * @returns {void}
   */
  var templateDetailApi = function templateDetailApi(jSPlugin, id, successCallback, errorCallback) {
    var success = function success(result) {
      console.log(result);
      if (result.meta) {
        successCallback(result);
      }
    };
    var errorFun = function errorFun(err) {
      console.log(err);
      errorCallback(err);
    };
    //   let headers = { 'Content-Type': 'application/json'};
    var url = "".concat(jSPlugin.env.domain, "/api/service/media/template/getDetail?accessToken=").concat(jSPlugin.accessToken, "&id=").concat(id);
    fetch(url, {
      method: 'GET'
    }).then(function (response) {
      return response.json();
    }).then(function (data) {
      console.log("get theme data", data);
      success(data);
    })["catch"](function (error) {
      errorFun(error);
    });
    //   FetchData(url, 'GET', {}, success, error, headers);
  };

  /**
   * @description 镜像翻转
   * @link https://open.ys7.com/help/59?h=%E9%95%9C%E5%83%8F%E7%BF%BB%E8%BD%AC#device_ptz-api3
   * 
   * 
   * @private
   * @param {string} domain 请求域名
   * @param {string} accessToken 令牌
   * @param {string} deviceSerial  设备序列号
   * @param {string} channelNo   通道号
   * @param {number} command 镜像方向：0-上下, 1-左右, 2-中心 , 和设备报备的能力集有关，即使设备支持，但是没有报备也一样不支持
   * @returns {Promise<any>}
   */
  var postDevicePtzMirror = function postDevicePtzMirror(domain, accessToken, deviceSerial, channelNo, command) {
    return new Promise(function (resolve, reject) {
      request("".concat(domain, "/api/lapp/device/ptz/mirror"), 'POST', {
        accessToken: accessToken,
        deviceSerial: deviceSerial,
        channelNo: channelNo,
        command: command
      }, '', resolve);
    });
  };

  /**
   * @description 获取设备视频质量查询接口
   * @link http://nvwa.hikvision.com.cn/pages/viewpage.action?pageId=662348596#id-%E7%89%A9%E6%A8%A1%E5%9E%8B%E7%A6%BB%E7%BA%BF%E6%8C%87%E4%BB%A4%E4%B8%8B%E5%8F%91%E6%8E%A5%E5%8F%A3%E5%BC%80%E6%94%BE+%E8%AE%BE%E5%A4%87%E8%A7%86%E9%A2%91%E8%B4%A8%E9%87%8F%E6%9F%A5%E8%AF%A2%E6%8E%A5%E5%8F%A3%E8%AE%BE%E8%AE%A1%E8%AF%B4%E6%98%8E%E4%B9%A6-%E8%AE%BE%E5%A4%87%E8%A7%86%E9%A2%91%E8%B4%A8%E9%87%8F%E6%9F%A5%E8%AF%A2%E6%8E%A5%E5%8F%A3
   * 
   * @private
   * @param {string} domain 请求域名
   * @param {string} accessToken 令牌
   * @param {string} deviceSerial  设备序列号
   * @param {string} channelNo   通道号
   * @returns {Promise<{data: Array<object>}>}
   */
  var getDeviceSupportQuality = function getDeviceSupportQuality(domain, accessToken, deviceSerial, channelNo) {
    var url = "".concat(domain, "/api/service/device/capacity/video/quality?accessToken=").concat(accessToken, "&deviceSerial=").concat(deviceSerial, "&channelNo=").concat(channelNo);
    return fetch(url, {
      method: 'GET'
    }).then(function (response) {
      return response.json();
    }).then(function (res) {
      if (res.meta && res.meta.code === 200) {
        if (res.data && res.data.length > 0) {
          // 支持子码流
          var result = res.data.find(function (item) {
            return item.streamTypeIn === 2;
          });
          if (result) {
            return VIDEO_LEVEL;
          }
        }
      }
      return VIDEO_LEVEL2;
    })["catch"](function () {
      return VIDEO_LEVEL2;
    });
  };

  var styleToString$3 = function styleToString(obj) {
    var styleString = "";
    Object.keys(obj).map(function (item, index) {
      styleString += "".concat(item, ":").concat(obj[item]).concat(index < Object.keys(obj).length - 1 ? ';' : "");
    });
    return styleString;
  };
  var MEDIAWIDTH$1 = 500;

  /**
   * @class Theme
   * @classdesc 播放器主题类
   * @param {import("../ezopen").EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @example
   * // 初始化Theme
   * const theme = new Theme(jSPlugin)
   * // 渲染Theme
   * theme.render()
   */
  var Theme = /*#__PURE__*/function () {
    function Theme(jSPlugin) {
      var _this = this;
      _classCallCheck$1(this, Theme);
      this.jSPlugin = jSPlugin;
      this.isNeedRenderHeader = false;
      this.isNeedRenderFooter = false;
      this.autoFocus = 0;
      this.autoFocusTimer = null;
      this.recordTimer = null;
      this.nextRate = 1;
      this.showHD = false;
      this.themeInited = false;
      this.decoderState = {
        state: {
          isEditing: false,
          play: false,
          pauseDate: null,
          sound: false,
          recordvideo: false,
          recordCount: "00:00",
          talk: false,
          zoom: false,
          pantile: false,
          hd: {},
          // 当前清晰度
          hdList: [],
          // 清晰度列表
          speed: false,
          expend: false,
          webExpend: false,
          cloudRec: matchEzopenUrl(jSPlugin.url).type === 'cloud.rec',
          rec: matchEzopenUrl(jSPlugin.url).type === 'rec',
          type: matchEzopenUrl(jSPlugin.url).type
        }
      };
      this.allowZoom = !this.jSPlugin.use3DZoom;
      this.zoomDisable = false;
      this.pluginStatus = new Status(this, this.jSPlugin.params.id);
      // console.log(" matchEzopenUrl(jSPlugin.url)", matchEzopenUrl(jSPlugin.url), this.decoderState.state)
      this.inited = false;
      this.isMobile = isMobile();
      if (typeof jSPlugin.isMobile !== 'undefined') {
        this.isMobile = jSPlugin.isMobile;
      }
      this.pauseTime = null;
      // 默认主题 - 按钮全部展示
      this.themeData = emptyData.data;
      this.deviceQ;
      // 自适应主题数据
      /*
       移动端 & 直播 =》 mobileLive
       移动端 & 回放地址 => mobileRec
       PC端 & 直播 =》 pcLive
       PC端 & 回放地址 => pcRec
      */
      if (this.jSPlugin.themeId) {
        switch (this.jSPlugin.themeId) {
          case 'pcLive':
          case 'pcRec':
          case 'mobileLive':
          case 'mobileRec':
          case 'security':
          case 'voice':
          case 'simple':
          case 'miniRec':
            var ezuikitTemplateDetail = _.find(officeTemplateList, function (item) {
              return item.themeId === _this.jSPlugin.themeId;
            });
            if (ezuikitTemplateDetail) {
              this.themeData = ezuikitTemplateDetail;
            }
            this.initThemeData();
            // this.renderThemeData();
            break;
          case 'themeData':
            this.themeData = this.jSPlugin.params.themeData;
            this.initThemeData();
            // this.renderThemeData();
            break;
          default:
            this.fetchThemeData(this.jSPlugin.themeId);
            break;
        }
      }
      if (!this.jSPlugin.Talk) {
        this.jSPlugin.Talk = new Talk(this.jSPlugin);
      }
      addCss("".concat(this.jSPlugin.staticPath, "/speed/speed.css"));
      addCss("".concat(this.jSPlugin.staticPath, "/css/theme.css"));
    }
    _createClass$1(Theme, [{
      key: "fetchThemeData",
      value: function fetchThemeData(themeId) {
        var _this2 = this;
        var successCallback = function successCallback(data) {
          if (data.meta.code == 0 && data.data) {
            _this2.themeData = data.data;
            if (data.data.header) {
              _this2.themeData.header = data.data.header;
              _this2.themeData.header.btnList = _this2.themeData.header.btnList.sort(function (a, b) {
                return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
              });
            }
            if (data.data.footer) {
              _this2.themeData.footer = data.data.footer;
              _this2.themeData.footer.btnList = _this2.themeData.footer.btnList.sort(function (a, b) {
                return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
              });
            }
            _this2.initThemeData();
            // this.renderThemeData();
            _this2.renderThemeData();
          }
        };
        var errorCallback = function errorCallback() {
          _this2.renderThemeData();
        };
        templateDetailApi(this.jSPlugin, themeId, successCallback, errorCallback);
      }
    }, {
      key: "changeTheme",
      value: function changeTheme(options) {
        var _this3 = this;
        if (typeof options === 'string') {
          this.jSPlugin.themeId = options;
          switch (this.jSPlugin.themeId) {
            case 'pcLive':
            case 'pcRec':
            case 'mobileLive':
            case 'mobileRec':
            case 'security':
            case 'voice':
            case 'simple':
            case 'miniRec':
              var ezuikitTemplateDetail = _.find(officeTemplateList, function (item) {
                return item.themeId === _this3.jSPlugin.themeId;
              });
              if (ezuikitTemplateDetail) {
                this.themeData = ezuikitTemplateDetail;
              }
              this.initThemeData();
              // this.renderThemeData();
              break;
            default:
              this.fetchThemeData(options);
              break;
          }
        } else if (_typeof(options) === 'object') {
          this.themeData = options;
          this.initThemeData();
          // this.renderThemeData();
          if (this.decoderState.state.isEditing) {
            this.editStart();
          }
        }
        if (this.jSPlugin && this.jSPlugin.handleThemeChange) {
          this.jSPlugin.handleThemeChange(options);
        }
      }
    }, {
      key: "renderThemeData",
      value: function renderThemeData() {
        var _this4 = this;
        var _this$themeData = this.themeData,
          header = _this$themeData.header,
          footer = _this$themeData.footer;
        if (this.isNeedRenderHeader && header) {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.background = header.backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.color = header.color.replace("-diy", "");
          header.btnList.map(function (item, index) {
            if (item.isrender) {
              _this4.setDecoderState(_defineProperty({}, item.iconId, _this4.decoderState.state[item.iconId]));
            }
          });
        }
        if (this.isNeedRenderFooter && footer) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer.backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer.color.replace("-diy", "");
          footer.btnList.map(function (item, index) {
            if (item.isrender) {
              _this4.setDecoderState(_defineProperty({}, item.iconId, _this4.decoderState.state[item.iconId]));
            }
            if (item.iconId === "play" && item.defaultActive && !_this4.themeInited) {
              var checkTimer = setInterval(function () {
                if (window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init) {
                  clearInterval(checkTimer);
                  _this4.jSPlugin.play();
                  _this4.themeInited = true;
                }
              }, 50);
            }
          });

          // 判断是否自动隐藏控件
          if (this.themeData.autoFocus > 0) {
            this.autoFocus = parseInt(this.themeData.autoFocus);
            this.startAutoFocus();
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).addEventListener("click", function () {
              if (document.getElementById("".concat(_this4.jSPlugin.id, "-audioControls"))) {
                document.getElementById("".concat(_this4.jSPlugin.id, "-audioControls")).style.opacity = 1;
                document.getElementById("".concat(_this4.jSPlugin.id, "-audioControls")).style.pointerEvents = 'all';
              }
              _this4.startAutoFocus();
            });
            // document.getElementById(`${this.jSPlugin.id}-wrap`).addEventListener("mouseout", ()=>{
            //   console.log("开启自动隐藏")
            //   this.startAutoFocus();
            // })
          }
          // 设置当前播放类型
          this.setDecoderState({
            cloudRec: matchEzopenUrl(this.jSPlugin.url).type === 'cloud.rec',
            rec: matchEzopenUrl(this.jSPlugin.url).type === 'rec',
            type: matchEzopenUrl(this.jSPlugin.url).type
          });
        } else {
          if (!this.themeInited) {
            var _checkTimer = setInterval(function () {
              if (window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer);
                _this4.jSPlugin.play();
                _this4.themeInited = true;
              }
            }, 50);
          }
        }
        var isNeedZoom = _.findIndex(this.themeData.footer.btnList, function (v) {
          return v.iconId === 'zoom' && v.isrender > 0;
        }) >= 0;
        if (isNeedZoom) {
          if (this.isMobile && !this.jSPlugin.use3DZoom) {
            //xuehb 开始手机端电子放大前校验回调，真正可以阻止放大的方法
            this.jSPlugin.beforeMobileZoomVerify = function () {
              //xuehb 播放状态才可以电子放大
              var play = _this4.decoderState.state.play;
              // console.log('手机端电子放大前校验回调play------------', play)
              if (!play) {
                return false;
              } else {
                return true;
              }
            };
            // this.jSPlugin.Zoom = new MobileZoom(this.jSPlugin);
          }
          // else {
          //   this.jSPlugin.Zoom = new Zoom(this.jSPlugin);
          // }
          this.jSPlugin.Zoom = new Zoom(this.jSPlugin);
        }
        var checkTimer = setInterval(function () {
          if (window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init) {
            clearInterval(checkTimer);
            // 执行一次reSize
            _this4.jSPlugin.reSize(_this4.jSPlugin.params.width, _this4.jSPlugin.params.height);
          }
        }, 50);
      }
    }, {
      key: "setDecoderState",
      value: function setDecoderState(options) {
        var _this5 = this;
        var _this$themeData2 = this.themeData,
          header = _this$themeData2.header,
          footer = _this$themeData2.footer;
        Object.keys(options).map(function (item, index) {
          var color = "#FFFFFF";
          var activeColor = "#FFFFFF";
          var _index = header.btnList.findIndex(function (i) {
            return i.iconId === item;
          });
          if (_index === -1) {
            color = footer.color.replace("-diy", "");
            activeColor = footer.activeColor.replace("-diy", "");
          } else {
            color = header.color.replace("-diy", "");
            // 按钮相关的激活颜色统一使用底部的
            activeColor = footer.activeColor.replace("-diy", "");
          }
          switch (item) {
            case 'play':
              if (options[item]) {
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-play"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play-content")).children[0].children[0].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play-content")).children[0].children[1].style = "display:none";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play")).className = options[item] ? 'active' : '';
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play-content")).childNodes[0].children[0].style.fill = options[item] ? activeColor : color;
                }
              } else {
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-play"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play-content")).children[0].children[1].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play-content")).children[0].children[0].style = "display:none";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play")).className = options[item] ? 'active' : '';
                  document.getElementById("".concat(_this5.jSPlugin.id, "-play-content")).childNodes[0].children[1].style.fill = options[item] ? activeColor : color;
                }
              }
              break;
            case 'sound':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-sound"))) {
                if (options[item]) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound-content")).children[0].children[1].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound-content")).children[0].children[0].style = "display:none";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound")).className = options[item] ? 'active' : '';
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound-content")).childNodes[0].children[1].style.fill = options[item] ? activeColor : color;
                } else {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound-content")).children[0].children[0].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound-content")).children[0].children[1].style = "display:none";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound")).className = options[item] ? 'active' : '';
                  document.getElementById("".concat(_this5.jSPlugin.id, "-sound-content")).childNodes[0].children[0].style.fill = options[item] ? activeColor : color;
                }
              }
              break;
            case 'recordvideo':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-recordvideo"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-recordvideo")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-recordvideo-content")).childNodes[0].style.fill = options[item] ? activeColor : color;

                // 定时器处理
                if (options[item]) {
                  _this5.countTime('add', 0);
                  // this.recordTimer = setInterval(() => {
                  // }, 1000);
                } else {
                  _this5.countTime('destroy', 0);
                  // clearInterval(this.recordTimer);
                }
              }

              break;
            case 'talk':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-talk"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-talk")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-talk-content")).childNodes[1].style.fill = options[item] ? activeColor : color;
              }
              break;
            case 'zoom':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-zoom"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-zoom")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-zoom-content")).childNodes[1].style.fill = options[item] ? activeColor : color;
              }
              break;
            case 'pantile':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-pantile"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-pantile")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-pantile-content")).childNodes[0].style.fill = options[item] ? activeColor : color;
              }
              break;
            case 'webExpend':
              if (options[item]) {
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend-content")).children[0].children[1].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend-content")).children[0].children[0].style = "display:none";
                }
                // 全屏置灰
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-expend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-expend")).className = "disabled";
                }
              } else {
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend-content")).children[0].children[0].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend-content")).children[0].children[1].style = "display:none";
                }
                // 全屏置灰
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-expend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-expend")).className = "";
                }
              }
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend-content")).childNodes[0].childNodes[0].style.fill = options[item] ? activeColor : color;
                document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend-content")).childNodes[0].childNodes[1].style.fill = options[item] ? activeColor : color;
              }
              break;
            case 'capturePicture':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-capturePicture"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-capturePicture")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-capturePicture-content")).childNodes[0].style.fill = options[item] ? activeColor : color;
              }
              break;
            case 'expend':
              if (options[item]) {
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-expend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-expend-content")).children[0].children[1].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-expend-content")).children[0].children[0].style = "display:none";
                }
                // 网站全屏置灰
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend")).className = "disabled";
                }
              } else {
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-expend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-expend-content")).children[0].children[0].style = "display:inline-block";
                  document.getElementById("".concat(_this5.jSPlugin.id, "-expend-content")).children[0].children[1].style = "display:none";
                }
                // 网站全屏置灰
                if (document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend"))) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-webExpend")).className = "";
                }
              }
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-expend"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-expend")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-expend-content")).childNodes[0].childNodes[0].style.fill = options[item] ? activeColor : color;
                document.getElementById("".concat(_this5.jSPlugin.id, "-expend-content")).childNodes[0].childNodes[1].style.fill = options[item] ? activeColor : color;
              }
              break;
            case 'hd':
              // 控制画面清晰度按钮内容展示
              // if (typeof options[item].level !== "undefined" && document.getElementById(`${this.jSPlugin.id}-hd`)) {
              //   const type = options[item].level
              //  const btnEleList =  document.getElementById(`${this.jSPlugin.id}-hd-content`).children[1].getElementsByClassName(`${this.jSPlugin.id}-select-quality-btn`)

              //   for (let i = 0; i < btnEleList.length; i++) {
              //     if (btnEleList[i].getAttribute('data-type') === type+'') {
              //       btnEleList[i].style.display = 'block';
              //     } else {
              //       btnEleList[i].style.display = "none";
              //     }
              //   }
              // }

              break;
            case 'speed':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-speed"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-speed-content")).children[1].children[0].style.color = options[item] ? activeColor : color;
                document.getElementById("".concat(_this5.jSPlugin.id, "-speed-content")).children[1].children[0].style.borderColor = options[item] ? activeColor : color;
              }
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-select-mask"))) {
                if (_this5.isMobile && options[item]) {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-select-mask")).style.display = "block";
                } else {
                  document.getElementById("".concat(_this5.jSPlugin.id, "-select-mask")).style.display = "none";
                }
              }
              break;
            case 'cloudRec':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-cloudRec"))) {
                console.log("document.getElementById(`${this.jSPlugin.id}-cloudRec-content`)", document.getElementById("".concat(_this5.jSPlugin.id, "-cloudRec")));
                document.getElementById("".concat(_this5.jSPlugin.id, "-cloudRec")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-cloudRec-content")).children[0].children[0].style.fill = options[item] ? activeColor : color;
              }
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-rec"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-rec")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-rec-content")).children[0].children[0].style.fill = options[item] ? color : activeColor;
              }
              break;
            case 'rec':
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-cloudRec"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-cloudRec")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-cloudRec-content")).children[0].children[0].style.fill = options[item] ? color : activeColor;
              }
              if (document.getElementById("".concat(_this5.jSPlugin.id, "-rec"))) {
                document.getElementById("".concat(_this5.jSPlugin.id, "-rec")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this5.jSPlugin.id, "-rec-content")).children[0].children[0].style.fill = options[item] ? activeColor : color;
              }
              break;
          }
          _this5.decoderState.state = Object.assign(_this5.decoderState.state, options);
        });
      }
    }, {
      key: "startAutoFocus",
      value: function startAutoFocus() {
        var _this6 = this;
        var autoFocus = this.autoFocus;
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
        this.autoFocusTimer = setTimeout(function () {
          if (document.getElementById("".concat(_this6.jSPlugin.id, "-audioControls"))) {
            document.getElementById("".concat(_this6.jSPlugin.id, "-audioControls")).style.opacity = 0;
            document.getElementById("".concat(_this6.jSPlugin.id, "-audioControls")).style.pointerEvents = 'none';
          }
        }, autoFocus * 1000);
      }
    }, {
      key: "stopAutoFocus",
      value: function stopAutoFocus() {
        if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.opacity = 1;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.pointerEvents = 'all';
        }
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
      }
    }, {
      key: "hideFooter",
      value: function hideFooter() {
        if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.display = 'none';
        }
      }
    }, {
      key: "showFooter",
      value: function showFooter() {
        if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.display = 'block';
        }
      }
    }, {
      key: "toString",
      value: function toString() {
        return "".concat(this.coreX, "-").concat(this.coreY);
      }
    }, {
      key: "renderFooter",
      value: function renderFooter(id, part) {
        var _this7 = this;
        var objItem = this.matchBtn(id);
        // // 移动端不展示电子放大
        // if (this.isMobile && objItem.id === "zoom") {
        //   return false;
        // }
        var objDOM = document.createElement('div');
        objDOM.className = "theme-icon-item";
        objDOM.innerHTML = "".concat("<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "\" style=\"position:relative;\">") // +`<span id="${this.jSPlugin.id}-${objItem.id}-left" class="ezuikit-theme-icon" title="左移" style="position: absolute;top: calc(50% - 26px);left: -6px;display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`  
        + "<div id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-content\" title=\"").concat(objItem.title, "\" style=\"height:").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "px;display: flex;align-items: center;position:relative;\">")).concat(objItem.domString, "</div>") // +`<span id="${this.jSPlugin.id}-${objItem.id}-right" class="ezuikit-theme-icon" title="右移" style="position: absolute;top: calc(50% - 26px);left: calc(100% - 0px);display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>`
        + '</span>';
        objDOM.onclick = function (e) {
          if (_this7.decoderState.state.isEditing) {
            return false;
          }
          objItem.onclick(e);
        };
        if (objItem.onmouseenter) {
          objDOM.onmouseenter = function (e) {
            if (_this7.decoderState.state.isEditing) {
              return false;
            }
            objItem.onmouseenter(e);
          };
        }
        if (objItem.onmouseleave) {
          objDOM.onmouseleave = function (e) {
            if (_this7.decoderState.state.isEditing) {
              return false;
            }
            objItem.onmouseleave(e);
          };
        }
        var toLeft = document.createElement('span');
        toLeft.className = "icon-move left";
        toLeft.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-left\" title=\"\u5DE6\u79FB\" style=\"position: absolute;top: calc(50% - 10px);left: -4px;\"><svg fill=\"#ffffff\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"24\" viewBox=\"0 0 10 15\" style=\"background:#00000080;\"><path d=\"M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z\"></path></svg></span>");
        toLeft.onclick = function () {
          _this7.editIcon(objItem.id, 'left', 'footer');
        };
        objDOM.appendChild(toLeft);
        var toRight = document.createElement('span');
        toRight.className = "icon-move right";
        toRight.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-right\" class=\"ezuikit-theme-icon\" title=\"\u53F3\u79FB\" style=\"position: absolute;top: calc(50% - 10px);left: calc(100% - 8px);\"><svg fill=\"#ffffff\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"12\" height=\"24\" viewBox=\"0 0 10 15\" style=\"background:#00000080\"><path d=\"M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z\"></path></svg></span>");
        toRight.onclick = function () {
          _this7.editIcon(objItem.id, 'right', 'footer');
        };
        objDOM.appendChild(toRight);
        var toClose = document.createElement('span');
        toClose.className = "icon-move close";
        toClose.innerHTML = "<span id=\"".concat(objItem.id, "-remove\" class=\"ezuikit-theme-icon\" title=\"\u79FB\u9664\" style=\"position: absolute;top: -10px;right: -10px;\">") + '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15">' + '<circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" />' + '<rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" />' + '<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" />' + '<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" />' + '</svg>' + '</span>';
        toClose.onclick = function () {
          _this7.editIcon(objItem.id, 'delete', 'footer');
        };
        objDOM.appendChild(toClose);
        if (part === 'left') {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).childNodes[0].appendChild(objDOM);
        } else {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).childNodes[1].appendChild(objDOM);
        }
        // 截图
      }
    }, {
      key: "editIcon",
      value: function editIcon(id, type, area) {
        console.log("编辑组件", id, type, area);
        var newThemeData = this.themeData;
        console.log("themeData", this.themeData);
        var btnList = this.themeData[area].btnList;
        var _index = _.findIndex(btnList, function (item) {
          return item.iconId === id;
        });
        var tmp = btnList[_index];
        switch (type) {
          case 'delete':
            // btnList.splice(_index, 1);
            // 限制回放必须选中一种介质
            if (id === "rec") {
              if (_.findIndex(btnList, function (item) {
                return item.iconId === "cloudRec" && item.isrender == 1;
              }) === -1) {
                if (this.jSPlugin.Message) {
                  this.jSPlugin.Message["default"]("必须选中一种存储介质");
                }
                return false;
              }
            } else if (id === "cloudRec") {
              if (_.findIndex(btnList, function (item) {
                return item.iconId === "rec" && item.isrender == 1;
              }) === -1) {
                if (this.jSPlugin.Message) {
                  this.jSPlugin.Message["default"]("必须选中一种存储介质");
                }
                return false;
              }
            }
            btnList[_index].isrender = 0;
            break;
          case 'right':
            var nextRightBtnIndex = -1;
            for (var i = _index + 1; i < btnList.length; i++) {
              if (btnList[i].part === btnList[_index].part && btnList[i].isrender == 1) {
                nextRightBtnIndex = i;
                break;
              }
            }
            if (nextRightBtnIndex !== -1) {
              btnList[_index] = btnList[nextRightBtnIndex];
              btnList[nextRightBtnIndex] = tmp;
            }
            break;
          case 'left':
            var nextLeftBtnIndex = -1;
            for (var _i = _index - 1; _i >= 0; _i--) {
              if (btnList[_i].part === btnList[_index].part && btnList[_i].isrender == 1) {
                nextLeftBtnIndex = _i;
                break;
              }
            }
            if (nextLeftBtnIndex !== -1) {
              btnList[_index] = btnList[nextLeftBtnIndex];
              btnList[nextLeftBtnIndex] = tmp;
            }
            break;
        }
        newThemeData[area].btnList = btnList;
        //this.renderThemeData();
        this.changeTheme(newThemeData);
      }
    }, {
      key: "renderHeader",
      value: function renderHeader(id, part) {
        var _this8 = this;
        var objItem = this.matchBtn(id);
        var objDOM = document.createElement('div');
        objDOM.className = "theme-icon-item";
        objDOM.style = "max-width:50%;";
        objDOM.innerHTML = "".concat("<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "\" style=\"position:relative;\";>") // +`<span id="${this.jSPlugin.id}-${objItem.id}-left" title="左移" style="position: absolute;top: calc(50% - 10px);left: -6px;display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`  
        + "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-content\" title=\"").concat(objItem.title, "\" style=\"display:inline-block;height:").concat(this.width > MEDIAWIDTH$1 ? 48 : 32, "px;\">")).concat(objItem.domString, "</span>") //+`<span id="${this.jSPlugin.id}-${objItem.id}-right" title="右移" style="position: absolute;top: calc(50% - 10px);left: calc(100% - 6px);display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>`
        + "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-remove\" title=\"\u79FB\u9664\" style=\"position: absolute;top: -6px;left: 38px;display: none;\">") + '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15">' + '<circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" />' + '<rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" />' + '<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" />' + '<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" />' + '</svg>' + '</span>' + '</span>';
        // var toLeft = document.createElement('span');
        // toLeft.innerHTML =  +`<span id="${this.jSPlugin.id}-${objItem.id}-left" title="左移" style="position: absolute;top: calc(50% - 10px);left: -6px;display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`;
        // toLeft.onclick = () => {console.log("左移动")};
        objDOM.onclick = function (e) {
          if (_this8.decoderState.state.isEditing) {
            return false;
          }
          objItem.onclick(e);
        };
        // var toLeft = document.createElement('span');
        // toLeft.className = "icon-move left";
        // toLeft.innerHTML =  `<span id="${this.jSPlugin.id}-${objItem.id}-left" title="左移" style="position: absolute;top: calc(50% - 10px);left: -4px;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`;
        // toLeft.onclick = () => {this.editIcon(objItem.id,'left','header')};
        // objDOM.appendChild(toLeft);

        // var toRight = document.createElement('span');
        // toRight.className = "icon-move right";
        // toRight.innerHTML = `<span id="${this.jSPlugin.id}-${objItem.id}-right" class="ezuikit-theme-icon" title="右移" style="position: absolute;top: calc(50% - 10px);left: calc(100% - 8px);"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>`;
        // toRight.onclick = () => {this.editIcon(objItem.id,'right','header')};
        // objDOM.appendChild(toRight);

        var toClose = document.createElement('span');
        toClose.className = "icon-move close";
        toClose.innerHTML = "<span id=\"".concat(objItem.id, "-remove\" class=\"ezuikit-theme-icon\" title=\"\u79FB\u9664\" style=\"position: absolute;top: -6px;right: -6px;\">") + '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 15 15">' + '<circle style="fill-rule:evenodd;clip-rule:evenodd;fill-opacity:0.8011;" cx="7.5" cy="7.6" r="7" />' + '<rect x="3.9" y="3.5" class="st1" style="fill:none;" width="8.1" height="8.1" />' + '<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="5" x2="10" y2="10.1" />' + '<line style="fill:none;stroke:#ffffff;stroke-width:0.5833;stroke-linecap:round;" x1="4.9" y1="10.1" x2="10" y2="5" />' + '</svg>' + '</span>';
        toClose.onclick = function () {
          _this8.editIcon(objItem.id, 'delete', 'header');
        };
        objDOM.appendChild(toClose);
        // objDOM.appendChild(toLeft);
        if (part === 'left') {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).childNodes[0].appendChild(objDOM);
        } else {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).childNodes[1].appendChild(objDOM);
        }
      }
    }, {
      key: "countTime",
      value: function countTime(type) {
        var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var that = this;
        if (!document.getElementById(this.jSPlugin.id + "time-area")) {
          var recordDOM = document.createElement("div");
          recordDOM.id = this.jSPlugin.id + "time-area";
          recordDOM.className = "time-area";
          recordDOM.innerHTML = "<span class=\"dot\"></span><span class=\"value\">00:00</span>";
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).appendChild(recordDOM);
          }
        }
        if (this.countTimer) {
          clearInterval(this.countTimer);
        }
        if (type === 'add') {
          var i = start;
          document.getElementById(that.jSPlugin.id + "time-area").style.display = 'flex';
          this.countTimer = setInterval(function () {
            ++i;
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = formatSeconds(i);
          }, 1000);
        } else if (type === 'destroy') {
          if (this.countTimer) {
            clearInterval(this.countTimer);
          }
          this.countTimer = undefined;
          if (document.getElementById(that.jSPlugin.id + "time-area")) {
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = '00:00';
            document.getElementById(that.jSPlugin.id + "time-area").style.display = 'none';
          }
        }
        //将秒数转换为时分秒格式
        function formatSeconds(value) {
          var theTime = parseInt(value); // 秒
          var middle = 0; // 分
          var hour = 0; // 小时
          var secondV = '00';
          var minV = '00';
          var hourV = '00';
          if (theTime > 59) {
            middle = parseInt(theTime / 60);
            theTime = parseInt(theTime % 60);
            if (middle > 59) {
              hour = parseInt(middle / 60);
              middle = parseInt(middle % 60);
            }
          }
          secondV = parseInt(theTime) > 9 ? parseInt(theTime) : '0' + parseInt(theTime);
          minV = parseInt(middle) > 9 ? parseInt(middle) : '0' + parseInt(middle);
          hourV = parseInt(hour) > 9 ? parseInt(hour) : '0' + parseInt(hour);
          if (hour > 0) {
            return hourV + ':' + minV + ':' + secondV;
          } else if (middle > 0) {
            return minV + ':' + secondV;
          } else {
            return '00:' + secondV;
          }
        }
      }

      /**
       * @description 设置按钮禁止点击状态 
       * @param {boolean} status 
       * @returns {void}
       */
    }, {
      key: "setDisabled",
      value: function setDisabled(status) {
        var sound = this.decoderState.state.sound;
        var DisabledStyle = status ? 'cursor: not-allowed; fill: gray; color: gray' : 'cursor: default';

        // WARN: setAttribute 会替换原有的 style 属性，导致原有的样式丢失

        //设置按钮禁止点击状态
        document.getElementById(sound ? "".concat(this.jSPlugin.id, "-sound-icon") : "".concat(this.jSPlugin.id, "-nosound-icon")) != null && document.getElementById(sound ? "".concat(this.jSPlugin.id, "-sound-icon") : "".concat(this.jSPlugin.id, "-nosound-icon")).setAttribute('style', status ? 'cursor: not-allowed;fill: gray' : 'cursor: default');
        document.getElementById("".concat(this.jSPlugin.id, "-recordvideo-icon")) != null && document.getElementById("".concat(this.jSPlugin.id, "-recordvideo-icon")).setAttribute('style', DisabledStyle);
        document.getElementById("".concat(this.jSPlugin.id, "-capturePicture-icon")) != null && document.getElementById("".concat(this.jSPlugin.id, "-capturePicture-icon")).setAttribute('style', DisabledStyle);
        document.getElementById("".concat(this.jSPlugin.id, "-talk-icon")) != null && document.getElementById("".concat(this.jSPlugin.id, "-talk-icon")).setAttribute('style', DisabledStyle);
        if (!this.allowZoom) {
          document.getElementById("".concat(this.jSPlugin.id, "-zoom-icon")) != null && document.getElementById("".concat(this.jSPlugin.id, "-zoom-icon")).setAttribute('style', DisabledStyle);
        }
        document.getElementById("".concat(this.jSPlugin.id, "-pantile-icon")) != null && document.getElementById("".concat(this.jSPlugin.id, "-pantile-icon")).setAttribute('style', DisabledStyle);
        // document.getElementById(`${this.jSPlugin.id}-expend-icon`).setAttribute('style', DisabledStyle);
        // document.getElementById(`${this.jSPlugin.id}-webExpend-icon`).setAttribute('style', DisabledStyle);

        // 清晰度切换按钮 disabled
        var qualityBtns = document.getElementsByClassName("".concat(this.jSPlugin.id, "-select-quality-btn"));
        if (qualityBtns.length) {
          for (var i = 0; i < qualityBtns.length; i++) {
            if (status) {
              qualityBtns[i].style.cursor = 'not-allowed';
              qualityBtns[i].style.fill = 'gray';
              qualityBtns[i].style.color = 'gray';
            } else {
              qualityBtns[i].style.cursor = 'default';
              qualityBtns[i].style.fill = '';
              qualityBtns[i].style.color = '';
            }
          }
        }

        //设置按钮禁止点击状态
        document.getElementById("".concat(this.jSPlugin.id, "-speed-text")) != null && document.getElementById("".concat(this.jSPlugin.id, "-speed-text")).setAttribute('style', document.getElementById("".concat(this.jSPlugin.id, "-speed-text")).getAttribute('style') + ';' + (status ? 'cursor: not-allowed;color: gray;border-color: gray;' : 'cursor: default;color: #ffffff;border-color: #ffffff;'));
        this.zoomDisable = this.jSPlugin.use3DZoom && status; //3D定位模式下暂停状态禁用缩放开关
      }
    }, {
      key: "matchBtn",
      value: function matchBtn(btnId) {
        var _this9 = this;
        var _this$themeData3 = this.themeData,
          header = _this$themeData3.header,
          footer = _this$themeData3.footer;
        var btnItem = {
          title: "",
          id: "",
          domString: "",
          color: "#FFFFFF",
          activeColor: "#FFFFFF",
          onclick: function onclick() {},
          onmoveleft: function onmoveleft() {},
          onmoveright: function onmoveright() {},
          onremove: function onremove() {}
        };
        var _index = header.btnList.findIndex(function (item) {
          return item.iconId === btnId;
        });
        if (_index === -1) {
          btnItem.color = footer.color;
          btnItem.backgroundColor = footer.backgroundColor;
          btnItem.activeColor = footer.activeColor;
        } else {
          btnItem.color = header.color;
          btnItem.backgroundColor = header.backgroundColor;
          btnItem.activeColor = header.activeColor;
        }
        switch (btnId) {
          case 'play':
            btnItem.title = "播放/结束播放";
            btnItem.id = btnId;
            btnItem.domString = '<div style="height: 100%">' + "<svg id=\"".concat(this.jSPlugin.id + '-play-icon', "\" class=\"theme-icon-item-icon\" style=\"display:none\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\"  fill=\"").concat(btnItem.color, "\" viewBox=\"-6 -6 32 32\">\n            <path id=\"Stroke-1\" class=\"st1\" d=\"M10.5,1.7c-4.9,0-8.8,4-8.8,8.8s4,8.8,8.8,8.8s8.8-4,8.8-8.8S15.4,1.7,10.5,1.7z M10.5,2.7\n              c4.3,0,7.8,3.5,7.8,7.8s-3.5,7.8-7.8,7.8s-7.8-3.5-7.8-7.8S6.2,2.7,10.5,2.7z\"/>\n            <path class=\"st2\" d=\"M8.7,8C9,8,9.3,8.3,9.3,8.6v3.8C9.3,12.7,9,13,8.7,13C8.3,13,8,12.7,8,12.4V8.6C8,8.3,8.3,8,8.7,8z\"/>\n            <path id=\"Rectangle-Copy-10\" class=\"st2\" d=\"M12.8,8c0.3,0,0.6,0.3,0.6,0.6v3.8c0,0.3-0.3,0.6-0.6,0.6c-0.3,0-0.6-0.3-0.6-0.6V8.6\n              C12.2,8.3,12.5,8,12.8,8z\"/>\n          </svg>") + "<svg id=\"".concat(this.jSPlugin.id + '-stop-icon', "\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M13,9.8L10.1,8C9.9,7.9,9.7,7.9,9.5,7.9c-0.6,0-1,0.4-1,1v3.7c0,0.2,0.1,0.4,0.2,0.5c0.3,0.5,0.9,0.6,1.4,0.3 l2.9-1.8c0.1-0.1,0.2-0.2,0.3-0.3C13.6,10.7,13.4,10.1,13,9.8z" />' + '<path d="M10.5,1.9c-4.9,0-8.8,4-8.8,8.8c0,4.9,4,8.8,8.8,8.8s8.8-4,8.8-8.8C19.4,5.8,15.4,1.9,10.5,1.9z M10.5,18.5 c-4.3,0-7.8-3.5-7.8-7.8s3.5-7.8,7.8-7.8c4.3,0,7.8,3.5,7.8,7.8S14.9,18.5,10.5,18.5z" />' + '</svg>' + '</div>';
            btnItem.onclick = function () {
              var _this9$decoderState$s = _this9.decoderState.state,
                play = _this9$decoderState$s.play,
                isEditing = _this9$decoderState$s.isEditing,
                rec = _this9$decoderState$s.rec,
                cloudRec = _this9$decoderState$s.cloudRec,
                recordvideo = _this9$decoderState$s.recordvideo,
                pantile = _this9$decoderState$s.pantile;
              if (isEditing) {
                return false;
              }
              if (Array.isArray(window.recTimer)) {
                window.recTimer.map(function (item) {
                  clearInterval(item);
                });
              }
              if (play) {
                if (rec || cloudRec) {
                  //回放时调用暂停，而不是结束播放
                  if (_this9.Rec) {
                    _this9.Rec.unSyncTimeLine();
                  }
                  _this9.jSPlugin.pause().then(function () {
                    _this9.setDecoderState({
                      play: !play
                    });
                    _this9.setDisabled(play);
                  });
                } else {
                  _this9.jSPlugin.stop().then(function () {
                    _this9.setDecoderState({
                      play: !play
                    });
                    _this9.setDisabled(play);
                  });
                  _this9.jSPlugin.Zoom.stopZoom();
                  _this9.jSPlugin.close3DZoom();
                }
                //停止录像并关闭录像计时
                if (recordvideo) {
                  // this.jSPlugin.stopSave();
                  _this9.setDecoderState({
                    recordvideo: false
                  });
                }
              } else {
                if (rec || cloudRec) {
                  //回放时调用恢复播放状态
                  if (_this9.Rec) {
                    _this9.Rec.syncTimeLine();
                  }
                  _this9.jSPlugin.resume().then(function () {
                    _this9.setDecoderState({
                      play: !play
                    });
                    _this9.setDisabled(play);
                  });
                } else {
                  _this9.jSPlugin.play().then(function () {
                    _this9.setDecoderState({
                      play: !play
                    });
                    _this9.setDisabled(play);
                  });
                }
                if (_this9.jSPlugin.use3DZoom) {
                  //xuehb 重置手机端电子放大状态
                  _this9.resetMobileZoomStatus();
                }
              }
              if (_this9.jSPlugin.use3DZoom) {
                _this9.setDecoderState({
                  zoom: false
                });
                _this9.allowZoom = false;
              } else {
                _this9.allowZoom = rec || cloudRec;
              }
              if (pantile && _this9.Ptz) {
                _this9.Ptz.hide();
                _this9.setDecoderState({
                  pantile: false
                });
              }
              if (document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect"))) {
                document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.display = 'none';
              }
            };
            break;
          case 'sound':
            btnItem.title = "声音";
            btnItem.id = btnId;
            btnItem.domString = '<span style="height: 100%">' + "<svg class=\"theme-icon-item-icon\" id=\"".concat(this.jSPlugin.id, "-nosound-icon\" style=\"display:none\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">\n            <path d=\"M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z\"/>\n            <path d=\"M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z\"/>\n            <path d=\"M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z\"/>\n            <path d=\"M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z\"/>\n            </svg>") + "<svg class=\"theme-icon-item-icon\" id=\"".concat(this.jSPlugin.id, "-sound-icon\" style=\"display:inline-block\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" fill=\"").concat(btnItem.color, "\" viewBox=\"-6 -6 32 32\">\n              <path d=\"M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n                c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z\"/>\n              <path d=\"M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n                c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z\"/>\n              <path id=\"Stroke-5\" class=\"st1\" d=\"M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n                C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n                L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z\"/>\n              <path  d=\"M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n                c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n                c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z\"/>\n            </svg>") + '</span>';
            btnItem.onclick = function () {
              var _this9$decoderState$s2 = _this9.decoderState.state,
                play = _this9$decoderState$s2.play,
                sound = _this9$decoderState$s2.sound,
                talk = _this9$decoderState$s2.talk,
                pantile = _this9$decoderState$s2.pantile;
              if (play && !talk) {
                if (sound) {
                  _this9.jSPlugin.closeSound();
                  _this9.setDecoderState({
                    sound: false
                  });
                } else {
                  _this9.jSPlugin.openSound();
                  _this9.setDecoderState({
                    sound: true
                  });
                }
                if (pantile && _this9.Ptz) {
                  _this9.Ptz.hide();
                  _this9.setDecoderState({
                    pantile: false
                  });
                }
              }
            };
            break;
          case 'recordvideo':
            btnItem.title = "录屏";
            btnItem.id = btnId;
            btnItem.domString = "<svg id=\"".concat(this.jSPlugin.id, "-recordvideo-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M11.6,5.3H4.7c-1.4,0-2.5,1.1-2.5,2.5v5.9c0,1.4,1.1,2.5,2.5,2.5h6.9c1.4,0,2.5-1.1,2.5-2.5V7.7 C14.1,6.4,13,5.3,11.6,5.3z M4.7,6.3h6.9c0.8,0,1.5,0.7,1.5,1.5v5.9c0,0.8-0.7,1.5-1.5,1.5H4.7c-0.8,0-1.5-0.7-1.5-1.5V7.7 C3.3,6.9,3.9,6.3,4.7,6.3z" />' + '<path d="M16.6,6.7c0.9-0.8,2.3-0.1,2.4,1l0,0.1v5.7c0,1.2-1.3,1.9-2.3,1.2l-0.1-0.1L13.3,12 c-0.2-0.2-0.2-0.5-0.1-0.7c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.7c0.3,0.2,0.7,0.1,0.8-0.3l0-0.1V7.8c0-0.4-0.4-0.6-0.7-0.4 l-0.1,0l-3.3,2.7c-0.2,0.2-0.5,0.1-0.7-0.1c-0.2-0.2-0.1-0.5,0-0.6l0.1-0.1L16.6,6.7z" />' + '</svg>';
            btnItem.onclick = function () {
              var _this9$decoderState$s3 = _this9.decoderState.state,
                play = _this9$decoderState$s3.play,
                recordvideo = _this9$decoderState$s3.recordvideo;
              if (play) {
                if (recordvideo) {
                  _this9.jSPlugin.stopSave();
                  _this9.setDecoderState({
                    recordvideo: false
                  });
                } else {
                  _this9.jSPlugin.startSave("".concat(new Date().getTime()));
                  _this9.setDecoderState({
                    recordvideo: true
                  });
                }
              }
            };
            break;
          case 'capturePicture':
            btnItem.title = "截图";
            btnItem.id = btnId;
            btnItem.domString = "<svg id=\"".concat(this.jSPlugin.id, "-capturePicture-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M10.8,7.7c-2,0-3.7,1.6-3.7,3.7S8.7,15,10.8,15c2,0,3.7-1.6,3.7-3.7S12.8,7.7,10.8,7.7z M10.8,8.7c1.5,0,2.7,1.2,2.7,2.7S12.2,14,10.8,14c-1.5,0-2.7-1.2-2.7-2.7S9.3,8.7,10.8,8.7z" />' + '<path d="M8.6,3.7l-0.1,0C8,3.7,7.7,4,7.5,4.3l-1,1.7l-1.3,0C4,6.1,3.1,7,3.1,8.2v7.1 c0,1.2,0.9,2.1,2.1,2.1h11.1c1.2,0,2.1-0.9,2.1-2.1V8.2l0-0.1c-0.1-1.1-1-1.9-2.1-1.9l-1.3,0l-1.1-1.8c-0.2-0.4-0.7-0.6-1.1-0.6H8.6 z M8.6,4.7h4.2c0.1,0,0.2,0.1,0.3,0.1l1.2,2c0.1,0.2,0.3,0.2,0.4,0.2h1.6c0.6,0,1.1,0.5,1.1,1.1v7.1c0,0.6-0.5,1.1-1.1,1.1H5.1 c-0.6,0-1.1-0.5-1.1-1.1V8.2c0-0.6,0.5-1.1,1.1-1.1h1.6c0.2,0,0.3-0.1,0.4-0.2l1.2-2C8.4,4.7,8.5,4.7,8.6,4.7z" />' + '</svg>';
            btnItem.onclick = function () {
              var play = _this9.decoderState.state.play;
              if (play) {
                _this9.jSPlugin.capturePicture("".concat(new Date().getTime()));
              } else {
                console.log("视频未播放，无法截图");
              }
            };
            break;
          case 'talk':
            btnItem.title = "对讲";
            btnItem.id = btnId;
            btnItem.domString = '<div></div>' + "<svg id=\"".concat(this.jSPlugin.id, "-talk-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6	C13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" />' + '<path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" />' + '<path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" />' + '<path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" />' + '</svg>';
            btnItem.onclick = function () {
              var _this9$decoderState$s4 = _this9.decoderState.state,
                talk = _this9$decoderState$s4.talk,
                sound = _this9$decoderState$s4.sound,
                play = _this9$decoderState$s4.play,
                pantile = _this9$decoderState$s4.pantile;
              if (play) {
                if (talk) {
                  console.log('结束对讲');
                  _this9.setDecoderState({
                    talk: false
                  });
                  _this9.jSPlugin.Talk.stopTalk();
                  var isReOpenSound = _.findIndex(_this9.themeData.footer.btnList, function (v) {
                    return v.iconId === 'sound' && v.isrender === 1 && v.defaultActive === 1;
                  }) > -1;
                  if (_this9.themeData && isReOpenSound) {
                    _this9.jSPlugin.openSound();
                    _this9.setDecoderState({
                      sound: true
                    });
                  }
                } else {
                  console.log('开始对讲');
                  _this9.setDecoderState({
                    talk: true
                  });
                  _this9.jSPlugin.Talk.startTalk(function (isGb) {
                    if (sound && !isGb) {
                      // 非国标设开启对讲时关闭视频流声音
                      _this9.jSPlugin.closeSound();
                      _this9.setDecoderState({
                        sound: false
                      });
                    }
                  });
                }
                if (pantile && _this9.Ptz) {
                  _this9.Ptz.hide();
                  _this9.setDecoderState({
                    pantile: false
                  });
                }
              }
            };
            break;
          case 'zoom':
            btnItem.title = this.jSPlugin.use3DZoom ? "3D定位" : "电子放大";
            btnItem.id = btnId;
            btnItem.domString = '<div></div>' + "<svg id=\"".concat(this.jSPlugin.id, "-zoom-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" id=\"\u56FE\u5C42_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n          width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"5 -6 5 32\" style=\"enable-background:new 0 0 20 20.1;\" xml:space=\"preserve\">\n              <path class=\"st1\" d=\"M8.8,2.6c3.5,0,6.2,2.8,6.2,6.2s-2.8,6.2-6.2,6.2s-6.2-2.8-6.2-6.2S5.3,2.6,8.8,2.6z M8.8,3.9\n                c-2.8,0-5,2.2-5,5s2.2,5,5,5s5-2.2,5-5S11.5,3.9,8.8,3.9z M12.7,12.7l3.9,3.9\"/>\n              <path class=\"st2\" d=\"M11.2,9.5h-5c-0.3,0-0.6-0.3-0.6-0.6s0.3-0.6,0.6-0.6h5c0.3,0,0.6,0.3,0.6,0.6S11.6,9.5,11.2,9.5z\"/>\n              <path class=\"st2\" d=\"M8.7,12c-0.3,0-0.6-0.3-0.6-0.6v-5c0-0.3,0.3-0.6,0.6-0.6s0.6,0.3,0.6,0.6v5C9.3,11.8,9.1,12,8.7,12z\"/>\n              <path class=\"st2\" d=\"M16.9,17.6c-0.1,0-0.3-0.1-0.4-0.2l-3.9-3.9c-0.2-0.2-0.2-0.6,0-0.8s0.6-0.2,0.8,0l3.9,3.9\n                c0.2,0.2,0.2,0.6,0,0.8C17.2,17.5,17,17.6,16.9,17.6z\"/>\n          </svg>");
            btnItem.onclick = function () {
              var _this9$decoderState$s5 = _this9.decoderState.state,
                zoom = _this9$decoderState$s5.zoom,
                play = _this9$decoderState$s5.play,
                rec = _this9$decoderState$s5.rec,
                cloudRec = _this9$decoderState$s5.cloudRec;
                _this9$decoderState$s5.pantile;
              if (_this9.jSPlugin.use3DZoom) {
                if (!play) {
                  return false;
                }
                if (zoom) {
                  _this9.jSPlugin.close3DZoom();
                } else {
                  _this9.jSPlugin.enable3DZoom();
                }
              } else {
                if (_this9.zoomDisable || !rec && !cloudRec && !play) {
                  return false;
                }
                if (zoom) {
                  console.log('结束电子放大');
                  _this9.jSPlugin.Zoom.stopZoom();
                } else {
                  console.log('开始电子放大');
                  _this9.jSPlugin.Zoom.startZoom();
                }
              }
              // if (pantile && this.Ptz) {
              //   this.Ptz.hide();
              //   this.setDecoderState({ pantile: false });
              // }
              _this9.setDecoderState({
                zoom: !zoom
              });
            };
            break;
          case 'pantile':
            btnItem.title = "云台控制";
            btnItem.id = btnId;
            btnItem.domString = "<svg id=\"".concat(this.jSPlugin.id, "-pantile-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M10.2,7.8c1.6,0,2.9,1.3,2.9,2.9s-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9S8.5,7.8,10.2,7.8z M10.2,8.8c-1.1,0-1.9,0.9-1.9,1.9s0.9,1.9,1.9,1.9s1.9-0.9,1.9-1.9S11.2,8.8,10.2,8.8z" />' + '<path d="M8.8,3.5c0.7-0.6,1.8-0.6,2.5-0.1l0.1,0.1l1.4,1.1c0.2,0.2,0.3,0.5,0.1,0.7 c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1,0l-1.4-1.1C10.5,3.9,10,3.9,9.6,4.2L9.4,4.3L8,5.4C7.8,5.5,7.5,5.5,7.3,5.3c-0.2-0.2-0.1-0.5,0-0.6 l0.1-0.1L8.8,3.5z" />' + '<path d="M2.5,12.3c-0.6-0.7-0.6-1.8-0.1-2.5l0.1-0.1l1.1-1.4c0.2-0.2,0.5-0.3,0.7-0.1 c0.2,0.2,0.2,0.4,0.1,0.6l0,0.1l-1.1,1.4C3,10.6,3,11.1,3.2,11.5l0.1,0.1L4.4,13c0.2,0.2,0.1,0.5-0.1,0.7c-0.2,0.2-0.5,0.1-0.6,0 l-0.1-0.1L2.5,12.3z" />' + '<path d="M17.7,12.3c0.6-0.7,0.6-1.8,0.1-2.5l-0.1-0.1l-1.1-1.4c-0.2-0.2-0.5-0.3-0.7-0.1 c-0.2,0.2-0.2,0.4-0.1,0.6l0,0.1l1.1,1.4c0.3,0.4,0.3,0.9,0.1,1.3l-0.1,0.1L15.8,13c-0.2,0.2-0.1,0.5,0.1,0.7c0.2,0.2,0.5,0.1,0.6,0 l0.1-0.1L17.7,12.3z" />' + '<path d="M8.8,18.2c0.7,0.6,1.8,0.6,2.5,0.1l0.1-0.1l1.4-1.1c0.2-0.2,0.3-0.5,0.1-0.7 c-0.2-0.2-0.4-0.2-0.6-0.1l-0.1,0l-1.4,1.1c-0.4,0.3-0.9,0.3-1.3,0.1l-0.1-0.1L8,16.3c-0.2-0.2-0.5-0.1-0.7,0.1 c-0.2,0.2-0.1,0.5,0,0.6l0.1,0.1L8.8,18.2z" />' + '</svg>';
            btnItem.onclick = function () {
              var _this9$decoderState$s6 = _this9.decoderState.state,
                play = _this9$decoderState$s6.play,
                pantile = _this9$decoderState$s6.pantile,
                expend = _this9$decoderState$s6.expend;
              if (play) {
                if (!pantile) {
                  console.log('显示云台');
                  if (_this9.isMobile && !expend) {
                    console.log("移动端，非全屏状态不展示云台");
                    // 移动端，非全屏状态不展示云台
                    return false;
                  }
                  _this9.Ptz.show();
                  _this9.setDecoderState({
                    pantile: true
                  });
                } else {
                  console.log('隐藏云台');
                  _this9.Ptz.hide();
                  _this9.setDecoderState({
                    pantile: false
                  });
                }
              }
            };
            break;
          case 'expend':
            btnItem.title = "全局全屏";
            btnItem.id = btnId;
            btnItem.domString = "<span><svg id=\"".concat(this.jSPlugin.id, "-expend-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M3.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,4.1,6.9,4.1H5.2 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.9,7.4,3.7,7.6,3.4,7.6z" />' + '<path d="M6.9,18.1H5.2c-1.2,0-2.2-1-2.2-2.2v-1.8c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8c0,0.7,0.6,1.2,1.2,1.2 h1.8c0.3,0,0.5,0.2,0.5,0.5S7.2,18.1,6.9,18.1z" />' + '<path d="M15.7,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.9,17.1,16.9,18.1,15.7,18.1z" />' + '<path d="M17.4,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-0.7-0.6-1.3-1.2-1.3h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8 c1.2,0,2.2,1,2.2,2.3v1.8C17.9,7.4,17.7,7.6,17.4,7.6z" />' + '</svg>' + "<svg class=\"theme-icon-item-icon\" style=\"display:none\" width=\"".concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" fill=\"").concat(btnItem.color, "\" viewBox=\"-6 -6 32 32\">\n            <path class=\"st1\" d=\"M5.7,8.1H3.9c-0.3,0-0.6-0.2-0.6-0.6S3.6,7,3.9,7h1.9c0.7,0,1.3-0.6,1.3-1.3V3.8c0-0.3,0.2-0.6,0.6-0.6\n              s0.6,0.2,0.6,0.6v1.9C8.2,7,7.1,8.1,5.7,8.1z\"/>\n            <path class=\"st1\" d=\"M7.6,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-0.7-0.6-1.3-1.3-1.3H3.9c-0.3,0-0.6-0.2-0.6-0.6s0.2-0.6,0.6-0.6h1.9\n              c1.3,0,2.4,1.1,2.4,2.4v1.9C8.2,17.5,7.9,17.7,7.6,17.7z\"/>\n            <path class=\"st1\" d=\"M13.4,17.7c-0.3,0-0.6-0.2-0.6-0.6v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.6,0.2,0.6,0.6S17.5,14,17.2,14\n              h-1.9c-0.7,0-1.3,0.6-1.3,1.3v1.9C14,17.5,13.8,17.7,13.4,17.7z\"/>\n            <path class=\"st1\" d=\"M17.2,8.1h-1.9c-1.3,0-2.4-1.1-2.4-2.4V3.8c0-0.3,0.2-0.6,0.6-0.6S14,3.5,14,3.8v1.9C14,6.4,14.6,7,15.3,7h1.9\n              c0.3,0,0.6,0.2,0.6,0.6S17.5,8.1,17.2,8.1z\"/>\n          </svg>\n          </span>");
            btnItem.onclick = function () {
              var _this9$decoderState$s7 = _this9.decoderState.state;
                _this9$decoderState$s7.webExpend;
                var expend = _this9$decoderState$s7.expend,
                zoom = _this9$decoderState$s7.zoom,
                pantile = _this9$decoderState$s7.pantile;
              if (!expend) {
                console.log("执行全局全屏");
                if (_this9.isMobile) {
                  var heightIntercept = parseInt(getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id, "-wrap"))).height, 10) - parseInt(getComputedStyle(document.getElementById(_this9.jSPlugin.id)).height, 10);
                  requestMobileFullScreen(document.getElementById("".concat(_this9.jSPlugin.id, "-wrap")));
                  var width = document.documentElement.clientWidth;
                  var height = document.documentElement.clientHeight;
                  // 兼容微信浏览器footer被隐藏
                  // document.getElementById(`${this.jSPlugin.id}-ez-iframe-footer-container`).style.marginTop = "0px";
                  // document.getElementById(`${this.jSPlugin.id}-headControl`).style.position = "absolute";
                  document.getElementById("".concat(_this9.jSPlugin.id)).style["backface-visibility"] = "hidden";
                  _this9.jSPlugin.jSPlugin.JS_Resize(height, width - heightIntercept, true);
                  _this9.jSPlugin.fullScreenWidth = height;
                  _this9.jSPlugin.fullScreenHeight = width - heightIntercept;
                  var currentScale = _this9.jSPlugin.Zoom.currentScale;
                  if (_this9.jSPlugin.Zoom && _this9.jSPlugin.Zoom.handleFullscreen) {
                    _this9.jSPlugin.Zoom.handleFullscreen(!expend, height, width - heightIntercept);
                  }
                  _this9.jSPlugin.Zoom.stopZoom();
                  if (zoom) {
                    setTimeout(function () {
                      _this9.jSPlugin.Zoom.startZoom();
                      _this9.jSPlugin.Zoom.currentScale = currentScale;
                      _this9.jSPlugin.Zoom.doScale(currentScale);
                    }, 200);
                  }
                } else {
                  var width = window.screen.width;
                  var height = window.screen.height;
                  var that = _this9;
                  var promise = requestFullScreenPromise(document.getElementById("".concat(_this9.jSPlugin.id)));
                  promise.then(function (data) {
                    _this9.jSPlugin.jSPlugin.JS_Resize(width, height);
                    _this9.jSPlugin.fullScreenWidth = width;
                    _this9.jSPlugin.fullScreenHeight = height;
                  })["catch"](function (err) {
                    console.log(err);
                  });
                  _this9.jSPlugin.close3DZoom();
                  ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange'].forEach(function (item) {
                    //  监听全屏事件触发
                    window.addEventListener(item, function fullscreenchange(e) {
                      var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
                      if (isFullScreen) {
                        that.jSPlugin.jSPlugin.JS_Resize(width, height);
                        that.jSPlugin.fullScreenWidth = width;
                        that.jSPlugin.fullScreenHeight = height;
                      } else {
                        that.jSPlugin.jSPlugin.JS_Resize(that.jSPlugin.width, that.jSPlugin.height);
                      }
                      return isFullScreen;
                    });
                  });
                }
              } else {
                if (_this9.isMobile) {
                  var heightIntercept = parseInt(getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id, "-wrap"))).height, 10) - parseInt(getComputedStyle(document.getElementById(_this9.jSPlugin.id)).height, 10);
                  if (document.getElementById("".concat(_this9.jSPlugin.id, "-ez-iframe-footer-container"))) {
                    document.getElementById("".concat(_this9.jSPlugin.id, "-ez-iframe-footer-container")).style.marginTop = "-32px";
                  }
                  if (document.getElementById("".concat(_this9.jSPlugin.id, "-headControl"))) {
                    document.getElementById("".concat(_this9.jSPlugin.id, "-headControl")).style.position = "relative";
                  }
                  cancelMobileFullScreen(document.getElementById("".concat(_this9.jSPlugin.id, "-wrap")), _this9.jSPlugin.width, _this9.jSPlugin.height + heightIntercept);
                  _this9.jSPlugin.jSPlugin.JS_Resize(_this9.jSPlugin.width, _this9.jSPlugin.height);
                  // 移动端取消全屏，如果开启了云台，取消云台
                  if (pantile && _this9.Ptz) {
                    _this9.Ptz.hide();
                    _this9.setDecoderState({
                      pantile: false
                    });
                  }
                  _this9.jSPlugin.fullScreenWidth = _this9.jSPlugin.width;
                  _this9.jSPlugin.fullScreenHeight = _this9.jSPlugin.height;
                  var _currentScale = _this9.jSPlugin.Zoom.currentScale;
                  if (_this9.jSPlugin.Zoom && _this9.jSPlugin.Zoom.handleFullscreen) {
                    _this9.jSPlugin.Zoom.handleFullscreen(!expend, _this9.jSPlugin.width, _this9.jSPlugin.height);
                  }
                  _this9.jSPlugin.Zoom.stopZoom();
                  if (zoom) {
                    setTimeout(function () {
                      _this9.jSPlugin.Zoom.startZoom();
                      _this9.jSPlugin.Zoom.currentScale = _currentScale;
                      _this9.jSPlugin.Zoom.doScale(_currentScale);
                    }, 200);
                  }
                } else {
                  console.log("取消全局全屏");
                  var cancelPromise = cancelFullScreenPromise();
                  cancelPromise.then(function (data) {
                    console.log("取消全屏", data, _this9.jSPlugin);
                    _this9.jSPlugin.jSPlugin.JS_Resize(_this9.jSPlugin.width, _this9.jSPlugin.height);
                  });
                }
              }
              _this9.setDecoderState({
                expend: !expend
              });
            };
            break;
          case 'webExpend':
            btnItem.title = "网页全屏";
            btnItem.id = btnId;
            btnItem.domString = "<span><svg id=\"".concat(this.jSPlugin.id, "-webExpend-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M3.1,7.6c-0.3,0-0.5-0.2-0.5-0.5V5.3c0-1.2,1-2.3,2.2-2.3h1.8c0.3,0,0.5,0.2,0.5,0.5S6.8,4.1,6.6,4.1H4.8 c-0.7,0-1.2,0.6-1.2,1.3v1.8C3.6,7.4,3.3,7.6,3.1,7.6z" />' + '<path d="M15.3,18.1h-1.8c-0.3,0-0.5-0.2-0.5-0.5s0.2-0.5,0.5-0.5h1.8c0.7,0,1.2-0.6,1.2-1.2v-1.8 c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v1.8C17.6,17.1,16.6,18.1,15.3,18.1z" />' + '<circle class="st2" cx="10.2" cy="10.4" r="1.1"/>' + '</svg>' + "<svg class=\"theme-icon-item-icon\" fill=\"".concat(btnItem.color, "\" style=\"display:none;\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">\n          <path class=\"st1\" d=\"M5.4,8.1H3.5C3.2,8.1,3,7.9,3,7.6s0.2-0.5,0.5-0.5h1.9c0.8,0,1.4-0.6,1.4-1.4V3.8c0-0.3,0.2-0.5,0.5-0.5\n            s0.5,0.2,0.5,0.5v1.9C7.7,7,6.7,8.1,5.4,8.1z\"/>\n          <path class=\"st1\" d=\"M13.1,17.7c-0.3,0-0.5-0.2-0.5-0.5v-1.9c0-1.3,1.1-2.4,2.4-2.4h1.9c0.3,0,0.5,0.2,0.5,0.5s-0.2,0.5-0.5,0.5H15\n            c-0.8,0-1.4,0.6-1.4,1.4v1.9C13.6,17.4,13.4,17.7,13.1,17.7z\"/>\n            <circle class=\"st2\" cx=\"10.2\" cy=\"10.4\" r=\"1.1\"/>\n          ") + '</svg></span>';
            btnItem.onclick = function () {
              var _this9$decoderState$s8 = _this9.decoderState.state,
                webExpend = _this9$decoderState$s8.webExpend,
                expend = _this9$decoderState$s8.expend,
                zoom = _this9$decoderState$s8.zoom;
              if (expend) {
                console.log("正在全局全屏");
                return false;
              }
              if (Array.isArray(window.recTimer)) {
                window.recTimer.map(function (item) {
                  clearInterval(item);
                });
              }
              if (!webExpend) {
                console.log("执行网页全屏");
                var footerDOMHeight = 0;
                var headerDOMHeight = 0;
                var width = window.screen.width;
                var height = window.screen.height;
                var that = _this9;
                var promise = requestFullScreenPromise(document.getElementById("".concat(_this9.jSPlugin.id, "-wrap")));
                promise.then(function (data) {
                  if (document.getElementById("".concat(_this9.jSPlugin.id, "-canvas-container"))) {
                    footerDOMHeight = parseInt(window.getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id, "-canvas-container"))).height, 10);
                  }
                  if (document.getElementById("".concat(_this9.jSPlugin.id, "-headControl"))) {
                    headerDOMHeight = parseInt(window.getComputedStyle(document.getElementById("".concat(_this9.jSPlugin.id, "-headControl"))).height, 10);
                  }
                  _this9.jSPlugin.jSPlugin.JS_Resize(width, height - footerDOMHeight - headerDOMHeight);
                  var fullscreenchange = function fullscreenchange() {
                    var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
                    if (isFullScreen) {
                      if (document.getElementById("".concat(that.jSPlugin.id, "-loading-item-0"))) {
                        document.getElementById("".concat(that.jSPlugin.id, "-loading-item-0")).style.height = window.screen.height - parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id, "-headControl"))).height, 10) + 'px';
                      }
                      that.jSPlugin.jSPlugin.JS_Resize(width, height - footerDOMHeight - headerDOMHeight);
                    } else {
                      if (document.getElementById("".concat(that.jSPlugin.id, "-loading-item-0"))) {
                        document.getElementById("".concat(that.jSPlugin.id, "-loading-item-0")).style.height = that.jSPlugin.height + parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id, "-headControl"))).height, 10) + 'px';
                      }
                      that.jSPlugin.jSPlugin.JS_Resize(that.jSPlugin.width, that.jSPlugin.height);
                      if (expend) {
                        that.setDecoderState({
                          expend: false
                        });
                        if (zoom && that.jSPlugin.use3DZoom) {
                          that.jSPlugin.enable3DZoom();
                        }
                      }
                    }
                    if (document.getElementById("".concat(that.jSPlugin.id, "-canvas-container"))) {
                      footerDOMHeight = parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id, "-canvas-container"))).height, 10);
                    }
                    if (document.getElementById("".concat(that.jSPlugin.id, "-headControl"))) {
                      headerDOMHeight = parseInt(window.getComputedStyle(document.getElementById("".concat(that.jSPlugin.id, "-headControl"))).height, 10);
                    }
                    return isFullScreen;
                  };
                  ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange'].forEach(function (item) {
                    //  监听全屏事件触发
                    window.removeEventListener(item, fullscreenchange);
                    window.addEventListener(item, fullscreenchange);
                  });
                })["catch"](function (err) {
                  console.log(err);
                });
              } else {
                console.log("取消网页全屏");
                var cancelPromise = cancelFullScreenPromise();
                cancelPromise.then(function (data) {
                  _this9.jSPlugin.jSPlugin.JS_Resize(_this9.jSPlugin.width, _this9.jSPlugin.height);
                });
              }
              if (_this9.jSPlugin.Theme.Rec) {
                setTimeout(function () {
                  _this9.jSPlugin.Theme.Rec.recAutoSize(function () {
                    if (_this9.jSPlugin.Zoom.currentScale > 1) {
                      //当设备处于缩放状态时，修改全屏状态后，需要重新缩放
                      var currentScale = _this9.jSPlugin.Zoom.currentScale;
                      _this9.jSPlugin.Zoom.stopZoom();
                      setTimeout(function () {
                        _this9.jSPlugin.Zoom.startZoom();
                        _this9.jSPlugin.Zoom.currentScale = currentScale;
                        _this9.jSPlugin.Zoom.doScale(currentScale);
                      }, 200);
                    }
                  });
                }, 100);
              }
              _this9.setDecoderState({
                webExpend: !webExpend
              });
            };
            break;
          case 'hd':
            var clsPrefix = "".concat(this.jSPlugin.id, "-select-quality");
            var clsItem = "".concat(clsPrefix, "-item");
            btnItem.title = "画面清晰度";
            btnItem.id = btnId;
            btnItem.domString = "<ul id=\"".concat(this.jSPlugin.id, "-hdSelect\" class=\"hd speed-select ").concat(this.isMobile ? "mobile" : "", "\" style=\"display:none;bottom: calc(constant(safe-area-inset-bottom) + ").concat(this.isMobile ? "80px" : "50px", ") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile ? "80px" : "50px", ") !important;\">\n          <!-- \u7531\u63A5\u53E3\u8FD4\u56DE\u751F\u6210 -->  \n        </ul><span id=\"").concat(this.jSPlugin.id, "-hdSelect-icon-warp\">\n           <!-- \u7531\u63A5\u53E3\u8FD4\u56DE\u751F\u6210 -->\n          </span>");
            btnItem.onclick = function (e) {
              var _this9$decoderState$s9 = _this9.decoderState.state,
                hd = _this9$decoderState$s9.hd,
                expend = _this9$decoderState$s9.expend,
                recordvideo = _this9$decoderState$s9.recordvideo,
                play = _this9$decoderState$s9.play,
                hdList = _this9$decoderState$s9.hdList,
                zoom = _this9$decoderState$s9.zoom,
                pantile = _this9$decoderState$s9.pantile;
              e.stopPropagation();
              if (play) {
                var id = e.target.id;
                var type = e.target.getAttribute('data-type');
                if (id.indexOf(clsPrefix) === 0) {
                  if (hd.type + '' !== type) {
                    // 无子码流时不触发事件
                    var targetType = hdList.find(function (item) {
                      return item.level + '' === type;
                    });
                    if (targetType && (targetType.streamType !== hd.streamType || targetType.level + '' !== hd.level + '')) {
                      _this9.jSPlugin.changeVideoLevel(targetType); // streamType 1: 主码流 2: 子码流
                      _this9.setDecoderState({
                        hd: targetType
                      });
                      if (zoom) {
                        //切换清晰度时结束电子放大
                        _this9.jSPlugin.Zoom.stopZoom();
                      }
                      var hdIcon = document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect-icon"));
                      var sdIcon = document.getElementById("".concat(_this9.jSPlugin.id, "-sdSelect-icon"));
                      if (hdIcon) hdIcon.style.display = ['hd', '0'].includes(targetType.level) ? 'block' : 'none';
                      if (sdIcon) sdIcon.style.display = ['sd', '1'].includes(targetType.level) ? 'block' : 'none';
                    }
                  }

                  //xuehb 重置手机端电子放大状态
                  _this9.resetMobileZoomStatus();
                  //切换清晰度时停止录像并关闭录像计时
                  if (recordvideo) {
                    // this.jSPlugin.stopSave();
                    _this9.setDecoderState({
                      recordvideo: false
                    });
                  }
                }
                _this9.showHD = !_this9.showHD;
                // 展示清晰度 tips
                if (document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect"))) {
                  document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).style.display = document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).style.display === 'none' ? 'block' : 'none';
                  if (_this9.isMobile) {
                    document.getElementById("".concat(_this9.jSPlugin.id, "-select-hd-mask")).style.display = document.getElementById("".concat(_this9.jSPlugin.id, "-select-hd-mask")).style.display === 'none' ? 'block' : 'none';
                  }
                  if (_this9.themeData.autoFocus > 0) {
                    if (document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).style.display === 'none') {
                      _this9.startAutoFocus();
                    } else {
                      _this9.stopAutoFocus();
                    }
                  }
                }
                if (_this9.isMobile && expend && _this9.showHD) {
                  document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).className = "hd speed-select mobile expend";
                } else {
                  document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).className = _this9.isMobile ? "hd speed-select mobile" : "speed-select";
                }
                if (_this9.isMobile) {
                  if (expend) {
                    document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).style.bottom = "env(safe-area-inset-bottom)";
                    document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).style.bottom = "constant(safe-area-inset-bottom)";
                  } else {
                    document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).style.bottom = "calc(constant(safe-area-inset-bottom) + 80px)";
                    document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect")).style.bottom = "calc(env(safe-area-inset-bottom) + 80px)";
                  }
                }
                if (pantile && _this9.Ptz) {
                  _this9.Ptz.hide();
                  _this9.setDecoderState({
                    pantile: false
                  });
                }
              }
            };

            // 获取设备视频质量查询接口
            getDeviceSupportQuality(this.jSPlugin.env.domain, this.jSPlugin.accessToken, this.jSPlugin.deviceSerial, this.jSPlugin.channelNo).then(function (data) {
              /** @type {Array} */
              var videoLevel = data;
              _this9.setDecoderState({
                hdList: videoLevel
              });
              var hd = _this9.jSPlugin.url.indexOf("hd.live") > -1 ? videoLevel[0] : videoLevel[1];
              _this9.setDecoderState({
                hd: hd
              });

              /** @type {HTMLUListElement} */
              var hdSelectListEle = document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect"));
              /** @type {HTMLSpanElement} */
              var hdSelectWarpEle = document.getElementById("".concat(_this9.jSPlugin.id, "-hdSelect-icon-warp"));
              if (hdSelectListEle) {
                // 数组reverse 会改变本身
                hdSelectListEle.innerHTML = "\n            ".concat(_toConsumableArray(videoLevel).reverse().map(function (item) {
                  // 根据数组生成清晰度选项
                  if (item.name && item.level != undefined) return "<li class=\"selectOption default ".concat(clsItem, "\" style=\"height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;\" name=\"option\" data-type=\"").concat(item.level, "\" id=\"").concat(clsPrefix, "_").concat(item.level, "\">").concat(item.name, "</li>");
                }).join(''), "\n            <li class=\"selectOption cancel\" style=\"").concat(_this9.isMobile ? "" : "display:none;", "\" name=\"option\" id=\"").concat(_this9.jSPlugin.id, "-select-speed\">\u53D6\u6D88</li>\n          ");
              }
              if (hdSelectWarpEle) {
                if (_typeof(_this9.decoderState.state.hd) === 'object' && typeof _this9.decoderState.state.hd.icon === "function") {
                  hdSelectWarpEle.innerHTML = "\n              ".concat(videoLevel.map(function (item) {
                    // 根据数组生成清晰度选项
                    if (item.name && typeof item.icon === 'function') {
                      return item.icon(_this9.jSPlugin.id, clsPrefix, btnItem.color, _this9.jSPlugin.width, MEDIAWIDTH$1, _this9.decoderState.state.hd);
                    }
                  }).join(''), "\n              <span class='speed-select-mask' style=\"display:none\" id=\"").concat(_this9.jSPlugin.id, "-select-hd-mask\"></span>\n            ");
                } else if (_typeof(_this9.decoderState.state.hd) === 'object' && typeof _this9.decoderState.state.hd.name === 'string') {
                  $(hdSelectWarpEle).prepend("<div class=\"theme-icon-item-icon ".concat(clsPrefix, "-btn\" data-type=\"").concat(_this9.decoderState.state.hd.level, "\" style=\"width: ").concat(_this9.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "px\">").concat(_this9.decoderState.state.hd.name, "</div>"));
                }
              }
            });
            return btnItem;
          case 'speed':
            btnItem.title = "回放倍速";
            btnItem.id = btnId;
            btnItem.domString = "<ul id=\"".concat(this.jSPlugin.id, "-speedSelect\" class=\"speed speed-select ").concat(this.isMobile ? "mobile" : "", "\" style=\"display:none;bottom: calc(constant(safe-area-inset-bottom) + ").concat(this.isMobile ? "80px" : "50px", ") !important;bottom: calc(env(safe-area-inset-bottom) + ").concat(this.isMobile ? "80px" : "50px", ") !important;\">") + "<li class=\"selectOption default\" style=\"height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;\" name=\"option\" id=\"".concat(this.jSPlugin.id, "-select-speed4\">4\u500D</li>") + "<li class=\"selectOption default\" style=\"height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;\" name=\"option\" id=\"".concat(this.jSPlugin.id, "-select-speed2\">2\u500D</li>") + "<li class=\"selectOption active\" style=\"height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;\" name=\"option\" id=\"".concat(this.jSPlugin.id, "-select-speed1\">1\u500D\uFF08\u6B63\u5E38\u64AD\u653E\uFF09</li>") + "<li class=\"selectOption default\" style=\"height: 45px;text-align: center;line-height: 45px;list-style: none;cursor: pointer;font-size: 13px;\" name=\"option\" id=\"".concat(this.jSPlugin.id, "-select-speed05\">0.5\u500D</li>") + "<li class=\"selectOption cancel\" style=\"".concat(this.isMobile ? "" : "display:none;", "\" name=\"option\" id=\"").concat(this.jSPlugin.id, "-select-speed\">\u53D6\u6D88</li>") + '</ul>' + "<span>\n          <div style=\"font-size: 12px;\n          vertical-align: bottom;\n          display: inline-flex;\n          padding: 0px 7px;\n          width: 48px;\n          line-height: 24px;\n          justify-content: center;\n          border: 1px solid ".concat(btnItem.color, ";\n          text-align: center;border-radius: 12.5px;\"\n          id=\"").concat(this.jSPlugin.id, "-speed-text\"\n          >").concat(this.nextRate === 1 ? "倍速" : "".concat(this.nextRate, "\u500D").replace("3", "0.5"), "</div>\n                ") + "<span class='speed-select-mask' style=\"display:none\" id=\"".concat(this.jSPlugin.id, "-select-mask\"></span>") + '</span>';
            // if (!this.isMobile) {
            //   btnItem.onmouseenter = (e) => {
            //     const { play } = this.decoderState.state;
            //     if (!play) {
            //       return false;
            //     }
            //     console.log("鼠标移入", e);
            //     this.setDecoderState({
            //       speed: true,
            //     });
            //     if (document.getElementById(`${this.jSPlugin.id}-speedSelect`)) {
            //       document.getElementById(`${this.jSPlugin.id}-speedSelect`).style.display = 'block';
            //     }
            //   }
            //   btnItem.onmouseleave = (e) => {
            //     const { play } = this.decoderState.state;
            //     if (!play) {
            //       return false;
            //     }
            //     console.log("鼠标移出", e);
            //     this.setDecoderState({
            //       speed: false,
            //     });
            //     if (document.getElementById(`${this.jSPlugin.id}-speedSelect`)) {
            //       document.getElementById(`${this.jSPlugin.id}-speedSelect`).style.display = 'none';
            //     }
            //   }
            // }
            btnItem.onclick = function (e) {
              var _this9$decoderState$s10 = _this9.decoderState.state,
                speed = _this9$decoderState$s10.speed,
                expend = _this9$decoderState$s10.expend,
                play = _this9$decoderState$s10.play;
              e.stopPropagation();
              //xuehb 播放状态才可以设置倍数
              if (!play) {
                return false;
              }
              if (!speed && _this9.isMobile) {
                document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).className = expend ? "speed speed-select mobile expend" : "speed speed-select mobile";
              }
              if (_this9.isMobile) {
                if (expend) {
                  document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.bottom = "constant(safe-area-inset-bottom)";
                  document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.bottom = "env(safe-area-inset-bottom)";
                } else {
                  document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.bottom = "calc(constant(safe-area-inset-bottom) + 80px)";
                  document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.bottom = "calc(env(safe-area-inset-bottom) + 80px)";
                }
              }
              _this9.nextRate = 1;
              if (e.target.id) {
                switch (e.target.id) {
                  case "".concat(_this9.jSPlugin.id, "-select-speed1"):
                    // case `${this.jSPlugin.id}-select-speed`:
                    console.log("倍速1");
                    _this9.nextRate = 1;
                    _this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);
                    _this9.changeRecSpeed(1);
                    _this9.jSPlugin.speed = 1;
                    _this9.setDecoderState({
                      speed: !speed
                    });
                    break;
                  case "".concat(_this9.jSPlugin.id, "-select-speed2"):
                    console.log("倍速2");
                    _this9.nextRate = 2;
                    _this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);
                    _this9.changeRecSpeed(2);
                    _this9.jSPlugin.speed = 2;
                    _this9.setDecoderState({
                      speed: !speed
                    });
                    break;
                  case "".concat(_this9.jSPlugin.id, "-select-speed4"):
                    console.log("倍速4");
                    _this9.nextRate = 4;
                    _this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);
                    _this9.changeRecSpeed(4);
                    _this9.jSPlugin.speed = 4;
                    _this9.setDecoderState({
                      speed: !speed
                    });
                    break;
                  case "".concat(_this9.jSPlugin.id, "-select-speed05"):
                    console.log("倍速05");
                    _this9.nextRate = 3;
                    _this9.jSPlugin.jSPlugin.JS_Speed(_this9.nextRate);
                    _this9.changeRecSpeed(0.5);
                    _this9.jSPlugin.speed = 0.5;
                    _this9.setDecoderState({
                      speed: !speed
                    });
                    break;
                  default:
                    // if(document.getElementById(`${this.jSPlugin.id}-speed-text`)){
                    //   document.getElementById(`${this.jSPlugin.id}-speed-text`).innerHTML = this.nextRate +"倍";
                    // }
                    // pc 端点击不再隐藏，只通过移出隐藏
                    if (!_this9.isMobile) {
                      _this9.setDecoderState({
                        speed: true
                      });
                    } else {
                      _this9.setDecoderState({
                        speed: !speed
                      });
                    }
                    break;
                }
              }
              // pc 端点击不再隐藏，只通过移出隐藏
              if (_this9.isMobile && e.target.id === "".concat(_this9.jSPlugin.id, "-speed-text")) {
                document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.display = 'block';
              } else {
                if (document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect"))) {
                  document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.display = document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.display === 'none' ? 'block' : 'none';
                }
              }
              _this9.setDecoderState({
                speed: !speed
              });
              if (_this9.themeData.autoFocus > 0) {
                if (document.getElementById("".concat(_this9.jSPlugin.id, "-speedSelect")).style.display === 'none') {
                  _this9.startAutoFocus();
                } else {
                  _this9.stopAutoFocus();
                }
              }
            };
            break;
          case 'deviceName':
            btnItem.title = "设备名称";
            btnItem.id = btnId;
            btnItem.domString = '<span>设备名称</span>';
            btnItem.onclick = function () {};
            break;
          case 'deviceID':
            btnItem.title = "设备序列号";
            btnItem.id = btnId;
            btnItem.domString = '<span>设备序列号</span>';
            btnItem.onclick = function () {};
            break;
          case 'cloudRec':
            btnItem.title = "云存储回放";
            btnItem.id = btnId;
            btnItem.domString = "\n        <span>\n          <svg class=\"theme-icon-item-icon\" fill=\"".concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"  width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"-10 0 40 15\">\n\t<path d=\"M9.5,13.1c-0.3,0-0.5-0.2-0.5-0.5V8.8c0-0.3,0.2-0.5,0.5-0.5S10,8.5,10,8.8v3.8C10,12.8,9.8,13.1,9.5,13.1z\"/>\n\t<path d=\"M7.6,10.6c-0.1,0-0.3-0.1-0.4-0.2C7,10.2,7,9.9,7.3,9.7l1.9-1.7c0.2-0.2,0.5-0.2,0.7,0l1.8,1.7\n\t\tc0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.5,0.2-0.7,0L9.5,9.1l-1.6,1.4C7.8,10.6,7.7,10.6,7.6,10.6z\"/>\n\t<path d=\"M13.2,15.7H5.6c-2.1-0.1-3.8-1.8-3.8-3.9c0-1.8,1.3-3.4,3-3.8c0.4-2.2,2.3-3.9,4.6-3.9c2.3,0,4.2,1.7,4.6,3.8\n\t\tc1.8,0.4,3.1,1.9,3.1,3.8C17.1,13.9,15.4,15.7,13.2,15.7z M5.6,14.7h7.6c1.6,0,2.9-1.3,2.9-2.9c0-1.5-1.1-2.7-2.6-2.9l-0.4,0l0-0.4\n\t\tc-0.2-1.9-1.7-3.3-3.6-3.3C7.5,5.1,6,6.6,5.8,8.5l0,0.4l-0.4,0c-1.4,0.2-2.5,1.4-2.5,2.9C2.8,13.3,4.1,14.6,5.6,14.7z\"/>\n          </svg>\n        </span>\n        ");
            btnItem.onclick = function () {
              console.log("点击云回放");
              _this9.setDecoderState({
                type: 'cloud.rec',
                cloudRec: true,
                rec: false
              });
              _this9.jSPlugin.changePlayUrl({
                type: 'cloud.rec'
              }, function () {
                //xuehb changePlayUrl这个方法异步的，要在成功修改URL后再获取回放时间段
                // console.log(this.jSPlugin);
                var initDate = getQueryString("begin", _this9.jSPlugin.url) || new Date().Format('yyyyMMdd');
                _this9.Rec.renderRec("".concat(initDate.slice(0, 4), "-").concat(initDate.slice(4, 6), "-").concat(initDate.slice(6, 8)));
                //xuehb 重置放大倍数
                var zoom = _this9.decoderState.state.zoom;
                if (zoom) {
                  _this9.setDecoderState({
                    zoom: false
                  });
                  _this9.jSPlugin.Zoom.stopZoom();
                  _this9.jSPlugin.close3DZoom();
                }
              }, false);
              // console.log(this.jSPlugin);
              // var initDate = getQueryString("begin", this.jSPlugin.url) || new Date().Format('yyyyMMdd');
              // this.Rec.renderRec(`${initDate.slice(0, 4)}-${initDate.slice(4, 6)}-${initDate.slice(6, 8)}`);
            };

            break;
          case 'rec':
            btnItem.title = "本地存储";
            btnItem.id = btnId;
            btnItem.domString = "\n        <span>\n        <svg class=\"theme-icon-item-icon\" fill=".concat(btnItem.color, " version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"  width=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "\" viewBox=\"0 0 40 15\">\n          <path d=\"M13,16.3H5.5c-1.1,0-2-0.9-2-2V3.8c0-1.1,0.9-2,2-2h5.4c0.5,0,1,0.2,1.4,0.6l2.1,2.1C14.8,4.8,15,5.3,15,5.9\n  v8.4C15,15.4,14.1,16.3,13,16.3z M5.5,2.8c-0.6,0-1,0.4-1,1v10.5c0,0.6,0.4,1,1,1H13c0.6,0,1-0.4,1-1V5.9c0-0.3-0.1-0.5-0.3-0.7\n  L11.6,3c-0.2-0.2-0.4-0.3-0.7-0.3H5.5z\"/>\n<path d=\"M6.3,7.3C6,7.3,5.8,7,5.8,6.8V4.5C5.8,4.2,6,4,6.3,4s0.5,0.2,0.5,0.5v2.2C6.8,7,6.6,7.3,6.3,7.3z\"/>\n<path d=\"M8.5,7.3C8.3,7.3,8,7,8,6.8V4.5C8,4.2,8.3,4,8.5,4S9,4.2,9,4.5v2.2C9,7,8.8,7.3,8.5,7.3z\"/>\n<path d=\"M10.8,7.3c-0.3,0-0.5-0.2-0.5-0.5V4.5c0-0.3,0.2-0.5,0.5-0.5s0.5,0.2,0.5,0.5v2.2C11.3,7,11.1,7.3,10.8,7.3z\"\n  />\n        </svg>\n      </span>\n        ");
            btnItem.onclick = function () {
              console.log("点击本地回放");
              _this9.setDecoderState({
                type: 'rec',
                cloudRec: false,
                rec: true
              });
              _this9.jSPlugin.changePlayUrl({
                type: 'rec'
              }, function () {
                //xuehb  这个方法异步的，要在成功修改URL后再获取回放时间段
                console.log('---------本地回放');
                var initDate = getQueryString("begin", _this9.jSPlugin.url) || new Date().Format('yyyyMMdd');
                _this9.Rec.renderRec("".concat(initDate.slice(0, 4), "-").concat(initDate.slice(4, 6), "-").concat(initDate.slice(6, 8)));
                //xuehb 重置放大倍数
                var zoom = _this9.decoderState.state.zoom;
                if (zoom) {
                  _this9.setDecoderState({
                    zoom: false
                  });
                  _this9.jSPlugin.Zoom.stopZoom();
                  _this9.jSPlugin.close3DZoom();
                }
              }, false);
              // var initDate = getQueryString("begin", this.jSPlugin.url) || new Date().Format('yyyyMMdd');
              // this.Rec.renderRec(`${initDate.slice(0, 4)}-${initDate.slice(4, 6)}-${initDate.slice(6, 8)}`);
            };

            break;
          // default:
          //   return btnItem;
        }

        return btnItem;
      }
    }, {
      key: "changeRecSpeed",
      value: function changeRecSpeed(speed) {
        var _this10 = this;
        var setLiActive = function setLiActive(index) {
          console.log("setLiActive", index);
          if (!document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect"))) {
            return false;
          }
          document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[0].className = document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[0].className.replace("active", "default");
          document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[1].className = document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[1].className.replace("active", "default");
          document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[2].className = document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[2].className.replace("active", "default");
          document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[3].className = document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[3].className.replace("active", "default");
          document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[index].className = document.getElementById("".concat(_this10.jSPlugin.id, "-speedSelect")).childNodes[index].className.replace("default", "active");
        };
        var speedText = "1";
        switch (speed) {
          case 1:
            setLiActive(2);
            speedText = "倍速";
            break;
          case 2:
            setLiActive(1);
            speedText = "".concat(speed, "\u500D");
            break;
          case 4:
            setLiActive(0);
            speedText = "".concat(speed, "\u500D");
            break;
          case 0.5:
            setLiActive(3);
            speedText = "".concat(speed, "\u500D");
            break;
          default:
            setLiActive(2);
            speedText = "".concat(speed, "\u500D");
            break;
        }
        if (document.getElementById("".concat(this.jSPlugin.id, "-speed-text"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-speed-text")).innerHTML = speedText;
        }
      }
    }, {
      key: "initThemeData",
      value: function initThemeData() {
        var _this11 = this;
        var _this$themeData4 = this.themeData,
          header = _this$themeData4.header,
          footer = _this$themeData4.footer;
        var videoId = this.jSPlugin.id;
        this.header = defaultTheme.header;
        this.footer = defaultTheme.footer;
        this.isNeedRenderHeader = _.findIndex(header.btnList, function (v) {
          return v.isrender > 0;
        }) >= 0 && this.jSPlugin.id != 'miniRec';
        if (this.isMobile) {
          // 移动端回放，需要判断设备序列号，设备名称
          this.isNeedRenderHeader = _.findIndex(header.btnList, function (v) {
            return v.isrender > 0 && v.iconId === "deviceID" || v.isrender > 0 && v.iconId === "deviceName";
          }) >= 0 && this.jSPlugin.id != 'miniRec';
        }
        this.isNeedRenderFooter = _.findIndex(footer.btnList, function (v) {
          return v.isrender > 0;
        }) >= 0 && this.jSPlugin.id != 'miniRec';
        console.log('miniRec：' + this.jSPlugin.themeId);
        this.isNeedRenderTimeLine = _.findIndex(header.btnList, function (v) {
          return v.iconId === 'cloudRec' && v.isrender === 1 || v.iconId === 'rec' && v.isrender === 1;
        }) >= 0 && !this.jSPlugin.disabledTimeLine && this.jSPlugin.id != 'miniRec';
        ["date-switch-container-wrap", "rec-type-container-wrap", "mobile-rec-wrap", "mobile-ez-ptz-container"].forEach(function (item, index) {
          if (document.getElementById(item)) {
            document.getElementById(item).parentElement.removeChild(document.getElementById(item));
          }
        });
        if (this.isNeedRenderHeader) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            var headerContainer = document.createElement('div');
            headerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-headControl"));
            headerContainer.setAttribute('class', 'header-controls');
            headerContainer.innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;'></div><div id='").concat(this.jSPlugin.id, "-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>");
            var headerStyle = {
              height: this.jSPlugin.width > MEDIAWIDTH$1 ? "48px" : "32px",
              "line-height": this.jSPlugin.width > MEDIAWIDTH$1 ? "48px" : "32px",
              display: "flex",
              "justify-content": "space-between",
              top: 0,
              "z-index": 1,
              background: "#000000",
              color: "#FFFFFF",
              width: "100%"
            };
            headerContainer.style = styleToString$3(headerStyle);
            document.getElementById("".concat(videoId, "-wrap")).insertBefore(headerContainer, document.getElementById(videoId));
            // 头部预留x像素空间
            var _checkTimer2 = setInterval(function () {
              if (window.EZUIKit[_this11.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer2);
                // 检测到渲染头部，执行一次reSize
                // this.jSPlugin.reSize(this.jSPlugin.params.width,this.jSPlugin.params.height);
              }
            }, 50);
          } else {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' style='display:flex;width: calc(100% - 100px);'></div><div id='").concat(this.jSPlugin.id, "-headControl-right' style='display:flex'></div>");
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-headControl")));
          }
          // this.jSPlugin.reSize(this.jSPlugin.params.width,this.jSPlugin.params.height);
        }

        if (this.isNeedRenderFooter) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            var footerContainer = document.createElement('div');
            footerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-ez-iframe-footer-container"));
            footerContainer.setAttribute('class', 'ez-iframe-footer-container');
            var footerStyle = {
              "min-height": this.jSPlugin.width > MEDIAWIDTH$1 ? "48px" : "32px",
              "max-height": this.jSPlugin.width > MEDIAWIDTH$1 ? "96px" : "80px",
              "position": "relative",
              "margin-top": this.jSPlugin.width > MEDIAWIDTH$1 ? "-48px" : "-32px",
              display: "flex",
              "flex-wrap": "wrap",
              "justify-content": "space-between",
              "z-index": 999,
              top: 0,
              color: "#FFFFFF",
              width: "100%"
            };
            footerContainer.style = styleToString$3(footerStyle);
            footerContainer.innerHTML = "<div id=\"".concat(this.jSPlugin.id, "-audioControls\" class=\"footer-controls\" style='display:flex;height:").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "px;justify-content: space-between;width:100%;z-index:999;position: relative;'><div id='").concat(this.jSPlugin.id, "-audioControls-left' class=\"footer-controls-left\" style='display:flex;'></div><div id='").concat(this.jSPlugin.id, "-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>");
            insertAfter(footerContainer, document.getElementById(videoId));
          } else {
            if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
              document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.marginTop = "-".concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "px");
              document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).innerHTML = "<div id=\"".concat(this.jSPlugin.id, "-audioControls\"  class=\"footer-controls\" style='display:flex;justify-content: space-between;height: ").concat(this.jSPlugin.width > MEDIAWIDTH$1 ? 48 : 32, "px;width:100%;'><div id='").concat(this.jSPlugin.id, "-audioControls-left' class=\"footer-controls-left\" style='display:flex'></div><div id='").concat(this.jSPlugin.id, "-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div></div>");
            }
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")));
          }
        }
        if (this.isNeedRenderHeader && document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.background = header.backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.color = header.color;
          // 为了同步（循序执行）
          var _iterator = _createForOfIteratorHelper(header.btnList),
            _step;
          try {
            for (_iterator.s(); !(_step = _iterator.n()).done;) {
              var item = _step.value;
              if (item.isrender) {
                try {
                  this.renderHeader(item.iconId, item.part);
                } catch (error) {}
              }
            }
          } catch (err) {
            _iterator.e(err);
          } finally {
            _iterator.f();
          }
        }
        if (this.isNeedRenderFooter && document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer.backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer.color;
          // 为了同步（循序执行）
          var _iterator2 = _createForOfIteratorHelper(footer.btnList),
            _step2;
          try {
            for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
              var _item = _step2.value;
              if (_item.isrender) {
                try {
                  this.renderFooter(_item.iconId, _item.part);
                } catch (error) {}
              }
            }
          } catch (err) {
            _iterator2.e(err);
          } finally {
            _iterator2.f();
          }
        }
        console.log('this.isNeedRenderTimeLine:' + this.isNeedRenderTimeLine);
        if (this.isNeedRenderTimeLine) {
          if (this.isMobile) {
            if (document.getElementById("".concat(this.jSPlugin.id, "-headControl-right"))) {
              document.getElementById("".concat(this.jSPlugin.id, "-headControl-right")).style.display = "none";
            }
            //xuehb changeRecSpeed传入，用来重置播放速度  resetMobileZoomStatus 重置手机放大状态方法
            this.Rec = new MobileRec(this.jSPlugin, this.changeRecSpeed, this.resetMobileZoomStatus);
          } else {
            if (this.Rec) {
              // 如果回放已经定义，只需要初始化渲染
              // this.Rec.unSyncTimeLine();
              this.Rec.recInit();
            } else {
              this.jSPlugin.decoderState = this.decoderState;
              this.jSPlugin.setDecoderState = this.setDecoderState;
              this.Rec = new Rec(this.jSPlugin);
            }

            // 回放时间轴预留48像素空间
            var _checkTimer3 = setInterval(function () {
              if (window.EZUIKit[_this11.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer3);
                // 检测到渲染回放时间轴，执行一次reSize
                // this.jSPlugin.reSize(this.jSPlugin.params.width, this.jSPlugin.params.height);
              }
            }, 50);
          }
        }
        var isNeedRenderPTZ = _.findIndex(this.themeData.footer.btnList, function (v) {
          return v.iconId === 'pantile' && v.isrender === 1;
        }) >= 0 && !this.jSPlugin.disabledPTZ;
        if (isNeedRenderPTZ) {
          if (this.isMobile) {
            this.MobilePtz = new MobilePtz(this.jSPlugin);
          }
          this.Ptz = new Ptz(this.jSPlugin);
        }
        var onFullscreenChange = function onFullscreenChange() {
          var that = _this11;
          var _that$decoderState$st = that.decoderState.state,
            expend = _that$decoderState$st.expend,
            zoom = _that$decoderState$st.zoom;
          var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
          if (that.Rec && window.randomNum == that.jSPlugin.randomNum) {
            setTimeout(function () {
              that.Rec.recAutoSize(function () {
                if (that.jSPlugin.Zoom.currentScale > 1) {
                  //当设备处于缩放状态时，修改全屏状态后，需要重新缩放
                  var currentScale = that.jSPlugin.Zoom.currentScale;
                  that.jSPlugin.Zoom.stopZoom();
                  setTimeout(function () {
                    that.jSPlugin.Zoom.startZoom();
                    that.jSPlugin.Zoom.currentScale = currentScale;
                    that.jSPlugin.Zoom.doScale(currentScale);
                  }, 200);
                }
              });
            }, 100);
          }
          if (!isFullScreen) {
            if (expend) {
              if (zoom && that.jSPlugin.use3DZoom) {
                that.jSPlugin.enable3DZoom();
              }
            }
            that.setDecoderState({
              webExpend: false,
              expend: false
            });
          }
          //触发全屏事件时收起其他弹窗
          if (document.getElementById("".concat(that.jSPlugin.id, "-hdSelect"))) {
            document.getElementById("".concat(that.jSPlugin.id, "-hdSelect")).style.display = 'none';
          }
          if (document.getElementById("".concat(that.jSPlugin.id, "-speedSelect"))) {
            document.getElementById("".concat(that.jSPlugin.id, "-speedSelect")).style.display = 'none';
          }
          if (that.isMobile) {
            if (document.getElementById("".concat(that.jSPlugin.id, "-select-hd-mask"))) {
              document.getElementById("".concat(that.jSPlugin.id, "-select-hd-mask")).style.display = 'none';
            }
            if (document.getElementById("".concat(that.jSPlugin.id, "-select-mask"))) {
              document.getElementById("".concat(that.jSPlugin.id, "-select-mask")).style.display = "none";
            }
          }
          if (that.themeData.autoFocus > 0) {
            that.startAutoFocus();
          }
        };
        //  监听全屏事件触发
        ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange'].forEach(function (item, index) {
          if (window.onFullscreenChange) {
            //若已经有实例，则先解绑旧的全屏监听事件
            document.removeEventListener(item, window.onFullscreenChange);
          }
          document.addEventListener(item, onFullscreenChange);
          //保存全屏监听事件
          window.onFullscreenChange = onFullscreenChange;
        });
        // 判断是否配置封面
        if (this.themeData.poster) {
          this.jSPlugin.poster = this.themeData.poster;
          var checkTimer = setInterval(function () {
            if (window.EZUIKit[_this11.jSPlugin.id].state.EZUIKitPlayer.init) {
              clearInterval(checkTimer);
              _this11.jSPlugin.setPoster(_this11.themeData.poster);
            }
          }, 50);
        }
        this.inited = true;
        //设备信息
        this.getDeviceInfo();
        this.renderThemeData();
      }

      //xuehb 重置手机端电子放大状态
    }, {
      key: "resetMobileZoomStatus",
      value: function resetMobileZoomStatus() {
        if (this.isMobile) {
          var zoomidDom = document.getElementById("".concat(this.jSPlugin.id, "-zoom-container"));
          if (zoomidDom && zoomidDom.style && zoomidDom.style.display != 'none') {
            console.log('结束电子放大');
            zoomidDom.style.display = "none";
          }
          //xuehb 重置放大倍数
          if (this.jSPlugin.jSPlugin.Zoom) {
            this.jSPlugin.jSPlugin.Zoom.resetZoom();
          }
        }
      }
    }, {
      key: "getDeviceInfo",
      value: function getDeviceInfo(callback) {
        var _this12 = this;
        var deviceAPISuccess = function deviceAPISuccess(data) {
          if (data.code == 200 && data.data) {
            callback && callback(data);

            // 设备名称
            if (document.getElementById("".concat(_this12.jSPlugin.id, "-deviceName-content"))) {
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceName-content")).style.maxWidth = "100%";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceName-content")).style.overflow = "hidden";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceName-content")).style.textOverflow = "ellipsis";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceName-content")).style.whiteSpace = "nowrap";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceName-content")).innerHTML = data.data.deviceName;
            }
            // 设备序列号
            if (document.getElementById("".concat(_this12.jSPlugin.id, "-deviceID-content"))) {
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceID-content")).style.maxWidth = "100%";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceID-content")).style.overflow = "hidden";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceID-content")).style.textOverflow = "ellipsis";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceID-content")).style.whiteSpace = "nowrap";
              document.getElementById("".concat(_this12.jSPlugin.id, "-deviceID-content")).innerHTML = matchEzopenUrl(_this12.jSPlugin.url).deviceSerial;
            }
          }
        };
        request(this.jSPlugin.env.domain + '/api/lapp/device/info', 'POST', {
          accessToken: this.jSPlugin.accessToken,
          deviceSerial: matchEzopenUrl(this.jSPlugin.url).deviceSerial
        }, '', deviceAPISuccess);
      }
    }, {
      key: "editStart",
      value: function editStart(callback) {
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var headerMessageDOM = document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        if (headerMessageDOM) {
          headerMessageDOM.setAttribute('class', 'header-controls themeEditing');
        }
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls themeEditing');
        }
        this.setDecoderState({
          isEditing: true
        });
      }
    }, {
      key: "editEnd",
      value: function editEnd(callback) {
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var headerMessageDOM = document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        if (headerMessageDOM) {
          headerMessageDOM.setAttribute('class', 'header-controls');
        }
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls');
        }
        this.setDecoderState({
          isEditing: false
        });
      }
    }, {
      key: "webExpend",
      value: function webExpend() {
        var _this13 = this;
        var _this$decoderState$st = this.decoderState.state;
          _this$decoderState$st.webExpend;
          var expend = _this$decoderState$st.expend,
          play = _this$decoderState$st.play;
        if (!play) {
          return false;
        }
        if (expend) {
          console.log("正在全局全屏");
          return false;
        }
        console.log("执行网页全屏");
        var footerDOMHeight = 0;
        var headerDOMHeight = 0;
        var promise = requestFullScreenPromise(document.getElementById("".concat(this.jSPlugin.id, "-wrap")));
        promise.then(function (data) {
          console.log("全屏promise", window.screen.width);
          if (document.getElementById("".concat(_this13.jSPlugin.id, "-canvas-container"))) {
            footerDOMHeight = parseInt(window.getComputedStyle(document.getElementById("".concat(_this13.jSPlugin.id, "-canvas-container"))).height, 10);
          }
          if (document.getElementById("".concat(_this13.jSPlugin.id, "-headControl"))) {
            headerDOMHeight = parseInt(window.getComputedStyle(document.getElementById("".concat(_this13.jSPlugin.id, "-headControl"))).height, 10);
          }
          console.log("this.jSPlugin.JS_Resiz", footerDOMHeight, headerDOMHeight, document.body.clientWidth);
          _this13.jSPlugin.jSPlugin.JS_Resize(window.screen.width, window.screen.height - footerDOMHeight - headerDOMHeight);
        })["catch"](function (err) {
          console.log(err);
        });
      }
    }, {
      key: "expend",
      value: function expend() {
        var _this14 = this;
        var _this$decoderState$st2 = this.decoderState.state,
          webExpend = _this$decoderState$st2.webExpend;
          _this$decoderState$st2.expend;
          var play = _this$decoderState$st2.play;
          _this$decoderState$st2.pantile;
        if (!play) {
          return false;
        }
        if (webExpend) {
          console.log("正在网站全屏");
          return false;
        }
        console.log("执行全局全屏");
        if (this.isMobile) {
          var heightIntercept = parseInt(getComputedStyle(document.getElementById("".concat(this.jSPlugin.id, "-wrap"))).height, 10) - parseInt(getComputedStyle(document.getElementById(this.jSPlugin.id)).height, 10);
          requestMobileFullScreen(document.getElementById("".concat(this.jSPlugin.id, "-wrap")));
          var width = document.documentElement.clientWidth;
          var height = document.documentElement.clientHeight;
          // 兼容微信浏览器footer被隐藏
          // document.getElementById(`${this.jSPlugin.id}-ez-iframe-footer-container`).style.marginTop = "0px";
          // document.getElementById(`${this.jSPlugin.id}-headControl`).style.position = "absolute";
          document.getElementById("".concat(this.jSPlugin.id)).style["backface-visibility"] = "hidden";
          this.jSPlugin.jSPlugin.JS_Resize(height, width - heightIntercept);
        } else {
          var promise = requestFullScreenPromise(document.getElementById("".concat(this.jSPlugin.id)));
          promise.then(function (data) {
            _this14.jSPlugin.jSPlugin.JS_Resize(window.screen.width, window.screen.height);
          })["catch"](function (err) {
            console.log(err);
          });
        }
      }

      /**
       * @description 临时的 后面可能会删除， 原因是鱼眼矫正现在没有主题
       * 
       * 鱼眼矫正 不支持 截图/录屏/电子放大
       *  
       */
    }, {
      key: "disabledFECBtn",
      value: function disabledFECBtn() {
        var list = ["".concat(this.jSPlugin.id, "-capturePicture"), "".concat(this.jSPlugin.id, "-capturePicture-content"), "".concat(this.jSPlugin.id, "-capturePicture-icon"), "".concat(this.jSPlugin.id, "-recordvideo"), "".concat(this.jSPlugin.id, "-recordvideo-content"), "".concat(this.jSPlugin.id, "-recordvideo-icon"), "".concat(this.jSPlugin.id, "-zoom"), "".concat(this.jSPlugin.id, "-zoom-content"), "".concat(this.jSPlugin.id, "-zoom-icon")];

        /** @type {HTMLDivElement} */
        var container = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        if (this.jSPlugin.use3DZoom) {
          this.jSPlugin.close3DZoom();
        } else {
          this.jSPlugin.Zoom.stopZoom();
        }
        this.setDecoderState({
          zoom: false
        });
        if (container) {
          var _iterator3 = _createForOfIteratorHelper(list),
            _step3;
          try {
            for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
              var id = _step3.value;
              var ele = container.querySelector("#".concat(id));
              if (ele) {
                ele.style.display = 'none';
              }
            }
          } catch (err) {
            _iterator3.e(err);
          } finally {
            _iterator3.f();
          }
        }
      }

      /**
       * @description 临时的 后面可能会删除， 原因是鱼眼矫正现在没有主题
       * 
       * 鱼眼矫正 不支持 截图/录屏/电子放大
       *  
       */
    }, {
      key: "resumeFECBtn",
      value: function resumeFECBtn() {
        var list = ["".concat(this.jSPlugin.id, "-capturePicture"), "".concat(this.jSPlugin.id, "-capturePicture-content"), "".concat(this.jSPlugin.id, "-capturePicture-icon"), "".concat(this.jSPlugin.id, "-recordvideo"), "".concat(this.jSPlugin.id, "-recordvideo-content"), "".concat(this.jSPlugin.id, "-recordvideo-icon"), "".concat(this.jSPlugin.id, "-zoom"), "".concat(this.jSPlugin.id, "-zoom-content"), "".concat(this.jSPlugin.id, "-zoom-icon")];

        /** @type {HTMLDivElement} */
        var container = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        if (container) {
          var _iterator4 = _createForOfIteratorHelper(list),
            _step4;
          try {
            for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
              var id = _step4.value;
              var ele = container.querySelector("#".concat(id));
              if (ele) {
                ele.style.display = '';
              }
            }
          } catch (err) {
            _iterator4.e(err);
          } finally {
            _iterator4.f();
          }
        }
      }
    }]);
    return Theme;
  }();

  //自定义toast

  /**
   * @class ToastCustom
   * @classdesc 自定义toast 适合PC/移动端使用 默认 2s 后自动关闭
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {boolean} isMobile - 弹窗高度
   * @example
   * // 初始化Toast
   * const toast = new ToastCustom(jSPlugin, heightPop)
   * // 渲染Toast
   * toast.initToastContent("操作成功！")
   */
  var ToastCustom = /*#__PURE__*/function () {
    function ToastCustom(jSPlugin, isMobile) {
      _classCallCheck$1(this, ToastCustom);
      this.jSPlugin = jSPlugin;
      this.isMobile = isMobile;
      this.timer = null;
      this.initToastCustom();
    }
    _createClass$1(ToastCustom, [{
      key: "initToastCustom",
      value: function initToastCustom() {
        if (!document.getElementById("".concat(this.jSPlugin.id, "-wrap-Toast-custom"))) {
          this.randerToast();
        } else {
          document.getElementById("".concat(this.jSPlugin.id, "-wrap-Toast-custom")).style.display = 'none';
        }
      }

      //加载Toast
    }, {
      key: "randerToast",
      value: function randerToast() {
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.jSPlugin.width;
        var ratioClient = 1;
        if (this.isMobile) {
          ratioClient = clientWidth / 375 || 1; //比例
        } else {
          ratioClient = clientWidth / 1024 || 1; //比例
        }

        var wrapVideo = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        var objDOM = document.createElement('div');
        objDOM.style = "display:none;position:absolute;top:0;width: 100%;align-items: center;justify-content: center;";
        objDOM.id = "".concat(this.jSPlugin.id, "-wrap-Toast-custom");
        if (this.isMobile) {
          objDOM.innerHTML = "<div id=\"".concat(this.jSPlugin.id, "-wrap-Toast-custom-content\" \n            style=\"padding: ").concat(12 * ratioClient, "px ").concat(20 * ratioClient, "px;font-size: ").concat(16 * ratioClient, "px;line-height:").concat(16 * ratioClient, "px;border-radius: ").concat(8 * ratioClient, "px;margin-top: ").concat(667 * ratioClient * 0.53, "px;\n            background-color: rgba(0,0,0,0.8);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;\">\n            </div>\n            ");
        } else {
          objDOM.innerHTML = "<div id=\"".concat(this.jSPlugin.id, "-wrap-Toast-custom-content\" \n            style=\"padding: ").concat(20 * ratioClient, "px ").concat(32 * ratioClient, "px;font-size: ").concat(24 * ratioClient, "px;line-height:").concat(24 * ratioClient, "px;border-radius: ").concat(12 * ratioClient, "px;margin-top: ").concat(36 * ratioClient, "px;\n            background-color: rgba(0,0,0,0.7);color:rgba(255,255,255,0.90);box-sizing: border-box;z-index: 999;\">\n            </div>\n            ");
        }
        wrapVideo.insertBefore(objDOM, document.getElementById(this.jSPlugin.id));
      }

      /**
       * @description 加载Toast内容
       * @param {Node} content toast内容
       * @param {number=} time 默认2000ms后关闭
       * @returns {void}
       */
    }, {
      key: "initToastContent",
      value: function initToastContent(content) {
        var _this = this;
        var time = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
        console.log('content----------------', content);
        this.timer = null;
        if (!!document.getElementById("".concat(this.jSPlugin.id, "-wrap-Toast-custom"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-wrap-Toast-custom")).style.display = 'flex';
          document.getElementById("".concat(this.jSPlugin.id, "-wrap-Toast-custom-content")).innerText = content || '';
          this.timer = setTimeout(function () {
            if (document.getElementById("".concat(_this.jSPlugin.id, "-wrap")) && document.getElementById("".concat(_this.jSPlugin.id, "-wrap-Toast-custom"))) {
              document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("".concat(_this.jSPlugin.id, "-wrap-Toast-custom")));
            }
          }, time);
        } else {
          this.randerToast();
          this.initToastContent(content);
        }
      }
    }]);
    return ToastCustom;
  }();

  // 呼叫模板API

  /**
   * @description 门禁远程控制
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {Function} successCallback  成功回调 (data) => void
   * @param {Function} errorCallback  失败回调 (err) => void
   * @returns {void}
   */
  var remoteDoor = function remoteDoor(jSPlugin, successCallback, errorCallback) {
    var success = function success(data) {
      console.log(data);
      successCallback(data);
    };
    var errorFun = function errorFun(err) {
      console.log(err);
      errorCallback(err);
    };
    var data = new FormData();
    data.append("deviceSerial", matchEzopenUrl(jSPlugin.url).deviceSerial);
    data.append("cmd", 'open');
    ({
      'Content-Type': 'application/x-www-form-urlencoded',
      'accessToken': jSPlugin.accessToken
    });
    var url = "".concat(jSPlugin.env.domain, "/api/v3/device/acs/remote/door?accessToken=").concat(jSPlugin.accessToken);
    // let url = `https://test12open.ys7.com/test/api/v3/device/acs/remote/door`;
    // FetchData(url, 'POST', data, success, error, headers);
    fetch(url, {
      method: 'POST',
      body: data
    }).then(function (response) {
      return response.json();
    }).then(function (data) {
      console.log("get theme data", data);
      success(data);
    })["catch"](function (error) {
      errorFun(error);
    });
  };

  // 
  /**
   * @description 语音文件查询接口
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {Function} successCallback  成功回调 (data) => void
   * @param {Function} errorCallback  失败回调 (err) => void
   * @returns {void}
   */
  var voiceQuery = function voiceQuery(jSPlugin, successCallback, errorCallback) {
    var success = function success(data) {
      console.log(data);
      successCallback(data);
    };
    var error = function error(err) {
      console.log(err);
      errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      pageStart: 0,
      pageSize: 4,
      "default": true,
      voiceName: '轻应用语音文件'
    };
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/lapp/voice/query");
    FetchData(url, 'POST', data, success, error, headers);
  };

  /**
   * @description 语音文件下发接口
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {string} voiceUrl  语音文件地址
   * @param {Function} successCallback  成功回调 (data) => void
   * @param {Function} errorCallback  失败回调 (err) => void
   * @returns {void}
   */
  var voiceSend = function voiceSend(jSPlugin, voiceUrl, successCallback, errorCallback) {
    var success = function success(data) {
      console.log(data);
      successCallback(data);
    };
    var errorFun = function errorFun(err) {
      console.log(err);
      errorCallback(err);
    };
    // let data = {
    //   accessToken: jSPlugin.accessToken,
    //   deviceSerial: matchEzopenUrl(jSPlugin.url).deviceSerial,
    //   channelNo: matchEzopenUrl(jSPlugin.url).channelNo || 1,
    //   fileUrl: voiceUrl
    // }
    // let headers = { 'Content-Type': 'application/x-www-form-urlencoded'};
    var url = "".concat(jSPlugin.env.domain, "/api/lapp/voice/send");
    var data = new FormData();
    data.append("deviceSerial", matchEzopenUrl(jSPlugin.url).deviceSerial);
    data.append("accessToken", jSPlugin.accessToken);
    data.append("channelNo", matchEzopenUrl(jSPlugin.url).channelNo || 1);
    data.append("fileUrl", voiceUrl);
    fetch(url, {
      method: 'POST',
      body: data
    }).then(function (response) {
      return response.json();
    }).then(function (data) {
      success(data);
    })["catch"](function (error) {
      errorFun(error);
    });
    // FetchData(url, 'POST', data, success, error, headers);
  };

  /**
   * @class PcQuickReplyEle
   * @classdesc PC端快捷回复组件
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {function} switchFooter - 切换底部组件 (type: string) => void
   * 
   * @example
   * // 初始化快捷回复组件
   * const pcQuickReplyEle = new PcQuickReplyEle(jSPlugin, switchFooter);
   * 
   */
  var PcQuickReplyEle = /*#__PURE__*/function () {
    function PcQuickReplyEle(jSPlugin, switchFooter) {
      _classCallCheck$1(this, PcQuickReplyEle);
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度
      this.switchFooter = switchFooter;
      this.sendLoadingStats = false; //是否正在发送
      this.toastCustom = new ToastCustom(jSPlugin, false); // 自定义toast
      this.quickReplyList = ['你好，请将快递放在门口', '你好，稍等', '你好，请将快递放入小区快递柜', '你好，请将外卖放在门口']; //快捷回复列表
      this.initQuickReply();
    }
    _createClass$1(PcQuickReplyEle, [{
      key: "initQuickReply",
      value: function initQuickReply() {
        if (!document.getElementById('pc-quickReply-back')) {
          this.renderQuickReply();
        }
        if (!document.getElementById('pc-quickReply-back-item-0')) {
          this.getQuickReplyList();
        }
      }
    }, {
      key: "renderQuickReply",
      value: function renderQuickReply() {
        var _this = this;
        var sizeRatio = this.videoWidth / 1024 || 1;
        var objDOM = document.createElement('div');
        objDOM.style = "width:100%;";
        objDOM.innerHTML = "<div style=\"width:100%;display:flex;flex-direction:row;align-items: center;\">\n        <div id=\"pc-quickReply-back\" style=\"display: flex;align-items: center;margin: 0 ".concat(8 * sizeRatio, "px 0 ").concat(16 * sizeRatio, "px;cursor: pointer;\">\n            <div style=\"height: ").concat(32 * sizeRatio, "px;\">\n                <svg width=\"").concat(32 * sizeRatio, "px\" height=\"").concat(32 * sizeRatio, "px\" viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                    <title>\u8FD4\u56DE</title>\n                    <defs>\n                        <filter id=\"filter-1\">\n                            <feColorMatrix in=\"SourceGraphic\" type=\"matrix\" values=\"0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0\"></feColorMatrix>\n                        </filter>\n                    </defs>\n                    <g id=\"\u63A7\u4EF6\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                        <g id=\"\u5FEB\u901F\u56DE\u590Dloading\" transform=\"translate(-16.000000, -497.000000)\">\n                            <g id=\"\u8FD4\u56DE\" transform=\"translate(0.000000, 425.000000)\" filter=\"url(#filter-1)\">\n                                <g transform=\"translate(16.000000, 72.000000)\">\n                                    <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"32\" height=\"32\"></rect>\n                                    <path d=\"M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z\" id=\"Path\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) \"></path>\n                                </g>\n                            </g>\n                        </g>\n                    </g>\n                </svg>\n            </div>\n            <span style=\"font-size: ").concat(24 * sizeRatio, "px;\">\u8FD4\u56DE</span>\n        </div>\n        <div id=\"pc-quickReply-content\" style=\"display: block;width:calc(100% - ").concat(160 * sizeRatio, "px);margin: 0 ").concat(24 * sizeRatio, "px;\"></div>\n        <div id=\"pc-quickReply-loading\" style=\"display: none;width:calc(100% - ").concat(160 * sizeRatio, "px);margin: 0 ").concat(24 * sizeRatio, "px;\"></div>\n        <div id=\"pc-quickReply-loaderror\" style=\"display: none;width:calc(100% - ").concat(160 * sizeRatio, "px);margin: 0 ").concat(24 * sizeRatio, "px;\"></div>\n    </div>");
        document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReply")).appendChild(objDOM);
        document.getElementById('pc-quickReply-back').onclick = function () {
          _this.switchFooter('onBell');
        };
      }
      //生成快捷回复选项
    }, {
      key: "matchQuickReplyBtn",
      value: function matchQuickReplyBtn() {
        var _this2 = this;
        var sizeRatio = this.videoWidth / 1024 || 1;
        var contentDom = document.getElementById("pc-quickReply-content");
        if (this.quickReplyList && this.quickReplyList.length > 0) {
          this.quickReplyList.forEach(function (item, index) {
            var objDOM = document.createElement('div');
            objDOM.id = "pc-quickReply-back-item-".concat(index);
            objDOM.style = "margin: ".concat(8 * sizeRatio, "px 0 ").concat(8 * sizeRatio, "px ").concat(8 * sizeRatio, "px;cursor: pointer;\n            padding: 0 ").concat(20 * sizeRatio, "px;min-height: ").concat(64 * sizeRatio, "px;width:calc(50% - ").concat(16 * sizeRatio, "px);\n            display: inline-block;background: rgba(0,0,0,0.70);border-radius: 8px;text-align: center;\n            box-sizing: border-box;font-size:").concat(24 * sizeRatio, "px;color: rgba(255,255,255,0.90);");
            objDOM.innerHTML = "<div id=\"pc-quickReply-back-item-box-".concat(index, "\">\n            <span id=\"pc-quickReply-name-").concat(index, "\" style=\"line-height: ").concat(64 * sizeRatio, "px;\">").concat(item.voiceName, "</span>\n            </div>");
            objDOM.onclick = function () {
              if (!_this2.sendLoadingStats) {
                console.log('item:' + item);
                _this2.sendQuickReply(item, index);
              }
            };
            contentDom.appendChild(objDOM);
          });
        }
      }
      //下发过程loading状态设置
    }, {
      key: "setBtnCheckLoading",
      value: function setBtnCheckLoading(status, index) {
        var sizeRatio = this.videoWidth / 1024 || 1;
        if (index > -1) {
          document.getElementById("pc-quickReply-back-item-".concat(index));
          var domItemBox = document.getElementById("pc-quickReply-back-item-box-".concat(index));
          var domItemName = document.getElementById("pc-quickReply-name-".concat(index));
          if (status == 1) {
            var domItemIconLoading = document.getElementById("pc-quickReply-icon-loading-".concat(index));
            if (!!domItemIconLoading && !!domItemName) {
              domItemBox.removeChild(domItemIconLoading);
            }
          } else {
            //loading状态
            if (!!domItemName) {
              var objDOM = document.createElement('span');
              objDOM.id = "pc-quickReply-icon-loading-".concat(index);
              // objDOM.src = 'https://resource.eziot.com/group2/M00/00/96/CtwQF2QlTNaAKpIxAAATNpWYCL8366.gif'
              objDOM.style = "vertical-align: middle;margin-right:".concat(16 * sizeRatio, "px;");
              // objDOM.innerHTML = `<img style="width:${24*sizeRatio<16?16:24*sizeRatio}px;height: ${24*sizeRatio<16?16:24*sizeRatio}px;" 
              // src='https://resource.eziot.com/group2/M00/00/96/CtwQF2QlTNaAKpIxAAATNpWYCL8366.gif'/>`
              objDOM.innerHTML = "<svg width=\"".concat(30 * sizeRatio, "\" height=\"").concat(30 * sizeRatio, "\" t=\"1567069979438\" class=\"loading\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2399\"><path d=\"M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z\" fill=\"#ffffff\" p-id=\"2400\"></path></svg>");
              domItemBox.insertBefore(objDOM, domItemName);
            }
          }
        }
      }
      //获取快捷回复列表
    }, {
      key: "getQuickReplyList",
      value: function getQuickReplyList() {
        var _this3 = this;
        console.log('getQuickReplyList');
        this.madeLoadingDom(0);
        var successCallback = function successCallback(data) {
          if (data && data.code == 200) {
            var quickReplyListTmd = data.data || [];
            var itemArr = [];
            data.data.forEach(function (item, index) {
              itemArr = item.voiceName.split('_');
              quickReplyListTmd[index].voiceName = itemArr[1];
            });
            _this3.quickReplyList = quickReplyListTmd;
            setTimeout(function () {
              _this3.madeLoadingDom(2);
            }, 500);
          } else {
            _this3.madeLoadingDom(1);
          }
        };
        var errorCallback = function errorCallback(err) {
          console.log(err);
          _this3.madeLoadingDom(1);
        };
        // 获取快捷回复列表api
        voiceQuery(this.jSPlugin, successCallback, errorCallback);
      }
      //快捷回复状态loading布局处理
    }, {
      key: "madeLoadingDom",
      value: function madeLoadingDom(status) {
        var _this4 = this;
        var sizeRatio = this.videoWidth / 1024 || 1;
        if (status == 0) {
          //加载中
          document.getElementById('pc-quickReply-content').style.display = 'none';
          document.getElementById('pc-quickReply-loaderror').style.display = 'none';
          document.getElementById('pc-quickReply-loading').style.display = 'block';
          //<img style="width:${40*sizeRatio}px;height: ${40*sizeRatio}px;" src='https://resource.eziot.com/group2/M00/00/96/CtwQF2Qqs1-ABG-DAAATNhOsSTw004.gif'/>
          if (!document.getElementById('pc-quickReply-loading-box')) {
            var objDOM = document.createElement('div');
            objDOM.id = "pc-quickReply-loading-box";
            objDOM.style = "width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;";
            objDOM.innerHTML = "<div class=\"\" style=\"heigth:".concat(40 * sizeRatio, "px\">\n                <svg width=\"").concat(40 * sizeRatio, "\" height=\"").concat(40 * sizeRatio, "\" t=\"1567069979438\" class=\"loading\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2399\"><path d=\"M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z\" fill=\"#ffffff\" p-id=\"2400\"></path></svg>\n            </div>\n            <div style=\"font-size: ").concat(28 * sizeRatio, "px;margin-top:").concat(10 * sizeRatio, "px;line-height:").concat(36 * sizeRatio, "px;\">\u52A0\u8F7D\u4E2D\u2026</div>");
            document.getElementById("pc-quickReply-loading").appendChild(objDOM);
          }
        } else if (status == 1) {
          //加载失败
          document.getElementById('pc-quickReply-content').style.display = 'none';
          document.getElementById('pc-quickReply-loading').style.display = 'none';
          document.getElementById('pc-quickReply-loaderror').style.display = 'block';
          if (!document.getElementById('pc-quickReply-loaderror-box')) {
            var _objDOM = document.createElement('div');
            _objDOM.id = "pc-quickReply-loaderror-box";
            _objDOM.style = "width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;";
            _objDOM.innerHTML = "<div style=\"font-size: ".concat(28 * sizeRatio, "px;color: rgba(255,255,255,0.90);\">\u5FEB\u901F\u56DE\u590D\u52A0\u8F7D\u5931\u8D25</div>\n            <div id=\"pc-quickReply-loaderror-reload\" style=\"font-size: ").concat(24 * sizeRatio, "px;margin-top:").concat(16 * sizeRatio, "px;color: rgba(100,143,252,0.90);cursor: pointer;\">\u91CD\u65B0\u52A0\u8F7D</div>");
            document.getElementById("pc-quickReply-loaderror").appendChild(_objDOM);
            document.getElementById("pc-quickReply-loaderror-reload").onclick = function () {
              _this4.getQuickReplyList();
            };
          }
        } else {
          //加载成功
          document.getElementById('pc-quickReply-loading').style.display = 'none';
          document.getElementById('pc-quickReply-loaderror').style.display = 'none';
          document.getElementById('pc-quickReply-content').style.display = 'block';
          this.matchQuickReplyBtn();
        }
      }
      //下发选择的快捷回复语
    }, {
      key: "sendQuickReply",
      value: function sendQuickReply(data, index) {
        var _this5 = this;
        this.sendLoadingStats = true;
        this.setBtnCheckLoading(0, index);
        var successCallback = function successCallback(data) {
          _this5.sendLoadingStats = false;
          _this5.setBtnCheckLoading(1, index);
          if (data && data.code == 200) {
            _this5.toastCustom.initToastContent('快捷回复成功');
          } else {
            _this5.toastCustom.initToastContent('快捷回复失败，请重试');
          }
          //返回
          _this5.switchFooter('onBell');
        };
        var errorCallback = function errorCallback(err) {
          console.log(err);
          _this5.sendLoadingStats = false;
          _this5.setBtnCheckLoading(1, index);
          _this5.toastCustom.initToastContent('快捷回复失败，请重试');
          //返回
          _this5.switchFooter('onBell');
        };
        //下发选择的快捷回复语API
        voiceSend(this.jSPlugin, data.fileUrl, successCallback, errorCallback);
      }
    }]);
    return PcQuickReplyEle;
  }();

  //远程解锁组件-pc
  /**
   * @class PcRemoteUnlockEle
   * @classdesc PC端远程解锁组件
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {function} switchFooter - 切换底部栏函数 (type: string) => void
   * @example
   * // 初始化远程解锁组件
   * var pcRemoteUnlockEle = new PcRemoteUnlockEle(jSPlugin, switchFooter)
   * 
   */
  var PcRemoteUnlockEle = /*#__PURE__*/function () {
    function PcRemoteUnlockEle(jSPlugin, switchFooter) {
      _classCallCheck$1(this, PcRemoteUnlockEle);
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度
      this.switchFooter = switchFooter;
      this.toastCustom = new ToastCustom(jSPlugin, false); // 自定义toast
      this.lockStatus = false;
      this.initRemoteUnlock();
    }
    _createClass$1(PcRemoteUnlockEle, [{
      key: "initRemoteUnlock",
      value: function initRemoteUnlock() {
        if (!document.getElementById('pc-remoteUnlock-back')) {
          this.renderRemoteUnlock();
        } else {
          this.madeSlideEvent();
        }
      }
    }, {
      key: "renderRemoteUnlock",
      value: function renderRemoteUnlock() {
        var _this = this;
        var sizeRatio = this.videoWidth / 1024 || 1;
        var objDOM = document.createElement('div');
        objDOM.style = "width:100%;";
        objDOM.id = "pc-remoteUnlock-box";
        objDOM.innerHTML = "<div style=\"width:100%;display:flex;flex-direction:row;align-items: center;\">\n        <div id=\"pc-remoteUnlock-back\" style=\"display: flex;align-items: center;margin: 0 ".concat(8 * sizeRatio, "px 0 ").concat(16 * sizeRatio, "px;cursor: pointer;\">\n            <div style=\"height: ").concat(32 * sizeRatio, "px;\">\n                <svg width=\"").concat(32 * sizeRatio, "px\" height=\"").concat(32 * sizeRatio, "px\" viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                    <title>\u8FD4\u56DE</title>\n                    <defs>\n                        <filter id=\"filter-1\">\n                            <feColorMatrix in=\"SourceGraphic\" type=\"matrix\" values=\"0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 0 1.000000 0 0 0 1.000000 0\"></feColorMatrix>\n                        </filter>\n                    </defs>\n                    <g id=\"\u63A7\u4EF6\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                        <g id=\"\u5FEB\u901F\u56DE\u590Dloading\" transform=\"translate(-16.000000, -497.000000)\">\n                            <g id=\"\u8FD4\u56DE\" transform=\"translate(0.000000, 425.000000)\" filter=\"url(#filter-1)\">\n                                <g transform=\"translate(16.000000, 72.000000)\">\n                                    <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"32\" height=\"32\"></rect>\n                                    <path d=\"M12.5,7.5 C13.2988404,7.5 13.9518304,8.12445998 13.9974537,8.91186361 L14,9 L14,21.5 L26.5,21.5 C27.2988404,21.5 27.9518304,22.12446 27.9974537,22.9118636 L28,23 C28,23.7988404 27.37554,24.4518304 26.5881364,24.4974537 L26.5,24.5 L12.5,24.5 C11.7011596,24.5 11.0481696,23.87554 11.0025463,23.0881364 L11,23 L11,9 C11,8.17157288 11.6715729,7.5 12.5,7.5 Z\" id=\"Path\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(19.500000, 16.000000) rotate(45.000000) translate(-19.500000, -16.000000) \"></path>\n                                </g>\n                            </g>\n                        </g>\n                    </g>\n                </svg>\n            </div>\n            <span style=\"font-size: ").concat(24 * sizeRatio, "px;user-select: none;\">\u8FD4\u56DE</span>\n        </div>\n        <div id=\"pc-remoteUnlock-content\" style=\"display: block;width:calc(100% - ").concat(160 * sizeRatio, "px);margin: 0 ").concat(24 * sizeRatio, "px;\"></div>\n    </div>");
        document.getElementById("".concat(this.jSPlugin.id, "-audioControls-remoteUnlock")).appendChild(objDOM);
        document.getElementById('pc-remoteUnlock-back').onclick = function () {
          _this.goback();
        };
        //解锁滑块构建
        this.renderRemoteUnlockSlide();
      }
      //解锁滑块构建
    }, {
      key: "renderRemoteUnlockSlide",
      value: function renderRemoteUnlockSlide() {
        var sizeRatio = this.videoWidth / 1024 || 1;
        var contentDom = document.getElementById("pc-remoteUnlock-content");
        var objDOM = document.createElement('div');
        objDOM.id = "pc-remoteUnlock-content-slide";
        objDOM.style = "width: 100%;display: flex;justify-content: center;cursor: pointer;";
        objDOM.innerHTML = "<div id=\"pc-remoteUnlock-slide-box\" style=\"width: ".concat(400 * sizeRatio, "px;line-height: ").concat(80 * sizeRatio, "px;height: ").concat(80 * sizeRatio, "px;border: 1px solid rgba(255,255,255,1);border-radius: ").concat(40 * sizeRatio, "px;position: relative;text-align: center;\">\n        <div id=\"pc-remoteUnlock-slide-bgColor\" style=\"border-radius: ").concat(40 * sizeRatio, "px;width: ").concat(64 * sizeRatio, "px;height: ").concat(80 * sizeRatio, "px;position: absolute;left: 0;top: 0;\"></div>\n        <div id=\"pc-remoteUnlock-slide-tips\" style=\"height: ").concat(80 * sizeRatio, "px;line-height: ").concat(80 * sizeRatio, "px;font-size: ").concat(24 * sizeRatio, "px;border-radius: ").concat(40 * sizeRatio, "px;position: absolute;text-align: center;user-select: none;color: rgba(255,255,255,0.90);width: 100%;\">\u53F3\u6ED1\u5F00\u9501</div>\n        <div id=\"pc-remoteUnlock-slide-ball\" style=\"top: ").concat(8 * sizeRatio, "px;left: ").concat(8 * sizeRatio, "px;width: ").concat(64 * sizeRatio, "px;height: ").concat(64 * sizeRatio, "px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display: flex;align-items: center;justify-content: center;\">\n            <svg id=\"slide-ball-start\" style=\"display: inline;\" width=\"").concat(36 * sizeRatio, "px\" height=\"").concat(36 * sizeRatio, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <title></title>\n                <g id=\"icon/\u7BAD\u5934\u5411\u53F3\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <rect id=\"\u77E9\u5F62\" fill=\"#000000\" fill-rule=\"nonzero\" opacity=\"0\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                    <path d=\"M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                </g>\n            </svg>\n            <svg id=\"slide-ball-end\"  style=\"display: none;\" width=\"").concat(36 * sizeRatio, "\" height=\"").concat(36 * sizeRatio, "\" t=\"1567069979438\" class=\"loading\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2399\"><path d=\"M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z\" fill=\"#598FFF\" p-id=\"2400\"></path></svg>\n            \n        </div>\n    </div>");
        contentDom.appendChild(objDOM);
        //处理滑块解锁事件
        this.madeSlideEvent();
      }
    }, {
      key: "getOffsetLeft",
      value: function getOffsetLeft(dom) {
        var offsetLeft = 0;
        do {
          offsetLeft += dom.offsetLeft;
          dom = dom.parentNode;
        } while (dom.parentNode);
        return offsetLeft;
      }
      //处理滑块解锁事件
    }, {
      key: "madeSlideEvent",
      value: function madeSlideEvent() {
        var sizeRatio = this.videoWidth / 1024 || 1;
        var videoDom = document.getElementById("".concat(this.jSPlugin.id));
        var videoOffsetLeft = this.getOffsetLeft(videoDom);
        var box = document.getElementById('pc-remoteUnlock-slide-box');
        var bgColor = document.getElementById('pc-remoteUnlock-slide-bgColor');
        var tips = document.getElementById('pc-remoteUnlock-slide-tips');
        var ball = document.getElementById('pc-remoteUnlock-slide-ball');
        var that = this;
        function success() {
          if (!that.lockStatus) {
            that.lockStatus = true;
            document.getElementById('slide-ball-start').style.display = 'none';
            document.getElementById('slide-ball-end').style.display = 'inline';
            bgColor.style.width = box.clientWidth + "px";
            bgColor.style.backgroundColor = "#598FFF";
            box.style.border = "0";
            ball.style.backgroundColor = '#ffffff';
            tips.textContent = "正在开锁";
            ball.onmousedown = null;
            document.onmousemove = null;
            that.sendRemoteUnlockApi();
          }
        }
        ball.onmousedown = function (e) {
          var e = e || window.event;
          var posx = e.offsetX;
          ball.style.transition = "";
          bgColor.style.transition = "";
          document.onmouseup = function () {
            console.log('--------------onmouseup');
            if (!that.lockStatus) {
              bgColor.style.width = 0 + "px";
              ball.style.left = 8 * sizeRatio + "px";
              ball.style.transition = "left 0.6s linear";
              bgColor.style.transition = "width 0.6s linear";
            }
            document.onmouseup = null;
            document.onmousemove = null;
          };
          document.onmousemove = function (e) {
            var e = e || window.event;
            console.log('videoDom', videoOffsetLeft);
            var x = e.pageX - box.offsetLeft - posx - videoOffsetLeft;
            var max = box.clientWidth - ball.clientWidth - 8 * sizeRatio;
            if (x <= 0) {
              x = 0;
            }
            if (x >= max) {
              x = max;
            }
            // bgColor.style.width = x + "px";
            ball.style.left = x + "px";
            // bgColor.style.backgroundColor = "#598FFF";
            if (x == max && !that.lockStatus) {
              success();
            }
          };
        };
      }
      //重置滑动解锁状态
    }, {
      key: "resetRemoteUnlockSlide",
      value: function resetRemoteUnlockSlide() {
        var domBox = document.getElementById("pc-remoteUnlock-box");
        var domRemoteUnlock = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-remoteUnlock"));
        if (!!domBox && !!domRemoteUnlock) {
          domRemoteUnlock.removeChild(domBox);
        }
      }
      //下发远程开锁的接口调用
    }, {
      key: "sendRemoteUnlockApi",
      value: function sendRemoteUnlockApi() {
        var _this2 = this;
        console.log('下发远程开锁');
        var successCallback = function successCallback(data) {
          if (data && data.code == 200) {
            _this2.toastCustom.initToastContent('开锁成功');
          } else {
            _this2.toastCustom.initToastContent('开锁失败，请重试');
          }
          // 返回（关闭弹窗）
          _this2.goback();
        };
        var errorCallback = function errorCallback(err) {
          console.log(err);
          _this2.toastCustom.initToastContent('开锁失败，请重试');
          // 返回（关闭弹窗）
          _this2.goback();
        };
        //远程开锁API
        remoteDoor(this.jSPlugin, successCallback, errorCallback);
      }
      //返回
    }, {
      key: "goback",
      value: function goback() {
        //返回
        this.switchFooter('onCall');
        //重置状态
        this.resetRemoteUnlockSlide();
      }
    }]);
    return PcRemoteUnlockEle;
  }();

  var data$3 = {
  	customConfig: {
  		defaultMicro: 0,
  		defaultPlay: 0,
  		maxTalkTime: 0,
  		bellPoster: 0,
  		maxBellTime: 0
  	},
  	header: {
  		onBell: {
  			color: "#2c2c2c",
  			backgroundColor: "#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",
  			activeColor: "#1890FF",
  			autoFocus: 0,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",
  					iconId: "ringStatus",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#ffffff",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",
  					iconId: "deviceCategory",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#ffffff",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				}
  			]
  		},
  		onCall: {
  			color: "#2c2c2c",
  			backgroundColor: "#00000000",
  			activeColor: "#1890FF",
  			autoFocus: 5,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",
  					iconId: "callStatus",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#ffffff",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",
  					iconId: "deviceCategory",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#ffffff",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				}
  			]
  		}
  	},
  	footer: {
  		onBell: {
  			color: "#ffffff",
  			backgroundColor: "#00000000",
  			activeColor: "#1890FF",
  			autoFocus: 5,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",
  					iconId: "quickReply",
  					part: "left",
  					defaultActive: 1,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",
  					iconId: "rejection",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#2C2C2C",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",
  					iconId: "answer",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",
  					iconId: "remoteUnlock",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				}
  			]
  		},
  		onCall: {
  			color: "#2c2c2c",
  			backgroundColor: "#00000080",
  			activeColor: "#1890FF",
  			autoFocus: 5,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",
  					iconId: "mute",
  					part: "left",
  					defaultActive: 1,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",
  					iconId: "hangUp",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",
  					iconId: "remoteUnlock",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				}
  			]
  		}
  	}
  };
  var webCallData = {
  	data: data$3
  };

  var styleToString$2 = function styleToString(obj) {
    var styleString = "";
    Object.keys(obj).map(function (item, index) {
      styleString += "".concat(item, ":").concat(obj[item]).concat(index < Object.keys(obj).length - 1 ? ';' : "");
    });
    return styleString;
  };

  //pc-呼叫模板

  /**
   * @class Call
   * @classdesc 呼叫模板
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {object} themeData - 模板数据
   * @param {function} setDecoderState - 设置解码器状态
   * @param {object} decoderState - 解码器状态
   * 
   * @example
   * var call = new Call(jSPlugin, themeData, setDecoderState, decoderState);
   * call.init();
   * 
   */
  var Call = /*#__PURE__*/function () {
    function Call(jSPlugin, themeData, setDecoderState, decoderState) {
      var _this = this;
      _classCallCheck$1(this, Call);
      // 自动播放监听回调（pc端无法自动播放解决方案）
      _defineProperty(this, "autoPlayRing", function () {
        console.log('autoPlayRing');
        var bellringAudio = document.getElementById('bellring-audio');
        if (!!bellringAudio) {
          bellringAudio.muted = false;
          bellringAudio.src = 'https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3';
          if (bellringAudio.paused) {
            bellringAudio.play();
          }
        }
        window.removeEventListener('click', _this.autoPlayRing);
      });
      // 静音方法
      _defineProperty(this, "muteCommon", function (btnData) {
        var _this$decoderState$st = _this.decoderState.state,
          talk = _this$decoderState$st.talk,
          sound = _this$decoderState$st.sound;
        if (talk) {
          console.log('结束对讲');
          _this.setDecoderState({
            talk: false,
            mute: true
          }, btnData.backgroundColor);
          _this.jSPlugin.Talk.stopTalk();
          if (!sound) {
            _this.jSPlugin.openSound();
          }
          _this.setDecoderState({
            sound: true
          });
        } else {
          _this.setDecoderState({
            talk: false,
            mute: true
          }, btnData.backgroundColor);
          if (!sound) {
            _this.jSPlugin.openSound();
          }
          _this.setDecoderState({
            sound: true
          });
        }
      });
      //接听响铃切换方法（给控制台用）
      _defineProperty(this, "switchCallStatus", function (value) {
        var editStatus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
        var _this$themeData = _this.themeData,
          header = _this$themeData.header,
          footer = _this$themeData.footer;
        var muteData = null;
        if (value == 'onCall') {
          console.log('接听');
          _this.bellStatus = 'onCall';
          _this.switchFooter('onCall');
          footer[_this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this.renderFooter(item.iconId, item);
            }
            if (item.iconId == 'mute') {
              muteData = item;
            }
          });
          header[_this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this.renderHeader(item.iconId, item);
            }
          });
          var bellHeaderDom = document.getElementById("".concat(_this.jSPlugin.id, "-header-onBell"));
          if (bellHeaderDom) {
            bellHeaderDom.parentElement.removeChild(bellHeaderDom);
          }
          //判断是否配置了默认封面
          if (_this.themeData.customConfig.bellPoster == 1) {
            if (document.getElementById("bellring-icon")) {
              document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
            }
          }
          //是否默认开启麦克风
          if (_this.themeData.customConfig.defaultMicro == 0 && muteData) {
            _this.muteCommon(muteData);
          } else {
            _this.setDecoderState({
              mute: false
            }, muteData.backgroundColor);
          }

          //停止响铃
          _this.removeBellRing();
        } else {
          console.log('响铃');
          _this.bellStatus = 'onBell';
          _this.jSPlugin.Theme.changeTheme(_this.themeData, editStatus);
        }
      });
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度 
      this.videoHeight = jSPlugin.height; //视频窗口高度
      this.themeData = themeData;
      this.setDecoderState = setDecoderState;
      this.decoderState = decoderState;
      this.isNeedRenderHeader = false;
      this.isNeedRenderFooter = false;
      this.autoFocus = 0, this.autoFocusTimer = null, this.bellStatus = 'onBell',
      //响铃状态 onBell-响铃中 onCall-通话中
      this.recordTimer = null;
      this.nextRate = 1;
      this.themeInited = false;
      this.inited = false;
      this.activeThemeStatus = true; //模板是否激活
      this.activeThemeStatusTxt = '模板未激活'; //模板不能使用的提示语title
      this.toastCustom = new ToastCustom(jSPlugin, false); // 自定义toast
    }

    //加载响铃
    _createClass$1(Call, [{
      key: "initBellRing",
      value: function initBellRing() {
        var _this2 = this;
        var _this$decoderState$st2 = this.decoderState.state,
          play = _this$decoderState$st2.play,
          isEditing = _this$decoderState$st2.isEditing;
          _this$decoderState$st2.rejection;
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.videoWidth;
        var ratioClient = clientWidth / 1024; //比例
        this.maxBellTime = this.themeData.customConfig.maxBellTime * 1000;
        var bellringDom = document.getElementById('bellring');
        var bellringAudioDom = document.getElementById('bellring-audio');
        if (!bellringDom && !bellringAudioDom) {
          // 判断是否需要响铃
          if (!!this.jSPlugin.isNeedBellRing) {
            var objDOM = document.createElement('div');
            objDOM.id = 'bellring';
            objDOM.innerHTML = "<div>\n          <audio id=\"bellring-audio\" loop autoplay>\n            <source src=\"https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3\" type=\"audio/mpeg\">\n          </audio>\n          </div>";
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(objDOM);
          }
          //判断是否配置了默认封面
          if (this.themeData.customConfig.bellPoster == 1 && !isEditing) {
            var bellTop = (this.videoHeight - 180 * ratioClient) / 2;
            var objIconDOM = document.createElement('div');
            objIconDOM.id = 'bellring-icon';
            objIconDOM.style = "position: absolute;pointer-events: none;background: none;width: 100%;\n          position: absolute;top: ".concat(bellTop, "px;display: flex;align-items: center;justify-content: center;");
            objIconDOM.innerHTML = "<div style=\"width: ".concat(180 * ratioClient, "px;height: ").concat(180 * ratioClient, "px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;\">\n            <div style=\"width: ").concat(100 * ratioClient, "px;height: ").concat(100 * ratioClient, "px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;\">\n              <svg width=\"").concat(40 * ratioClient, "px\" height=\"").concat(40 * ratioClient, "px\" viewBox=\"0 0 40 40\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                  <title>icon/\u54CD\u94C3</title>\n                  <g id=\"icon/\u54CD\u94C3\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                      <polygon id=\"Path\" points=\"0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002\"></polygon>\n                      <path d=\"M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                  </g>\n              </svg>\n            </div>\n          </div>");
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(objIconDOM);
            if (play && this.bellStatus == 'onBell') {
              this.jSPlugin.pause();
            }
          } else {
            if (document.getElementById("bellring-icon")) {
              document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
            }
          }
          setTimeout(function () {
            var _this2$decoderState$s = _this2.decoderState.state,
              isEditing = _this2$decoderState$s.isEditing,
              rejection = _this2$decoderState$s.rejection;
            if (_this2.bellStatus == 'onBell' && !rejection) {
              //停止响铃
              _this2.removeBellRing();
              //应答超时
              if (!isEditing) {
                _this2.answerOvertime();
              }
            }
          }, this.maxBellTime);
        }
      }
      //停止响铃
    }, {
      key: "removeBellRing",
      value: function removeBellRing() {
        if (!!document.getElementById("bellring")) {
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring"));
        }
        if (!!document.getElementById("bellring-icon")) {
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
        }
      }

      // 处理按钮
    }, {
      key: "matchBtn",
      value: function matchBtn(btnId, btnData) {
        var _this3 = this;
        var _this$themeData2 = this.themeData,
          header = _this$themeData2.header,
          footer = _this$themeData2.footer;
        var _this$decoderState$st3 = this.decoderState.state,
          mute = _this$decoderState$st3.mute,
          rejection = _this$decoderState$st3.rejection;
        var btnItem = {
          title: "",
          id: "",
          domString: "",
          color: "#FFFFFF",
          activeColor: "#FFFFFF",
          onclick: function onclick() {},
          onmoveleft: function onmoveleft() {},
          onmoveright: function onmoveright() {},
          onremove: function onremove() {}
        };
        var _index = header[this.bellStatus].btnList.findIndex(function (item) {
          return item.iconId === btnId;
        });
        if (_index === -1) {
          btnItem.color = footer[this.bellStatus].color;
          btnItem.backgroundColor = footer[this.bellStatus].backgroundColor;
          btnItem.activeColor = footer[this.bellStatus].activeColor;
        } else {
          btnItem.color = header[this.bellStatus].color;
          btnItem.backgroundColor = header[this.bellStatus].backgroundColor;
          btnItem.activeColor = header[this.bellStatus].activeColor;
        }
        var btnWidth = this.videoWidth / 6; // 按钮宽度
        // let clientWidth = document.documentElement.clientWidth;
        this.videoWidth;
        var sizeRatio = this.videoWidth / 1024 || 1;
        switch (btnId) {
          case 'ringStatus':
            btnItem.title = this.activeThemeStatus ? "有人按门铃" : this.activeThemeStatusTxt;
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onBell-ringStatus\" style=\"color:".concat(btnData.color || '#FFFFFF', ";font-size: ").concat(32 * sizeRatio, "px;display: block;text-align: left;font-weight: 500;\" >").concat(this.activeThemeStatus ? "有人按门铃" : this.activeThemeStatusTxt, "</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'deviceCategory':
            btnItem.title = "设备名称";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onBell-deviceCategory\" \n          style=\"\n          color:".concat(btnData.color || '#FFFFFF', ";\n          font-size: ").concat(24 * sizeRatio, "px;\n          padding-top: ").concat(16 * sizeRatio, "px;\n          display: block;\n          max-width: 100%;\n          overflow: hidden;\n          text-overflow: ellipsis;\n          white-space: nowrap;\n          text-align: left;\n          \">").concat(this.deviceInfoData && this.deviceInfoData.deviceName || '设备名称', "</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'callStatus':
            btnItem.title = "通话中";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onCall-ringStatus\" style=\"color:".concat(btnData.color || '#FFFFFF', ";font-size: ").concat(32 * sizeRatio, "px;display: block;text-align: left;\" >\u901A\u8BDD\u4E2D</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'deviceCategory':
            btnItem.title = "设备名称";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onCall-deviceCategory\"\n           style=\"color:".concat(btnData.color || '#FFFFFF', ";\n           font-size: ").concat(24 * sizeRatio, "px;\n           padding-top: ").concat(16 * sizeRatio, "px;\n           display: block;\n           max-width: 100%;\n           overflow: hidden;\n           text-overflow: ellipsis;\n           white-space: nowrap;\n           text-align: left;\n           \">").concat(this.deviceInfoData && this.deviceInfoData.deviceName || '设备名称', "</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'rejection':
            btnItem.title = "拒绝";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.7, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width:").concat(btnWidth * 0.5, "px;height: ").concat(btnWidth * 0.5, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.3, "px\" height=\"").concat(btnWidth * 0.3, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u62D2\u7EDD</title>\n                        <g id=\"icon/\u62D2\u7EDD\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z\" id=\"\u8DEF\u5F84\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) \"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u62D2\u7EDD</div>\n            </div>");
            btnItem.onclick = function () {
              var _this3$decoderState$s = _this3.decoderState.state,
                play = _this3$decoderState$s.play,
                isEditing = _this3$decoderState$s.isEditing,
                rejection = _this3$decoderState$s.rejection;
              if (isEditing || rejection) {
                return false;
              }
              console.log('拒绝');
              if (play) {
                _this3.jSPlugin.stop();
              }
              //停止响铃
              _this3.removeBellRing();
              _this3.setDecoderState({
                play: false,
                rejection: true
              });
              // 拒绝/挂断状态处理
              _this3.rejectionStatusDispose();
              // 拒绝回调
              if (typeof _this3.jSPlugin.hangUpCallback === 'function') {
                _this3.jSPlugin.hangUpCallback('rejection');
              }
            };
            return btnItem;
          case 'quickReply':
            btnItem.title = "快捷回复";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.7, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width: ").concat(btnWidth * 0.5, "px;height: ").concat(btnWidth * 0.5, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.3, "px\" height=\"").concat(btnWidth * 0.3, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u5FEB\u6377\u56DE\u590D</title>\n                        <g id=\"icon/web\u5FEB\u6377\u56DE\u590D\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M17.4723401,6.00464509 C24.1317208,5.8200623 29.613145,11.1601938 29.613145,17.806299 C29.613145,19.5506656 29.2343807,21.2437888 28.5133012,22.7904909 L28.638,22.51 L29.9802796,28.9334997 C30.0980856,29.4978889 29.6719785,30.0050773 29.131395,30.0271186 L29.0218792,30.0249315 L28.9025577,30.0074816 L22.488349,28.6446207 L22.3501503,28.7067675 C21.0679643,29.242563 19.6940914,29.5480927 18.2793303,29.6038407 L18.2793303,29.6038407 L17.8062986,29.6131454 C11.1610025,29.6131454 5.820073,24.1313212 6.00464384,17.4723718 C6.17540866,11.3038211 11.3038207,6.17540904 17.4723401,6.00464509 Z M17.8062986,16.2974446 C16.9707372,16.2974446 16.2926003,16.9755814 16.2926003,17.8111428 C16.2926003,18.6467043 16.9707372,19.3248411 17.8062986,19.3248411 C18.64186,19.3248411 19.3199969,18.6467043 19.3199969,17.8111428 C19.3199969,16.9755814 18.64186,16.2974446 17.8062986,16.2974446 Z M12.9624642,16.2974446 C12.1269027,16.2974446 11.4487659,16.9755814 11.4487659,17.8111428 C11.4487659,18.6467043 12.1269027,19.3248411 12.9624642,19.3248411 C13.7980256,19.3248411 14.4761624,18.6467043 14.4761624,17.8111428 C14.4761624,16.9755814 13.7980256,16.2974446 12.9624642,16.2974446 Z M22.650133,16.2974446 C21.8145716,16.2974446 21.1364348,16.9755814 21.1364348,17.8111428 C21.1364348,18.6467043 21.8145716,19.3248411 22.650133,19.3248411 C23.4856945,19.3248411 24.1638313,18.6467043 24.1638313,17.8111428 C24.1638313,16.9755814 23.4856945,16.2974446 22.650133,16.2974446 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u5FEB\u6377\u56DE\u590D</div>\n            </div>");
            btnItem.onclick = function () {
              var rejection = _this3.decoderState.state.rejection;
              if (rejection) {
                return false;
              }
              console.log('快捷回复');
              _this3.switchFooter('quickReply');
              _this3.quickReplyEle = new PcQuickReplyEle(_this3.jSPlugin, _this3.switchFooter);
            };
            return btnItem;
          case 'answer':
            btnItem.title = "接听";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.7, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width: ").concat(btnWidth * 0.5, "px;height: ").concat(btnWidth * 0.5, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.3, "px\" height=\"").concat(btnWidth * 0.3, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u63A5\u542C</title>\n                        <g id=\"icon/\u63A5\u542C\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z\" id=\"\u8DEF\u5F84\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) \"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u63A5\u542C</div>\n            </div>");
            btnItem.onclick = function () {
              var _this3$decoderState$s2 = _this3.decoderState.state,
                play = _this3$decoderState$s2.play,
                isEditing = _this3$decoderState$s2.isEditing,
                talk = _this3$decoderState$s2.talk,
                sound = _this3$decoderState$s2.sound,
                rejection = _this3$decoderState$s2.rejection;
              if (isEditing || rejection) {
                return false;
              }
              console.log('接听');
              _this3.jSPlugin.pluginStatus.loadingClear();
              if (!play) {
                _this3.jSPlugin.pluginStatus.loadingStart(_this3.jSPlugin.id);
                _this3.jSPlugin.pluginStatus.loadingSetText({
                  text: '视频加载中'
                });
                _this3.jSPlugin.play();
                _this3.setDecoderState({
                  play: !play
                });
              }
              if (!talk && _this3.themeData.customConfig.defaultMicro == 1) {
                _this3.setDecoderState({
                  talk: true,
                  mute: false
                });
                if (sound) {
                  _this3.jSPlugin.closeSound();
                }
                _this3.jSPlugin.Talk.startTalk();
              }
              _this3.setDecoderState({
                sound: false
              });
              _this3.bellStatus = 'onCall';
              _this3.switchFooter('onCall');
              footer[_this3.bellStatus].btnList.map(function (item, index) {
                if (item.isrender) {
                  _this3.renderFooter(item.iconId, item);
                }
              });
              header[_this3.bellStatus].btnList.map(function (item, index) {
                if (item.isrender) {
                  _this3.renderHeader(item.iconId, item);
                }
              });
              var bellHeaderDom = document.getElementById("".concat(_this3.jSPlugin.id, "-header-onBell"));
              if (bellHeaderDom) {
                bellHeaderDom.parentElement.removeChild(bellHeaderDom);
              }
              //判断是否配置了默认封面
              if (_this3.themeData.customConfig.bellPoster == 1) {
                if (document.getElementById("bellring-icon")) {
                  document.getElementById("".concat(_this3.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
                }
                _this3.jSPlugin.setPoster(''); //清除封面
              }
              //是否默认开启麦克风
              if (_this3.themeData.customConfig.defaultMicro == 0) {
                _this3.muteCommon(btnData);
                _this3.jSPlugin.openSound();
                _this3.setDecoderState({
                  sound: true
                });
              }
              //停止响铃
              _this3.removeBellRing();
              //最长通话时长
              _this3.maxTalkTime = _this3.themeData.customConfig.maxTalkTime * 1000 * 60;
              var that = _this3;
              setTimeout(function () {
                if (talk) {
                  console.log('结束对讲');
                  that.setDecoderState({
                    talk: false
                  });
                  that.jSPlugin.Talk.stopTalk();
                }
                if (play) {
                  that.jSPlugin.stop();
                  that.setDecoderState({
                    play: !play
                  });
                }
                // 拒绝/挂断状态处理
                _this3.rejectionStatusDispose();
                // 远程开锁弹出内容关闭
                if (!!_this3.remoteUnlockEle) {
                  _this3.remoteUnlockEle.goback();
                }
                //挂断回调
                if (typeof _this3.jSPlugin.hangUpCallback === 'function') {
                  _this3.jSPlugin.hangUpCallback('hangUp');
                }
              }, _this3.maxTalkTime);
            };
            return btnItem;
          case 'remoteUnlock':
            btnItem.title = "远程开锁";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.7, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width: ").concat(btnWidth * 0.5, "px;height: ").concat(btnWidth * 0.5, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.3, "px\" height=\"").concat(btnWidth * 0.3, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u5F00\u9501</title>\n                        <g id=\"icon/\u5F00\u9501\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u8FDC\u7A0B\u5F00\u9501</div>\n            </div>");
            btnItem.onclick = function () {
              var _this3$decoderState$s3 = _this3.decoderState.state,
                isEditing = _this3$decoderState$s3.isEditing,
                rejection = _this3$decoderState$s3.rejection;
              if (isEditing || _this3.bellStatus == 'onBell' || rejection) {
                return false;
              }
              console.log('远程开锁');
              _this3.switchFooter('remoteUnlock');
              _this3.remoteUnlockEle = new PcRemoteUnlockEle(_this3.jSPlugin, _this3.switchFooter);
            };
            return btnItem;
          case 'mute':
            btnItem.title = "静音";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.7, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div id=\"").concat(this.jSPlugin.id, "-icon-mute\" style=\"width: ").concat(btnWidth * 0.5, "px;height: ").concat(btnWidth * 0.5, "px;border-radius: 50%;border: 1px solid ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";background: ").concat(rejection && mute ? '#cccccc' : '#ffffff', ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.3, "px\" height=\"").concat(btnWidth * 0.3, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u9759\u97F3</title>\n                        <g id=\"icon/\u9759\u97F3\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path id=\"icon-mute-path\" d=\"M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"").concat(mute ? '#ffffff' : rejection ? '#cccccc' : btnData.backgroundColor, "\"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u9759\u97F3</div>\n            </div>");
            btnItem.onclick = function () {
              var _this3$decoderState$s4 = _this3.decoderState.state,
                talk = _this3$decoderState$s4.talk,
                sound = _this3$decoderState$s4.sound;
                _this3$decoderState$s4.play;
                var rejection = _this3$decoderState$s4.rejection;
              if (rejection) {
                return false;
              }
              console.log('静音');
              if (talk) {
                console.log('结束对讲');
                _this3.setDecoderState({
                  talk: false,
                  mute: true
                }, btnData.backgroundColor);
                _this3.jSPlugin.Talk.stopTalk();
                _this3.jSPlugin.openSound();
                _this3.setDecoderState({
                  sound: true
                });
              } else {
                console.log('开始对讲');
                _this3.setDecoderState({
                  talk: true,
                  mute: false
                }, btnData.backgroundColor);
                if (sound) {
                  _this3.jSPlugin.closeSound();
                  _this3.setDecoderState({
                    sound: false
                  });
                }
                _this3.jSPlugin.Talk.startTalk();
              }
            };
            return btnItem;
          case 'hangUp':
            btnItem.title = "挂断";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.7, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width:").concat(btnWidth * 0.5, "px;height: ").concat(btnWidth * 0.5, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.3, "px\" height=\"").concat(btnWidth * 0.3, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u6302\u65AD</title>\n                        <g id=\"icon/\u6302\u65AD\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z\" id=\"\u8DEF\u5F84\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) \"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;\">\u6302\u65AD</div>\n            </div>");
            btnItem.onclick = function () {
              var _this3$decoderState$s5 = _this3.decoderState.state,
                talk = _this3$decoderState$s5.talk,
                play = _this3$decoderState$s5.play,
                sound = _this3$decoderState$s5.sound,
                rejection = _this3$decoderState$s5.rejection;
              if (rejection) {
                return false;
              }
              if (talk) {
                console.log('结束对讲');
                _this3.setDecoderState({
                  talk: false
                });
                _this3.jSPlugin.Talk.stopTalk();
              }
              if (play) {
                _this3.jSPlugin.stop();
                _this3.setDecoderState({
                  play: !play
                });
              }
              if (sound) {
                _this3.jSPlugin.closeSound();
                _this3.setDecoderState({
                  sound: false
                });
              }
              if (play || talk) {
                console.log('挂断');
                //停止响铃
                _this3.removeBellRing();
                // 拒绝/挂断状态处理
                _this3.rejectionStatusDispose();
                //挂断回调
                if (typeof _this3.jSPlugin.hangUpCallback === 'function') {
                  _this3.jSPlugin.hangUpCallback('hangUp');
                }
              }
            };
            return btnItem;
          default:
            return btnItem;
        }
      }

      //应答超时处理
    }, {
      key: "answerOvertime",
      value: function answerOvertime() {
        this.toastCustom.initToastContent('应答超时');
        var play = this.decoderState.state.play;
        console.log('应答超时');
        if (play) {
          this.jSPlugin.stop();
        }
        this.setDecoderState({
          play: false,
          rejection: true
        });
        // 拒绝/挂断状态处理
        this.rejectionStatusDispose();
        //返回（关闭快捷回复）
        this.switchFooter('onBell');
        // 拒绝回调
        if (typeof this.jSPlugin.hangUpCallback === 'function') {
          this.jSPlugin.hangUpCallback('rejection');
        }
      }

      //拒绝/挂断状态处理
    }, {
      key: "rejectionStatusDispose",
      value: function rejectionStatusDispose() {
        var _this4 = this;
        var footer = this.themeData.footer;
        var footerDom = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var footerDomCall = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        var headerRingStatusDom = document.getElementById("header-".concat(this.bellStatus, "-ringStatus"));
        if (this.bellStatus == 'onBell') {
          footerDom.innerHTML = "";
          footerDom.style.color = '#ffffff';
        } else {
          footerDomCall.innerHTML = "";
          footerDomCall.style.color = '#ffffff';
        }
        console.log('rejectionStatusDispose');
        this.setDecoderState({
          rejection: true
        });
        footer[this.bellStatus].btnList.map(function (item, index) {
          if (item.isrender) {
            _this4.renderFooter(item.iconId, item);
          }
        });
        headerRingStatusDom.innerText = "\u901A\u8BDD\u5DF2\u7ED3\u675F";
        this.jSPlugin.pluginStatus.loadingClear();
        this.jSPlugin.pluginStatus.loadingSetTextWithBtn({
          text: '通话已结束',
          color: 'white',
          isMobile: false,
          type: 2
        });
      }
    }, {
      key: "userNoDevice",
      value:
      //用户不拥有该设备
      function userNoDevice() {
        var _this5 = this;
        //停止响铃
        this.removeBellRing();
        this.setDecoderState({
          rejection: true
        });
        var footer = this.themeData.footer;
        var footerDom = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var footerDomCall = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        if (this.bellStatus == 'onBell') {
          footerDom.innerHTML = "";
          footerDom.style.color = '#ffffff';
        } else {
          footerDomCall.innerHTML = "";
          footerDomCall.style.color = '#ffffff';
        }
        console.log('userNoDevice');
        this.setDecoderState({
          rejection: true
        });
        footer[this.bellStatus].btnList.map(function (item, index) {
          if (item.isrender) {
            _this5.renderFooter(item.iconId, item);
          }
        });
        this.jSPlugin.pluginStatus.loadingClear();
        this.jSPlugin.pluginStatus.loadingSetTextWithBtn({
          text: '该用户不拥有该设备',
          color: 'white',
          isMobile: false,
          type: 2
        });
      }
      // 加载header
    }, {
      key: "renderHeader",
      value: function renderHeader(id, item) {
        var _this6 = this;
        var sizeRatio = this.videoWidth / 1024 || 1;
        var objItem = this.matchBtn(id, item);
        if (document.getElementById("".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus, "-content"))) {
          var childDOM = document.createElement('span');
          childDOM.innerHTML = "".concat(objItem.domString);
          document.getElementById("".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus, "-content")).appendChild(childDOM);
        } else {
          var objDOM = document.createElement('div');
          objDOM.id = "".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus);
          objDOM.style = "max-width:50%;position:relative;";
          objDOM.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus, "-content\" style=\"display:inline-block;height:auto;padding-top: ").concat(32 * sizeRatio, "px;\";>\n        ").concat(objItem.domString, "\n      </span>");
          objDOM.onclick = function (e) {
            if (_this6.decoderState.state.isEditing || !_this6.activeThemeStatus) {
              return false;
            }
            objItem.onclick(e);
          };
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).childNodes[0].appendChild(objDOM);
        }
      }

      // 加载footer
    }, {
      key: "renderFooter",
      value: function renderFooter(id, item) {
        var _this7 = this;
        var mute = this.decoderState.state.mute;
        //远程开锁
        console.log('-------------renderFooter');
        if (id == 'remoteUnlock' && !!this.jSPlugin.capacity && (!this.jSPlugin.capacity['support_unlock'] || this.jSPlugin.capacity['support_unlock'] == 0)) {
          return false;
        }
        var objItem = this.matchBtn(id, item);
        var btnWidth = this.videoWidth / 6; // 按钮宽度
        var objDOM = document.createElement('div');
        objDOM.className = "theme-icon-item";
        if (!!this.jSPlugin.isWebConsole) {
          objDOM.style = "padding:0 ".concat(btnWidth * 0.1, "px;");
        } else {
          objDOM.style = "padding:0 ".concat(btnWidth * 0.1, "px;cursor: pointer;");
        }
        objDOM.innerHTML = "".concat("<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "\" style=\"position:relative;\">") // +`<span id="${this.jSPlugin.id}-${objItem.id}-left" class="ezuikit-theme-icon" title="左移" style="position: absolute;top: calc(50% - 26px);left: -6px;display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`  
        + "<div id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-content\" title=\"").concat(objItem.title, "\" style=\"display: flex;align-items: center;position:relative;\">")).concat(objItem.domString, "</div>") // +`<span id="${this.jSPlugin.id}-${objItem.id}-right" class="ezuikit-theme-icon" title="右移" style="position: absolute;top: calc(50% - 26px);left: calc(100% - 0px);display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>`
        + '</span>';
        objDOM.onclick = function (e) {
          if (_this7.decoderState.state.isEditing || !_this7.activeThemeStatus) {
            return false;
          }
          objItem.onclick(e);
        };
        if (objItem.onmouseenter) {
          objDOM.onmouseenter = function (e) {
            if (_this7.decoderState.state.isEditing || !_this7.activeThemeStatus) {
              return false;
            }
            objItem.onmouseenter(e);
          };
        }
        if (objItem.onmouseleave) {
          objDOM.onmouseleave = function (e) {
            if (_this7.decoderState.state.isEditing || !_this7.activeThemeStatus) {
              return false;
            }
            objItem.onmouseleave(e);
          };
        }
        var iconSizeScale = this.videoWidth / 597;
        var toLeft = document.createElement('span');
        toLeft.className = "icon-move left";
        // toLeft.innerHTML =  `<span id="${this.jSPlugin.id}-${objItem.id}-left" title="左移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ${35*iconSizeScale}px); width: ${10*iconSizeScale}px; height: ${40*iconSizeScale}px;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 10 15" style="background:#595959;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`;
        toLeft.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-left\" title=\"\u5DE6\u79FB\" style=\"display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ").concat(35 * iconSizeScale, "px); width: ").concat(10 * iconSizeScale, "px; height: ").concat(40 * iconSizeScale, "px;cursor: pointer;\">\n        <svg width=\"100%\" height=\"100%\" viewBox=\"0 0 10 40\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <title></title>\n              <g id=\"\u547C\u53EB\u6A21\u677F-\u63A7\u5236\u53F0\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                  <g id=\"H5\u547C\u53EB\u6A21\u677F\" transform=\"translate(-614.000000, -5024.000000)\">\n                      <g id=\"\u7F16\u7EC4-28\" transform=\"translate(421.000000, 4484.000000)\">\n                          <g id=\"\u7F16\u7EC4-9\" transform=\"translate(23.000000, 522.000000)\">\n                              <g id=\"\u7F16\u7EC4\" transform=\"translate(170.000000, 0.000000)\">\n                                  <g id=\"\u7BAD\u5934\u5DE6\" transform=\"translate(0.000000, 18.000000)\">\n                                      <rect id=\"\u77E9\u5F62\" fill=\"#595959\" x=\"0\" y=\"0\" width=\"10\" height=\"40\" rx=\"2\"></rect>\n                                      <g id=\"1.\u901A\u7528/2.Icon\u56FE\u6807/Common/Fill/Left\" transform=\"translate(1.000000, 15.000000)\" fill=\"#FFFFFF\">\n                                          <path d=\"M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z\" id=\"\u4E09\u89D2\u5F62\" transform=\"translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) \"></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n        </span>");
        toLeft.onclick = function () {
          _this7.editIcon(objItem.id, 'left', 'footer');
        };
        objDOM.appendChild(toLeft);
        var toRight = document.createElement('span');
        toRight.className = "icon-move right";
        // toRight.innerHTML = `<span id="${this.jSPlugin.id}-${objItem.id}-right" class="ezuikit-theme-icon" title="右移" style="display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ${35 * iconSizeScale}px);left: ${20 * iconSizeScale + btnWidth * 0.5}px; width: ${10 * iconSizeScale}px; height: ${40*iconSizeScale}px;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 10 15" style="background:#595959"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>`;
        toRight.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-right\" class=\"ezuikit-theme-icon\" title=\"\u53F3\u79FB\" style=\"display: inline-block;border-radius: 2px;overflow: hidden;position: absolute;top: calc(50% - ").concat(35 * iconSizeScale, "px);left: ").concat(20 * iconSizeScale + btnWidth * 0.5, "px; width: ").concat(10 * iconSizeScale, "px; height: ").concat(40 * iconSizeScale, "px;cursor: pointer;\">\n        <svg width=\"100%\" height=\"100%\" viewBox=\"0 0 10 40\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <title></title>\n              <g id=\"\u547C\u53EB\u6A21\u677F-\u63A7\u5236\u53F0\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                  <g id=\"H5\u547C\u53EB\u6A21\u677F\" transform=\"translate(-684.000000, -5024.000000)\">\n                      <g id=\"\u7F16\u7EC4-28\" transform=\"translate(421.000000, 4484.000000)\">\n                          <g id=\"\u7F16\u7EC4-9\" transform=\"translate(23.000000, 522.000000)\">\n                              <g id=\"\u7F16\u7EC4\" transform=\"translate(170.000000, 0.000000)\">\n                                  <g id=\"\u7BAD\u5934\u53F3\" transform=\"translate(70.000000, 18.000000)\">\n                                      <rect id=\"\u77E9\u5F62\" fill=\"#595959\" x=\"0\" y=\"0\" width=\"10\" height=\"40\" rx=\"2\"></rect>\n                                      <g id=\"1.\u901A\u7528/2.Icon\u56FE\u6807/Common/Fill/Left\" transform=\"translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)\" fill=\"#FFFFFF\">\n                                          <path d=\"M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z\" id=\"\u4E09\u89D2\u5F62\" transform=\"translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) \"></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n        </span>");
        toRight.onclick = function () {
          _this7.editIcon(objItem.id, 'right', 'footer');
        };
        objDOM.appendChild(toRight);
        if (id == 'answer' || id == 'rejection' || id == 'hangUp') ; else {
          var toClose = document.createElement('span');
          toClose.className = "icon-move close";
          toClose.innerHTML = "<span id=\"".concat(objItem.id, "-remove\" class=\"ezuikit-theme-icon\" title=\"\u79FB\u9664\" style=\"position: absolute;top: ").concat(-15 * iconSizeScale - 1, "px;left: ").concat(20 * iconSizeScale + btnWidth * 0.5 - 4.5 * iconSizeScale, "px;cursor: pointer;\">\n            <svg width=\"").concat(18 * iconSizeScale, "\" height=\"").concat(18 * iconSizeScale, "\" viewBox=\"0 0 18 18\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                  <title></title>\n                  <g id=\"\u547C\u53EB\u6A21\u677F-\u63A7\u5236\u53F0\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                      <g id=\"H5\u547C\u53EB\u6A21\u677F\" transform=\"translate(-680.000000, -5006.000000)\">\n                          <g id=\"\u7F16\u7EC4-28\" transform=\"translate(421.000000, 4484.000000)\">\n                              <g id=\"\u7F16\u7EC4-9\" transform=\"translate(23.000000, 522.000000)\">\n                                  <g id=\"\u7F16\u7EC4\" transform=\"translate(170.000000, 0.000000)\">\n                                      <g id=\"\u5173\u95ED1\" transform=\"translate(66.000000, 0.000000)\">\n                                          <rect id=\"\u77E9\u5F62\" fill-rule=\"nonzero\" x=\"0\" y=\"0\" width=\"18\" height=\"18\"></rect>\n                                          <path d=\"M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z\" id=\"\u5F62\u72B6\" fill=\"#595959\"></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </svg>\n          </span>");
          toClose.onclick = function () {
            _this7.editIcon(objItem.id, 'delete', 'footer');
          };
          objDOM.appendChild(toClose);
        }
        if (this.bellStatus == 'onCall') {
          //通话中
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).appendChild(objDOM);
        } else {
          //响铃中
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).appendChild(objDOM);
        }
        if (this.decoderState.state.isEditing && id == 'mute' && this.bellStatus == 'onCall') {
          //控制台直接设置通话中静音设置
          //是否默认开启麦克风
          if (this.themeData.customConfig.defaultMicro == 0 && !mute) {
            this.setDecoderState({
              mute: true
            }, item.backgroundColor);
          } else {
            this.setDecoderState({
              mute: false
            }, item.backgroundColor);
          }
        }
      }
    }, {
      key: "switchFooter",
      value:
      //切换footer区域显示的内容 onBell 响铃 onCall 通话 quickReply 快捷回复 remoteUnlock 远程开锁
      function switchFooter(type) {
        var footer = {};
        if (!!this.themeData) {
          footer = this.themeData.footer;
        }
        switch (type) {
          case 'onBell':
            if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReply"))) {
              document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReply")).style.display = 'none';
            }
            if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"))) {
              if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.display == 'none') {
                document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'flex';
              }
            } else {
              document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'flex';
            }
            break;
          case 'onCall':
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls-remoteUnlock")).style.display = 'none';
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'none';
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.display = 'flex';
            if (!!this.themeData) {
              document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.color = footer[this.bellStatus].color;
            }
            break;
          case 'quickReply':
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReply")).style.display = 'flex';
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'none';
            break;
          case 'remoteUnlock':
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.display = 'none';
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'none';
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls-remoteUnlock")).style.display = 'flex';
            break;
        }
      }

      //加载渲染模板数据
    }, {
      key: "initThemeData",
      value: function initThemeData() {
        var _this8 = this;
        console.log('-------------initThemeData');
        var isEditing = this.decoderState.state.isEditing;
        var _this$themeData3 = this.themeData,
          header = _this$themeData3.header,
          footer = _this$themeData3.footer;
        var videoId = this.jSPlugin.id;
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.videoWidth;
        var ratioClient = clientWidth / 1024; //比例
        // this.header = defaultTheme.header;
        // this.footer = defaultTheme.footer;
        this.isNeedRenderHeader = _.findIndex(header[this.bellStatus].btnList, function (v) {
          return v.isrender > 0;
        }) >= 0;
        this.isNeedRenderFooter = _.findIndex(footer[this.bellStatus].btnList, function (v) {
          return v.isrender > 0;
        }) >= 0;
        if (this.isNeedRenderHeader) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            var headerContainer = document.createElement('div');
            headerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-headControl"));
            headerContainer.setAttribute('class', 'header-controls');
            headerContainer.innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' class=\"header-controls-left\" style='display:flex;width:calc(100% - 100px);overflow:hidden;padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id, "-headControl-right' class=\"header-controls-right\" style='display:flex;'></div>");
            console.log(this.jSPlugin.height);
            var headerHeight = this.jSPlugin.height * 0.2 + 'px';
            var headerStyle = {
              height: headerHeight,
              display: "flex",
              "justify-content": "space-between",
              top: 0,
              "z-index": 999,
              color: "#FFFFFF",
              width: "100%",
              position: "relative",
              'margin-bottom': '-' + headerHeight,
              "align-items": 'center',
              "background": "transparent linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)"
            };
            headerContainer.style = styleToString$2(headerStyle);
            document.getElementById("".concat(videoId, "-wrap")).insertBefore(headerContainer, document.getElementById(videoId));
            // 头部预留x像素空间
            var _checkTimer = setInterval(function () {
              if (window.EZUIKit[_this8.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer);
                // 检测到渲染头部，执行一次reSize
                // this.jSPlugin.reSize(this.jSPlugin.params.width,this.jSPlugin.params.height);
              }
            }, 50);
          } else {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' style='display:flex;width: calc(100% - 100px);padding-left: 3%;'></div><div id='").concat(this.jSPlugin.id, "-headControl-right' style='display:flex'></div>");
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-headControl")));
          }
          // this.jSPlugin.reSize(this.jSPlugin.params.width,this.jSPlugin.params.height);
        }

        var footerHeight = this.jSPlugin.height * 0.3;
        if (this.isNeedRenderFooter) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            var footerContainer = document.createElement('div');
            footerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-ez-iframe-footer-container"));
            footerContainer.setAttribute('class', 'ez-iframe-footer-container');
            var footerStyle = {
              "min-height": footerHeight + 'px',
              "max-height": footerHeight + 'px',
              "position": "relative",
              "margin-top": '-' + footerHeight + 'px',
              display: "flex",
              "flex-wrap": "wrap",
              "justify-content": "space-between",
              "z-index": 999,
              top: 0,
              color: "#FFFFFF",
              width: "100%",
              "align-items": 'center',
              "background-image": "linear-gradient(180deg, rgba(0,0,0,0.00) 0%, rgba(0,0,0,0.60) 100%)",
              "font-size": 24 * ratioClient + "px"
            };
            footerContainer.style = styleToString$2(footerStyle);
            footerContainer.innerHTML = "\n            <div id=\"".concat(this.jSPlugin.id, "-audioControls\" class=\"footer-controls\" style='display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id, "-audioControls-onCall\" class=\"footer-controls\" style='display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id, "-audioControls-quickReply\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id, "-audioControls-remoteUnlock\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n            ");
            insertAfter(footerContainer, document.getElementById(videoId));
          } else {
            if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
              document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.marginTop = "-".concat(footerHeight, "px");
              if (this.bellStatus == 'onCall') {
                //控制台使用逻辑，直接更新渲染通话中的按钮
                document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).innerHTML = "\n              <div id=\"".concat(this.jSPlugin.id, "-audioControls\"  class=\"footer-controls\" style='display:none;justify-content: space-around;padding: 0 4%;width:100%;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-onCall\" class=\"footer-controls\" style='display:flex;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-quickReply\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-remoteUnlock\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              ");
              } else {
                document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).innerHTML = "\n              <div id=\"".concat(this.jSPlugin.id, "-audioControls\"  class=\"footer-controls\" style='display:flex;justify-content: space-around;padding: 0 4%;width:100%;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-onCall\" class=\"footer-controls\" style='display:none;justify-content: space-around;padding: 0 4%;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-quickReply\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-remoteUnlock\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              ");
              }
            }
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")));
          }
        }
        if (this.isNeedRenderHeader && document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.background = header[this.bellStatus].backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.color = header[this.bellStatus].color;
          header[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this8.renderHeader(item.iconId, item);
            }
          });
        }
        if (this.isNeedRenderFooter && document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer[this.bellStatus].backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer[this.bellStatus].color;
          footer[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this8.renderFooter(item.iconId, item);
            }
          });
        }

        // // 判断是否配置封面
        if (this.themeData.customConfig.bellPoster == 1 && !isEditing) {
          this.jSPlugin.poster = 'https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg';
          var checkTimer = setInterval(function () {
            if (window.EZUIKit[_this8.jSPlugin.id].state.EZUIKitPlayer.init) {
              clearInterval(checkTimer);
              _this8.jSPlugin.setPoster(_this8.jSPlugin.poster);
            }
          }, 50);
        }
        if (this.activeThemeStatus) {
          //加载响铃铃声
          this.initBellRing();
          window.addEventListener('click', this.autoPlayRing);
        }
        this.inited = true;
        //设备信息
        this.getCallDeviceInfo();
      }
    }, {
      key: "renderThemeData",
      value: function renderThemeData() {
        var _this9 = this;
        var isEditing = this.decoderState.state.isEditing;
        var _this$themeData4 = this.themeData,
          header = _this$themeData4.header,
          footer = _this$themeData4.footer;
        if (this.isNeedRenderHeader && header) {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.background = header[this.bellStatus].backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.color = header[this.bellStatus].color.replace("-diy", "");
          header[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this9.setDecoderState(_defineProperty({}, item.iconId, _this9.decoderState.state[item.iconId]));
            }
          });
        }
        if (this.isNeedRenderFooter && footer) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer[this.bellStatus].backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer[this.bellStatus].color.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.color = footer[this.bellStatus].color.replace("-diy", "");
          footer[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this9.setDecoderState(_defineProperty({}, item.iconId, _this9.decoderState.state[item.iconId]));
            }
            if (index == 0 && !_this9.themeInited && _this9.activeThemeStatus) {
              //直接开始播放 xuehb
              var checkTimer = setInterval(function () {
                if (window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init) {
                  clearInterval(checkTimer);
                  if (_this9.themeData.customConfig.bellPoster == 1 && !isEditing) {
                    _this9.jSPlugin.pluginStatus.loadingClear();
                  } else {
                    _this9.jSPlugin.play();
                  }
                  _this9.themeInited = true;
                }
              }, 50);
            }
          });
          // 判断标清高清
          if (this.jSPlugin.url.indexOf("hd.live") !== -1) {
            this.setDecoderState({
              hd: true
            });
          }
          // 判断是否自动隐藏控件
          if (this.themeData.autoFocus > 0) {
            this.autoFocus = parseInt(this.themeData.autoFocus);
            this.startAutoFocus();
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).addEventListener("click", function () {
              _this9.stopAutoFocus();
            });
            // document.getElementById(`${this.jSPlugin.id}-wrap`).addEventListener("mouseout", ()=>{
            //   console.log("开启自动隐藏")
            //   this.startAutoFocus();
            // })
          }
          // 设置当前播放类型
          this.setDecoderState({
            cloudRec: matchEzopenUrl(this.jSPlugin.url).type === 'cloud.rec',
            rec: matchEzopenUrl(this.jSPlugin.url).type === 'rec',
            type: matchEzopenUrl(this.jSPlugin.url).type
          });
        } else {
          if (!this.themeInited && this.activeThemeStatus) {
            var _checkTimer2 = setInterval(function () {
              if (window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer2);
                // this.jSPlugin.play();
                if (_this9.themeData && _this9.themeData.customConfig && _this9.themeData.customConfig.bellPoster == 1 && !isEditing) {
                  _this9.jSPlugin.pluginStatus.loadingClear();
                } else {
                  _this9.jSPlugin.play();
                }
                _this9.themeInited = true;
              }
            }, 50);
          }
        }
        var checkTimer = setInterval(function () {
          if (window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init) {
            clearInterval(checkTimer);
            // 执行一次reSize
            _this9.jSPlugin.reSize(_this9.jSPlugin.params.width, _this9.jSPlugin.params.height);
          }
        }, 50);
      }
      //设置 setThemeData   
    }, {
      key: "setThemeData",
      value: function setThemeData(options, bellStatus) {
        this.themeData = options;
        if (bellStatus == 'onCall') {
          //控制台直接设置更新通话中按钮样式
          this.bellStatus = 'onCall';
        }
      }
    }, {
      key: "startAutoFocus",
      value: function startAutoFocus() {
        var _this10 = this;
        //console.log("开始自动隐藏",this.autoFocus);
        var autoFocus = this.autoFocus;
        // if(document.getElementById(`${this.jSPlugin.id}-audioControls`)) {
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
        this.autoFocusTimer = setTimeout(function () {
          if (document.getElementById("".concat(_this10.jSPlugin.id, "-audioControls"))) {
            document.getElementById("".concat(_this10.jSPlugin.id, "-audioControls")).style.opacity = 0;
            document.getElementById("".concat(_this10.jSPlugin.id, "-audioControls")).style.pointerEvents = 'none';
          }
        }, autoFocus * 1000);
      }
    }, {
      key: "stopAutoFocus",
      value: function stopAutoFocus() {
        //console.log("结束自动隐藏")
        if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.opacity = 1;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.pointerEvents = 'all';
        }
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
        this.startAutoFocus();
      }
    }, {
      key: "editIcon",
      value: function editIcon(id, type, area) {
        console.log("编辑组件", id, type, area);
        var newThemeData = this.themeData;
        console.log("themeData", this.themeData);
        var btnList = this.themeData[area][this.bellStatus].btnList;
        var _index = _.findIndex(btnList, function (item) {
          return item.iconId === id;
        });
        var tmp = btnList[_index];
        switch (type) {
          case 'delete':
            btnList[_index].isrender = 0;
            break;
          case 'right':
            var nextRightBtnIndex = -1;
            for (var i = _index + 1; i < btnList.length; i++) {
              if (btnList[i].part === btnList[_index].part && btnList[i].isrender == 1) {
                nextRightBtnIndex = i;
                break;
              }
            }
            if (nextRightBtnIndex !== -1) {
              btnList[_index] = btnList[nextRightBtnIndex];
              btnList[nextRightBtnIndex] = tmp;
            }
            break;
          case 'left':
            var nextLeftBtnIndex = -1;
            for (var _i = _index - 1; _i >= 0; _i--) {
              if (btnList[_i].part === btnList[_index].part && btnList[_i].isrender == 1) {
                nextLeftBtnIndex = _i;
                break;
              }
            }
            if (nextLeftBtnIndex !== -1) {
              btnList[_index] = btnList[nextLeftBtnIndex];
              btnList[nextLeftBtnIndex] = tmp;
            }
            break;
        }
        console.log("new btnList", btnList);
        newThemeData[area][this.bellStatus].btnList = btnList;
        //this.renderThemeData();
        this.jSPlugin.Theme.changeTheme(newThemeData);
      }
    }, {
      key: "countTime",
      value: function countTime(type) {
        var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var that = this;
        if (!document.getElementById(this.jSPlugin.id + "time-area")) {
          var recordDOM = document.createElement("div");
          recordDOM.id = this.jSPlugin.id + "time-area";
          recordDOM.className = "time-area";
          recordDOM.innerHTML = "<span class=\"dot\"></span><span class=\"value\">00:00</span>";
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).appendChild(recordDOM);
          }
        }
        if (this.countTimer) {
          clearInterval(this.countTimer);
        }
        if (type === 'add') {
          var i = start;
          document.getElementById(that.jSPlugin.id + "time-area").style.display = 'flex';
          this.countTimer = setInterval(function () {
            ++i;
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = formatSeconds(i);
          }, 1000);
        } else if (type === 'destroy') {
          if (this.countTimer) {
            clearInterval(this.countTimer);
          }
          this.countTimer = undefined;
          if (document.getElementById(that.jSPlugin.id + "time-area")) {
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = '00:00';
            document.getElementById(that.jSPlugin.id + "time-area").style.display = 'none';
          }
        }
        //将秒数转换为时分秒格式
        function formatSeconds(value) {
          var theTime = parseInt(value); // 秒
          var middle = 0; // 分
          var hour = 0; // 小时
          var secondV = '00';
          var minV = '00';
          var hourV = '00';
          if (theTime > 59) {
            middle = parseInt(theTime / 60);
            theTime = parseInt(theTime % 60);
            if (middle > 59) {
              hour = parseInt(middle / 60);
              middle = parseInt(middle % 60);
            }
          }
          secondV = parseInt(theTime) > 9 ? parseInt(theTime) : '0' + parseInt(theTime);
          minV = parseInt(middle) > 9 ? parseInt(middle) : '0' + parseInt(middle);
          hourV = parseInt(hour) > 9 ? parseInt(hour) : '0' + parseInt(hour);
          if (hour > 0) {
            return hourV + ':' + minV + ':' + secondV;
          } else if (middle > 0) {
            return minV + ':' + secondV;
          } else {
            return '00:' + secondV;
          }
        }
      }
    }, {
      key: "editStart",
      value: function editStart(callback) {
        console.log('----------editStart2');
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var audioControlsOnCallDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls themeEditing');
        }
        if (audioControlsOnCallDOM) {
          audioControlsOnCallDOM.setAttribute('class', 'footer-controls themeEditing');
        }
        this.setDecoderState({
          isEditing: true
        });
      }
    }, {
      key: "editEnd",
      value: function editEnd(callback) {
        console.log('----------editEnd2');
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var headerMessageDOM = document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        var audioControlsOnCallDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        if (headerMessageDOM) {
          headerMessageDOM.setAttribute('class', 'header-controls');
        }
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls');
        }
        if (audioControlsOnCallDOM) {
          audioControlsOnCallDOM.setAttribute('class', 'footer-controls');
        }
        // this.setDecoderState({
        //   isEditing:false
        // });
      }

      //获取模板数据
    }, {
      key: "fetchThemeData",
      value: function fetchThemeData(themeId) {
        var _this11 = this;
        var successCallback = function successCallback(data) {
          if (data.meta.code == 0 && data.data) {
            _this11.activeThemeStatus = true;
            _this11.themeData = data.data;
            if (data.data.header) {
              _this11.themeData.header = data.data.header;
              _this11.themeData.header[_this11.bellStatus].btnList = _this11.themeData.header[_this11.bellStatus].btnList.sort(function (a, b) {
                return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
              });
            }
            if (data.data.footer) {
              _this11.themeData.footer = data.data.footer;
              _this11.themeData.footer[_this11.bellStatus].btnList = _this11.themeData.footer[_this11.bellStatus].btnList.sort(function (a, b) {
                return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
              });
            }
            if (!_this11.jSPlugin.capacity) {
              setTimeout(function () {
                _this11.initThemeData();
                _this11.renderThemeData();
              }, 300);
            } else {
              _this11.initThemeData();
              _this11.renderThemeData();
            }
          } else {
            //未试用和购买（无权限试用）
            _this11.activeThemeStatus = false;
            _this11.jSPlugin.pluginStatus.loadingClear();
            _this11.setDecoderState({
              rejection: true
            });
            if (data.meta.code == '111021') {
              // 轻应用模板不存在 
              _this11.jSPlugin.pluginStatus.loadingSetText({
                text: "无效的模板id",
                color: '#fff'
              });
              _this11.activeThemeStatusTxt = '无效的模板id';
            } else if (data.meta.code == '111023') {
              // 轻应用模板试用已过期
              _this11.jSPlugin.pluginStatus.loadingSetText({
                text: "您的试用特权已到期，需前往轻应用控制台购买后使用。",
                color: '#fff'
              });
              _this11.activeThemeStatusTxt = '试用特权已到期';
            } else {
              // 轻应用模板未激活
              _this11.jSPlugin.pluginStatus.loadingSetText({
                text: "模板未激活，请先在开放平台轻应用控制台购买模板",
                color: '#fff'
              });
              _this11.activeThemeStatusTxt = '模板未激活';
            }
            _this11.themeData = webCallData.data;
            _this11.initThemeData();
            _this11.renderThemeData();
          }
        };
        var errorCallback = function errorCallback() {
          _this11.renderThemeData();
        };
        templateDetailApi(this.jSPlugin, themeId, successCallback, errorCallback);
      }

      //获取设备信息
    }, {
      key: "getCallDeviceInfo",
      value: function getCallDeviceInfo() {
        var _this12 = this;
        this.videoWidth / 1024 || 1;
        var that = this;
        var deviceAPISuccess = function deviceAPISuccess(data) {
          if (data.code == 200 && data.data) {
            console.log('---------getCallDeviceInfo');
            _this12.deviceInfoData = data.data;
            if (data.data.isEncrypt) {
              setTimeout(function () {
                console.log('---------------------视频已加密');
                that.jSPlugin.pluginStatus && that.jSPlugin.pluginStatus.loadingClear();
                that.jSPlugin.pluginStatus.loadingSetText({
                  text: "视频已加密",
                  color: '#fff'
                });
              }, 50);
            }
            // 设备名称
            if (document.getElementById("header-".concat(_this12.bellStatus, "-deviceCategory"))) {
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.maxWidth = "100%";
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.overflow = "hidden";
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.textOverflow = "ellipsis";
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.whiteSpace = "nowrap";
              document.getElementById("header-".concat(_this12.bellStatus, "-deviceCategory")).innerText = '' + data.data.deviceName;
            }
          }
          if (data.code == 20018 && !_this12.jSPlugin.isWebConsole) {
            //该用户不拥有该设备
            _this12.userNoDevice();
          }
        };
        request(this.jSPlugin.env.domain + '/api/lapp/device/info', 'POST', {
          accessToken: this.jSPlugin.accessToken,
          deviceSerial: matchEzopenUrl(this.jSPlugin.url).deviceSerial
        }, '', deviceAPISuccess);
      }

      //设置头部文字
    }, {
      key: "setHeaderText",
      value: function setHeaderText(headerText) {
        var sizeRatio = this.videoWidth / 1024 || 1;
        if (document.getElementById("".concat(this.jSPlugin.id, "-deviceCategory-content"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-deviceCategory-content")).innerHTML = "<span style=\"font-size: ".concat(32 * sizeRatio, "px;display: block\">").concat(headerText, "</span><span style=\"font-size: ").concat(24 * sizeRatio, "px;padding-top: ").concat(16 * sizeRatio, "px;display: block;\">").concat(this.deviceInfoData && this.deviceInfoData.deviceName || '', "</span>");
        }
      }
    }]);
    return Call;
  }();

  //自定义弹窗
  /**
   * @class PopupCustom
   * @classdesc 底部自定义弹窗 从屏幕底部滑出或弹出一块自定义内容区。 适合移动端使用
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {number} heightPop - 弹窗高度
   * @example
   * // 初始化弹窗
   * const popupCustom = new PopupCustom(jSPlugin, heightPop)
   * // 关闭弹窗
   * popupCustom.closePopupCustom()
   * // 加载弹窗内容
   * popupCustom.initPopupContent(content, dom)
   */
  var PopupCustom = /*#__PURE__*/function () {
    function PopupCustom(jSPlugin, heightPop) {
      _classCallCheck$1(this, PopupCustom);
      this.jSPlugin = jSPlugin;
      this.heightPop = heightPop || 366;
      this.initPopupCustom();
    }

    /**
     * @description 初始化弹窗
     * @returns {void}
     */
    _createClass$1(PopupCustom, [{
      key: "initPopupCustom",
      value: function initPopupCustom() {
        if (!document.getElementById("".concat(this.jSPlugin.id, "-wrap-popup-custom"))) {
          this.randerPopup();
        } else {
          document.getElementById("".concat(this.jSPlugin.id, "-wrap-popup-custom")).style.display = 'flex';
        }
      }

      /**
       * @description 渲染弹窗 加载popup
       * @returns {void}
       */
    }, {
      key: "randerPopup",
      value: function randerPopup() {
        var _this = this;
        var clientWidth = document.documentElement.clientWidth;
        var ratioClient = clientWidth / 375 || 1; //比例
        var oS = document.createElement('style');
        document.getElementsByTagName("head")[0].appendChild(oS);
        oS.innerHTML = "@keyframes slideContentUp {0%   {bottom: -".concat(366 * ratioClient, "px;}\n        25%  {bottom: -").concat(244 * ratioClient, "px;}\n        50%  {bottom: -").concat(122 * ratioClient, "px;}\n        100% {bottom:0;}} .open-popup{animation:slideContentUp 0.3s 1 linear; -webkit-animation: slideContentUp 0.3s 1 linear;}");
        var wrapVideo = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        var objDOM = document.createElement('div');
        objDOM.style = "display:flex;";
        objDOM.id = "".concat(this.jSPlugin.id, "-wrap-popup-custom");
        objDOM.innerHTML = "<div id=\"".concat(this.jSPlugin.id, "-wrap-popup-custom-mask\" style=\"height:100%;width:100%;position:fixed;top:0;left:0;z-index:9998;background-color: rgba(0,0,0,0.75);overflow:hidden;\">\n        </div>\n        <div id=\"").concat(this.jSPlugin.id, "-wrap-popup-board\" class=\"open-popup\" style=\"bottom:0;height: ").concat(this.heightPop * ratioClient, "px;position:fixed;left: 0; width: 100%;background-color:#ffffff;z-index: 9999;border-radius: 16px 16px 0px 0px;\">\n            <div style=\"margin-top: ").concat(20 * ratioClient, "px;padding: 0 ").concat(15 * ratioClient, "px;width: 100%;display:flex;flex-direction: row;align-items: center;\">\n                <div id=\"").concat(this.jSPlugin.id, "-popup-board-close\">\n                    <svg width=\"").concat(24 * ratioClient, "px\" height=\"").concat(24 * ratioClient, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>icon/close</title>\n                        <g id=\"icon/close\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <g id=\"common/Close/Dark\">\n                                <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                                <path d=\"M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#2C2C2C\" fill-rule=\"nonzero\"></path>\n                            </g>\n                        </g>\n                    </svg>\n                </div>\n                <div id=\"popup-board-title-content\" style=\"width: ").concat(180 * ratioClient, "px;font-size: ").concat(18 * ratioClient, "px;margin-left: ").concat(59 * ratioClient, "px;font-family: PingFangSC-Medium;color: #2C2C2C;font-weight: 500;text-align: center;\"></div>\n            </div>\n            <div id=\"").concat(this.jSPlugin.id, "-popup-board-content\" style=\"width:100%;padding: 0 ").concat(15 * ratioClient, "px;height: ").concat((this.heightPop - 48) * ratioClient, "px;box-sizing: border-box;display: flex;align-items: center;justify-content: center;flex-direction: column;\"></div>\n        </div>\n        ");
        wrapVideo.appendChild(objDOM);
        document.getElementById("".concat(this.jSPlugin.id, "-wrap-popup-custom-mask")).onclick = function () {
          _this.closePopupCustom();
        };
        document.getElementById("".concat(this.jSPlugin.id, "-popup-board-close")).onclick = function () {
          _this.closePopupCustom();
        };
      }

      /**
       * @description  关闭自定义弹窗
       * @param {Function} callBack 处罚关闭时的回调
       * @returns {void}
       */
    }, {
      key: "closePopupCustom",
      value: function closePopupCustom() {
        var callBack = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
        callBack();
        var domWrap = document.getElementById("".concat(this.jSPlugin.id, "-wrap"));
        var domPop = document.getElementById("".concat(this.jSPlugin.id, "-wrap-popup-custom"));
        if (domWrap && domPop) {
          domWrap.removeChild(domPop);
        }
      }
      /**
       * @description 自定义内容加载popup内容
       * @param {Node} title - 弹窗标题
       * @param {Node=} dom - 弹窗内容
       */
    }, {
      key: "initPopupContent",
      value: function initPopupContent(title, dom) {
        // console.log('content-----',content)
        document.getElementById("popup-board-title-content").innerText = title || '';
        if (dom) {
          document.getElementById("".concat(this.jSPlugin.id, "-popup-board-content")).appendChild(dom);
        }
      }
    }]);
    return PopupCustom;
  }();

  //快捷回复组件-Mobile
  /**
   * @class MobileQuickReplyEle
   * @classdesc 快捷回复组件-Mobile 适合移动端使用
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {Function} switchFooter - 是否开启底部切换 (type: string) => void
   * @param {number} videoWidth - 视频窗口宽度
   * @example
   * // 初始化MobileQuickReplyEle
   * const mobileQuickReplyEle = new MobileQuickReplyEle(jSPlugin, switchFooter, videoWidth)
   * // 发送快捷回复
   * mobileQuickReplyEle.sendQuickReply()
   */
  var MobileQuickReplyEle = /*#__PURE__*/function () {
    function MobileQuickReplyEle(jSPlugin, switchFooter, videoWidth) {
      _classCallCheck$1(this, MobileQuickReplyEle);
      this.jSPlugin = jSPlugin;
      this.videoWidth = videoWidth; //视频窗口宽度
      this.switchFooter = switchFooter;
      this.toastCustom = new ToastCustom(jSPlugin, true); // 自定义toast
      this.sendLoadingStats = false; //是否正在发送
      this.quickReplyList = ['你好，请将快递放在门口', '你好，稍等', '你好，请将快递放入小区快递柜', '你好，请将外卖放在门口']; //快捷回复列表
      this.popupCustom = new PopupCustom(jSPlugin, 366);
      if (!document.getElementById("mobile-quickReply-list")) {
        this.popupCustom.initPopupContent('快捷回复', this.renderQuickReply());
        this.initQuickReply();
      }
    }
    _createClass$1(MobileQuickReplyEle, [{
      key: "initQuickReply",
      value: function initQuickReply() {
        if (!document.getElementById('mobile-quickReply-list-item-0')) {
          this.getQuickReplyList();
        }
      }
    }, {
      key: "renderQuickReply",
      value: function renderQuickReply() {
        document.documentElement.clientWidth;
        var objDOM = document.createElement('div');
        objDOM.style = "width:100%;";
        objDOM.id = "mobile-quickReply-list";
        objDOM.innerHTML = "<div id=\"mobile-quickReply-content\" style=\"display: block;width:100%;margin-bottom: 36px;\"></div>\n    <div id=\"mobile-quickReply-loading\" style=\"display: none;width:100%;\"></div>\n    <div id=\"mobile-quickReply-loaderror\" style=\"display: none;width:100%;\"></div>";
        return objDOM;
      }
      //生成快捷回复选项
    }, {
      key: "matchQuickReplyBtn",
      value: function matchQuickReplyBtn() {
        var _this = this;
        var sizeRatio = this.videoWidth / 375 || 1;
        var contentDom = document.getElementById("mobile-quickReply-content");
        if (this.quickReplyList && this.quickReplyList.length > 0) {
          this.quickReplyList.forEach(function (item, index) {
            var objDOM = document.createElement('div');
            objDOM.id = "mobile-quickReply-list-item-".concat(index);
            objDOM.style = "margin: ".concat(14 * sizeRatio, "px 0;\n            padding: ").concat(12 * sizeRatio, "px ").concat(15 * sizeRatio, "px;min-height: ").concat(50 * sizeRatio, "px;width:100%;\n            background: #ffffff;border-radius: ").concat(25 * sizeRatio, "px;display: flex;align-items: center;\n            box-sizing: border-box;font-size:").concat(16 * sizeRatio, "px;color: #2c2c2c;");
            objDOM.innerHTML = "\n            <svg id=\"mobile-quickReply-icon-".concat(index, "\" width=\"").concat(24 * sizeRatio, "px\" height=\"").concat(24 * sizeRatio, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                    <title>icon/\u5FEB\u6377\u56DE\u590D\u64AD\u653E</title>\n                    <g id=\"icon/\u5FEB\u6377\u56DE\u590D\u64AD\u653E\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                        <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                        <path d=\"M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#2C2C2C\" fill-rule=\"nonzero\"></path>\n                    </g>\n                </svg>\n            <span id=\"mobile-quickReply-name-").concat(index, "\" style=\"padding-left: 5px;\">").concat(item.voiceName, "</span>");
            objDOM.onclick = function () {
              console.log('item:' + item);
              if (!_this.sendLoadingStats) {
                _this.setBtnCheckStatus(index);
                _this.sendQuickReply(item);
              }
            };
            contentDom.appendChild(objDOM);
          });
        }
      }
      //设置选中状态
    }, {
      key: "setBtnCheckStatus",
      value: function setBtnCheckStatus(checked) {
        var _this2 = this;
        var domItem = '';
        this.quickReplyList.forEach(function (item, index) {
          domItem = document.getElementById("mobile-quickReply-list-item-".concat(index));
          if (index == checked) {
            domItem.style.background = '#F4F6FC';
            domItem.style.color = '#648FFC';
            _this2.setBtnCheckLoding(0, index);
          } else {
            domItem.style.background = '#ffffff';
            domItem.style.color = '#2c2c2c';
          }
        });
      }
      //下发过程loading状态设置
    }, {
      key: "setBtnCheckLoding",
      value: function setBtnCheckLoding(status, index) {
        console.log(index);
        var sizeRatio = this.videoWidth / 375 || 1;
        if (index > -1) {
          var domItem = document.getElementById("mobile-quickReply-list-item-".concat(index));
          var domItemName = document.getElementById("mobile-quickReply-name-".concat(index));
          var domItemIcon = document.getElementById("mobile-quickReply-icon-".concat(index));
          if (status == 1) {
            var domItemIconLoading = document.getElementById("mobile-quickReply-icon-loading-".concat(index));
            if (!!domItemIconLoading && !!domItemName) {
              var objDOM = document.createElement('span');
              objDOM.id = "mobile-quickReply-icon-".concat(index);
              objDOM.style = "height:".concat(24 * sizeRatio, "px;");
              objDOM.innerHTML = "\n                <svg width=\"".concat(24 * sizeRatio, "px\" height=\"").concat(24 * sizeRatio, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                    <title>icon/\u5FEB\u6377\u56DE\u590D\u64AD\u653E</title>\n                    <g id=\"icon/\u5FEB\u6377\u56DE\u590D\u64AD\u653E\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                        <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                        <path d=\"M18.9877488,4.36609064 C21.024173,6.11256041 22.2495,8.93566941 22.2495,12.0024 C22.2495,15.066006 21.0272636,17.8857191 18.9943957,19.6331539 C18.6802816,19.9031635 18.2067557,19.8674098 17.9367461,19.5532957 C17.6667365,19.2391816 17.7024902,18.7656557 18.0166043,18.4956461 C19.708691,17.0411437 20.7495,14.6399857 20.7495,12.0024 C20.7495,9.36223947 19.7060688,6.95821183 18.0112512,5.50470936 C17.6968304,5.23505702 17.6605383,4.76157212 17.9301906,4.44715124 C18.199843,4.13273036 18.6733279,4.09643829 18.9877488,4.36609064 Z M12.2442357,5.87579772 L12.2496,6.0179 L12.2496,17.9819 C12.2496,19.4241617 10.6173522,20.2281184 9.48072691,19.4058312 L9.36879527,19.318145 L5.5996,16.1243865 L3.4996,16.1249 C2.581479,16.1249 1.8284129,15.4182283 1.75540159,14.518493 L1.7496,14.3749 L1.7496,9.6249 C1.7496,8.70699712 2.45696726,7.95373471 3.35611134,7.88070323 L3.4996,7.8749 L5.5996,7.8743865 L9.36863059,4.68279453 C10.4692948,3.74976994 12.1377395,4.4768074 12.2442357,5.87579772 Z M10.3952894,5.79039368 L10.338321,5.82721597 L6.35932099,9.19721597 C6.33078024,9.2209397 6.30781291,9.23786997 6.28390041,9.25347262 L6.35932099,9.19721597 C6.32908972,9.22282023 6.29742069,9.24561685 6.26463127,9.26563212 C6.24087088,9.28012218 6.21634729,9.29327785 6.19105714,9.30506452 C6.18413632,9.30829747 6.1773583,9.31133066 6.1705483,9.31425704 C6.10964585,9.34044144 6.04445985,9.35881628 5.97637056,9.36805338 C5.95756973,9.37054904 5.94148484,9.37214804 5.92538001,9.37322799 L5.8746,9.3749 L3.4996,9.3749 C3.38149734,9.3749 3.28218291,9.45734262 3.25621762,9.56766695 L3.2496,9.6249 L3.2496,14.3749 C3.2496,14.4934644 3.33170357,14.592449 3.44222164,14.6183106 L3.4996,14.6249 L5.8746,14.6249 L5.92192315,14.6263483 C5.93923255,14.627429 5.95652113,14.629109 5.97375563,14.6313909 L5.8746,14.6249 C5.9789469,14.6249 6.0783167,14.6462095 6.168595,14.6847142 C6.18010037,14.6895946 6.19235048,14.695194 6.2044823,14.7011451 C6.22547728,14.7114805 6.24528995,14.7223727 6.26453263,14.7341072 C6.266314,14.735195 6.26795143,14.7362034 6.26958602,14.7372187 L6.28086895,14.7443598 C6.30587317,14.7605037 6.32985559,14.7780945 6.3526978,14.7970136 L6.35940473,14.802655 L10.3380567,18.1733603 C10.4825575,18.2956302 10.695338,18.2179271 10.7408386,18.0492187 L10.7496,17.9819 L10.7496,6.0179 C10.7496,5.82820058 10.5532313,5.71607381 10.3952894,5.79039368 Z M15.9361636,7.38657032 C17.3580982,8.28109203 18.2498,10.0509458 18.2498,12.0044 C18.2498,13.9607796 17.3563865,15.7307985 15.9326223,16.6154437 C15.5807928,16.8340503 15.1183629,16.7260519 14.8997563,16.3742223 C14.6811497,16.0223928 14.7891481,15.5599629 15.1409777,15.3413563 C16.1036696,14.7431949 16.7498,13.4630899 16.7498,12.0044 C16.7498,10.5466827 16.103548,9.26399865 15.1374364,8.65622968 C14.7868297,8.43566726 14.6814079,7.97264316 14.9019703,7.62203641 C15.1225327,7.27142966 15.5855568,7.1660079 15.9361636,7.38657032 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#2C2C2C\" fill-rule=\"nonzero\"></path>\n                    </g>\n                </svg>\n                ");
              domItem.insertBefore(objDOM, domItemName);
            }
          } else {
            //loading状态
            if (!!domItemIcon && !!domItemName) {
              domItem.removeChild(domItemIcon);
              var _objDOM = document.createElement('span');
              _objDOM.id = "mobile-quickReply-icon-loading-".concat(index);
              _objDOM.style = "height:".concat(20 * sizeRatio, "px;width: ").concat(24 * sizeRatio, "px;");
              // objDOM.innerHTML = `<img style="width:${24*sizeRatio}px;height: ${24*sizeRatio}px;" 
              // src='https://resource.eziot.com/group2/M00/00/96/CtwQFmQquAqAfDSgAAATNmw425c881.gif'/>`
              _objDOM.innerHTML = "<svg width=\"".concat(20 * sizeRatio, "\" height=\"").concat(20 * sizeRatio, "\" t=\"1567069979438\" class=\"loading\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2399\"><path d=\"M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z\" fill=\"#666666\" p-id=\"2400\"></path></svg>");
              domItem.insertBefore(_objDOM, domItemName);
            }
          }
        }
      }
      //获取快捷回复列表
    }, {
      key: "getQuickReplyList",
      value: function getQuickReplyList() {
        var _this3 = this;
        console.log('getQuickReplyList');
        this.madeLoadingDom(0);
        var successCallback = function successCallback(data) {
          if (data && data.code == 200) {
            var quickReplyListTmd = data.data || [];
            var itemArr = [];
            data.data.forEach(function (item, index) {
              itemArr = item.voiceName.split('_');
              quickReplyListTmd[index].voiceName = itemArr[1];
            });
            _this3.quickReplyList = quickReplyListTmd;
            setTimeout(function () {
              _this3.madeLoadingDom(2);
            }, 500);
          } else {
            _this3.madeLoadingDom(1);
          }
        };
        var errorCallback = function errorCallback(err) {
          console.log(err);
          _this3.madeLoadingDom(1);
        };
        // 获取快捷回复列表api
        voiceQuery(this.jSPlugin, successCallback, errorCallback);
      }
      //快捷回复状态loading布局处理
    }, {
      key: "madeLoadingDom",
      value: function madeLoadingDom(status) {
        var _this4 = this;
        var sizeRatio = this.videoWidth / 375 || 1;
        if (status == 0) {
          //加载中
          document.getElementById('mobile-quickReply-content').style.display = 'none';
          document.getElementById('mobile-quickReply-loaderror').style.display = 'none';
          document.getElementById('mobile-quickReply-loading').style.display = 'block';
          if (!document.getElementById('mobile-quickReply-loading-box')) {
            var objDOM = document.createElement('div');
            // <img style="width: ${20*sizeRatio}px;height: ${20*sizeRatio}px;" src="https://resource.eziot.com/group2/M00/00/96/CtwQFmQquAqAfDSgAAATNmw425c881.gif"/>
            objDOM.id = "mobile-quickReply-loading-box";
            objDOM.style = "width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: row;";
            objDOM.innerHTML = "<div class=\"\" style=\"heigth:".concat(20 * sizeRatio, "px\">\n                <svg width=\"").concat(20 * sizeRatio, "\" height=\"").concat(20 * sizeRatio, "\" t=\"1567069979438\" class=\"loading\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2399\"><path d=\"M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z\" fill=\"#666666\" p-id=\"2400\"></path></svg>   \n            </div>\n            <div style=\"font-size: ").concat(16 * sizeRatio, "px;margin-left:", 10, "px;color:#666666;\">\u6B63\u5728\u52A0\u8F7D\uFF0C\u8BF7\u7A0D\u5019</div>");
            document.getElementById("mobile-quickReply-loading").appendChild(objDOM);
          }
        } else if (status == 1) {
          //加载失败
          document.getElementById('mobile-quickReply-content').style.display = 'none';
          document.getElementById('mobile-quickReply-loading').style.display = 'none';
          document.getElementById('mobile-quickReply-loaderror').style.display = 'block';
          if (!document.getElementById('mobile-quickReply-loaderror-box')) {
            var _objDOM2 = document.createElement('div');
            _objDOM2.id = "mobile-quickReply-loaderror-box";
            _objDOM2.style = "width: 100%;display: flex;align-items: center;justify-content: center;flex-direction: column;";
            _objDOM2.innerHTML = "<div style=\"\">\n                <img style=\"width:".concat(186 * sizeRatio, "px;height:").concat(120 * sizeRatio, "px;\" src=\"https://resource.eziot.com/group1/M00/00/B8/CtwQEmPZ34KAAStrAAA0pZ5cGTw167.png\" />\n            </div>\n            <div style=\"font-size: ").concat(16 * sizeRatio, "px;color: #666666;\">\n                <span>\u52A0\u8F7D\u5931\u8D25 </span>\n                <span id=\"mobile-quickReply-loaderror-reload\" \n                style=\"color: #648FFC;-webkit-tap-highlight-color: transparent;\">\u70B9\u51FB\u91CD\u8BD5</span>\n            </div>");
            document.getElementById("mobile-quickReply-loaderror").appendChild(_objDOM2);
            document.getElementById("mobile-quickReply-loaderror-reload").onclick = function () {
              _this4.getQuickReplyList();
            };
          }
        } else {
          //加载成功
          document.getElementById('mobile-quickReply-loading').style.display = 'none';
          document.getElementById('mobile-quickReply-loaderror').style.display = 'none';
          document.getElementById('mobile-quickReply-content').style.display = 'block';
          this.matchQuickReplyBtn();
        }
      }
      //下发选择的快捷回复语
    }, {
      key: "sendQuickReply",
      value: function sendQuickReply(data) {
        var _this5 = this;
        this.sendLoadingStats = true;
        var successCallback = function successCallback(data) {
          _this5.sendLoadingStats = false;
          if (data && data.code == 200) {
            _this5.toastCustom.initToastContent('快捷回复成功');
          } else {
            _this5.toastCustom.initToastContent('快捷回复失败，请重试');
          }
          //返回
          _this5.popupCustom.closePopupCustom();
        };
        var errorCallback = function errorCallback(err) {
          console.log(err);
          _this5.sendLoadingStats = false;
          _this5.toastCustom.initToastContent('快捷回复失败，请重试');
          //返回
          _this5.popupCustom.closePopupCustom();
        };
        //下发选择的快捷回复语API
        voiceSend(this.jSPlugin, data.fileUrl, successCallback, errorCallback);
      }
      // 关闭快捷回复
    }, {
      key: "closeQuickReplyEle",
      value: function closeQuickReplyEle() {
        this.popupCustom.closePopupCustom();
      }
    }]);
    return MobileQuickReplyEle;
  }();

  /**
   * @class MobileRemoteUnlockEle
   * @classdesc 远程开锁组件-Mobile
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {Function} switchFooter - 是否开启底部切换 (type: string) => void
   * @param {number} videoWidth - 视频窗口宽度
   * @example
   * // 初始化远程开锁组件
   * const remoteUnlock = new MobileRemoteUnlockEle(jSPlugin, switchFooter, videoWidth)
   * 
   */
  var MobileRemoteUnlockEle = /*#__PURE__*/function () {
    function MobileRemoteUnlockEle(jSPlugin, switchFooter, videoWidth) {
      _classCallCheck$1(this, MobileRemoteUnlockEle);
      this.jSPlugin = jSPlugin;
      this.videoWidth = videoWidth; //视频窗口宽度
      this.switchFooter = switchFooter;
      this.toastCustom = new ToastCustom(jSPlugin, true); // 自定义toast
      this.lockStatus = false;
      this.popupCustom = new PopupCustom(jSPlugin, 265);
      this.popupCustom.initPopupContent('远程开锁', this.renderRemoteUnlock());
      //解锁滑块构建
      this.renderRemoteUnlockSlide();
      // this.initRemoteUnlock()
    }
    _createClass$1(MobileRemoteUnlockEle, [{
      key: "initRemoteUnlock",
      value: function initRemoteUnlock() {
        if (!document.getElementById('mobile-remoteUnlock-content')) {
          this.renderRemoteUnlock();
        } else {
          this.madeSlideEvent();
        }
      }
    }, {
      key: "renderRemoteUnlock",
      value: function renderRemoteUnlock() {
        var sizeRatio = this.videoWidth / 1024 || 1;
        var objDOM = document.createElement('div');
        objDOM.style = "width:100%;";
        objDOM.id = "mobile-remoteUnlock-box";
        objDOM.innerHTML = "<div style=\"width:100%;display:flex;flex-direction:row;align-items: center;\">\n        <div id=\"mobile-remoteUnlock-content\" style=\"display: block;width:calc(100% - ".concat(160 * sizeRatio, "px);margin: 0 ").concat(24 * sizeRatio, "px;\"></div>\n    </div>");
        return objDOM;
      }
      //解锁滑块构建
    }, {
      key: "renderRemoteUnlockSlide",
      value: function renderRemoteUnlockSlide() {
        var sizeRatio = this.videoWidth / 375 || 1;
        var contentDom = document.getElementById("mobile-remoteUnlock-content");
        var objDOM = document.createElement('div');
        objDOM.id = "mobile-remoteUnlock-content-slide";
        objDOM.style = "width: 100%;display: flex;justify-content: center;padding: 0 ".concat(15 * sizeRatio, "px");
        objDOM.innerHTML = "<div id=\"mobile-remoteUnlock-slide-box\" style=\"width: 100%;line-height: ".concat(60 * sizeRatio, "px;height: ").concat(60 * sizeRatio, "px;border: 1px solid rgba(100,143,252,1);border-radius: ").concat(30 * sizeRatio, "px;position: relative;text-align: center;\">\n        <div id=\"mobile-remoteUnlock-slide-bgColor\" style=\"border-radius: ").concat(30 * sizeRatio, "px;width: ").concat(44 * sizeRatio, "px;height: ").concat(60 * sizeRatio, "px;position: absolute;left: 0;top: 0;\"></div>\n        <div id=\"mobile-remoteUnlock-slide-tips\" style=\"height: ").concat(60 * sizeRatio, "px;line-height: ").concat(60 * sizeRatio, "px;font-size: ").concat(14 * sizeRatio, "px;border-radius: ").concat(30 * sizeRatio, "px;position: absolute;text-align: center;user-select: none;color: #666666;width: 100%;\">\u53F3\u6ED1\u5F00\u9501</div>\n        <div id=\"mobile-remoteUnlock-slide-ball\" style=\"top: ").concat(8 * sizeRatio, "px;left: ").concat(8 * sizeRatio, "px;width: ").concat(44 * sizeRatio, "px;height: ").concat(44 * sizeRatio, "px;background: #598FFF;position: absolute;text-align: center;border-radius:50%;display:flex;align-items: center;justify-content: center;\">\n            <svg id=\"slide-ball-start\" style=\"display: inline;\" width=\"").concat(24 * sizeRatio, "px\" height=\"").concat(24 * sizeRatio, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <title>icon/\u7BAD\u5934\u5411\u53F3</title>\n                <g id=\"icon/\u7BAD\u5934\u5411\u53F3\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <rect id=\"\u77E9\u5F62\" fill=\"#000000\" fill-rule=\"nonzero\" opacity=\"0\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                    <path d=\"M14.2841136,6.3689007 L19.9432338,12.0287579 L14.2863796,17.6856122 L12.8580239,16.2572565 L16.114,12.9999007 L4.00000001,13 L4.00000001,11 L16.058,10.9999007 L12.8557579,7.79725638 L14.2841136,6.3689007 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                </g>\n            </svg>\n            <svg id=\"slide-ball-end\" style=\"display: none;\" width=\"").concat(20 * sizeRatio, "\" height=\"").concat(20 * sizeRatio, "\" t=\"1567069979438\" class=\"loading\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2399\"><path d=\"M538.5344 266.4448a133.12 133.12 0 1 1 133.12-133.12 133.4272 133.4272 0 0 1-133.12 133.12zM255.0144 372.1984a121.6768 121.6768 0 1 1 121.6768-121.6768 121.856 121.856 0 0 1-121.6768 121.6768zM134.72 647.424a107.3664 107.3664 0 1 1 107.3664-107.264A107.52 107.52 0 0 1 134.72 647.424z m120.32 272.4608a90.9824 90.9824 0 1 1 90.9824-90.9824A91.1616 91.1616 0 0 1 255.04 919.8848zM538.5344 1024a79.36 79.36 0 1 1 79.36-79.36 79.36 79.36 0 0 1-79.36 79.36z m287.6928-134.144a64.1792 64.1792 0 1 1 64.1792-64.1792 64.3584 64.3584 0 0 1-64.1792 64.1792z m117.76-296.704a52.6336 52.6336 0 1 1 52.6592-52.6336 52.608 52.608 0 0 1-52.6336 52.6336z m-158.72-338.7136a40.96 40.96 0 1 1 12.0064 28.8512 40.5248 40.5248 0 0 1-12.0064-28.8512z\" fill=\"#648ffc\" p-id=\"2400\"></path></svg>\n        </div>\n    </div>");
        // <img id="slide-ball-end" style="display: none;width:${24*sizeRatio}px;height: ${24*sizeRatio}px;" src='https://resource.eziot.com/group2/M00/00/96/CtwQF2QlTNaAKpIxAAATNpWYCL8366.gif'/>
        contentDom.appendChild(objDOM);
        //处理滑块解锁事件
        this.madeSlideEvent();
      }
      //处理滑块解锁事件
    }, {
      key: "madeSlideEvent",
      value: function madeSlideEvent() {
        var sizeRatio = this.videoWidth / 375 || 1;
        var box = document.getElementById('mobile-remoteUnlock-slide-box');
        var bgColor = document.getElementById('mobile-remoteUnlock-slide-bgColor');
        var tips = document.getElementById('mobile-remoteUnlock-slide-tips');
        var ball = document.getElementById('mobile-remoteUnlock-slide-ball');
        var that = this;
        function success() {
          that.lockStatus = true;
          document.getElementById('slide-ball-start').style.display = 'none';
          document.getElementById('slide-ball-end').style.display = 'inline';
          bgColor.style.width = box.clientWidth + "px";
          bgColor.style.backgroundColor = "#598FFF";
          box.style.border = "0";
          ball.style.backgroundColor = '#ffffff';
          tips.textContent = "正在开锁";
          tips.style.color = "#ffffff";
          ball.ontouchstart = null;
          that.sendRemoteUnlockApi();
        }
        ball.ontouchstart = function (e) {
          console.log('ontouchstart');
          var e = e || window.event;
          var posx = e.touches[0].pageX;
          ball.style.transition = "";
          bgColor.style.transition = "";
          document.ontouchmove = function (e) {
            var e = e || window.event;
            var x = e.touches[0].pageX - box.offsetLeft - posx;
            var max = box.clientWidth - ball.clientWidth - 8 * sizeRatio;
            if (x <= 0) {
              x = 0;
            }
            if (x >= max) {
              x = max;
            }
            // bgColor.style.width = x + "px";
            ball.style.left = x + "px";
            // bgColor.style.backgroundColor = "#598FFF";
            if (x == max && !that.lockStatus) {
              success();
            }
          };
          document.ontouchend = function () {
            if (!that.lockStatus) {
              bgColor.style.width = 0 + "px";
              ball.style.left = 8 * sizeRatio + "px";
              ball.style.transition = "left 0.6s linear";
              bgColor.style.transition = "width 0.6s linear";
            }
            document.ontouchend = null;
            document.ontouchmove = null;
          };
        };
      }
      //重置滑动解锁状态
    }, {
      key: "resetRemoteUnlockSlide",
      value: function resetRemoteUnlockSlide() {
        var sizeRatio = this.videoWidth / 1024 || 1;
        this.lockStatus = false;
        var box = document.getElementById('mobile-remoteUnlock-slide-box');
        var bgColor = document.getElementById('mobile-remoteUnlock-slide-bgColor');
        var tips = document.getElementById('mobile-remoteUnlock-slide-tips');
        var ball = document.getElementById('mobile-remoteUnlock-slide-ball');
        bgColor.style.width = 0 + "px";
        ball.style.left = 8 * sizeRatio + "px";
        tips.textContent = "右滑开锁";
        tips.style.color = "#666666";
        document.getElementById('slide-ball-start').style.display = 'inline';
        document.getElementById('slide-ball-end').style.display = 'none';
        bgColor.style.backgroundColor = "#FFFFFF";
        box.style.border = "1px solid rgba(255,255,255,1)";
        ball.style.backgroundColor = '#598FFF';
      }
      //下发远程开锁的接口调用
    }, {
      key: "sendRemoteUnlockApi",
      value: function sendRemoteUnlockApi() {
        var _this = this;
        console.log('下发远程开锁');
        var successCallback = function successCallback(data) {
          if (data && data.code == 200) {
            _this.toastCustom.initToastContent('开锁成功');
          } else {
            _this.toastCustom.initToastContent('开锁失败，请重试');
          }
          _this.popupCustom.closePopupCustom();
        };
        var errorCallback = function errorCallback(err) {
          console.log(err);
          _this.toastCustom.initToastContent('开锁失败，请重试');
          _this.popupCustom.closePopupCustom();
        };
        //远程开锁API
        remoteDoor(this.jSPlugin, successCallback, errorCallback);
      }
      // 关闭远程开锁
    }, {
      key: "closeRemoteUnlock",
      value: function closeRemoteUnlock() {
        this.popupCustom.closePopupCustom();
      }
    }]);
    return MobileRemoteUnlockEle;
  }();

  var data$2 = {
  	customConfig: {
  		defaultMicro: 0,
  		defaultPlay: 0,
  		maxTalkTime: 0,
  		bellPoster: 0,
  		maxBellTime: 0
  	},
  	header: {
  		onBell: {
  			color: "#2c2c2c",
  			backgroundColor: "#00000000 linear-gradient(180deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0.00) 100%)",
  			activeColor: "#1890FF",
  			autoFocus: 0,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",
  					iconId: "ringStatus",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#2c2c2c",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",
  					iconId: "deviceCategory",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#2c2c2c",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				}
  			]
  		},
  		onCall: {
  			color: "#2c2c2c",
  			backgroundColor: "#00000000",
  			activeColor: "#1890FF",
  			autoFocus: 5,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-0",
  					iconId: "callStatus",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#2c2c2c",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-header-1",
  					iconId: "deviceCategory",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#2c2c2c",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793"
  				}
  			]
  		}
  	},
  	footer: {
  		onBell: {
  			color: "#2c2c2c",
  			backgroundColor: "#00000000",
  			activeColor: "#1890FF",
  			autoFocus: 5,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",
  					iconId: "quickReply",
  					part: "left",
  					defaultActive: 1,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",
  					iconId: "rejection",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#2C2C2C",
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",
  					iconId: "answer",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-3",
  					iconId: "remoteUnlock",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				}
  			]
  		},
  		onCall: {
  			color: "#2c2c2c",
  			backgroundColor: "#00000080",
  			activeColor: "#1890FF",
  			autoFocus: 5,
  			btnList: [
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-0",
  					iconId: "mute",
  					part: "left",
  					defaultActive: 1,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-1",
  					iconId: "hangUp",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				},
  				{
  					btnKey: "c1cbc1d4e86d49a0981f54beea95280a-4412dc7a9f7b471a9a3e9a8fb625c793-footer-2",
  					iconId: "remoteUnlock",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					themeId: "4412dc7a9f7b471a9a3e9a8fb625c793",
  					backgroundColor: "#cccccc"
  				}
  			]
  		}
  	}
  };
  var mobileCallData = {
  	data: data$2
  };

  var styleToString$1 = function styleToString(obj) {
    var styleString = "";
    Object.keys(obj).map(function (item, index) {
      styleString += "".concat(item, ":").concat(obj[item]).concat(index < Object.keys(obj).length - 1 ? ';' : "");
    });
    return styleString;
  };

  //Mobile-呼叫模板
  /**
   * @class MobileCall
   * @classdesc Mobile-呼叫模板
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * @param {object} themeData - 模板数据
   * @param {function} setDecoderState - 设置播放器状态
   * @param {object} decoderState - 播放器状态
   * @example
   * // 初始化MobileCall
   * const mobileCall = new MobileCall(jSPlugin, themeData, setDecoderState, decoderState)
   * 
   */
  var MobileCall = /*#__PURE__*/function () {
    function MobileCall(jSPlugin, themeData, setDecoderState, decoderState) {
      var _this = this;
      _classCallCheck$1(this, MobileCall);
      //接听响铃切换方法（给控制台用）
      _defineProperty(this, "switchCallStatus", function (value) {
        var editStatus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
        var _this$themeData = _this.themeData,
          header = _this$themeData.header,
          footer = _this$themeData.footer;
        var muteData = null;
        if (value == 'onCall') {
          console.log('接听');
          _this.bellStatus = 'onCall';
          _this.switchFooter('onCall');
          footer[_this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this.renderFooter(item.iconId, item);
            }
            if (item.iconId == 'mute') {
              muteData = item;
            }
          });
          header[_this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this.renderHeader(item.iconId, item);
            }
          });
          var bellHeaderDom = document.getElementById("".concat(_this.jSPlugin.id, "-header-onBell"));
          if (bellHeaderDom) {
            bellHeaderDom.parentElement.removeChild(bellHeaderDom);
          }
          //判断是否配置了默认封面
          if (_this.themeData.customConfig.bellPoster == 1) {
            if (document.getElementById("bellring-icon")) {
              document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
            }
          }

          //是否默认开启麦克风
          if (_this.themeData.customConfig.defaultMicro == 0 && muteData) {
            _this.muteCommon(muteData);
          } else {
            _this.setDecoderState({
              mute: false
            }, muteData.backgroundColor);
          }

          //停止响铃
          _this.removeBellRing();
          //关闭小窗口
          _this.miniRecCloseClick();
        } else {
          console.log('响铃');
          _this.bellStatus = 'onBell';
          _this.jSPlugin.Theme.changeTheme(_this.themeData, editStatus);
        }
      });
      // 静音方法
      _defineProperty(this, "muteCommon", function (btnData) {
        var _this$decoderState$st = _this.decoderState.state,
          talk = _this$decoderState$st.talk,
          sound = _this$decoderState$st.sound;
        if (talk) {
          console.log('结束对讲');
          _this.setDecoderState({
            talk: false,
            mute: true
          }, btnData.backgroundColor);
          _this.jSPlugin.Talk.stopTalk();
          if (!sound) {
            _this.jSPlugin.openSound();
          }
          _this.setDecoderState({
            sound: true
          });
        } else {
          _this.setDecoderState({
            talk: false,
            mute: true
          }, btnData.backgroundColor);
          if (!sound) {
            _this.jSPlugin.openSound();
          }
          _this.setDecoderState({
            sound: true
          });
        }
      });
      // 自动播放监听回调（手机端无法自动播放解决方案）
      _defineProperty(this, "autoPlayRing", function () {
        console.log('autoPlayRing');
        var bellringAudio = document.getElementById('bellring-audio');
        if (!!bellringAudio) {
          // console.log('bellringAudio.paused-----',bellringAudio.paused)
          bellringAudio.muted = false;
          bellringAudio.src = 'https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3';
          if (bellringAudio.paused) {
            bellringAudio.play();
          }
        }
        var isAppleDevice = _this.checkIsAppleDevice() || false;
        if (isAppleDevice) {
          window.removeEventListener('touchstart', _this.autoPlayRing);
        } else {
          window.removeEventListener('click', _this.autoPlayRing);
        }
      });
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度 
      this.videoHeight = jSPlugin.height; //视频窗口高度 
      this.themeData = themeData;
      this.setDecoderState = setDecoderState;
      this.decoderState = decoderState;
      this.isNeedRenderHeader = false;
      this.isNeedRenderFooter = false;
      this.autoFocus = 0, this.autoFocusTimer = null, this.bellStatus = 'onBell',
      //响铃状态 onBell-响铃中 onCall-通话中
      this.recordTimer = null;
      this.nextRate = 1;
      this.themeInited = false;
      this.inited = false;
      this.miniRecStatus = 'rec';
      this.activeThemeStatus = true;
      this.activeThemeStatusTxt = '模板未激活'; //模板不能使用的提示语title
      this.miniRecNum = 0;
      this.toastCustom = new ToastCustom(jSPlugin, true); // 自定义toast
    }
    //加载响铃
    _createClass$1(MobileCall, [{
      key: "initBellRing",
      value: function initBellRing() {
        var _this2 = this;
        var _this$decoderState$st2 = this.decoderState.state,
          play = _this$decoderState$st2.play,
          isEditing = _this$decoderState$st2.isEditing;
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.videoWidth;
        var ratioClient = clientWidth / 375; //比例
        this.maxBellTime = this.themeData.customConfig.maxBellTime * 1000;
        var bellringDom = document.getElementById('bellring');
        var bellringAudioDom = document.getElementById('bellring-audio');
        if (!bellringDom && !bellringAudioDom) {
          // 判断是否需要响铃
          if (!!this.jSPlugin.isNeedBellRing) {
            var objDOM = document.createElement('div');
            objDOM.id = 'bellring';
            objDOM.innerHTML = "<div>\n          <audio id=\"bellring-audio\" loop autoplay>\n            <source src=\"https://resource.eziot.com/group2/M00/00/8F/CtwQFmPbWnOAGuT5AAHZihhCJEM230.mp3\" type=\"audio/mpeg\">\n          </audio>\n          </div>";
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(objDOM);
          }
          //判断是否配置了默认封面
          if (this.themeData.customConfig.bellPoster == 1 && !isEditing) {
            var clientHeight = clientWidth * 1.8;
            var headerHeight = 6;
            if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
              headerHeight = document.getElementById("".concat(this.jSPlugin.id, "-headControl")).offsetHeight + clientHeight * 0.1 + 6;
            }
            var bellTop = headerHeight + (this.videoHeight - 130 * ratioClient) / 2;
            var objIconDOM = document.createElement('div');
            objIconDOM.id = 'bellring-icon';
            objIconDOM.style = "position: absolute;pointer-events: none;background: none;width: 100%;\n          position: absolute;top: ".concat(bellTop, "px;display: flex;align-items: center;justify-content: center;");
            objIconDOM.innerHTML = "<div style=\"width: ".concat(130 * ratioClient, "px;height: ").concat(130 * ratioClient, "px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.2);border-radius: 50%;\">\n            <div style=\"width: ").concat(80 * ratioClient, "px;height: ").concat(80 * ratioClient, "px;display: flex;align-items: center;justify-content: center;border: 1px solid rgba(255,255,255,0.3);border-radius: 50%;\">\n              <svg width=\"").concat(40 * ratioClient, "px\" height=\"").concat(40 * ratioClient, "px\" viewBox=\"0 0 40 40\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                  <title>icon/\u54CD\u94C3</title>\n                  <g id=\"icon/\u54CD\u94C3\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                      <polygon id=\"Path\" points=\"0 0 40.0000002 0 40.0000002 40.0000002 0 40.0000002\"></polygon>\n                      <path d=\"M20.0000001,4.25000002 C22.0363461,4.25000002 23.698175,5.84879552 23.8000507,7.8591997 L23.8050001,8.05500003 L23.805316,8.99953253 C27.1874196,9.97041766 29.6921839,13.0354462 29.80936,16.723731 L29.80936,16.723731 L29.8133335,16.9800001 L29.8133335,21.6416668 C29.8133335,22.3259481 30.0858837,22.9835569 30.5703302,23.4680033 L30.5703302,23.4680033 L31.6386635,24.5363367 C32.338953,25.2366262 32.760721,26.1675592 32.8273086,27.1785295 L32.8273086,27.1785295 L32.8350001,27.4233334 C32.8350001,29.577547 31.0892137,31.3233335 28.9350001,31.3233335 L28.9350001,31.3233335 L24.5666667,31.323 L24.5650266,31.3951531 C24.4527075,33.8194458 22.4520933,35.7500001 20.0000001,35.7500001 C17.5482065,35.7500001 15.5473098,33.8197367 15.4349743,31.3967059 L15.4326667,31.323 L11.0666667,31.3233335 C9.06159524,31.3233335 7.39851917,29.8069287 7.18810198,27.8229374 L7.17194359,27.6230185 L7.1666667,27.4233334 C7.1666667,26.3411154 7.59733134,25.3020086 8.36300328,24.5363367 L8.36300328,24.5363367 L9.43133662,23.4680033 C9.91578309,22.9835569 10.1883334,22.3259481 10.1883334,21.6416668 L10.1883334,21.6416668 L10.1883334,16.9800001 C10.1883334,13.1909619 12.7263704,9.99530436 16.1948593,8.99965364 L16.1950001,8.05500003 C16.1950001,5.95360729 17.8979654,4.25000002 20.0000001,4.25000002 Z M23.0656667,31.323 L16.9336667,31.323 L16.9352114,31.3619281 C17.0285826,32.9723844 18.3649772,34.2500001 20.0000001,34.2500001 C21.6352227,34.2500001 22.9714318,32.9721919 23.0647896,31.3604131 L23.0656667,31.323 Z M21.5116668,10.1783334 L18.4900001,10.1783334 C14.7336124,10.1783334 11.6883334,13.2231481 11.6883334,16.9800001 L11.6883334,16.9800001 L11.6883334,21.6416668 C11.6883334,22.7238848 11.2576687,23.7629916 10.4919968,24.5286635 L10.4919968,24.5286635 L9.42366346,25.5969969 C8.93921698,26.0814433 8.6666667,26.7390521 8.66637526,27.402427 L8.66637526,27.402427 L8.67048222,27.560237 C8.74130967,28.8268108 9.79171396,29.8233335 11.0666667,29.8233335 L11.0666667,29.8233335 L23.7906939,29.8222289 C23.8004164,29.8218553 23.8101862,29.8216668 23.8200001,29.8216668 L23.8486667,29.823 L28.9350001,29.8233335 C30.2055455,29.8233335 31.2450456,28.8367727 31.329826,27.609522 L31.3354106,27.4481422 L31.3293607,27.2529336 C31.2880301,26.6292837 31.0210852,26.0400787 30.5780034,25.5969969 L30.5780034,25.5969969 L29.50967,24.5286635 C28.7439981,23.7629916 28.3133335,22.7238848 28.3133335,21.6416668 L28.3133335,21.6416668 L28.3134279,16.9919039 L28.3098332,16.759466 C28.1934023,13.0970787 25.1864454,10.1783334 21.5116668,10.1783334 L21.5116668,10.1783334 Z M20.0000001,5.75000002 C18.7795808,5.75000002 17.7813801,6.69770708 17.7003155,7.89717688 L17.6950001,8.05500003 L17.6952875,8.7158769 C17.9568453,8.69103758 18.2219393,8.67833337 18.4900001,8.67833337 L18.4900001,8.67833337 L21.5116668,8.67833337 C21.7792577,8.67833337 22.0439466,8.69101238 22.3051575,8.71580951 L22.3050001,8.05500003 C22.3050001,6.7819079 21.273481,5.75000002 20.0000001,5.75000002 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                  </g>\n              </svg>\n            </div>\n          </div>");
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(objIconDOM);
            if (play && this.bellStatus == 'onBell') {
              this.jSPlugin.pause();
            }
          } else {
            if (document.getElementById("bellring-icon")) {
              document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
            }
          }
          setTimeout(function () {
            var _this2$decoderState$s = _this2.decoderState.state,
              isEditing = _this2$decoderState$s.isEditing,
              rejection = _this2$decoderState$s.rejection;
            if (_this2.bellStatus == 'onBell' && !rejection) {
              //停止响铃
              _this2.removeBellRing();
              //应答超时
              if (!isEditing) {
                _this2.answerOvertime();
              }
            }
          }, this.maxBellTime);
        }
      }
      //停止响铃
    }, {
      key: "removeBellRing",
      value: function removeBellRing() {
        if (!!document.getElementById("bellring")) {
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring"));
        }
        if (!!document.getElementById("bellring-icon")) {
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
        }
      }
      //获取小窗口播放路径
    }, {
      key: "getMiniCallTimeUrl",
      value: function getMiniCallTimeUrl() {
        console.log('--------------getMiniCallTimeUrl');
        if (this.jSPlugin.url.indexOf('hd.live') !== -1) {
          this.recUrl = this.jSPlugin.url.replace('hd.live', 'rec');
        } else {
          this.recUrl = this.jSPlugin.url.replace('live', 'rec');
        }
        if (!!this.jSPlugin.callTime) {
          var callTimeCur = parseInt(this.jSPlugin.callTime);
          var endTime = callTimeCur + 5 * 1000;
          var beginTime = callTimeCur - 10 * 1000;
          var begin = new Date(beginTime).Format('yyyyMMddhhmmss');
          var end = new Date(endTime).Format('yyyyMMddhhmmss');
          this.recUrl = "".concat(this.recUrl, "?begin=").concat(begin, "&end=").concat(end);
          console.log('recurl=' + this.recUrl);
        }
      }
      //加载小窗口
    }, {
      key: "initMiniRec",
      value: function initMiniRec() {
        var _this3 = this;
        var that = this;
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.videoWidth;
        // let clientHeight = document.documentElement.clientHeight;
        var ratioClient = clientWidth / 375; //比例
        var clientHeight = clientWidth * 1.8;
        var headerHeight = 6;
        if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          headerHeight = document.getElementById("".concat(this.jSPlugin.id, "-headControl")).offsetHeight + clientHeight * 0.1 + 6;
        }
        var videoTop = headerHeight + this.videoHeight + 10 * ratioClient;
        console.log(headerHeight);
        if (!document.getElementById("miniRecbox")) {
          var objDOM = document.createElement('div');
          objDOM.id = 'miniRecbox';
          objDOM.style = "-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;top: ".concat(videoTop, "px;right: ").concat(9 * ratioClient, "px;");
          objDOM.innerHTML = "<div id=\"miniRec\"></div>";
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(objDOM);
          //获取小窗口播放路径
          this.getMiniCallTimeUrl();
          var lineEnv = {
            domain: 'https://open.ys7.com'
          };
          this.miniRecPlayer = new EZUIKitPlayer({
            id: 'miniRec',
            width: 160 * ratioClient,
            height: 90 * ratioClient,
            template: "miniRec",
            url: this.recUrl,
            accessToken: this.jSPlugin.accessToken,
            handleError: function handleError(err) {
              console.log("小窗口handleError------------", err);
              if (err && err.retcode == 6701) {
                _this3.miniRecNum = _this3.miniRecNum + 1;
                console.log('小窗口miniRecNum-----------------', _this3.miniRecNum);
                if (_this3.miniRecNum < 5) {
                  that.miniRecPlayer.changePlayUrl({
                    type: 'miniRec'
                  });
                } else {
                  console.log('小窗口------------------已播放5次，关闭小窗口');
                  //小窗口关闭
                  that.miniRecCloseClick();
                }
              } else {
                console.log('小窗口------------------播放失败，关闭小窗口');
                //小窗口关闭
                that.miniRecCloseClick();
              }
            },
            env: this.jSPlugin.env || lineEnv
          });
          // var miniSwitchDOM = document.createElement('div');
          // miniSwitchDOM.id = 'miniSwitch';
          // miniSwitchDOM.style = `cursor: pointer;position: absolute;top: ${(headerHeight + 10)*ratioClient}px;left: ${9*ratioClient}px;`;
          // miniSwitchDOM.innerHTML = `<div id="miniSwitch-btn" style="width: ${35*ratioClient}px;height: ${35*ratioClient}px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.40);">
          //   <svg width="${24*ratioClient}px" height="${24*ratioClient}px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
          //       <title>大小窗切换</title>
          //       <g id="icon/大小窗切换" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
          //           <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
          //           <path d="M16,3.25 C17.5187831,3.25 18.75,4.48121694 18.75,6 L18.75,6 L18.75,6.644 L19.095177,6.64456257 C20.6299163,6.64456257 21.9388658,7.64624846 22.0337198,8.99291851 L22.0392202,9.14979714 L22.0392202,17.639328 C22.0392202,19.0115638 20.7871129,20.0640733 19.2712041,20.1401546 L19.095177,20.1445626 L8.48326347,20.1445626 C6.94852423,20.1445626 5.63957467,19.1428767 5.54472071,17.7962066 L5.53922025,17.639328 L5.539,16.75 L5,16.75 C3.53746816,16.75 2.34159572,15.6082954 2.25501879,14.1675223 L2.25,14 L2.25,6 C2.25,4.48121694 3.48121694,3.25 5,3.25 L5,3.25 Z M18.75,14 C18.75,15.5187831 17.5187831,16.75 16,16.75 L16,16.75 L7.039,16.75 L7.03922025,17.639328 C7.03922025,18.1209822 7.57916546,18.5830417 8.33031492,18.6389177 L8.48326347,18.6445626 L19.095177,18.6445626 C19.873026,18.6445626 20.4615868,18.2126064 20.5321184,17.735283 L20.5392202,17.639328 L20.5392202,9.14979714 C20.5392202,8.66814298 19.999275,8.20608342 19.2481256,8.15020744 L19.095177,8.14456257 L18.75,8.144 Z M16,4.75 L5,4.75 C4.30964406,4.75 3.75,5.30964406 3.75,6 L3.75,6 L3.75,14 C3.75,14.6903559 4.30964406,15.25 5,15.25 L5,15.25 L16,15.25 C16.6903559,15.25 17.25,14.6903559 17.25,14 L17.25,14 L17.25,8.144 L17.2422027,8.14456257 L17.2422027,6.64456257 L17.25,6.644 L17.25,6 C17.25,5.35279131 16.7581253,4.8204661 16.1278052,4.75645361 L16,4.75 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
          //       </g>
          //   </svg>
          // </div>`;
          // document.getElementById(`${this.jSPlugin.id}-wrap`).appendChild(miniSwitchDOM)
          // document.getElementById(`miniSwitch-btn`).onclick = () => {
          //   //小窗口切换
          //   that.miniRecSwitchClick()
          // }
          var miniCloseDOM = document.createElement('div');
          miniCloseDOM.id = 'miniClose';
          miniCloseDOM.style = "position: absolute;top: ".concat(videoTop + 8, "px;right: ").concat(16 * ratioClient, "px;");
          miniCloseDOM.innerHTML = "<div id=\"miniClose-btn\" style=\"width: ".concat(24 * ratioClient, "px;height: ").concat(24 * ratioClient, "px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.1);\">\n          <svg width=\"").concat(24 * ratioClient, "px\" height=\"").concat(24 * ratioClient, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <title>close</title>\n              <g id=\"icon/close\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                  <g id=\"common/Close/Dark\">\n                      <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                      <path d=\"M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#fff\" fill-rule=\"nonzero\"></path>\n                  </g>\n              </g>\n          </svg>\n        </div>");
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(miniCloseDOM);
          document.getElementById("miniClose-btn").onclick = function () {
            //小窗口关闭
            that.miniRecCloseClick();
          };
        } else {
          if (document.getElementById("miniRecbox")) {
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("miniRecbox"));
          }
          // if(document.getElementById(`miniSwitch`)){
          //   document.getElementById(`${this.jSPlugin.id}-wrap`).removeChild(document.getElementById(`miniSwitch`))
          // }
          if (document.getElementById("miniClose")) {
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("miniClose"));
          }
          this.initMiniRec();
        }
      }
      //控制台用-固定图片演示小窗口效果
    }, {
      key: "initMiniImageRec",
      value: function initMiniImageRec() {
        console.log('initMiniImageRec');
        var clientWidth = this.videoWidth;
        var ratioClient = clientWidth / 375; //比例
        var headerHeight = 6;
        if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          headerHeight = document.getElementById("".concat(this.jSPlugin.id, "-headControl")).offsetHeight + 26;
        }
        var videoTop = headerHeight + this.videoHeight + 10 * ratioClient;
        if (!document.getElementById("miniRecbox")) {
          var objDOM = document.createElement('div');
          objDOM.id = 'miniRecbox';
          objDOM.style = "-webkit-border-radius: 8px;border-radius: 8px;overflow: hidden;position: absolute;\n        top: ".concat(videoTop, "px;\n        right: ").concat(9 * ratioClient, "px;\n        user-select: none;\n        ");
          objDOM.innerHTML = "<div id=\"miniRec\" style=\"width: ".concat(160 * ratioClient, "px;height: ").concat(90 * ratioClient, "px;display: flex;align-items: center;justify-content: center;\">\n          <embed id=\"miniRec-embed\" style=\"z-index: 3;position: absolute;width: ").concat(160 * ratioClient, "px;height: ").concat(90 * ratioClient, "px;\" type=\"image/svg+xml\" src=\"https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg\" />\n          <div style=\"color: #FFFFFF;font-size: 12px;z-index: 4;\">\u793A\u610F\u5C0F\u7A97\u4F4D\u7F6E</div>\n        </div>");
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(objDOM);

          // var miniSwitchDOM = document.createElement('div');
          // miniSwitchDOM.id = 'miniSwitch';
          // miniSwitchDOM.style = `z-index: 4;position: absolute;top: ${(headerHeight + 10)*ratioClient}px;left: ${9*ratioClient}px;`;
          // miniSwitchDOM.innerHTML = `<div id="miniSwitch-btn" style="width: ${35*ratioClient}px;height: ${35*ratioClient}px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.40);">
          //   <svg width="${24*ratioClient}px" height="${24*ratioClient}px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
          //       <title>大小窗切换</title>
          //       <g id="icon/大小窗切换" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
          //           <rect id="矩形" x="0" y="0" width="24" height="24"></rect>
          //           <path d="M16,3.25 C17.5187831,3.25 18.75,4.48121694 18.75,6 L18.75,6 L18.75,6.644 L19.095177,6.64456257 C20.6299163,6.64456257 21.9388658,7.64624846 22.0337198,8.99291851 L22.0392202,9.14979714 L22.0392202,17.639328 C22.0392202,19.0115638 20.7871129,20.0640733 19.2712041,20.1401546 L19.095177,20.1445626 L8.48326347,20.1445626 C6.94852423,20.1445626 5.63957467,19.1428767 5.54472071,17.7962066 L5.53922025,17.639328 L5.539,16.75 L5,16.75 C3.53746816,16.75 2.34159572,15.6082954 2.25501879,14.1675223 L2.25,14 L2.25,6 C2.25,4.48121694 3.48121694,3.25 5,3.25 L5,3.25 Z M18.75,14 C18.75,15.5187831 17.5187831,16.75 16,16.75 L16,16.75 L7.039,16.75 L7.03922025,17.639328 C7.03922025,18.1209822 7.57916546,18.5830417 8.33031492,18.6389177 L8.48326347,18.6445626 L19.095177,18.6445626 C19.873026,18.6445626 20.4615868,18.2126064 20.5321184,17.735283 L20.5392202,17.639328 L20.5392202,9.14979714 C20.5392202,8.66814298 19.999275,8.20608342 19.2481256,8.15020744 L19.095177,8.14456257 L18.75,8.144 Z M16,4.75 L5,4.75 C4.30964406,4.75 3.75,5.30964406 3.75,6 L3.75,6 L3.75,14 C3.75,14.6903559 4.30964406,15.25 5,15.25 L5,15.25 L16,15.25 C16.6903559,15.25 17.25,14.6903559 17.25,14 L17.25,14 L17.25,8.144 L17.2422027,8.14456257 L17.2422027,6.64456257 L17.25,6.644 L17.25,6 C17.25,5.35279131 16.7581253,4.8204661 16.1278052,4.75645361 L16,4.75 Z" id="形状结合" fill="#FFFFFF" fill-rule="nonzero"></path>
          //       </g>
          //   </svg>
          // </div>`;
          // document.getElementById(`${this.jSPlugin.id}-wrap`).appendChild(miniSwitchDOM)
          // document.getElementById(`miniSwitch-btn`).onclick = () => {
          //   //小窗口切换
          //   // that.miniRecSwitchClick()
          // }
          var miniCloseDOM = document.createElement('div');
          miniCloseDOM.id = 'miniClose';
          miniCloseDOM.style = "z-index: 4;position: absolute;top: ".concat(videoTop + 8, "px;right: ").concat(16 * ratioClient, "px;");
          miniCloseDOM.innerHTML = "<div id=\"miniClose-btn\" style=\"width: ".concat(24 * ratioClient, "px;height: ").concat(24 * ratioClient, "px;display: flex;align-items: center;justify-content: center;border-radius: 50%;\">\n          <svg width=\"").concat(24 * ratioClient, "px\" height=\"").concat(24 * ratioClient, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <title>close</title>\n              <g id=\"icon/close\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                  <g id=\"common/Close/Dark\">\n                      <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                      <path d=\"M18.1871843,5.81281566 C18.4556698,6.08130112 18.4780436,6.50270075 18.2543057,6.7966719 L18.1871843,6.87347584 L13.0611458,12.0001458 L18.1871843,17.1265242 C18.4800776,17.4194174 18.4800776,17.8942911 18.1871843,18.1871843 C17.9186989,18.4556698 17.4972993,18.4780436 17.2033281,18.2543057 L17.1265242,18.1871843 L12.0001458,13.0611458 L6.87347584,18.1871843 C6.58058262,18.4800776 6.10570888,18.4800776 5.81281566,18.1871843 C5.54433021,17.9186989 5.52195643,17.4972993 5.7456943,17.2033281 L5.81281566,17.1265242 L10.9391458,12.0001458 L5.81281566,6.87347584 C5.51992245,6.58058262 5.51992245,6.10570888 5.81281566,5.81281566 C6.08130112,5.54433021 6.50270075,5.52195643 6.7966719,5.7456943 L6.87347584,5.81281566 L12.0001458,10.9391458 L17.1265242,5.81281566 C17.4194174,5.51992245 17.8942911,5.51992245 18.1871843,5.81281566 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#fff\" fill-rule=\"nonzero\"></path>\n                  </g>\n              </g>\n          </svg>\n        </div>");
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(miniCloseDOM);
          document.getElementById("miniClose-btn").onclick = function () {
            //小窗口关闭
            // that.miniRecCloseClick()
          };
        } else {
          document.getElementById("miniRecbox").style.top = videoTop + 'px';
          // document.getElementById(`miniSwitch`).style.top = (headerHeight + 10)*ratioClient + 'px';
          document.getElementById("miniClose").style.top = videoTop + 8 + 'px';
        }
      }
      // 小窗口关闭
    }, {
      key: "miniRecCloseClick",
      value: function miniRecCloseClick() {
        if (document.getElementById("miniRecbox")) {
          console.log('---------------------miniRecCloseClick');
          if (this.miniRecStatus == 'rec') {
            if (!!this.miniRecPlayer) {
              this.miniRecPlayer.stop();
            }
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("miniClose"));
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("miniRecbox"));
            // document.getElementById(`${this.jSPlugin.id}-wrap`).removeChild(document.getElementById(`miniSwitch`))
          }
        }
      }
      //小窗口切换
    }, {
      key: "miniRecSwitchClick",
      value: function miniRecSwitchClick() {
        console.log('---------------小窗口切换');
        var isEditing = this.decoderState.state.isEditing;
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.videoWidth;
        // let clientHeight = document.documentElement.clientHeight;
        var ratioClient = clientWidth / 375; //比例
        var clientHeight = clientWidth * 1.8;
        var headerHeight = 6;
        if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          headerHeight = document.getElementById("".concat(this.jSPlugin.id, "-headControl")).offsetHeight + clientHeight * 0.1 + 6;
        }
        console.log('headerHeight-------', headerHeight);
        var videoTop = headerHeight + this.videoHeight + 10 * ratioClient;
        console.log('videoTop-------', videoTop);
        //初始状态
        if (this.miniRecStatus == 'rec') {
          this.miniRecStatus = 'live';
          if (!isEditing) {
            this.miniRecPlayer.reSize(this.jSPlugin.width, this.jSPlugin.height);
          } else {
            document.getElementById("miniRec-embed").style.width = this.jSPlugin.width + 'px';
            document.getElementById("miniRec-embed").style.height = this.jSPlugin.height + 'px';
            document.getElementById("miniRec").style.width = this.jSPlugin.width + 'px';
            document.getElementById("miniRec").style.height = this.jSPlugin.height + 'px';
          }
          this.jSPlugin.reSize(160 * ratioClient, 90 * ratioClient);
          var videoMarginTop = this.videoHeight + 10 * ratioClient;
          var footerMarginTop = clientHeight * 0.2 - 90 * ratioClient - 10 * ratioClient;
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).style.width = this.videoWidth + 'px';
          document.getElementById("".concat(this.jSPlugin.id)).style.marginTop = videoMarginTop + 'px';
          document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft = clientWidth - 160 * ratioClient - 9 + 'px';
          document.getElementById("".concat(this.jSPlugin.id)).style.overflow = 'hidden';
          document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius = '8px';
          document.getElementById("miniRecbox").style.top = headerHeight + 'px';
          document.getElementById("miniRecbox").style.left = '0';
          document.getElementById("miniRecbox").style.right = '0';
          document.getElementById("miniRecbox").style.borderRadius = '0px';
          document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.marginTop = footerMarginTop + 'px';
        } else {
          //切换回来
          console.log(this.jSPlugin.width);
          this.miniRecStatus = 'rec';
          if (!isEditing) {
            this.miniRecPlayer.reSize(160 * ratioClient, 90 * ratioClient);
          } else {
            document.getElementById("miniRec-embed").style.width = 160 * ratioClient + 'px';
            document.getElementById("miniRec-embed").style.height = 90 * ratioClient + 'px';
            document.getElementById("miniRec").style.width = 160 * ratioClient + 'px';
            document.getElementById("miniRec").style.height = 90 * ratioClient + 'px';
          }
          this.jSPlugin.reSize(this.videoWidth, this.videoHeight);
          document.getElementById("".concat(this.jSPlugin.id, "-wrap")).style.width = this.videoWidth + +'px';
          document.getElementById("".concat(this.jSPlugin.id)).style.marginTop = '0';
          document.getElementById("".concat(this.jSPlugin.id)).style.marginLeft = '0';
          document.getElementById("".concat(this.jSPlugin.id)).style.overflow = 'hidden';
          document.getElementById("".concat(this.jSPlugin.id)).style.borderRadius = '0px';
          document.getElementById("miniRecbox").style.top = videoTop + 'px';
          document.getElementById("miniRecbox").style.right = '9px';
          document.getElementById("miniRecbox").style.left = 'auto';
          document.getElementById("miniRecbox").style.borderRadius = '8px';
          document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.marginTop = clientHeight * 0.2 + 'px';
        }
      }
      // 处理按钮
    }, {
      key: "matchBtn",
      value: function matchBtn(btnId, btnData) {
        var _this4 = this;
        var _this$themeData2 = this.themeData,
          header = _this$themeData2.header,
          footer = _this$themeData2.footer;
        var _this$decoderState$st3 = this.decoderState.state,
          mute = _this$decoderState$st3.mute,
          rejection = _this$decoderState$st3.rejection;
        document.documentElement.clientHeight;
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.videoWidth;
        var ratioClient = clientWidth / 375; //比例
        var sizeRatio = this.videoWidth / 375 || 1;
        var btnItem = {
          title: "",
          id: "",
          domString: "",
          color: "#FFFFFF",
          activeColor: "#FFFFFF",
          onclick: function onclick() {},
          onmoveleft: function onmoveleft() {},
          onmoveright: function onmoveright() {},
          onremove: function onremove() {}
        };
        var _index = header[this.bellStatus].btnList.findIndex(function (item) {
          return item.iconId === btnId;
        });
        if (_index === -1) {
          btnItem.color = footer[this.bellStatus].color;
          btnItem.backgroundColor = footer[this.bellStatus].backgroundColor;
          btnItem.activeColor = footer[this.bellStatus].activeColor;
        } else {
          btnItem.color = header[this.bellStatus].color;
          btnItem.backgroundColor = header[this.bellStatus].backgroundColor;
          btnItem.activeColor = header[this.bellStatus].activeColor;
        }
        var btnWidth = this.videoWidth / 4; // 按钮宽度
        switch (btnId) {
          case 'ringStatus':
            btnItem.title = this.activeThemeStatus ? "有人按门铃" : this.activeThemeStatusTxt;
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onBell-ringStatus\" style=\"color:".concat(btnData.color || '#2C2C2C', ";font-size: ").concat(24 * sizeRatio, "px;display: block;font-weight: 600;\" >").concat(this.activeThemeStatus ? "有人按门铃" : this.activeThemeStatusTxt, "</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'deviceCategory':
            btnItem.title = "设备名称";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onBell-deviceCategory\" \n          style=\"color:".concat(btnData.color || '#2C2C2C', ";\n          font-size: ").concat(14 * sizeRatio, "px;\n          padding-top: ").concat(5 * sizeRatio, "px;\n          display: block;\n          max-width: 100%;\n          overflow: hidden;\n          text-overflow: ellipsis;\n          white-space: nowrap;\n          \">").concat(this.deviceInfoData && this.deviceInfoData.deviceName || '设备名称', "</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'callStatus':
            btnItem.title = "通话中";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onCall-ringStatus\" style=\"color:".concat(btnData.color || '#2C2C2C', ";font-size: ").concat(24 * sizeRatio, "px;display: block;font-weight: 600;\" >\u901A\u8BDD\u4E2D</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'deviceCategory':
            btnItem.title = "设备名称";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"header-onCall-deviceCategory\" \n          style=\"color:".concat(btnData.color || '#2C2C2C', ";\n          font-size: ").concat(14 * sizeRatio, "px;\n          padding-top: ").concat(5 * sizeRatio, "px;\n          display: block;\n          max-width: 100%;\n          overflow: hidden;\n          text-overflow: ellipsis;\n          white-space: nowrap;\n          \">").concat(this.deviceInfoData && this.deviceInfoData.deviceName || '设备名称', "</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'rejection':
            btnItem.title = "拒绝";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.66, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width:").concat(btnWidth * 0.66, "px;height: ").concat(btnWidth * 0.66, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.4, "px\" height=\"").concat(btnWidth * 0.4, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u62D2\u7EDD</title>\n                        <g id=\"icon/\u62D2\u7EDD\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z\" id=\"\u8DEF\u5F84\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) \"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u62D2\u7EDD</div>\n            </div>");
            btnItem.onclick = function () {
              var that = _this4;
              var _this4$decoderState$s = _this4.decoderState.state,
                play = _this4$decoderState$s.play,
                isEditing = _this4$decoderState$s.isEditing,
                rejection = _this4$decoderState$s.rejection;
              if (isEditing || rejection) {
                return false;
              }
              console.log('拒绝');
              if (play) {
                _this4.jSPlugin.stop();
              }
              //停止响铃
              _this4.removeBellRing();
              _this4.setDecoderState({
                play: false,
                rejection: true
              });
              //小窗口关闭
              that.miniRecCloseClick();
              // 拒绝/挂断状态处理
              _this4.rejectionStatusDispose();
              // 拒绝回调
              if (typeof _this4.jSPlugin.hangUpCallback === 'function') {
                _this4.jSPlugin.hangUpCallback('rejection');
              }
            };
            return btnItem;
          case 'quickReply':
            btnItem.title = "快捷回复";
            btnItem.id = btnId;
            btnItem.domString = "<div id=\"".concat(this.jSPlugin.id, "-btn-quickReply\" style=\"width: ").concat(126 * ratioClient, "px;height: ").concat(40 * ratioClient, "px;color:").concat(rejection ? 'rgba(44,44,44,0.5)' : btnItem.color, ";background: #F8F8F8;border-radius: 20px;display: flex;flex-direction: row;align-items: center;justify-content: center;-webkit-tap-highlight-color:transparent;\">\n                <div>\n                  <svg width=\"").concat(24 * ratioClient, "px\" height=\"").concat(24 * ratioClient, "px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                      <title>\u5FEB\u6377\u56DE\u590D</title>\n                      <g id=\"icon/H5\u5FEB\u6377\u56DE\u590D\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                          <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n                          <path d=\"M10.7238197,2.25008794 C16.2230834,2.09766093 20.7496,6.50749909 20.7496,11.9958 C20.7496,13.4362841 20.4368194,14.8344518 19.8413577,16.1117061 L19.9440524,15.8792521 L21.0527769,21.184554 C21.1496277,21.6485507 20.8013031,22.0657304 20.3577211,22.0873894 L20.2613374,22.0858497 L20.1628027,22.0714397 L14.866,20.946 L14.7518767,20.9973203 C13.6930577,21.439776 12.5585243,21.69208 11.3902258,21.7381162 L11.3902258,21.7381162 L10.9996,21.7458 C5.51196728,21.7458 1.10147008,17.2189531 1.25388722,11.7200456 C1.39490345,6.62610538 5.62990538,2.39110345 10.7238197,2.25008794 Z M11.0183931,3.74628651 L10.7653544,3.74951278 C6.46729462,3.86849655 2.87229655,7.46349462 2.75331206,11.7615803 C2.62431432,16.4155628 6.35610614,20.2458 10.9996,20.2458 C12.2165433,20.2458 13.3936843,19.9831552 14.4692454,19.4827855 C14.6166569,19.4142071 14.7823612,19.395387 14.9413973,19.4291603 L14.9413973,19.4291603 L19.349,20.365 L18.4274231,15.948046 C18.4026128,15.8291836 18.4071487,15.7066932 18.4398273,15.5909727 L18.4398273,15.5909727 L18.4818423,15.4778939 C18.9851908,14.3982208 19.2496,13.216279 19.2496,11.9958 C19.2496,7.35166383 15.4197191,3.62050444 10.7653544,3.74951278 Z M10.9996,10.7498 C11.6896,10.7498 12.2496,11.3098 12.2496,11.9998 C12.2496,12.6898 11.6896,13.2498 10.9996,13.2498 C10.3096,13.2498 9.7496,12.6898 9.7496,11.9998 C9.7496,11.3098 10.3096,10.7498 10.9996,10.7498 Z M6.9996,10.7498 C7.6896,10.7498 8.2496,11.3098 8.2496,11.9998 C8.2496,12.6898 7.6896,13.2498 6.9996,13.2498 C6.3096,13.2498 5.7496,12.6898 5.7496,11.9998 C5.7496,11.3098 6.3096,10.7498 6.9996,10.7498 Z M14.9996,10.7498 C15.6896,10.7498 16.2496,11.3098 16.2496,11.9998 C16.2496,12.6898 15.6896,13.2498 14.9996,13.2498 C14.3096,13.2498 13.7496,12.6898 13.7496,11.9998 C13.7496,11.3098 14.3096,10.7498 14.9996,10.7498 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"").concat(rejection ? 'rgba(44,44,44,0.5)' : '#2c2c2c', "\" fill-rule=\"nonzero\"></path>\n                      </g>\n                  </svg>\n                </div>\n                <div style=\"margin-left: 5px;user-select: none;font-size:14px\">\u5FEB\u6377\u56DE\u590D<div>\n            </div>");
            btnItem.onclick = function () {
              var _this4$decoderState$s2 = _this4.decoderState.state,
                isEditing = _this4$decoderState$s2.isEditing,
                rejection = _this4$decoderState$s2.rejection;
              if (isEditing || rejection) {
                return false;
              }
              console.log('快捷回复');
              _this4.switchFooter('quickReply');
              _this4.quickReplyEle = new MobileQuickReplyEle(_this4.jSPlugin, _this4.switchFooter, _this4.videoWidth);
            };
            return btnItem;
          case 'answer':
            btnItem.title = "接听";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.66, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width: ").concat(btnWidth * 0.66, "px;height: ").concat(btnWidth * 0.66, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.4, "px\" height=\"").concat(btnWidth * 0.4, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u63A5\u542C</title>\n                        <g id=\"icon/\u63A5\u542C\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M15.7728281,19.6822968 C13.2528132,17.165123 10.8435994,14.2473605 11.9999084,13.0938925 C13.6505608,11.4432401 15.0881341,10.4261428 12.1646895,6.78675259 C9.23840386,3.14452132 7.28659974,5.94011849 5.68708632,7.53963191 C3.84324225,9.38631703 5.59049048,16.2645088 12.3891328,23.0659922 C19.1877751,29.8646345 26.0688079,31.6147238 27.9154931,29.7680386 C29.5150065,28.1685252 32.3106036,26.2195622 28.6712134,23.2932765 C25.0318232,20.3669909 24.0147259,21.8045642 22.3640735,23.4580576 C21.2077645,24.6086845 18.2928431,22.1994707 15.7728281,19.6822968 Z\" id=\"\u8DEF\u5F84\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(17.727936, 17.728157) rotate(-360.000000) translate(-17.727936, -17.728157) \"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u63A5\u542C</div>\n            </div>");
            btnItem.onclick = function () {
              var _this4$decoderState$s3 = _this4.decoderState.state,
                play = _this4$decoderState$s3.play,
                isEditing = _this4$decoderState$s3.isEditing,
                talk = _this4$decoderState$s3.talk,
                sound = _this4$decoderState$s3.sound,
                rejection = _this4$decoderState$s3.rejection;
              if (isEditing || rejection) {
                return false;
              }
              console.log('接听');
              _this4.jSPlugin.pluginStatus.loadingClear();
              _this4.bellStatus = 'onCall';
              _this4.switchFooter('onCall');
              footer[_this4.bellStatus].btnList.map(function (item, index) {
                if (item.isrender) {
                  _this4.renderFooter(item.iconId, item);
                }
              });
              header[_this4.bellStatus].btnList.map(function (item, index) {
                if (item.isrender) {
                  _this4.renderHeader(item.iconId, item);
                }
              });
              var bellHeaderDom = document.getElementById("".concat(_this4.jSPlugin.id, "-header-onBell"));
              if (bellHeaderDom) {
                bellHeaderDom.parentElement.removeChild(bellHeaderDom);
              }
              //判断是否配置了默认封面
              if (_this4.themeData.customConfig.bellPoster == 1) {
                if (document.getElementById("bellring-icon")) {
                  document.getElementById("".concat(_this4.jSPlugin.id, "-wrap")).removeChild(document.getElementById("bellring-icon"));
                }
                _this4.jSPlugin.setPoster(''); //清除封面
              }

              //停止响铃
              _this4.removeBellRing();

              //小窗口关闭
              _this4.miniRecCloseClick();
              if (!play) {
                _this4.jSPlugin.pluginStatus.loadingStart(_this4.jSPlugin.id);
                _this4.jSPlugin.pluginStatus.loadingSetText({
                  text: '视频加载中'
                });
                _this4.jSPlugin.play();
                _this4.setDecoderState({
                  play: !play
                });
              }
              if (!talk && _this4.themeData.customConfig.defaultMicro == 1) {
                _this4.setDecoderState({
                  talk: true,
                  mute: false
                });
                if (sound) {
                  _this4.jSPlugin.closeSound();
                }
                _this4.jSPlugin.Talk.startTalk();
              }
              _this4.setDecoderState({
                sound: false
              });
              //是否默认开启麦克风
              if (_this4.themeData.customConfig.defaultMicro == 0) {
                _this4.muteCommon(btnData);
                _this4.jSPlugin.openSound();
                _this4.setDecoderState({
                  sound: true
                });
              }
              //最长通话时长
              _this4.maxTalkTime = _this4.themeData.customConfig.maxTalkTime * 1000 * 60;
              var that = _this4;
              setTimeout(function () {
                if (talk) {
                  console.log('结束对讲');
                  that.setDecoderState({
                    talk: false
                  });
                  that.jSPlugin.Talk.stopTalk();
                }
                if (play) {
                  that.jSPlugin.stop();
                  that.setDecoderState({
                    play: !play
                  });
                }
                // 拒绝/挂断状态处理
                _this4.rejectionStatusDispose();
                // 关闭远程开锁
                if (!!_this4.remoteUnlockEle) {
                  _this4.remoteUnlockEle.closeRemoteUnlock();
                }
                //挂断回调
                if (typeof _this4.jSPlugin.hangUpCallback === 'function') {
                  _this4.jSPlugin.hangUpCallback('hangUp');
                }
              }, _this4.maxTalkTime);
            };
            return btnItem;
          case 'remoteUnlock':
            btnItem.title = "远程开锁";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.66, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width: ").concat(btnWidth * 0.66, "px;height: ").concat(btnWidth * 0.66, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.4, "px\" height=\"").concat(btnWidth * 0.4, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u5F00\u9501</title>\n                        <g id=\"icon/\u5F00\u9501\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M18,4 C21.3137085,4 24,6.6862915 24,10 L24,10 L24,19.787 L29.5,19.7875 C30.0522847,19.7875 30.5,20.2352153 30.5,20.7875 C30.5,21.3397847 30.0522847,21.7875 29.5,21.7875 L24,21.787 L24,26 C24,29.2383969 21.4344251,31.8775718 18.2249383,31.9958615 L18,32 C14.6862915,32 12,29.3137085 12,26 L12,26 L12,10 C12,6.6862915 14.6862915,4 18,4 Z M18,6 C15.790861,6 14,7.790861 14,10 L14,10 L14,26 C14,28.209139 15.790861,30 18,30 C20.209139,30 22,28.209139 22,26 L22,26 L22,21.787 L18.5,21.7875 C17.9477153,21.7875 17.5,21.3397847 17.5,20.7875 C17.5,20.2352153 17.9477153,19.7875 18.5,19.7875 L22,19.787 L22,10 C22,7.85780461 20.3160315,6.10892112 18.1996403,6.00489531 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u8FDC\u7A0B\u5F00\u9501</div>\n            </div>");
            btnItem.onclick = function () {
              var _this4$decoderState$s4 = _this4.decoderState.state,
                isEditing = _this4$decoderState$s4.isEditing;
                _this4$decoderState$s4.play;
                var rejection = _this4$decoderState$s4.rejection;
              if (isEditing || _this4.bellStatus == 'onBell' || rejection) {
                return false;
              }
              console.log('远程开锁');
              _this4.switchFooter('remoteUnlock');
              _this4.remoteUnlockEle = new MobileRemoteUnlockEle(_this4.jSPlugin, _this4.switchFooter, _this4.videoWidth);
            };
            return btnItem;
          case 'mute':
            btnItem.title = "静音";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.66, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div id=\"").concat(this.jSPlugin.id, "-icon-mute\" style=\"width: ").concat(btnWidth * 0.66, "px;height: ").concat(btnWidth * 0.66, "px;border-radius: 50%;border: 1px solid ").concat(rejection ? '#cccccc' : btnData.backgroundColor, ";background: ").concat(rejection && mute ? '#cccccc' : '#ffffff', ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.4, "px\" height=\"").concat(btnWidth * 0.4, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>icon/\u9759\u97F3</title>\n                        <g id=\"icon/\u9759\u97F3\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path id=\"icon-mute-path\" d=\"M29.2988305,7.56559704 C29.8540627,8.1086468 29.8980234,8.97727504 29.4240597,9.57172938 L29.3223594,9.6867869 L22.585,16.574 L22.5859243,26.0592702 C22.5859243,26.9500521 21.8638029,27.6721735 20.973021,27.6721735 C20.6007147,27.6721735 20.2398727,27.5433734 19.9517149,27.3076254 L15.583,23.733 L10.4341733,28.9987008 C9.85492024,29.5909486 8.9052312,29.6014828 8.31298346,29.0222298 C7.75775121,28.47918 7.71379057,27.6105518 8.18775419,27.0160974 L8.28945454,26.9010399 L27.1776406,7.58912597 C27.7568937,6.99687823 28.7065827,6.98634397 29.2988305,7.56559704 Z M22.2503608,7.16816759 C22.4679282,7.45036017 22.5859243,7.79665625 22.5859243,8.15298221 L22.585,9.899 L10.778,21.971 L9.47580645,21.9713498 C7.69424274,21.9713498 6.25,20.5271071 6.25,18.7455434 L6.25,15.65293 C6.25,13.8713663 7.69424274,12.4271235 9.47580645,12.4271235 L12.787,12.427 L19.9882064,6.87564241 C20.6936617,6.33174431 21.7064627,6.46271229 22.2503608,7.16816759 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"").concat(mute ? '#ffffff' : rejection ? '#cccccc' : btnData.backgroundColor, "\"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u9759\u97F3</div>\n            </div>");
            btnItem.onclick = function () {
              var _this4$decoderState$s5 = _this4.decoderState.state,
                talk = _this4$decoderState$s5.talk,
                sound = _this4$decoderState$s5.sound;
                _this4$decoderState$s5.play;
                var rejection = _this4$decoderState$s5.rejection;
              if (rejection) {
                return false;
              }
              console.log('静音');
              if (talk) {
                console.log('结束对讲');
                _this4.setDecoderState({
                  talk: false,
                  mute: true
                }, btnData.backgroundColor);
                _this4.jSPlugin.Talk.stopTalk();
                _this4.jSPlugin.openSound();
                _this4.setDecoderState({
                  sound: true
                });
              } else {
                console.log('开始对讲');
                _this4.setDecoderState({
                  talk: true,
                  mute: false
                }, btnData.backgroundColor);
                if (sound) {
                  _this4.jSPlugin.closeSound();
                  _this4.setDecoderState({
                    sound: false
                  });
                }
                _this4.jSPlugin.Talk.startTalk();
              }
            };
            return btnItem;
          case 'hangUp':
            btnItem.title = "挂断";
            btnItem.id = btnId;
            btnItem.domString = "<div style=\"width: ".concat(btnWidth * 0.66, "px;display: flex;flex-direction: column;align-items: center;\">\n                <div style=\"width:").concat(btnWidth * 0.66, "px;height: ").concat(btnWidth * 0.66, "px;border-radius: 50%;background: ").concat(rejection ? '#CCCCCC' : btnData.backgroundColor, ";display: flex;align-items: center;justify-content: center;\" >\n                    <svg width=\"").concat(btnWidth * 0.4, "px\" height=\"").concat(btnWidth * 0.4, "px\" viewBox=\"0 0 36 36\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                        <title>\u6302\u65AD</title>\n                        <g id=\"icon/\u6302\u65AD\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                            <rect id=\"Rectangle\" x=\"0\" y=\"0\" width=\"36\" height=\"36\"></rect>\n                            <path d=\"M16.0428281,19.9522968 C13.5228132,17.435123 11.1135994,14.5173605 12.2699084,13.3638925 C13.9205608,11.7132401 15.3581341,10.6961428 12.4346895,7.05675259 C9.50840386,3.41452132 7.55659974,6.21011849 5.95708632,7.80963191 C4.11324225,9.65631703 5.86049048,16.5345088 12.6591328,23.3359922 C19.4577751,30.1346345 26.3388079,31.8847238 28.1854931,30.0380386 C29.7850065,28.4385252 32.5806036,26.4895622 28.9412134,23.5632765 C25.3018232,20.6369909 24.2847259,22.0745642 22.6340735,23.7280576 C21.4777645,24.8786845 18.5628431,22.4694707 16.0428281,19.9522968 Z\" id=\"\u8DEF\u5F84\" fill=\"#FFFFFF\" fill-rule=\"nonzero\" transform=\"translate(17.997936, 17.998157) rotate(135.000000) translate(-17.997936, -17.998157) \"></path>\n                        </g>\n                    </svg>\n                </div>\n                <div style=\"margin-top: ").concat(btnWidth * 0.1, "px;user-select: none;\">\u6302\u65AD</div>\n            </div>");
            btnItem.onclick = function () {
              var that = _this4;
              var _this4$decoderState$s6 = _this4.decoderState.state,
                talk = _this4$decoderState$s6.talk,
                play = _this4$decoderState$s6.play,
                rejection = _this4$decoderState$s6.rejection;
              if (rejection) {
                return false;
              }
              if (talk) {
                console.log('结束对讲');
                _this4.setDecoderState({
                  talk: false
                });
                _this4.jSPlugin.Talk.stopTalk();
              }
              if (play) {
                _this4.jSPlugin.stop();
                _this4.setDecoderState({
                  play: !play
                });
              }
              if (play || talk) {
                //小窗口关闭
                that.miniRecCloseClick();
                console.log('挂断');
                // 拒绝/挂断状态处理
                _this4.rejectionStatusDispose();
                // 挂断回调
                if (typeof _this4.jSPlugin.hangUpCallback === 'function') {
                  _this4.jSPlugin.hangUpCallback('hangUp');
                }
              }
            };
            return btnItem;
          default:
            return btnItem;
        }
      }

      //应答超时处理
    }, {
      key: "answerOvertime",
      value: function answerOvertime() {
        this.toastCustom.initToastContent('应答超时');
        var play = this.decoderState.state.play;
        console.log('应答超时');
        if (play) {
          this.jSPlugin.stop();
        }
        this.setDecoderState({
          play: false,
          rejection: true
        });
        //小窗口关闭
        this.miniRecCloseClick();
        // 拒绝/挂断状态处理
        this.rejectionStatusDispose();
        // 关闭快捷回复
        if (!!this.quickReplyEle) {
          this.quickReplyEle.closeQuickReplyEle();
        }
        // 拒绝回调
        if (typeof this.jSPlugin.hangUpCallback === 'function') {
          this.jSPlugin.hangUpCallback('rejection');
        }
      }

      //拒绝/挂断状态处理
    }, {
      key: "rejectionStatusDispose",
      value: function rejectionStatusDispose() {
        var _this5 = this;
        var footer = this.themeData.footer;
        var footerDom = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var footerDomCall = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        var footerDomQuickReply = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn"));
        var headerRingStatusDom = document.getElementById("header-".concat(this.bellStatus, "-ringStatus"));
        if (this.bellStatus == 'onBell') {
          footerDom.innerHTML = "";
          footerDomQuickReply.innerHTML = "";
          footerDom.style.color = '#2C2C2C';
        } else {
          footerDomCall.innerHTML = "";
          footerDomCall.style.color = '#2C2C2C';
        }
        console.log('rejectionStatusDispose');
        this.setDecoderState({
          rejection: true
        });
        footer[this.bellStatus].btnList.map(function (item, index) {
          if (item.isrender) {
            _this5.renderFooter(item.iconId, item);
          }
        });
        headerRingStatusDom.innerText = "\u901A\u8BDD\u5DF2\u7ED3\u675F";
        this.jSPlugin.pluginStatus.loadingClear();
        this.jSPlugin.pluginStatus.loadingSetTextWithBtn({
          text: '通话已结束',
          color: 'white',
          isMobile: true,
          type: 2
        });
      }

      // 用户不拥有该设备
    }, {
      key: "userNoDevice",
      value: function userNoDevice() {
        var _this6 = this;
        //停止响铃
        this.removeBellRing();
        this.setDecoderState({
          rejection: true
        });
        var footer = this.themeData.footer;
        var footerDom = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var footerDomCall = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        var footerDomQuickReply = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn"));
        if (this.bellStatus == 'onBell') {
          footerDom.innerHTML = "";
          footerDomQuickReply.innerHTML = "";
          footerDom.style.color = '#2C2C2C';
        } else {
          footerDomCall.innerHTML = "";
          footerDomCall.style.color = '#2C2C2C';
        }
        console.log('userNoDevice');
        this.setDecoderState({
          rejection: true
        });
        footer[this.bellStatus].btnList.map(function (item, index) {
          if (item.isrender) {
            _this6.renderFooter(item.iconId, item);
          }
        });
        this.jSPlugin.pluginStatus.loadingClear();
        this.jSPlugin.pluginStatus.loadingSetTextWithBtn({
          text: '该用户不拥有该设备',
          color: 'white',
          isMobile: true,
          type: 2
        });
      }

      // 加载header
    }, {
      key: "renderHeader",
      value: function renderHeader(id, item) {
        var _this7 = this;
        var objItem = this.matchBtn(id, item);
        if (document.getElementById("".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus, "-content"))) {
          var childDOM = document.createElement('span');
          childDOM.innerHTML = "".concat(objItem.domString);
          document.getElementById("".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus, "-content")).appendChild(childDOM);
        } else {
          var objDOM = document.createElement('div');
          objDOM.id = "".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus);
          objDOM.style = "max-width:50%;position:relative;";
          objDOM.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-header-").concat(this.bellStatus, "-content\" style=\"display:inline-block;height:auto;\";>\n            ").concat(objItem.domString, "\n          </span>");
          objDOM.onclick = function (e) {
            if (_this7.decoderState.state.isEditing) {
              return false;
            }
            objItem.onclick(e);
          };
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).childNodes[0].appendChild(objDOM);
        }
      }

      // 加载footer
    }, {
      key: "renderFooter",
      value: function renderFooter(id, item) {
        var _this8 = this;
        var mute = this.decoderState.state.mute;
        if (id == 'remoteUnlock' && !!this.jSPlugin.capacity && (!this.jSPlugin.capacity['support_unlock'] || this.jSPlugin.capacity['support_unlock'] == 0)) {
          return false;
        }
        var objItem = this.matchBtn(id, item);
        var btnWidth = this.videoWidth / 4; // 按钮宽度
        var objDOM = document.createElement('div');
        objDOM.className = "theme-icon-item";
        if (objItem.id !== "quickReply") {
          objDOM.style = "width:".concat(btnWidth * 0.66, "px;padding:0 ").concat(btnWidth * 0.12, "px;box-sizing: content-box;-webkit-tap-highlight-color:transparent;");
        }
        objDOM.innerHTML = "".concat("<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "\" style=\"position:relative;\">") // +`<span id="${this.jSPlugin.id}-${objItem.id}-left" class="ezuikit-theme-icon" title="左移" style="position: absolute;top: calc(50% - 26px);left: -6px;display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`  
        + "<div id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-content\" title=\"").concat(objItem.title, "\" style=\"display: flex;align-items: center;position:relative;\">")).concat(objItem.domString, "</div>") // +`<span id="${this.jSPlugin.id}-${objItem.id}-right" class="ezuikit-theme-icon" title="右移" style="position: absolute;top: calc(50% - 26px);left: calc(100% - 0px);display: none;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="12" height="24" viewBox="0 0 10 15" style="background:#00000080"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>`
        + '</span>';
        objDOM.onclick = function (e) {
          if (_this8.decoderState.state.isEditing || !_this8.activeThemeStatus) {
            return false;
          }
          objItem.onclick(e);
        };
        if (objItem.onmouseenter) {
          objDOM.onmouseenter = function (e) {
            if (_this8.decoderState.state.isEditing || !_this8.activeThemeStatus) {
              return false;
            }
            objItem.onmouseenter(e);
          };
        }
        if (objItem.onmouseleave) {
          objDOM.onmouseleave = function (e) {
            if (_this8.decoderState.state.isEditing || !_this8.activeThemeStatus) {
              return false;
            }
            objItem.onmouseleave(e);
          };
        }
        if (id != 'quickReply') {
          var toLeft = document.createElement('span');
          toLeft.className = "icon-move left";
          // toLeft.innerHTML =  `<span id="${this.jSPlugin.id}-${objItem.id}-left" title="左移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: 1px;display: inline-block;border-radius: 2px;overflow: hidden;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="10" height="40" viewBox="0 0 10 15" style="background:#595959;"><path d="M7.4,10V5.3c0-0.3-0.3-0.6-0.6-0.6c-0.1,0-0.3,0.1-0.4,0.2L3.7,7.4c-0.2,0.2-0.3,0.6,0,0.8 c0,0,0,0,0.1,0.1l2.7,2.2c0.2,0.2,0.6,0.2,0.8-0.1C7.3,10.3,7.4,10.2,7.4,10z"></path></svg></span>`;
          toLeft.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-left\" title=\"\u5DE6\u79FB\" style=\"height: 40px;position: absolute;top: calc(50% - 33px);left: 1px;display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;\">\n          <svg width=\"10px\" height=\"40px\" viewBox=\"0 0 10 40\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <title></title>\n              <g id=\"\u547C\u53EB\u6A21\u677F-\u63A7\u5236\u53F0\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                  <g id=\"H5\u547C\u53EB\u6A21\u677F\" transform=\"translate(-614.000000, -5024.000000)\">\n                      <g id=\"\u7F16\u7EC4-28\" transform=\"translate(421.000000, 4484.000000)\">\n                          <g id=\"\u7F16\u7EC4-9\" transform=\"translate(23.000000, 522.000000)\">\n                              <g id=\"\u7F16\u7EC4\" transform=\"translate(170.000000, 0.000000)\">\n                                  <g id=\"\u7BAD\u5934\u5DE6\" transform=\"translate(0.000000, 18.000000)\">\n                                      <rect id=\"\u77E9\u5F62\" fill=\"#595959\" x=\"0\" y=\"0\" width=\"10\" height=\"40\" rx=\"2\"></rect>\n                                      <g id=\"1.\u901A\u7528/2.Icon\u56FE\u6807/Common/Fill/Left\" transform=\"translate(1.000000, 15.000000)\" fill=\"#FFFFFF\">\n                                          <path d=\"M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z\" id=\"\u4E09\u89D2\u5F62\" transform=\"translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) \"></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n          </span>");
          toLeft.onclick = function () {
            _this8.editIcon(objItem.id, 'left', 'footer');
          };
          objDOM.appendChild(toLeft);
          var toRight = document.createElement('span');
          toRight.className = "icon-move right";
          // toRight.innerHTML = `<span id="${this.jSPlugin.id}-${objItem.id}-right" class="ezuikit-theme-icon" title="右移" style="height: 40px;position: absolute;top: calc(50% - 33px);left: calc(100% - 11px);display: inline-block;border-radius: 2px;overflow: hidden;"><svg fill="#ffffff" version="1.1" xmlns="http://www.w3.org/2000/svg" width="10" height="40" viewBox="0 0 10 15" style="background:#595959"><path d="M3.4,5.2v4.7c0,0.3,0.3,0.6,0.6,0.6c0.1,0,0.3-0.1,0.4-0.2l2.7-2.5c0.2-0.2,0.3-0.6,0-0.8 c0,0,0,0-0.1-0.1L4.4,4.8C4.1,4.6,3.8,4.6,3.6,4.9C3.5,5,3.4,5.1,3.4,5.2z"></path></svg></span>`;
          toRight.innerHTML = "<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-right\" class=\"ezuikit-theme-icon\" title=\"\u53F3\u79FB\" style=\"height: 40px;position: absolute;top: calc(50% - 33px);left: calc(100% - 11px);display: inline-block;border-radius: 2px;overflow: hidden;cursor: pointer;\">\n          <svg width=\"10px\" height=\"40px\" viewBox=\"0 0 10 40\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <title></title>\n              <g id=\"\u547C\u53EB\u6A21\u677F-\u63A7\u5236\u53F0\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                  <g id=\"H5\u547C\u53EB\u6A21\u677F\" transform=\"translate(-684.000000, -5024.000000)\">\n                      <g id=\"\u7F16\u7EC4-28\" transform=\"translate(421.000000, 4484.000000)\">\n                          <g id=\"\u7F16\u7EC4-9\" transform=\"translate(23.000000, 522.000000)\">\n                              <g id=\"\u7F16\u7EC4\" transform=\"translate(170.000000, 0.000000)\">\n                                  <g id=\"\u7BAD\u5934\u53F3\" transform=\"translate(70.000000, 18.000000)\">\n                                      <rect id=\"\u77E9\u5F62\" fill=\"#595959\" x=\"0\" y=\"0\" width=\"10\" height=\"40\" rx=\"2\"></rect>\n                                      <g id=\"1.\u901A\u7528/2.Icon\u56FE\u6807/Common/Fill/Left\" transform=\"translate(5.500000, 20.000000) scale(-1, 1) translate(-5.500000, -20.000000) translate(2.000000, 15.000000)\" fill=\"#FFFFFF\">\n                                          <path d=\"M3.88411064,2.46093277 L7.81658983,7.1799078 C7.99337187,7.39204625 7.96470984,7.7073286 7.75257139,7.88411064 C7.66271389,7.95899189 7.54944745,8 7.43247919,8 L-0.432479194,8 C-0.708621569,8 -0.932479194,7.77614237 -0.932479194,7.5 C-0.932479194,7.38303175 -0.891471084,7.2697653 -0.816589833,7.1799078 L3.11588936,2.46093277 C3.2926714,2.24879432 3.60795375,2.22013229 3.8200922,2.39691433 C3.84332373,2.41627394 3.86475103,2.43770124 3.88411064,2.46093277 Z\" id=\"\u4E09\u89D2\u5F62\" transform=\"translate(3.500000, 5.000000) scale(-1, -1) rotate(-270.000000) translate(-3.500000, -5.000000) \"></path>\n                                      </g>\n                                  </g>\n                              </g>\n                          </g>\n                      </g>\n                  </g>\n              </g>\n          </svg>\n          </span>");
          toRight.onclick = function () {
            _this8.editIcon(objItem.id, 'right', 'footer');
          };
          objDOM.appendChild(toRight);
        }
        if (id == 'answer' || id == 'rejection' || id == 'hangUp') ; else {
          var toClose = document.createElement('span');
          toClose.className = "icon-move close";
          toClose.innerHTML = "<span id=\"".concat(objItem.id, "-remove\" class=\"ezuikit-theme-icon\" title=\"\u79FB\u9664\" style=\"position: absolute;top: -6px;right: -2px;cursor: pointer;\">\n            <svg width=\"16px\" height=\"16px\" viewBox=\"0 0 18 18\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <title></title>\n                <g id=\"\u547C\u53EB\u6A21\u677F-\u63A7\u5236\u53F0\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"H5\u547C\u53EB\u6A21\u677F\" transform=\"translate(-680.000000, -5006.000000)\">\n                        <g id=\"\u7F16\u7EC4-28\" transform=\"translate(421.000000, 4484.000000)\">\n                            <g id=\"\u7F16\u7EC4-9\" transform=\"translate(23.000000, 522.000000)\">\n                                <g id=\"\u7F16\u7EC4\" transform=\"translate(170.000000, 0.000000)\">\n                                    <g id=\"\u5173\u95ED1\" transform=\"translate(66.000000, 0.000000)\">\n                                        <rect id=\"\u77E9\u5F62\" fill-rule=\"nonzero\" x=\"0\" y=\"0\" width=\"18\" height=\"18\"></rect>\n                                        <path d=\"M9,1.125 C4.65117188,1.125 1.125,4.65117188 1.125,9 C1.125,13.3488281 4.65117188,16.875 9,16.875 C13.3488281,16.875 16.875,13.3488281 16.875,9 C16.875,4.65117188 13.3488281,1.125 9,1.125 Z M11.9074219,11.9917969 L10.7472656,11.9865234 L9,9.90351562 L7.25449219,11.9847656 L6.09257813,11.9900391 C6.01523438,11.9900391 5.95195313,11.9285156 5.95195313,11.8494141 C5.95195313,11.8160156 5.96425781,11.784375 5.98535156,11.7580078 L8.27226563,9.03339844 L5.98535156,6.31054687 C5.96425781,6.28417969 5.95195313,6.25253906 5.95195313,6.21914062 C5.95195313,6.14179687 6.01523438,6.07851562 6.09257813,6.07851562 L7.25449219,6.08378906 L9,8.16679687 L10.7455078,6.08554688 L11.9056641,6.08027344 C11.9830078,6.08027344 12.0462891,6.14179687 12.0462891,6.22089844 C12.0462891,6.25429687 12.0339844,6.2859375 12.0128906,6.31230469 L9.72949219,9.03515625 L12.0146484,11.7597656 C12.0357422,11.7861328 12.0480469,11.8177734 12.0480469,11.8511719 C12.0480469,11.9285156 11.9847656,11.9917969 11.9074219,11.9917969 Z\" id=\"\u5F62\u72B6\" fill=\"#595959\"></path>\n                                    </g>\n                                </g>\n                            </g>\n                        </g>\n                    </g>\n                </g>\n            </svg>\n          </span>");
          toClose.onclick = function () {
            _this8.editIcon(objItem.id, 'delete', 'footer');
          };
          objDOM.appendChild(toClose);
        }
        if (this.bellStatus == 'onCall') {
          //通话中
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).appendChild(objDOM);
        } else {
          //响铃中
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).appendChild(objDOM);
          if (objItem.id === "quickReply") {
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn")).appendChild(objDOM);
          }
        }
        if (this.decoderState.state.isEditing && id == 'mute' && this.bellStatus == 'onCall') {
          //控制台直接设置通话中静音设置
          //是否默认开启麦克风
          if (this.themeData.customConfig.defaultMicro == 0 && !mute) {
            this.setDecoderState({
              mute: true
            }, item.backgroundColor);
          } else {
            this.setDecoderState({
              mute: false
            }, item.backgroundColor);
          }
        }
      }

      //切换footer区域显示的内容 onBell 响铃 onCall 通话 quickReply 快捷回复 remoteUnlock 远程开锁
    }, {
      key: "switchFooter",
      value: function switchFooter(type) {
        var footer = this.themeData.footer;
        switch (type) {
          case 'onBell':
            // document.getElementById(`${this.jSPlugin.id}-audioControls-quickReply`).style.display = 'none'
            if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"))) {
              if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.display == 'none') {
                document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'flex';
                document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn")).style.display = 'flex';
                document.getElementById("".concat(this.jSPlugin.id, "-btn-quickReply")).style.display = 'flex';
              }
            } else {
              document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'flex';
              document.getElementById("".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn")).style.display = 'flex';
              document.getElementById("".concat(this.jSPlugin.id, "-btn-quickReply")).style.display = 'flex';
            }
            break;
          case 'onCall':
            // document.getElementById(`${this.jSPlugin.id}-audioControls-remoteUnlock`).style.display = 'none'
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.display = 'none';
            document.getElementById("".concat(this.jSPlugin.id, "-btn-quickReply")).style.display = 'none';
            document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.display = 'flex';
            if (!!this.themeData) {
              document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.color = footer[this.bellStatus].color;
            }
            break;
        }
      }
    }, {
      key: "initThemeData",
      value:
      //加载渲染模板数据
      function initThemeData() {
        var _this9 = this;
        console.log('-------------initThemeData');
        var _this$themeData3 = this.themeData,
          header = _this$themeData3.header,
          footer = _this$themeData3.footer;
        var isEditing = this.decoderState.state.isEditing;
        // let clientHeight = document.documentElement.clientHeight;
        // let clientWidth = document.documentElement.clientWidth;
        var clientWidth = this.videoWidth;
        var ratioClient = clientWidth / 375; //比例
        var clientHeight = clientWidth * 1.8;
        var videoId = this.jSPlugin.id;
        this.isNeedRenderHeader = _.findIndex(header[this.bellStatus].btnList, function (v) {
          return v.isrender > 0;
        }) >= 0;
        this.isNeedRenderFooter = _.findIndex(footer[this.bellStatus].btnList, function (v) {
          return v.isrender > 0;
        }) >= 0;
        if (this.isNeedRenderHeader) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            var _headerStyle;
            var headerContainer = document.createElement('div');
            headerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-headControl"));
            headerContainer.setAttribute('class', 'header-controls');
            headerContainer.innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' class=\"header-controls-left\" style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>");
            console.log(this.jSPlugin.height);
            this.jSPlugin.height * 0.2 + 'px';
            var headerStyle = (_headerStyle = {
              // height: headerHeight,
              display: "flex",
              "justify-content": "space-between",
              top: 0,
              "z-index": 999,
              color: "#FFFFFF",
              width: "100%",
              position: "relative",
              'margin-bottom': clientHeight * 0.1 + 'px',
              "align-items": 'center',
              "text-align": "center",
              "font-size": '24ox'
            }, _defineProperty(_headerStyle, "color", '#2c2c2c'), _defineProperty(_headerStyle, "margin-top", '6px'), _headerStyle);
            headerContainer.style = styleToString$1(headerStyle);
            document.getElementById("".concat(videoId, "-wrap")).insertBefore(headerContainer, document.getElementById(videoId));
            // 头部预留x像素空间
            var _checkTimer = setInterval(function () {
              if (window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer);
                // 检测到渲染头部，执行一次reSize
                // this.jSPlugin.reSize(this.jSPlugin.params.width,this.jSPlugin.params.height);
              }
            }, 50);
          } else {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' style='display:flex;width:100%;overflow:hidden;justify-content: center;'></div>");
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-headControl")));
          }
          // this.jSPlugin.reSize(this.jSPlugin.params.width,this.jSPlugin.params.height);
        }

        this.jSPlugin.height * 0.3;
        if (this.isNeedRenderFooter) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            var footerContainer = document.createElement('div');
            footerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-ez-iframe-footer-container"));
            footerContainer.setAttribute('class', 'ez-iframe-footer-container');
            var footerStyle = {
              "position": "relative",
              "margin-top": clientHeight * 0.2 + 'px',
              display: "flex",
              "flex-wrap": "wrap",
              "justify-content": "space-between",
              "z-index": 999,
              top: 0,
              color: "#FFFFFF",
              width: "100%",
              "align-items": 'center',
              "font-size": "12px"
            };
            footerContainer.style = styleToString$1(footerStyle);
            footerContainer.innerHTML = "\n            <div id=\"".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn\" class=\"footer-controls\" style='min-height: ").concat(40 * ratioClient, "px;margin-bottom: ").concat(40 * ratioClient, "px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id, "-audioControls\" class=\"footer-controls\" style='display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id, "-audioControls-onCall\" class=\"footer-controls\" style='display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id, "-audioControls-quickReply\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n            <div id=\"").concat(this.jSPlugin.id, "-audioControls-remoteUnlock\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n            ");
            insertAfter(footerContainer, document.getElementById(videoId));
          } else {
            if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
              document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.marginTop = "".concat(clientHeight * 0.2, "px");
              if (this.bellStatus == 'onCall') {
                //控制台使用逻辑，直接更新渲染通话中的按钮
                document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).innerHTML = "\n              <div id=\"".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn\" class=\"footer-controls\" style='min-height: ").concat(40 * ratioClient, "px;margin-bottom: ").concat(40 * ratioClient, "px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls\" class=\"footer-controls\" style='display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-onCall\" class=\"footer-controls\" style='display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-quickReply\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-remoteUnlock\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              ");
              } else {
                document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).innerHTML = "\n              <div id=\"".concat(this.jSPlugin.id, "-audioControls-quickReplyBtn\" class=\"footer-controls\" style='min-height: ").concat(40 * ratioClient, "px;margin-bottom: ").concat(40 * ratioClient, "px;display:flex;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls\" class=\"footer-controls\" style='display:flex;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-onCall\" class=\"footer-controls\" style='display:none;justify-content: space-around;padding: 0 8%;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-quickReply\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              <div id=\"").concat(this.jSPlugin.id, "-audioControls-remoteUnlock\" class=\"footer-controls\" style='display:none;justify-content: center;width:100%;z-index:999;position: relative;'></div>\n              ");
              }
            }
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")));
          }
        }
        if (this.isNeedRenderHeader && document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          // document.getElementById(`${this.jSPlugin.id}-headControl`).style.background = header[this.bellStatus].backgroundColor;
          // document.getElementById(`${this.jSPlugin.id}-headControl`).style.color = header[this.bellStatus].color;
          header[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this9.renderHeader(item.iconId, item);
            }
          });
        }
        if (this.isNeedRenderFooter && document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer[this.bellStatus].backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer[this.bellStatus].color;
          footer[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this9.renderFooter(item.iconId, item);
            }
          });
        }

        // // 判断是否配置封面
        if (this.themeData.customConfig.bellPoster == 1 && !isEditing) {
          this.jSPlugin.poster = 'https://resource.eziot.com/group1/M00/00/B8/CtwQEmPbGh2AVJB-ABDcYtyw5gk899.svg';
          var checkTimer = setInterval(function () {
            if (window.EZUIKit[_this9.jSPlugin.id].state.EZUIKitPlayer.init) {
              clearInterval(checkTimer);
              _this9.jSPlugin.setPoster(_this9.jSPlugin.poster);
            }
          }, 50);
        } else {
          this.jSPlugin.setPoster('');
        }
        if (this.activeThemeStatus) {
          //加载响铃铃声
          this.initBellRing();
          var isAppleDevice = this.checkIsAppleDevice() || false;
          if (isAppleDevice) {
            window.addEventListener('touchstart', this.autoPlayRing);
          } else {
            window.addEventListener('click', this.autoPlayRing);
          }
        }
        this.inited = true;
        //设备信息
        this.getCallDeviceInfo();
      }

      // js判断是否是苹果设备
    }, {
      key: "checkIsAppleDevice",
      value: function checkIsAppleDevice() {
        var u = navigator.userAgent;
        var ios = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
        var iPad = u.indexOf("iPad") > -1;
        var iPhone = u.indexOf("iPhone") > -1 || u.indexOf("Mac") > -1;
        if (ios || iPad || iPhone) {
          return true;
        } else {
          return false;
        }
      }
    }, {
      key: "renderThemeData",
      value: function renderThemeData() {
        var _this10 = this;
        var _this$themeData4 = this.themeData,
          header = _this$themeData4.header,
          footer = _this$themeData4.footer;
        var isEditing = this.decoderState.state.isEditing;
        if (this.isNeedRenderHeader && header) {
          // document.getElementById(`${this.jSPlugin.id}-headControl`).style.background = header[this.bellStatus].backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.color = header[this.bellStatus].color.replace("-diy", "");
          header[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this10.setDecoderState(_defineProperty({}, item.iconId, _this10.decoderState.state[item.iconId]));
            }
          });
        }
        if (this.isNeedRenderFooter && footer) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer[this.bellStatus].backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer[this.bellStatus].color.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall")).style.color = footer[this.bellStatus].color.replace("-diy", "");
          footer[this.bellStatus].btnList.map(function (item, index) {
            if (item.isrender) {
              _this10.setDecoderState(_defineProperty({}, item.iconId, _this10.decoderState.state[item.iconId]));
            }
            console.log('-------------activeThemeStatus');
            if (index == 0 && !_this10.themeInited && _this10.activeThemeStatus) {
              //直接开始播放 xuehb
              var checkTimer = setInterval(function () {
                if (window.EZUIKit[_this10.jSPlugin.id].state.EZUIKitPlayer.init) {
                  clearInterval(checkTimer);
                  if (_this10.themeData.customConfig.bellPoster == 1 && !isEditing) {
                    _this10.jSPlugin.pluginStatus.loadingClear();
                  } else {
                    _this10.jSPlugin.play();
                  }
                  _this10.themeInited = true;
                }
              }, 50);
            }
          });
          // 判断标清高清
          if (this.jSPlugin.url.indexOf("hd.live") !== -1) {
            this.setDecoderState({
              hd: true
            });
          }
          // 判断是否自动隐藏控件
          if (this.themeData.autoFocus > 0) {
            this.autoFocus = parseInt(this.themeData.autoFocus);
            this.startAutoFocus();
            document.getElementById("".concat(this.jSPlugin.id, "-wrap")).addEventListener("click", function () {
              _this10.stopAutoFocus();
            });
            // document.getElementById(`${this.jSPlugin.id}-wrap`).addEventListener("mouseout", ()=>{
            //   console.log("开启自动隐藏")
            //   this.startAutoFocus();
            // })
          }
          // 设置当前播放类型
          this.setDecoderState({
            cloudRec: matchEzopenUrl(this.jSPlugin.url).type === 'cloud.rec',
            rec: matchEzopenUrl(this.jSPlugin.url).type === 'rec',
            type: matchEzopenUrl(this.jSPlugin.url).type
          });
        } else {
          if (!this.themeInited && this.activeThemeStatus) {
            var _checkTimer2 = setInterval(function () {
              if (window.EZUIKit[_this10.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer2);
                // this.jSPlugin.play();
                if (_this10.themeData && _this10.themeData.customConfig && _this10.themeData.customConfig.bellPoster == 1 && !isEditing) {
                  _this10.jSPlugin.pluginStatus.loadingClear();
                } else {
                  _this10.jSPlugin.play();
                }
                _this10.themeInited = true;
              }
            }, 50);
          }
        }
        var checkTimer = setInterval(function () {
          if (window.EZUIKit[_this10.jSPlugin.id].state.EZUIKitPlayer.init) {
            clearInterval(checkTimer);
            // 执行一次reSize
            _this10.jSPlugin.reSize(_this10.jSPlugin.params.width, _this10.jSPlugin.params.height);
          }
        }, 50);
        if (!isEditing && !this.jSPlugin.isWebConsole) {
          // 非编辑状态
          setTimeout(function () {
            // 判断设备能力集是否支持小窗口
            if (_this10.bellStatus == 'onBell' && _this10.jSPlugin.capacity && _this10.jSPlugin.capacity['support_doorcall_playback'] == 1) {
              console.log('小窗口initMiniRec-------------设备能力集成功');
              if (_this10.themeData.customConfig.miniWinRec == 1) {
                console.log('小窗口initMiniRec---------------画中画设置已开启');
                //加载小窗口
                if (!_this10.deviceInfoData || _this10.deviceInfoData && !_this10.deviceInfoData.isEncrypt) {
                  console.log('小窗口initMiniRec---------------设备未加密');
                  _this10.miniRecNum = 0;
                  _this10.initMiniRec();
                }
              }
            }
          }, 1000);
        } else {
          //编辑状态
          // 控制台用-固定图片演示小窗口效果
          if (this.themeData.customConfig.miniWinRec == 1) {
            this.initMiniImageRec();
          } else {
            // 控制台用-隐藏固定图片演示小窗口效果
            this.miniRecCloseClick();
          }
        }
      }

      //设置 setThemeData   
    }, {
      key: "setThemeData",
      value: function setThemeData(options, bellStatus) {
        this.themeData = options;
        if (bellStatus == 'onCall') {
          //控制台直接设置更新通话中按钮样式
          this.bellStatus = 'onCall';
        }
      }
    }, {
      key: "startAutoFocus",
      value: function startAutoFocus() {
        var _this11 = this;
        //console.log("开始自动隐藏",this.autoFocus);
        var autoFocus = this.autoFocus;
        // if(document.getElementById(`${this.jSPlugin.id}-audioControls`)) {
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
        this.autoFocusTimer = setTimeout(function () {
          if (document.getElementById("".concat(_this11.jSPlugin.id, "-audioControls"))) {
            document.getElementById("".concat(_this11.jSPlugin.id, "-audioControls")).style.opacity = 0;
            document.getElementById("".concat(_this11.jSPlugin.id, "-audioControls")).style.pointerEvents = 'none';
          }
        }, autoFocus * 1000);
      }
    }, {
      key: "stopAutoFocus",
      value: function stopAutoFocus() {
        //console.log("结束自动隐藏")
        if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.opacity = 1;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.pointerEvents = 'all';
        }
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
        this.startAutoFocus();
      }
    }, {
      key: "editIcon",
      value: function editIcon(id, type, area) {
        console.log("编辑组件", id, type, area);
        var newThemeData = this.themeData;
        console.log("themeData", this.themeData);
        var btnList = this.themeData[area][this.bellStatus].btnList;
        var _index = _.findIndex(btnList, function (item) {
          return item.iconId === id;
        });
        var tmp = btnList[_index];
        switch (type) {
          case 'delete':
            btnList[_index].isrender = 0;
            break;
          case 'right':
            var nextRightBtnIndex = -1;
            for (var i = _index + 1; i < btnList.length; i++) {
              if (btnList[i].part === btnList[_index].part && btnList[i].isrender == 1) {
                nextRightBtnIndex = i;
                break;
              }
            }
            if (nextRightBtnIndex !== -1) {
              btnList[_index] = btnList[nextRightBtnIndex];
              btnList[nextRightBtnIndex] = tmp;
            }
            break;
          case 'left':
            var nextLeftBtnIndex = -1;
            for (var _i = _index - 1; _i >= 0; _i--) {
              if (btnList[_i].part === btnList[_index].part && btnList[_i].isrender == 1) {
                nextLeftBtnIndex = _i;
                break;
              }
            }
            if (nextLeftBtnIndex !== -1) {
              btnList[_index] = btnList[nextLeftBtnIndex];
              btnList[nextLeftBtnIndex] = tmp;
            }
            break;
        }
        console.log("new btnList", btnList);
        newThemeData[area][this.bellStatus].btnList = btnList;
        //this.renderThemeData();
        // this.changeTheme(newThemeData);
        this.jSPlugin.Theme.changeTheme(newThemeData);
      }
    }, {
      key: "countTime",
      value: function countTime(type) {
        var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var that = this;
        if (!document.getElementById(this.jSPlugin.id + "time-area")) {
          var recordDOM = document.createElement("div");
          recordDOM.id = this.jSPlugin.id + "time-area";
          recordDOM.className = "time-area";
          recordDOM.innerHTML = "<span class=\"dot\"></span><span class=\"value\">00:00</span>";
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).appendChild(recordDOM);
          }
        }
        if (this.countTimer) {
          clearInterval(this.countTimer);
        }
        if (type === 'add') {
          var i = start;
          document.getElementById(that.jSPlugin.id + "time-area").style.display = 'flex';
          this.countTimer = setInterval(function () {
            ++i;
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = formatSeconds(i);
          }, 1000);
        } else if (type === 'destroy') {
          if (this.countTimer) {
            clearInterval(this.countTimer);
          }
          this.countTimer = undefined;
          if (document.getElementById(that.jSPlugin.id + "time-area")) {
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = '00:00';
            document.getElementById(that.jSPlugin.id + "time-area").style.display = 'none';
          }
        }
        //将秒数转换为时分秒格式
        function formatSeconds(value) {
          var theTime = parseInt(value); // 秒
          var middle = 0; // 分
          var hour = 0; // 小时
          var secondV = '00';
          var minV = '00';
          var hourV = '00';
          if (theTime > 59) {
            middle = parseInt(theTime / 60);
            theTime = parseInt(theTime % 60);
            if (middle > 59) {
              hour = parseInt(middle / 60);
              middle = parseInt(middle % 60);
            }
          }
          secondV = parseInt(theTime) > 9 ? parseInt(theTime) : '0' + parseInt(theTime);
          minV = parseInt(middle) > 9 ? parseInt(middle) : '0' + parseInt(middle);
          hourV = parseInt(hour) > 9 ? parseInt(hour) : '0' + parseInt(hour);
          if (hour > 0) {
            return hourV + ':' + minV + ':' + secondV;
          } else if (middle > 0) {
            return minV + ':' + secondV;
          } else {
            return '00:' + secondV;
          }
        }
      }
    }, {
      key: "editStart",
      value: function editStart(callback) {
        console.log('----------editStart1');
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var audioControlsOnCallDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls themeEditing');
        }
        if (audioControlsOnCallDOM) {
          audioControlsOnCallDOM.setAttribute('class', 'footer-controls themeEditing');
        }
        this.setDecoderState({
          isEditing: true
        });
      }
    }, {
      key: "editEnd",
      value: function editEnd(callback) {
        console.log('----------editEnd1');
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var headerMessageDOM = document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        var audioControlsOnCallDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        if (headerMessageDOM) {
          headerMessageDOM.setAttribute('class', 'header-controls');
        }
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls');
        }
        if (audioControlsOnCallDOM) {
          audioControlsOnCallDOM.setAttribute('class', 'footer-controls');
        }
        // this.setDecoderState({
        //   isEditing:false
        // });
      }

      //获取模板数据
    }, {
      key: "fetchThemeData",
      value: function fetchThemeData(themeId) {
        var _this12 = this;
        switch (this.jSPlugin.themeId) {
          case 'pcLive':
          case 'pcRec':
          case 'mobileLive':
          case 'mobileRec':
          case 'miniRec':
            break;
          default:
            var successCallback = function successCallback(data) {
              if (data.meta.code == 0 && data.data) {
                _this12.activeThemeStatus = true;
                _this12.themeData = data.data;
                if (data.data.header) {
                  _this12.themeData.header = data.data.header;
                  _this12.themeData.header[_this12.bellStatus].btnList = _this12.themeData.header[_this12.bellStatus].btnList.sort(function (a, b) {
                    return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
                  });
                }
                if (data.data.footer) {
                  _this12.themeData.footer = data.data.footer;
                  _this12.themeData.footer[_this12.bellStatus].btnList = _this12.themeData.footer[_this12.bellStatus].btnList.sort(function (a, b) {
                    return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
                  });
                }
                if (!_this12.jSPlugin.capacity) {
                  setTimeout(function () {
                    _this12.initThemeData();
                    _this12.renderThemeData();
                  }, 300);
                } else {
                  _this12.initThemeData();
                  _this12.renderThemeData();
                }
              } else {
                //未试用和购买（无权限试用）
                _this12.activeThemeStatus = false;
                _this12.jSPlugin.pluginStatus.loadingClear();
                _this12.setDecoderState({
                  rejection: true
                });
                if (data.meta.code == '111021') {
                  // 轻应用模板不存在 
                  _this12.jSPlugin.pluginStatus.loadingSetText({
                    text: "无效的模板id",
                    color: '#fff',
                    type: 1
                  });
                  _this12.activeThemeStatusTxt = '无效的模板id';
                } else if (data.meta.code == '111023') {
                  // 轻应用模板试用已过期
                  _this12.jSPlugin.pluginStatus.loadingSetText({
                    text: "您的试用特权已到期，需前往轻应用控制台购买后使用。",
                    color: '#fff',
                    type: 1
                  });
                  _this12.activeThemeStatusTxt = '试用特权已到期';
                } else {
                  // 轻应用模板未激活
                  _this12.jSPlugin.pluginStatus.loadingSetText({
                    text: "模板未激活，请先在开放平台轻应用控制台购买模板",
                    color: '#fff',
                    type: 1
                  });
                  _this12.activeThemeStatusTxt = '模板未激活';
                }
                _this12.themeData = mobileCallData.data;
                _this12.initThemeData();
                _this12.renderThemeData();
              }
            };
            var errorCallback = function errorCallback() {
              _this12.renderThemeData();
            };
            templateDetailApi(this.jSPlugin, themeId, successCallback, errorCallback);
            break;
        }
      }

      //获取设备信息
    }, {
      key: "getCallDeviceInfo",
      value: function getCallDeviceInfo() {
        var _this13 = this;
        this.videoWidth / 375 || 1;
        var deviceAPISuccess = function deviceAPISuccess(data) {
          if (data.code == 200 && data.data) {
            _this13.deviceInfoData = data.data;
            console.log('------------getDeviceInfo');
            if (data.data.isEncrypt) {
              console.log('小窗口miniRecCloseClick------------设备已加密');
              _this13.miniRecCloseClick();
              setTimeout(function () {
                _this13.jSPlugin.pluginStatus.loadingClear();
                _this13.jSPlugin.pluginStatus.loadingSetText({
                  text: "视频已加密",
                  color: '#fff'
                });
              }, 50);
            }
            // 设备名称
            if (document.getElementById("header-".concat(_this13.bellStatus, "-deviceCategory"))) {
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.maxWidth = "100%";
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.overflow = "hidden";
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.textOverflow = "ellipsis";
              // document.getElementById(`header-${this.bellStatus}-deviceCategory`).style.whiteSpace = "nowrap";
              document.getElementById("header-".concat(_this13.bellStatus, "-deviceCategory")).innerText = '' + data.data.deviceName;
            }
          }
          if (data.code == 20018 && !_this13.jSPlugin.isWebConsole) {
            //该用户不拥有该设备
            _this13.userNoDevice();
          }
        };
        request(this.jSPlugin.env.domain + '/api/lapp/device/info', 'POST', {
          accessToken: this.jSPlugin.accessToken,
          deviceSerial: matchEzopenUrl(this.jSPlugin.url).deviceSerial
        }, '', deviceAPISuccess);
      }

      //设置头部文字
    }, {
      key: "setHeaderText",
      value: function setHeaderText(headerText) {
        console.log('setHeaderText');
        var sizeRatio = this.videoWidth / 375 || 1;
        if (document.getElementById("".concat(this.jSPlugin.id, "-deviceCategory-content"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-deviceCategory-content")).innerHTML = "<span style=\"font-size: ".concat(24 * sizeRatio, "px;display: block\">").concat(headerText, "</span><span style=\"font-size: ").concat(14 * sizeRatio, "px;padding-top: ").concat(5 * sizeRatio, "px;display: block;\">").concat(this.deviceInfoData && this.deviceInfoData.category || '', "</span>");
        }
      }
    }]);
    return MobileCall;
  }();

  /**
   * @class CallTheme
   * @classdesc 呼叫模板-Theme
   * @param {EZUIKitPlayer} jSPlugin - EZUIKitPlayer 插件对象
   * 
   * @example
   * // 初始化呼叫模板Theme
   * var callTheme = new CallTheme(jSPlugin);
   */
  var CallTheme = /*#__PURE__*/function () {
    function CallTheme(jSPlugin) {
      _classCallCheck$1(this, CallTheme);
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度
      this.autoFocus = 0, this.autoFocusTimer = null, this.decoderState = {
        state: {
          isEditing: false,
          play: false,
          sound: false,
          recordvideo: false,
          recordCount: "00:00",
          talk: false,
          mute: false,
          rejection: false,
          cloudRec: matchEzopenUrl(jSPlugin.url).type === 'cloud.rec',
          rec: matchEzopenUrl(jSPlugin.url).type === 'rec',
          type: matchEzopenUrl(jSPlugin.url).type
        }
      };
      console.log("matchEzopenUrl(jSPlugin.url)", matchEzopenUrl(jSPlugin.url), this.decoderState.state);
      this.isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
      if (typeof jSPlugin.isMobile !== 'undefined') {
        this.isMobile = jSPlugin.isMobile;
      }
      // 默认主题 - 按钮全部展示 todo
      // this.themeData = callData.data;
      this.themeData = {};
      if (this.jSPlugin.themeId == 'themeData') {
        this.themeData = this.jSPlugin.params.themeData;
      }
      // 自适应主题数据
      if (this.jSPlugin.themeId) {
        if (this.isMobile) {
          this.call = new MobileCall(this.jSPlugin, this.themeData, this.setDecoderState, this.decoderState);
        } else {
          this.call = new Call(this.jSPlugin, this.themeData, this.setDecoderState, this.decoderState);
        }
        switch (this.jSPlugin.themeId) {
          // case 'mobileCall':
          //   this.themeData = callData.data;
          //   setTimeout(()=>{
          //     this.call.initThemeData();
          //     this.call.renderThemeData();
          //   }, 300)
          //   break;
          case 'themeData':
            this.themeData = this.jSPlugin.params.themeData;
            this.call.initThemeData();
            this.call.renderThemeData();
            break;
          default:
            this.call.fetchThemeData(this.jSPlugin.themeId);
            break;
        }
      }
      if (!this.jSPlugin.Talk) {
        this.jSPlugin.Talk = new Talk(this.jSPlugin);
      }
      addCss("".concat(this.jSPlugin.staticPath, "/speed/speed.css"));
      addCss("".concat(this.jSPlugin.staticPath, "/css/theme.css"));
    }
    _createClass$1(CallTheme, [{
      key: "changeTheme",
      value: function changeTheme(options) {
        var editStatus = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
        var bellStatus = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'onBell';
        if (typeof options === 'string') {
          this.jSPlugin.themeId = options;
          switch (this.jSPlugin.themeId) {
            case 'pcLive':
            case 'mobileCall':
            case 'webCall':
              this.call.initThemeData();
              this.call.renderThemeData();
              break;
            default:
              this.call.fetchThemeData(options);
              break;
          }
        } else if (_typeof(options) === 'object') {
          this.themeData = options;
          this.call.setThemeData(options, bellStatus);
          this.call.initThemeData();
          this.call.renderThemeData();
          if (this.decoderState.state.isEditing && editStatus) {
            this.call.editStart();
          }
        }
        if (this.jSPlugin && this.jSPlugin.handleThemeChange) {
          this.jSPlugin.handleThemeChange(options);
        }
      }
      //设置按钮状态
    }, {
      key: "setDecoderState",
      value: function setDecoderState(options, backgroundColor) {
        var _this = this;
        var _this$themeData = this.themeData;
          _this$themeData.header;
          _this$themeData.footer;
        Object.keys(options).map(function (item) {
          switch (item) {
            case 'mute':
              if (document.getElementById("".concat(_this.jSPlugin.id, "-icon-mute"))) {
                console.log('mute');
                if (options[item]) {
                  document.getElementById("".concat(_this.jSPlugin.id, "-icon-mute")).style.background = backgroundColor;
                  document.getElementById("".concat(_this.jSPlugin.id, "-icon-mute")).style.border = " 1px solid ".concat(backgroundColor);
                  document.getElementById("icon-mute-path").style.fill = '#ffffff';
                } else {
                  document.getElementById("".concat(_this.jSPlugin.id, "-icon-mute")).style.background = '#ffffff';
                  document.getElementById("".concat(_this.jSPlugin.id, "-icon-mute")).style.border = "1px solid ".concat(backgroundColor);
                  document.getElementById("icon-mute-path").style.fill = backgroundColor;
                }
              }
              break;
          }
          _this.decoderState.state = Object.assign(_this.decoderState.state, options);
        });
      }
    }, {
      key: "startAutoFocus",
      value: function startAutoFocus() {
        var _this2 = this;
        //console.log("开始自动隐藏",this.autoFocus);
        var autoFocus = this.autoFocus;
        // if(document.getElementById(`${this.jSPlugin.id}-audioControls`)) {
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
        this.autoFocusTimer = setTimeout(function () {
          if (document.getElementById("".concat(_this2.jSPlugin.id, "-audioControls"))) {
            document.getElementById("".concat(_this2.jSPlugin.id, "-audioControls")).style.opacity = 0;
            document.getElementById("".concat(_this2.jSPlugin.id, "-audioControls")).style.pointerEvents = 'none';
          }
        }, autoFocus * 1000);
      }
    }, {
      key: "stopAutoFocus",
      value: function stopAutoFocus() {
        //console.log("结束自动隐藏")
        if (document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.opacity = 1;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.pointerEvents = 'all';
        }
        if (this.autoFocusTimer) {
          clearTimeout(this.autoFocusTimer);
        }
        this.startAutoFocus();
      }
    }, {
      key: "toString",
      value: function toString() {
        return "".concat(this.coreX, "-").concat(this.coreY);
      }
    }, {
      key: "editIcon",
      value: function editIcon(id, type, area) {
        console.log("编辑组件", id, type, area);
        var newThemeData = this.themeData;
        console.log("themeData", this.themeData);
        var btnList = this.themeData[area].btnList;
        var _index = _.findIndex(btnList, function (item) {
          return item.iconId === id;
        });
        var tmp = btnList[_index];
        switch (type) {
          case 'delete':
            // btnList.splice(_index, 1);
            // 限制回放必须选中一种介质
            if (id === "rec") {
              if (_.findIndex(btnList, function (item) {
                return item.iconId === "cloudRec" && item.isrender == 1;
              }) === -1) {
                if (this.jSPlugin.Message) {
                  this.jSPlugin.Message["default"]("必须选中一种存储介质");
                }
                return false;
              }
            } else if (id === "cloudRec") {
              if (_.findIndex(btnList, function (item) {
                return item.iconId === "rec" && item.isrender == 1;
              }) === -1) {
                if (this.jSPlugin.Message) {
                  this.jSPlugin.Message["default"]("必须选中一种存储介质");
                }
                return false;
              }
            }
            btnList[_index].isrender = 0;
            break;
          case 'right':
            var nextRightBtnIndex = -1;
            for (var i = _index + 1; i < btnList.length; i++) {
              if (btnList[i].part === btnList[_index].part && btnList[i].isrender == 1) {
                nextRightBtnIndex = i;
                break;
              }
            }
            if (nextRightBtnIndex !== -1) {
              btnList[_index] = btnList[nextRightBtnIndex];
              btnList[nextRightBtnIndex] = tmp;
            }
            break;
          case 'left':
            var nextLeftBtnIndex = -1;
            for (var _i = _index - 1; _i >= 0; _i--) {
              if (btnList[_i].part === btnList[_index].part && btnList[_i].isrender == 1) {
                nextLeftBtnIndex = _i;
                break;
              }
            }
            if (nextLeftBtnIndex !== -1) {
              btnList[_index] = btnList[nextLeftBtnIndex];
              btnList[nextLeftBtnIndex] = tmp;
            }
            break;
        }
        console.log("new btnList", btnList);
        newThemeData[area].btnList = btnList;
        //this.renderThemeData();
        this.changeTheme(newThemeData);
      }
    }, {
      key: "countTime",
      value: function countTime(type) {
        var start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
        var that = this;
        if (!document.getElementById(this.jSPlugin.id + "time-area")) {
          var recordDOM = document.createElement("div");
          recordDOM.id = this.jSPlugin.id + "time-area";
          recordDOM.className = "time-area";
          recordDOM.innerHTML = "<span class=\"dot\"></span><span class=\"value\">00:00</span>";
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).appendChild(recordDOM);
          }
        }
        if (this.countTimer) {
          clearInterval(this.countTimer);
        }
        if (type === 'add') {
          var i = start;
          document.getElementById(that.jSPlugin.id + "time-area").style.display = 'flex';
          this.countTimer = setInterval(function () {
            ++i;
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = formatSeconds(i);
          }, 1000);
        } else if (type === 'destroy') {
          if (this.countTimer) {
            clearInterval(this.countTimer);
          }
          this.countTimer = undefined;
          if (document.getElementById(that.jSPlugin.id + "time-area")) {
            document.getElementById(that.jSPlugin.id + "time-area").children[1].innerHTML = '00:00';
            document.getElementById(that.jSPlugin.id + "time-area").style.display = 'none';
          }
        }
        //将秒数转换为时分秒格式
        function formatSeconds(value) {
          var theTime = parseInt(value); // 秒
          var middle = 0; // 分
          var hour = 0; // 小时
          var secondV = '00';
          var minV = '00';
          var hourV = '00';
          if (theTime > 59) {
            middle = parseInt(theTime / 60);
            theTime = parseInt(theTime % 60);
            if (middle > 59) {
              hour = parseInt(middle / 60);
              middle = parseInt(middle % 60);
            }
          }
          secondV = parseInt(theTime) > 9 ? parseInt(theTime) : '0' + parseInt(theTime);
          minV = parseInt(middle) > 9 ? parseInt(middle) : '0' + parseInt(middle);
          hourV = parseInt(hour) > 9 ? parseInt(hour) : '0' + parseInt(hour);
          if (hour > 0) {
            return hourV + ':' + minV + ':' + secondV;
          } else if (middle > 0) {
            return minV + ':' + secondV;
          } else {
            return '00:' + secondV;
          }
        }
      }
    }, {
      key: "editStart",
      value: function editStart(callback) {
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var audioControlsOnCallDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls-onCall"));
        var headerMessageDOM = document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        if (headerMessageDOM) {
          headerMessageDOM.setAttribute('class', 'header-controls themeEditing');
        }
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls themeEditing');
        }
        if (audioControlsOnCallDOM) {
          audioControlsOnCallDOM.setAttribute('class', 'footer-controls themeEditing');
        }
        this.setDecoderState({
          isEditing: true
        });
      }
    }, {
      key: "editEnd",
      value: function editEnd(callback) {
        var audioControlsDOM = document.getElementById("".concat(this.jSPlugin.id, "-audioControls"));
        var headerMessageDOM = document.getElementById("".concat(this.jSPlugin.id, "-headControl"));
        if (headerMessageDOM) {
          headerMessageDOM.setAttribute('class', 'header-controls');
        }
        if (audioControlsDOM) {
          audioControlsDOM.setAttribute('class', 'footer-controls');
        }
        this.setDecoderState({
          isEditing: false
        });
      }
    }, {
      key: "setDisabled",
      value: function setDisabled(status) {}
      //获取设备信息
    }, {
      key: "getDeviceInfo",
      value: function getDeviceInfo() {
        var _this3 = this;
        var sizeRatio = this.videoWidth / 1024 || 1;
        var deviceAPISuccess = function deviceAPISuccess(data) {
          if (data.code == 200 && data.data) {
            if (data.data.isEncrypt) {
              setTimeout(function () {
                _this3.jSPlugin.pluginStatus.loadingClear();
                _this3.jSPlugin.pluginStatus.loadingSetText({
                  text: "视频已加密",
                  color: '#fff'
                });
              }, 50);
            }
            // 设备型号
            if (document.getElementById("".concat(_this3.jSPlugin.id, "-deviceCategory-content"))) {
              document.getElementById("".concat(_this3.jSPlugin.id, "-deviceCategory-content")).style.maxWidth = "100%";
              document.getElementById("".concat(_this3.jSPlugin.id, "-deviceCategory-content")).style.overflow = "hidden";
              document.getElementById("".concat(_this3.jSPlugin.id, "-deviceCategory-content")).style.textOverflow = "ellipsis";
              document.getElementById("".concat(_this3.jSPlugin.id, "-deviceCategory-content")).style.whiteSpace = "nowrap";
              document.getElementById("".concat(_this3.jSPlugin.id, "-deviceCategory-content")).innerHTML = "<span style=\"font-size: ".concat(32 * sizeRatio, "px;display: block\">\u6709\u4EBA\u6309\u95E8\u94C3</span><span style=\"font-size: ").concat(24 * sizeRatio, "px;padding-top: ").concat(16 * sizeRatio, "px;display: block;\">").concat(data.data.category, "</span>");
            }
          }
        };
        request(this.jSPlugin.env.domain + '/api/lapp/device/info', 'POST', {
          accessToken: this.jSPlugin.accessToken,
          deviceSerial: matchEzopenUrl(this.jSPlugin.url).deviceSerial
        }, '', deviceAPISuccess);
      }
    }]);
    return CallTheme;
  }();

  /* eslint-disable valid-jsdoc */

  /**
   * @class Status
   * @classdesc 播放器状态类
   * @description 提供播放器状态提示
   * 
   * @private
   * 定时器任务管理
   * @example
   */
  var Timer = /*#__PURE__*/function () {
    function Timer(jSPlugin) {
      _classCallCheck$1(this, Timer);
      this.jSPlugin = jSPlugin;
      var timer = window["EZUIKIT_TIMER_INTERVAL_".concat(jSPlugin.id)];
      if (timer && Object.keys(timer).length > 0) {
        this.resetTimer();
      }
      window["EZUIKIT_TIMER_INTERVAL_".concat(jSPlugin.id)] = {};
    }

    /**
     * 创建定时器
     * @param {*} key 
     * @param {*} fn 
     * @param {*} time 
     */
    _createClass$1(Timer, [{
      key: "createInterval",
      value: function createInterval(key, fn, time) {
        var timer = window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];
        timer[key] = setInterval(fn, time);
      }

      /**
       * 清除定时器
       * @param {*} key
       */
    }, {
      key: "clearTimer",
      value: function clearTimer(key) {
        var timer = window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];
        if (timer[key]) {
          clearInterval(timer[key]);
          delete timer[key];
        }
      }

      /** 重置定时器 */
    }, {
      key: "resetTimer",
      value: function resetTimer() {
        var timer = window["EZUIKIT_TIMER_INTERVAL_".concat(this.jSPlugin.id)];
        for (var key in timer) {
          clearInterval(timer[key]);
          delete timer[key];
        }
      }
    }]);
    return Timer;
  }();

  var InspectMap = /*#__PURE__*/_createClass$1(function InspectMap(jSPlugin) {
    var _this = this;
    _classCallCheck$1(this, InspectMap);
    //地图窗口绘制
    _defineProperty(this, "initMap", function () {
      var that = _this;
      var clientWidth = _this.videoWidth;
      var clientHeight = _this.videoHeight;
      if (!document.getElementById("".concat(_this.jSPlugin.id, "-miniRecbox"))) {
        var objDOM = document.createElement('div');
        objDOM.id = "".concat(_this.jSPlugin.id, "-miniRecbox");
        objDOM.style = ";position: absolute; bottom:96px;right:".concat(_this.jSPlugin.inspectVideoWidth, "px;");
        objDOM.innerHTML = "<div  id=\"".concat(_this.jSPlugin.id, "-mapbox\" style=\"\n        width: ").concat(clientWidth * 0.3333, "px;\n        height: ").concat(clientHeight * 0.3333, "px;\n      \"></div>");
        document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).insertBefore(objDOM, document.getElementById("".concat(_this.jSPlugin.id, "-ez-iframe-footer-container")));
        that.map = that.loadMap("".concat(_this.jSPlugin.id, "-mapbox"));
      } else {
        document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("".concat(_this.jSPlugin.id, "-miniRecbox")));
        _this.initMap();
      }
      return that.map;
    });
    /**
     * 初始化地图并返回地图实例
     * 创建地图实例
     * 设置中心点坐标和地图级别
     * 开启鼠标滚轮缩放
     */
    _defineProperty(this, "loadMap", function (id) {
      var map = new BMapGL.Map(id); // 创建Map实例
      map.centerAndZoom(new BMapGL.Point(116.297611, 40.047363), 15); // 初始化地图，设置中心点坐标和地图级别
      map.enableScrollWheelZoom(true); // 开启鼠标滚轮缩放
      return map;
    });
    /**
     * 创建关键点函数提供给子组件调用
     * 先创建关键点
     * 再根据半径绘制范围
     * @param {*} lng 经度
     * @param {*} lat 纬度
     * @param {*} radius 半径
     * @param {*} map 地图实例
     */
    _defineProperty(this, "createCircle", function (lng, lat, radius, inspectPointName) {
      // 创建关键点
      var point = new BMapGL.Point(lng, lat);
      var marker = new BMapGL.Marker(point, {
        title: inspectPointName
      }); // 创建标注   
      _this.map.addOverlay(marker); // 将标注添加到地图中
      if (radius == 0) return;
      // 根据半径绘制范围
      var circle = new BMapGL.Circle(new BMapGL.Point(lng, lat), radius, {
        strokeColor: "#ff4d4f",
        strokeWeight: 4,
        strokeOpacity: 1,
        // 虚线
        strokeStyle: 'dashed',
        // 填充透明
        fillOpacity: 0
      });
      _this.map.addOverlay(circle);
    });
    /**
     * 创建巡检点列表
     * @param {*} inspectPoints 数组，包含经纬度和半径
     * inspectPointId
     * inspectPointName
     * latitude
     * longitude
     * radius
     */
    _defineProperty(this, "createInspectPoints", function (inspectPoints) {
      inspectPoints.map(function (v) {
        _this.createCircle(v.longitude, v.latitude, v.radius, v.inspectPointName);
      });
    });
    /**
     * 根据坐标点列表，在地图上绘制一个多边形的范围
     * 补齐最后一个点，使其闭合
     * @param {*} path 坐标点列表，包含经纬度 '116.297611,40.047363;116.305243,40.043063;116.314226,40.047988;116.314226,40.057988'
     * @param {*} map 地图实例
     * @param {*} color 多边形颜色，默认为蓝色
     * @param {*} strokeStyle 边框样式，默认为实线
     * @param {*} strokeWeight 边框宽度，默认为2
     * @param {*} strokeOpacity 边框透明度，默认为1
     * @param {*} fillOpacity 填充透明度，默认为0
     */
    _defineProperty(this, "createPolygon", function (path) {
      var color = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#407AFF';
      var strokeStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'solid';
      var strokeWeight = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 4;
      var strokeOpacity = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
      var fillColor = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '407AFF';
      var fillOpacity = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
      var pathArr = [];
      var pathList = path.split(';');
      pathList.map(function (v) {
        var point = v.split(',');
        pathArr.push(new BMapGL.Point(point[0], point[1]));
      });
      _this.inspectRange = new BMapGL.Polygon(pathArr, {
        strokeColor: color,
        strokeWeight: strokeWeight,
        strokeOpacity: strokeOpacity,
        // 虚线
        strokeStyle: strokeStyle,
        // 填充透明
        fillOpacity: fillOpacity,
        fillColor: fillColor
      });
      _this.map.addOverlay(_this.inspectRange);
    });
    /**
     * 创建地图轨迹点，第一个轨迹点和最后一个轨迹点标准为起点和终点
     * @param {*} path 坐标点列表，包含经纬度
     * @param {*} map 地图实例
     * @param {*} color 轨迹颜色，默认为蓝色
     * @param {*} fillColor 填充颜色，默认为透明
     * @param {*} strokeStyle 边框样式，默认为实线
     * @param {*} strokeWeight 边框宽度，默认为2
     * @param {*} strokeOpacity 边框透明度，默认为1
     * @param {*} fillOpacity 填充透明度，默认为0
     * @param {*} autoView 是否自动调整视野，默认为false
     * @param {*} tilt 轨迹播放的角度，默认为55
     * @param {*} duration 动画持续时长，默认为10000，单位ms
     * @param {*} delay 动画开始的延迟，默认0，单位ms
     * @param {*} overallView 动画完成后自动调整视野到总览，默认为false                      
     * @returns
     */
    _defineProperty(this, "createTrack", function (path) {
      var isFirst = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
      var color = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '#18C796';
      var strokeStyle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'solid';
      var strokeWeight = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 4;
      var strokeOpacity = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
      var fillOpacity = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
      var tilt = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 0;
      var duration = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 500;
      var delay = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 0;
      var overallView = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : false;
      var point = [];
      // 轨迹点是否已经在this.currentTrack中存在,如果存在则不再重复添加，判断条件是经纬度和时间戳是否相同
      path.map(function (v) {
        var isExist = false;
        if (_this.currentTrack.length > 0) {
          _this.currentTrack.map(function (v1) {
            if (v1.longitude === v.longitude && v1.latitude === v.latitude && v1.reportTime === v.reportTime) {
              isExist = true;
            }
          });
        }
        if (!isExist) {
          if (point.length == 0 && _this.currentTrack.length > 0) {
            // 增加this.currentTrack的最后一个点
            point.push(new BMapGL.Point(_this.currentTrack[_this.currentTrack.length - 1].longitude, _this.currentTrack[_this.currentTrack.length - 1].latitude));
          }
          point.push(new BMapGL.Point(v.longitude, v.latitude));
        }
      });
      if (point.length == 0) return;
      var pl = new BMapGL.Polyline(point, {
        strokeColor: color,
        // 轨迹颜色，默认"#0000ff"
        strokeWeight: strokeWeight,
        strokeOpacity: strokeOpacity,
        // 虚线
        strokeStyle: strokeStyle,
        // 填充透明
        fillOpacity: fillOpacity
      });
      if (isFirst) {
        _this.map.addOverlay(pl);
        // 自动调整视野,居中到轨迹的最后一个点
        _this.map.centerAndZoom(point[point.length - 1], 15);
      } else {
        _this.trackAni = new BMapGLLib.TrackAnimation(_this.map, pl, {
          overallView: overallView,
          // 动画完成后自动调整视野到总览
          tilt: tilt,
          // 轨迹播放的角度，默认为0
          duration: duration,
          // 动画持续时长，默认为10000，单位ms
          delay: delay // 动画开始的延迟，默认0，单位ms
        });

        _this.trackAni.start();
      }
      _this.currentTrack = path;
      if (_this.currentTrack.length > 0) {
        // 如果只有一个点，标识为起点
        // 如果仅有两个点，第一个点为起点，第二个为终点
        // 如果有两个以上的点，第一个点为起点，清空掉前面一个终点的标识，重新添加最后一个点为终点
        // 上述起点、终点为百度地图添加的自定义覆盖物
        if (_this.currentTrack.length > 0) {
          var firstPoint = new BMapGL.Point(_this.currentTrack[0].longitude, _this.currentTrack[0].latitude);
          _this.startPoint = new BMapGL.Marker(firstPoint, {
            icon: new BMapGL.Icon("".concat(_this.jSPlugin.staticPath, "/imgs/start.png"), new BMapGL.Size(32, 47)),
            offset: new BMapGL.Size(0, -17)
          });
          _this.map.addOverlay(_this.startPoint);
          if (_this.currentTrack.length == 1) return;
          var _point = new BMapGL.Point(_this.currentTrack[_this.currentTrack.length - 1].longitude, _this.currentTrack[_this.currentTrack.length - 1].latitude);
          if (_this.endPoint) {
            _this.map.removeOverlay(_this.endPoint);
          }
          setTimeout(function () {
            _this.endPoint = new BMapGL.Marker(_point, {
              icon: new BMapGL.Icon("".concat(_this.jSPlugin.staticPath, "/imgs/end.png"), new BMapGL.Size(30, 30))
            });
            _this.map.addOverlay(_this.endPoint);
          }, isFirst ? 0 : duration);
        }
      }
    });
    /**
     * 地图居中到轨迹点
     * this.currentTrack.length > 0 时，居中到轨迹的最后一个点this.endPoint
     * this.currentTrack.length == 0 时，居中到起点this.startPoint
     * 
     */
    _defineProperty(this, "centerToTrack", function () {
      var lv = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 15;
      if (_this.currentTrack.length > 0) {
        if (_this.currentTrack.length == 1) {
          _this.map.centerAndZoom(new BMapGL.Point(_this.currentTrack[0].longitude, _this.currentTrack[0].latitude), lv);
        } else {
          _this.map.centerAndZoom(new BMapGL.Point(_this.currentTrack[_this.currentTrack.length - 1].longitude, _this.currentTrack[_this.currentTrack.length - 1].latitude), lv);
        }
      }
    });
    this.jSPlugin = jSPlugin;
    this.videoWidth = jSPlugin.width; //视频窗口宽度
    this.videoHeight = jSPlugin.height;
    this.toastCustom = new ToastCustom(jSPlugin, false); // 自定义toast
    this.currentTrack = []; // 当前轨迹
    // 起点和当前终点
    this.startPoint = null;
    this.endPoint = null;
    this.trackAni = null;
    this.inspectRange = null;
    this.map = this.initMap();
  });

  var GlobalContainer = /*#__PURE__*/_createClass$1(function GlobalContainer(jSPlugin) {
    var _this = this;
    _classCallCheck$1(this, GlobalContainer);
    //巡检事件列表初始化
    _defineProperty(this, "init", function () {
      var that = _this;
      _this.videoWidth + 290;
      _this.videoHeight + 170;
      if (!document.getElementById("".concat(_this.jSPlugin.id, "-inspect-global-box"))) {
        var objDOM = document.createElement('div');
        objDOM.id = "".concat(_this.jSPlugin.id, "-inspect-global-box");
        objDOM.style = ";position: absolute; left:0; top: 0; width: 100%; height: 100%; z-index: 10000; background: #fff;";
        objDOM.innerHTML = "<div id=\"".concat(_this.jSPlugin.id, "-inspect-loading-box\" style=\"\n        overflow: auto;\n        box-sizing: border-box;\n        font-size: 14px;\n        color: #595959;\n        line-height: 24px;\n        font-weight: bold;\n        width: 100%;\n        display: flex;\n        align-items: center;\n        justify-content: center;\n        height: 100%;\n      \">\n      <div>\n      <div style=\"text-align:center;\"><div type=\"default\" class=\"ezuikit-spin ezuikit-spin-spinning\"><span class=\"ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default\"><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i></span></div></div>\n      <div style=\"color: #595959; font-size:14px; font-weight: 400; text-align: center;\">\u52A0\u8F7D\u4E2D\u2026</div>\n      </div></div>\n      ");
        document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).appendChild(objDOM);
      } else {
        if (document.getElementById("".concat(_this.jSPlugin.id, "-inspect-global-box"))) {
          document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("".concat(_this.jSPlugin.id, "-inspect-global-box")));
        }
        that.init();
      }
    });
    /**
     * 设备不在线等异常情况处理”
     * 同时增加刷新按钮，点击刷新按钮，触发callback函数
     * @param {*} callback 
     */
    _defineProperty(this, "deviceErrorInfo", function (opt, callback) {
      var defaultOpt = {
        tips: '',
        refreshBtn: '',
        refreshShow: false
      };
      var options = Object.assign(defaultOpt, opt);
      if (!document.getElementById("".concat(_this.jSPlugin.id, "-no-inspect-box"))) {
        _this.videoHeight + 170;
        var objDOM = document.createElement('div');
        objDOM.id = "".concat(_this.jSPlugin.id, "-no-inspect-box");
        objDOM.style = "width:100%;height:100%; background: #ffffff; display: flex; justify-content: center; align-items: center";
        objDOM.innerHTML = "<div style=\"\n        overflow: auto;\n        box-sizing: border-box;\n        font-size: 14px;\n        color: #595959;\n        text-align: center;\n      \">\n      <div style=\"text-align:center; height: 21px;\">\n      <svg t=\"1689074472491\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"7172\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"21\" height=\"21\"><path d=\"M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z\" fill=\"#FF4D4F\" p-id=\"7173\"></path></svg>\n      </div>\n      <div style=\"color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;\">".concat(options.tips, "</div>\n      <button id=\"").concat(_this.jSPlugin.id, "-inspect-device-status-refresh\" style=\"display: ").concat(options.refreshShow ? 'block' : 'none', ";  width: 80px; margin: 0 auto;\" type=\"button\" class=\"ezuikit-btn ezuikit-btn-primary\"><span>").concat(options.refreshBtn, "</span></button>\n      </div>\n      ");
        document.getElementById("".concat(_this.jSPlugin.id, "-inspect-global-box")).appendChild(objDOM);
        document.getElementById("".concat(_this.jSPlugin.id, "-inspect-device-status-refresh")).addEventListener("click", function () {
          callback && callback();
        });
      } else {
        if (document.getElementById("".concat(_this.jSPlugin.id, "-no-inspect-box"))) {
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-global-box")).removeChild(document.getElementById("".concat(_this.jSPlugin.id, "-no-inspect-box")));
        }
        _this.deviceErrorInfo(opt, callback);
      }
    });
    _defineProperty(this, "globalContainerToggle", function (id, isShow) {
      if (document.getElementById(id)) {
        document.getElementById(id).style.display = isShow ? 'flex' : 'none';
      }
    });
    this.jSPlugin = jSPlugin;
    this.videoWidth = jSPlugin.width; //视频窗口宽度
    this.videoHeight = jSPlugin.height;
    this.toastCustom = new ToastCustom(jSPlugin, false); // 自定义toast
    this.init();
  });

  //自定义message 弱提示

  /**
   * @class Message
   * @classdesc 自定义message 适合PC/移动端使用 默认 2s 后自动关闭
   * @param {Node} params.wrapNode    消息容器, 默认为document.body
   * @param {String} params.content   消息内容
   * @param {Number} params.time     消息显示时间, 默认为2000ms,.若为0则不自动关闭
   * @param {String} params.type   消息类型	'info' | 'success' | 'error' | 'warning', 默认为info
   * @param {Boolean} params.center   是否居中显示，默认false为顶部显示, 可设置top值(相对于wrapNode，需为position: relative)， 为true时top无效
   * @param {Number} params.top   消息距离顶部的距离 , 默认为 8px
   */
  var Message = /*#__PURE__*/function () {
    function Message(params) {
      _classCallCheck$1(this, Message);
      this.timer = null;
      var defaultParams = {
        wrapNode: document.body,
        time: 2000,
        content: '',
        type: 'info',
        center: false,
        top: 8
      };
      this.params = _objectSpread2(_objectSpread2({}, defaultParams), params);
      this.init();
    }
    _createClass$1(Message, [{
      key: "init",
      value: function init() {
        var _this = this;
        this.timer = null;
        var _this$params = this.params,
          wrapNode = _this$params.wrapNode,
          content = _this$params.content,
          time = _this$params.time,
          type = _this$params.type,
          center = _this$params.center,
          top = _this$params.top;
        this.wrapNode = wrapNode;
        var wrapToast = document.createElement('div');
        wrapToast.setAttribute('class', 'ezuikit-message');
        if (center) {
          wrapToast.setAttribute('style', "top: 50%; transform: translateY(-50%);");
        } else {
          wrapToast.setAttribute('style', "top: ".concat(top || 0, "px;"));
        }
        this.wrapNode.appendChild(wrapToast);
        this.initMessageContent(type, content, wrapToast);
        if (time === 0) return;
        this.timer = setTimeout(function () {
          _this.wrapNode.removeChild(wrapToast);
        }, time || 2000);
      }

      /**
         * @description 加载message内容
       * @param {String} type   消息类型	'info' | 'success' | 'error' | 'warning'
       * @param {String} content   消息内容
       * @param {Number} time     消息显示时间
       * @param {Node} wrapToast    消息容器
       * 
         */
    }, {
      key: "initMessageContent",
      value: function initMessageContent(type, content, wrapToast) {
        var messageContent = document.createElement('div');
        messageContent.setAttribute('class', 'ezuikit-message-notice');
        messageContent.innerHTML = "\n\t\t\t<div class=\"ezuikit-message-notice-content\">\n\t\t\t\t<div class=\"ezuikit-message-custom-content ezuikit-message-".concat(type, "\">\n\t\t\t\t\t<span role=\"img\" aria-label=\"check-circle\" class=\"ezdicon ezdicon-check-circle\">\n\t\t\t\t\t\t").concat(type === 'warning' ? '<svg fill="currentColor" t="1691567271942" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z"></path></svg>' : '', "\n\t\t\t\t\t\t").concat(type === 'info' ? '<svg fill="currentColor" t="1691567317943" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z"></path></svg>' : '', "\n\t\t\t\t\t\t").concat(type === 'error' ? '<svg fill="currentColor" t="1691567308585" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"><path d="M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m165.376 618.24l-65.92-0.32L512 563.392l-99.328 118.4-66.048 0.32a7.936 7.936 0 0 1-8-8c0-1.92 0.64-3.712 1.92-5.184L470.528 513.92 340.48 359.04a8 8 0 0 1 6.08-13.184l66.112 0.256L512 464.576l99.328-118.4 65.92-0.256c4.48 0 8.064 3.456 8.064 8a8.32 8.32 0 0 1-1.92 5.12l-129.92 154.944 130.048 155.008a8 8 0 0 1-6.08 13.184z"></path></svg>' : '', "\n\t\t\t\t\t\t").concat(type === 'success' ? '<svg fill="currentColor" viewBox="64 64 896 896" focusable="false" data-icon="check-circle" width="1em" height="1em" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"></path></svg>' : '', "\n\t\t\t\t\t</span>\n\t\t\t\t\t<span>").concat(content, "</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t");
        wrapToast.appendChild(messageContent);
      }
    }]);
    return Message;
  }();

  /**
   * @description 自定义image
   * @class Image
   * @param {Object} params
   * @param {String} params.id	图片容器id
   * @param {Number} params.width	图片容器宽度
   * @param {Number} params.height	图片容器高度
   * @param {Boolean} params.preview	是否开启预览，默认开启true
   * @param {Boolean} params.showIcon  是否显示icon，默认显示true
   * @param {String} params.src		图片地址
   * @param {String} params.fallback		图片加载失败地址
   * @param {String} params.alt		图片描述
   */
  var Image$1 = /*#__PURE__*/function () {
    function Image(params) {
      _classCallCheck$1(this, Image);
      var defaultParams = {
        id: '',
        width: '100%',
        height: '100%',
        preview: true,
        showIcon: true,
        src: '',
        alt: '',
        fallback: 'https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png'
      };
      this.params = _objectSpread2(_objectSpread2({}, defaultParams), params);
      this.id = Math.random().toString(36).substr(2);
      this.init();
    }

    /**
     * @description 初始化
     */
    _createClass$1(Image, [{
      key: "init",
      value: function init() {
        var _this$params = this.params,
          id = _this$params.id,
          width = _this$params.width,
          height = _this$params.height,
          preview = _this$params.preview;
        if (document.getElementById(id)) {
          var imgWrap = document.createElement('div');
          imgWrap.setAttribute('class', 'ezuikit-image');
          imgWrap.setAttribute('style', "width:".concat(width, ";height:").concat(height, ";"));
          document.getElementById(id).appendChild(imgWrap);
          this.initImage(imgWrap);
          if (preview) {
            this.initPreview(imgWrap);
          }
        }
      }

      /**
       * @description 预览图片
       */
    }, {
      key: "previewImg",
      value: function previewImg() {
        var _this$params2 = this.params,
          src = _this$params2.src,
          alt = _this$params2.alt,
          fallback = _this$params2.fallback;
        var previewImg = document.createElement('div');
        previewImg.setAttribute('id', this.id + '-preview');
        previewImg.setAttribute('class', 'ezuikit-image-preview');
        previewImg.innerHTML = "\n\t\t\t<div class=\"ezuikit-image-preview-mask\"></div>\n\t\t\t<div class=\"ezuikit-image-preview-img-wrapper\">\n\t\t\t\t<div class=\"ezuikit-image-preview-operations\" id=\"".concat(this.id, "-ezuikit-image-preview-operations\">\n\t\t\t\t\t<div class=\"ezuikit-image-preview-operations-operation\">\n\t\t\t\t\t\t<span role=\"img\" aria-label=\"close\" class=\"anticon anticon-close ezuikit-image-preview-operations-icon\">\n\t\t\t\t\t\t\t<svg viewBox=\"64 64 896 896\" focusable=\"false\" data-icon=\"close\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z\"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"ezuikit-image-preview-wrap\">\n\t\t\t\t\t<div class=\"ezuikit-image-preview-img-main\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t");
        var Img = document.createElement('img');
        Img.setAttribute('class', 'ezuikit-image-preview-img');
        Img.setAttribute('alt', alt);
        Img.setAttribute('src', src);
        // 图片加载失败时加载默认图片
        Img.addEventListener('error', function () {
          Img.setAttribute('src', fallback);
        });
        document.body.appendChild(previewImg);
        previewImg.querySelector('.ezuikit-image-preview-img-main').appendChild(Img);
        document.getElementById(this.id + '-ezuikit-image-preview-operations').addEventListener('click', function () {
          document.body.removeChild(previewImg);
        });
      }

      /**
       * @description 初始化图片
       * @param {Object} params
       * @param {String} params.src	图片地址
       * @param {String} params.alt	图片描述
       * @param {Node} imgWrap	图片容器
       * 
      */
    }, {
      key: "initImage",
      value: function initImage(imgWrap) {
        var _this$params3 = this.params,
          src = _this$params3.src,
          alt = _this$params3.alt,
          fallback = _this$params3.fallback;
        var Img = document.createElement('img');
        Img.setAttribute('class', 'ezuikit-image-img');
        Img.setAttribute('alt', alt);
        Img.setAttribute('src', src);
        // 图片加载失败时加载默认图片
        Img.addEventListener('error', function () {
          Img.setAttribute('src', fallback);
        });
        imgWrap.appendChild(Img);
      }

      /**
       * @description 初始化预览
       * @param {Node} imgWrap	图片容器
       */
    }, {
      key: "initPreview",
      value: function initPreview(imgWrap) {
        var _this = this;
        var showIcon = this.params.showIcon;
        var previewWrap = document.createElement('div');
        previewWrap.setAttribute('class', 'ezuikit-image-mask');
        if (showIcon) {
          previewWrap.innerHTML = "\n\t\t\t\t<div class=\"ezuikit-image-mask-info\">\n\t\t\t\t\t<span class=\"ezuikit-image-anticon-eye\">\n\t\t\t\t\t\t<svg viewBox=\"64 64 896 896\" focusable=\"false\" data-icon=\"eye\" width=\"1em\" height=\"1em\"  aria-hidden=\"true\"><path d=\"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z\"></path></svg>\n\t\t\t\t\t\t\u9884\u89C8\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t\t";
        }
        imgWrap.appendChild(previewWrap);
        imgWrap.onclick = function () {
          _this.previewImg();
        };
      }
    }]);
    return Image;
  }();

  /**
   * @description 自定义popover
   * @class Popover
   * @param {Object} params
   * @param {string} params.id 	唯一标识， 根据id查找节点的偏移量
   * @param {Node} params.parentNodeId	自定义父节点的id，如果没有传入id，则默认为document.body
   * @param {Node} params.content	内容
   * @param {string} params.placement	位置	可选值：top、bottom、left、right、topLeft、topRight、bottomLeft、bottomRight、leftTop、leftBottom、rightTop、rightBottom
   * @param {boolean} params.arrowPointAtCenter	箭头是否指向目标元素中心	默认值：false
   * @param {string} params.title	标题
   */
  var Popover = /*#__PURE__*/function () {
    function Popover(params) {
      _classCallCheck$1(this, Popover);
      var defaultParams = {
        id: '',
        parentNodeId: '',
        title: '',
        content: '',
        placement: 'top',
        cancelText: '取消',
        arrowPointAtCenter: false,
        okText: '确定',
        onCancel: function onCancel() {},
        onConfirm: function onConfirm() {}
      };
      this.params = _objectSpread2(_objectSpread2({}, defaultParams), params);
      this.initState = false;
      this.init(params);
    }

    // 初始化
    _createClass$1(Popover, [{
      key: "init",
      value: function init() {
        var _this = this;
        var _this$params = this.params,
          id = _this$params.id,
          content = _this$params.content,
          placement = _this$params.placement,
          title = _this$params.title;
        var popoverNode = document.getElementById(id);
        if (popoverNode) {
          var popover = document.createElement('div');
          popover.setAttribute('id', id + '-popover');
          popover.setAttribute('class', 'ezuikit-popover');
          popover.setAttribute('style', "display:none;");
          popover.innerHTML = "\n\t\t\t\t\t<div class=\"ezuikit-popover-arrow\">\n\t\t\t\t\t\t<span class=\"ezuikit-popover-arrow-content\"></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"ezuikit-popover-inner\">\n\t\t\t\t\t\t".concat(title ? "<div class=\"ezuikit-popover-title\">".concat(title, "</div>") : '', "\n\t\t\t\t\t\t<div class=\"ezuikit-popover-inner-content\">").concat(content, "</div>\n\t\t\t\t\t</div>\n\t\t\t\t");
          if (!document.getElementById(id + '-popover')) {
            var parentNode = document.body;
            if (this.params.parentNodeId) {
              parentNode = document.getElementById(this.params.parentNodeId);
            }
            parentNode.appendChild(popover);
            this.renderPopover(popover, popoverNode, placement);
          }

          // 绑定事件，点击popover以外的区域隐藏popover
          document.body.addEventListener('click', function (e) {
            _this.addEventListenerFn(e);
          });
        }
      }

      // 绑定事件，点击popover以外的区域隐藏popover
    }, {
      key: "addEventListenerFn",
      value: function addEventListenerFn(e) {
        var id = this.params.id;
        var popoverNode = document.getElementById(id);
        var popover = document.getElementById(id + '-popover');
        if (popoverNode && !(e.target === popoverNode || popoverNode.contains(e.target))) {
          // popover内部的元素不隐藏popover，比如点击确定按钮不隐藏popover，如果需要隐藏，可以在onConfirm回调函数中调用hidePopover方法
          if (popover && !(e.target === popover || popover.contains(e.target))) {
            this.hidePopover();
          }
        }
      }

      // 隐藏popover
    }, {
      key: "hidePopover",
      value: function hidePopover() {
        var id = this.params.id;
        var popover = document.getElementById(id + '-popover');
        if (popover) {
          document.body.removeChild(popover);
        }
      }

      /**渲染popover
       * 描述：根据placement渲染popover，包括箭头
       * 根据placement渲染popover，包括箭头
       * 判断位置，包括滚动条
       * 根据父元素的宽度和高度，计算popover的位置，自适应展示效果
       * @param {Object} popover
       * @param {Object} popoverNode
       * @param {Object} placement
       */
    }, {
      key: "renderPopover",
      value: function renderPopover(popover, popoverNode, placement, popoverWidthRefresh, popoverHeightRefresh) {
        // this.initState = true;
        popover.style.display = 'block';
        var _popoverNode$getBound = popoverNode.getBoundingClientRect(),
          top = _popoverNode$getBound.top,
          left = _popoverNode$getBound.left,
          width = _popoverNode$getBound.width,
          height = _popoverNode$getBound.height;
        var _popover$getBoundingC = popover.getBoundingClientRect(),
          popoverWidth = _popover$getBoundingC.width,
          popoverHeight = _popover$getBoundingC.height;
        if (popoverWidthRefresh) {
          popoverWidth = popoverWidthRefresh;
        }
        if (popoverHeightRefresh) {
          popoverHeight = popoverHeightRefresh;
        }
        var parentNode = document.body;
        if (this.params.parentNodeId) {
          parentNode = document.getElementById(this.params.parentNodeId);
        }
        var arrowPointAtCenter = this.params.arrowPointAtCenter;
        var topOffset = 0;
        var leftOffset = 0;
        var arrow = popover.getElementsByClassName('ezuikit-popover-arrow')[0];
        var _arrow$getBoundingCli = arrow.getBoundingClientRect(),
          arrowWidth = _arrow$getBoundingCli.width,
          arrowHeight = _arrow$getBoundingCli.height;
        if (arrowPointAtCenter) {
          var arrowLeft = 0;
          var arrowTop = 0;
          switch (placement) {
            case 'top':
              arrowLeft = popoverWidth / 2;
              arrowTop = popoverHeight;
              break;
            case 'bottom':
              arrowLeft = popoverWidth / 2;
              arrowTop = 0;
              break;
            case 'left':
              arrowLeft = popoverWidth;
              arrowTop = popoverHeight / 2;
              break;
            case 'right':
              arrowLeft = 0;
              arrowTop = popoverHeight / 2;
              break;
            case 'topLeft':
              arrowLeft = (width - arrowWidth) / 2;
              arrowTop = popoverHeight;
              break;
            case 'topRight':
              arrowLeft = popoverWidth - (width + arrowWidth) / 2;
              arrowTop = popoverHeight;
              break;
            case 'bottomLeft':
              arrowLeft = (width - arrowWidth) / 2;
              arrowTop = 0;
              break;
            case 'bottomRight':
              arrowLeft = popoverWidth - (width + arrowWidth) / 2;
              arrowTop = 0;
              break;
            case 'leftTop':
              arrowLeft = popoverWidth;
              arrowTop = (height - arrowHeight) / 2;
              break;
            case 'leftBottom':
              arrowLeft = popoverWidth;
              arrowTop = popoverHeight - (height + arrowHeight) / 2;
              break;
            case 'rightTop':
              arrowLeft = 0;
              arrowTop = (height - 10) / 2;
              break;
            case 'rightBottom':
              arrowLeft = 0;
              arrowTop = popoverHeight - (height + arrowHeight) / 2;
              break;
            default:
              arrowLeft = popoverWidth / 2;
              arrowTop = popoverHeight;
              break;
          }
          arrow.style.left = arrowLeft + 'px';
          arrow.style.top = arrowTop + 'px';
        }
        switch (placement) {
          case 'top':
            topOffset = -(popoverHeight + arrowHeight);
            leftOffset = (width - popoverWidth) / 2;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-top');
            break;
          case 'bottom':
            topOffset = height - arrowHeight / 2;
            leftOffset = (width - popoverWidth) / 2;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-bottom');
            break;
          case 'left':
            topOffset = (height - popoverHeight) / 2;
            leftOffset = -(popoverWidth + arrowWidth / 2);
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-left');
            break;
          case 'right':
            topOffset = (height - popoverHeight) / 2;
            leftOffset = width - arrowWidth / 2;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-right');
            break;
          case 'topLeft':
            topOffset = -(popoverHeight + arrowHeight);
            leftOffset = 0;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-topLeft');
            break;
          case 'topRight':
            topOffset = -(popoverHeight + arrowHeight);
            leftOffset = width - popoverWidth;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-topRight');
            break;
          case 'bottomLeft':
            topOffset = height - arrowHeight / 2;
            leftOffset = 0;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-bottomLeft');
            break;
          case 'bottomRight':
            topOffset = height - arrowHeight / 2;
            leftOffset = width - popoverWidth;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-bottomRight');
            break;
          case 'leftTop':
            topOffset = 0;
            leftOffset = -(popoverWidth + arrowWidth / 2);
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-leftTop');
            break;
          case 'leftBottom':
            topOffset = height - popoverHeight;
            leftOffset = -(popoverWidth + arrowWidth / 2);
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-leftBottom');
            break;
          case 'rightTop':
            topOffset = 0;
            leftOffset = width - arrowWidth / 2;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-rightTop');
            break;
          case 'rightBottom':
            topOffset = height - popoverHeight;
            leftOffset = width - arrowWidth / 2;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-rightBottom');
            break;
          default:
            topOffset = -popoverHeight;
            leftOffset = (width - popoverWidth) / 2;
            popover.setAttribute('class', 'ezuikit-popover ezuikit-popover-placement-top');
            break;
        }
        var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
        var scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
        popover.style.top = top + scrollTop + topOffset + 'px';
        popover.style.left = left + scrollLeft + leftOffset + 'px';

        // 判断是否超出边界 
        // Element.getBoundingClientRect(): 返回一个对象，属性值为元素在屏幕某一时刻（relative to the current viewport）的左、上、右和下边距（即：边框与视图之间的距离，不包含外边距，四舍五入 Pixel数），viewport 视口指浏览器可见内容的区域大小。 
        // parentNode.parentNode.getBoundingClientRect（）：表示parentNode相对于屏幕的距离,parentNode是popover的parentNode 
        var popoverRect = popover.getBoundingClientRect(); // popover 
        var parentRect = parentNode === document.body ? {
          left: 0,
          top: 0,
          right: window.innerWidth,
          bottom: window.innerHeight
        } : parentNode.getBoundingClientRect(); // parentNode.parentNode 

        var newPlacement = placement;
        if (popoverRect.left < parentRect.left) {
          newPlacement = newPlacement.replace('Right', 'Left');
          newPlacement = newPlacement.replace('right', 'left');
        }
        if (popoverRect.right > parentRect.right) {
          newPlacement = newPlacement.replace('Left', 'Right');
          newPlacement = newPlacement.replace('left', 'right');
        }
        if (popoverRect.top < parentRect.top) {
          newPlacement = newPlacement.replace('Top', 'Bottom');
          newPlacement = newPlacement.replace('top', 'bottom');
        }
        if (popoverRect.bottom > parentRect.bottom) {
          newPlacement = newPlacement.replace('Bottom', 'Top');
          newPlacement = newPlacement.replace('bottom', 'top');
        }
        if (newPlacement !== placement) {
          this.renderPopover(popover, popoverNode, newPlacement, popoverWidth, popoverHeight);
        }
      }
    }]);
    return Popover;
  }();

  /**
   * @description 自定义popconfirm
   * @class Popconfirm
   * @param {Object} params
   * @param {string} params.id 	唯一标识， 根据id查找节点的偏移量
   * @param {Node} params.content	内容
   * @param {string} params.placement	位置	可选值：top、bottom、left、right、topLeft、topRight、bottomLeft、bottomRight、leftTop、leftBottom、rightTop、rightBottom
   * @param {boolean} params.arrowPointAtCenter	箭头是否指向目标元素中心	默认值：false
   */
  var Popconfirm = /*#__PURE__*/function () {
    function Popconfirm(params) {
      _classCallCheck$1(this, Popconfirm);
      var defaultParams = {
        id: '',
        content: '',
        placement: 'top',
        cancelText: '取消',
        arrowPointAtCenter: false,
        okText: '确定',
        onCancel: function onCancel() {},
        onConfirm: function onConfirm() {}
      };
      this.params = _objectSpread2(_objectSpread2({}, defaultParams), params);
      this.PopconfirmDom = null;
      this.init(params);
    }

    // 初始化
    _createClass$1(Popconfirm, [{
      key: "init",
      value: function init() {
        var _this = this;
        var _this$params = this.params,
          content = _this$params.content,
          cancelText = _this$params.cancelText,
          okText = _this$params.okText,
          onCancel = _this$params.onCancel,
          onConfirm = _this$params.onConfirm;
        var contentDom = document.createElement('div');
        contentDom.innerHTML = "\n      <div class=\"ezuikit-confirm\">\n        <div class=\"ezuikit-confirm-content\">\n\t\t\t\t\t<span class=\"ezuikit-confirm-icon\">\n          \t<svg fill=\"currentColor\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"24\" height=\"24\"><path d=\"M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z\"></path></svg>\n          </span>\n\t\t\t\t\t<span class=\"ezuikit-confirm-content-label\">".concat(content, "</span>\n        </div>\n        <div class=\"ezuikit-popover-buttons\"></div>\n      </div>\n      ");
        var cancelBtn = document.createElement('button');
        cancelBtn.className = 'ezuikit-btn ezuikit-cancel-btn';
        cancelBtn.innerText = cancelText;
        var okBtn = document.createElement('button');
        okBtn.className = 'ezuikit-btn ezuikit-ok-btn ezuikit-btn-primary';
        okBtn.innerText = okText;
        contentDom.querySelector('.ezuikit-popover-buttons').appendChild(cancelBtn);
        contentDom.querySelector('.ezuikit-popover-buttons').appendChild(okBtn);
        this.PopconfirmDom = new Popover(_objectSpread2(_objectSpread2({}, this.params), {}, {
          content: contentDom.innerHTML
        }));
        // 点击取消按钮
        if (document.getElementById("".concat(this.params.id, "-popover")).querySelector('.ezuikit-cancel-btn')) {
          document.getElementById("".concat(this.params.id, "-popover")).querySelector('.ezuikit-cancel-btn').onclick = function () {
            if (onCancel) {
              onCancel();
            } else {
              _this.hide();
            }
            return;
          };
        }
        // 点击确定按钮
        if (document.getElementById("".concat(this.params.id, "-popover")).querySelector('.ezuikit-ok-btn')) {
          document.getElementById("".concat(this.params.id, "-popover")).querySelector('.ezuikit-ok-btn').onclick = function () {
            if (onConfirm) {
              onConfirm();
            } else {
              _this.hide();
            }
            return;
          };
        }
        return this.PopconfirmDom;
      }

      // 隐藏popover
    }, {
      key: "hide",
      value: function hide() {
        this.PopconfirmDom.hidePopover();
      }
    }]);
    return Popconfirm;
  }();

  /**
   * @description 自定义video
   * @class Video
   * @param {Object} params
   * @param {String} params.id	图片容器id
   * @param {Number} params.width	图片容器宽度
   * @param {Number} params.height	图片容器高度
   * @param {String} params.poster	视频封面
   * @param {String} params.fallback		视频封面图片加载失败地址
   * @param {String} params.src		视频地址
   * @param {Boolean} params.preview	是否开启预览
   * 
   */
  var Video = /*#__PURE__*/function () {
    function Video(params) {
      _classCallCheck$1(this, Video);
      var defaultParams = {
        id: '',
        width: '100%',
        height: '100%',
        preview: true,
        poster: '',
        fallback: 'https://img.ys7.com/group32/M00/81/9D/CtxIA2HnrGyADm_jAAAFfWjIDJs811.png',
        src: ''
      };
      this.params = _objectSpread2(_objectSpread2({}, defaultParams), params);
      this.id = Math.random().toString(36).substr(2);
      this.init();
    }

    /**
    	* @description 初始化
    */
    _createClass$1(Video, [{
      key: "init",
      value: function init() {
        var _this$params = this.params,
          id = _this$params.id,
          width = _this$params.width,
          height = _this$params.height,
          preview = _this$params.preview;
        if (document.getElementById(id)) {
          var videoWrap = document.createElement('div');
          videoWrap.setAttribute('class', 'ezuikit-video');
          videoWrap.setAttribute('style', "width:".concat(width, ";height:").concat(height, ";"));
          document.getElementById(id).appendChild(videoWrap);
          this.initVideo(videoWrap);
          if (preview) {
            this.initPreview(videoWrap);
          }
        }
      }

      /**
       * @description 预览视频
       * @param {String} params.src	视频播放地址
       */
    }, {
      key: "previewVideo",
      value: function previewVideo() {
        var src = this.params.src;
        var previewVideo = document.createElement('div');
        previewVideo.setAttribute('id', this.id + '-preview');
        previewVideo.setAttribute('class', 'ezuikit-image-video');
        previewVideo.innerHTML = "\n\t\t\t<div class=\"ezuikit-video-preview-mask\"></div>\n\t\t\t<div class=\"ezuikit-video-preview-img-wrapper\">\n\t\t\t\t<div class=\"ezuikit-video-preview-operations\" id=\"".concat(this.id, "-ezuikit-video-preview-operations\">\n\t\t\t\t\t<div class=\"ezuikit-video-preview-operations-operation\">\n\t\t\t\t\t\t<span role=\"img\" aria-label=\"close\" class=\"anticon anticon-close ezuikit-video-preview-operations-icon\">\n\t\t\t\t\t\t\t<svg viewBox=\"64 64 896 896\" focusable=\"false\" data-icon=\"close\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z\"></path></svg>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"ezuikit-video-preview-wrap\">\n\t\t\t\t\t<div class=\"ezuikit-video-preview-img-wrapper\">\n\t\t\t\t\t\t<video\n\t\t\t\t\t\t\tclass=\"ezuikit-video-preview-img custom-controls\"\n\t\t\t\t\t\t\tsrc=\"").concat(src, "\"\n\t\t\t\t\t\t\tautoplay \n\t\t\t\t\t\t\tcontrols \n\t\t\t\t\t\t\tcontrolslist=\"nodownload noremoteplayback noplaybackrate\"\n\t\t\t\t\t\t\tdisablePictureInPicture\n\t\t\t\t\t\t\tdisableRemotePlayback\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t");
        document.body.appendChild(previewVideo);
        document.getElementById(this.id + '-ezuikit-video-preview-operations').addEventListener('click', function () {
          document.body.removeChild(previewVideo);
        });
      }

      /**
       * @description 初始化图片
       * @param {Node} imgWrap	图片容器
       * 
      */
    }, {
      key: "initVideo",
      value: function initVideo(imgWrap) {
        var _this$params2 = this.params,
          poster = _this$params2.poster,
          fallback = _this$params2.fallback;
        var Img = document.createElement('img');
        Img.setAttribute('class', 'ezuikit-video-img');
        Img.setAttribute('src', poster);
        // 图片加载失败时加载默认图片
        Img.addEventListener('error', function () {
          Img.setAttribute('src', fallback);
        });
        imgWrap.appendChild(Img);
      }

      /**
       * @description 初始化预览
       * @param {Node} imgWrap	图片容器
       */
    }, {
      key: "initPreview",
      value: function initPreview(imgWrap) {
        var _this = this;
        var previewWrap = document.createElement('div');
        previewWrap.setAttribute('class', 'ezuikit-video-mask');
        previewWrap.innerHTML = "\n\t\t\t<div class=\"ezuikit-video-mask-info\">\n\t\t\t\t<span class=\"ezuikit-video-anticon-eye\">\n\t\t\t\t\t<svg width=\"28\" height=\"28\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 28 28\" style=\"enable-background:new 0 0 28 28;\" xml:space=\"preserve\">\n\t\t\t\t\t<circle cx=\"14\" cy=\"14\" r=\"14\" style=\"opacity:0.7;fill-rule:evenodd;clip-rule:evenodd;enable-background:new;\"/>\n\t\t\t\t\t<path style=\"fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;\" d=\"M18.3,15.2l-5.3,3.3c-0.7,0.4-1.6,0.2-2.1-0.5c-0.1-0.2-0.2-0.5-0.2-0.8v-6.6\n\t\t\t\t\t\tc0-0.8,0.7-1.5,1.5-1.5c0.3,0,0.6,0.1,0.8,0.2l5.3,3.3c0.7,0.4,0.9,1.4,0.5,2.1C18.6,14.9,18.4,15,18.3,15.2z\"/>\n\t\t\t\t\t</svg>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t\t";
        imgWrap.appendChild(previewWrap);
        imgWrap.onclick = function () {
          _this.previewVideo();
        };
      }
    }]);
    return Video;
  }();

  // 巡检记录信息查询
  var getInspectDetail = function getInspectDetail(jSPlugin, successCallback, errorCallback) {
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      deviceSerial: matchEzopenUrl(jSPlugin.url).deviceSerial
    };
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/bodycamera/inspect/detail/latest");
    FetchData(url, 'GET', data, success, error, headers);
  };

  // 查询巡检轨迹
  var getDeviceTrace = function getDeviceTrace(jSPlugin, inspectRecordId, successCallback, errorCallback) {
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      inspectRecordId: inspectRecordId,
      page: 0
    };
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/bodycamera/device/trace");
    FetchData(url, 'GET', data, success, error, headers);
  };

  //获取设备信息-执法记录仪查询接口
  var getDeviceInfo = function getDeviceInfo(jSPlugin, successCallback, errorCallback) {
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      deviceSerial: matchEzopenUrl(jSPlugin.url).deviceSerial
    };
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/bodycamera");
    FetchData(url, 'GET', data, success, error, headers);
  };

  //获取设备信息-执法记录仪查询接口
  var getEventList = function getEventList(jSPlugin, inspectRecordId) {
    var pageStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
    var pageSize = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 30;
    var successCallback = arguments.length > 4 ? arguments[4] : undefined;
    var errorCallback = arguments.length > 5 ? arguments[5] : undefined;
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      inspectRecordId: inspectRecordId,
      pageStart: pageStart,
      pageSize: pageSize
    };
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/bodycamera/inspect/event/page");
    FetchData(url, 'GET', data, success, error, headers);
  };

  /**
   * 触发存证文件接口（图片抓拍、视频录制）
   * @param {*} jSPlugin
   * @param {*} evidenceFileType 存证类型 0.图片抓拍 1.视频录制
   * @param {*} successCallback
   * @param {*} errorCallback
   * @returns
   */

  var evidence = function evidence(jSPlugin, evidenceFileType, successCallback, errorCallback) {
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      deviceSerial: matchEzopenUrl(jSPlugin.url).deviceSerial,
      validateCode: matchEzopenUrl(jSPlugin.url).validCode,
      channelNo: matchEzopenUrl(jSPlugin.url).channelNo,
      evidenceFileType: evidenceFileType // 存证类型 0.图片抓拍 1.视频录制
    };

    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/common/file/evidence");
    FetchData(url, 'POST', data, success, error, headers);
  };

  /**
   * 触发停止录制接口
   */
  var evidenceStop = function evidenceStop(jSPlugin, taskId, successCallback, errorCallback) {
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      taskId: taskId
    };
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/v3/open/cloud/video/frame/stop");
    FetchData(url, 'POST', data, success, error, headers);
  };

  /**
   * 查询任务详情接口
   */
  var getTaskDetail = function getTaskDetail(jSPlugin, taskId, successCallback, errorCallback) {
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = {
      accessToken: jSPlugin.accessToken,
      taskId: taskId
    };
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/opencloud/task/info");
    FetchData(url, 'GET', data, success, error, headers);
  };

  /**
   * 新增执法记录事件
   * @param {*} parms
   * @param {*} successCallback
   * @param {*} errorCallback
   */
  var addEvent = function addEvent(jSPlugin, parms, successCallback, errorCallback) {
    var defaultParms = {
      accessToken: jSPlugin.accessToken,
      inspectRecordId: '',
      eventType: '',
      evidenceFileId: '',
      eventTime: '',
      eventBeginTime: '',
      eventEndTime: '',
      depositaryOfficer: '',
      eventRemark: '',
      evidenceFileType: ''
    };
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = Object.assign(defaultParms, parms);
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/bodycamera/inspect/event");
    FetchData(url, 'POST', data, success, error, headers);
  };

  /**
   * 修改执法记录事件
   * @param {*} parms
   * @param {*} successCallback
   * @param {*} errorCallback
   * @returns
   *
   */
  var updateEvent = function updateEvent(jSPlugin, parms, successCallback, errorCallback) {
    var defaultParms = {
      accessToken: jSPlugin.accessToken,
      inspectRecordId: '',
      // inspectRecordId: 1017,
      inspectEventId: '',
      eventType: '',
      eventRemark: ''
    };
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = Object.assign(defaultParms, parms);
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/bodycamera/inspect/event/update");
    FetchData(url, 'POST', data, success, error, headers);
  };

  /**
   * 删除执法记录事件
   * @param {*} parms
   * @param {*} successCallback
   * @param {*} errorCallback
   * @returns
   */
  var deleteEvent = function deleteEvent(jSPlugin, parms, successCallback, errorCallback) {
    var defaultParms = {
      accessToken: jSPlugin.accessToken,
      inspectEventId: ''
    };
    var success = function success(data) {
      successCallback && successCallback(data);
    };
    var error = function error(err) {
      errorCallback && errorCallback(err);
    };
    var data = Object.assign(defaultParms, parms);
    var headers = {
      'Content-Type': 'application/x-www-form-urlencoded'
    };
    var url = "".concat(jSPlugin.env.domain, "/api/service/devicekit/bodycamera/inspect/event/delete");
    FetchData(url, 'POST', data, success, error, headers);
  };

  function formatDuring$1(millisecond) {
    var hours = parseInt(millisecond % (1000 * 60 * 60 * 24) / (1000 * 60 * 60));
    var minutes = parseInt(millisecond % (1000 * 60 * 60) / (1000 * 60));
    var seconds = parseInt(millisecond % (1000 * 60) / 1000);
    return (hours < 10 ? "0".concat(hours) : hours) + ":" + (minutes < 10 ? "0".concat(minutes) : minutes) + ":" + (seconds < 10 ? "0".concat(seconds) : seconds);
  }
  var InspectEventDetail = /*#__PURE__*/function () {
    function InspectEventDetail(jSPlugin) {
      var currentEventInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
      var timer = arguments.length > 2 ? arguments[2] : undefined;
      var type = arguments.length > 3 ? arguments[3] : undefined;
      var saveSuccessCallback = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : function () {};
      _classCallCheck$1(this, InspectEventDetail);
      this.jSPlugin = jSPlugin;
      this.currentEventInfo = currentEventInfo;
      this.inspectInfo = jSPlugin.Theme.inspect.inspectInfo;
      this.type = type; // 0.新增 1.修改
      this.timer = timer;
      this.startTime = 1000;
      this.videoRecordingStatus = true;
      this.saveSuccessCallback = saveSuccessCallback;
      this.init();
    }
    _createClass$1(InspectEventDetail, [{
      key: "init",
      value: function init() {
        this.renderEventDetail();
        this.eventDetailDomEvent();
      }

      // 显示事件详情
    }, {
      key: "show",
      value: function show() {
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-detail-wrap")).setAttribute('class', 'inspect-event-detail-wrap show');
      }

      // 隐藏事件详情
    }, {
      key: "hide",
      value: function hide() {
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-detail-wrap")).setAttribute('class', 'inspect-event-detail-wrap');
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-detail-box")).innerHTML = '';
      }

      // 事件标签校验
    }, {
      key: "validationEventTag",
      value: function validationEventTag() {
        var value = document.getElementById("".concat(this.jSPlugin.id, "-event-tag")).value;
        if (value.length == 0) {
          document.getElementById("".concat(this.jSPlugin.id, "-event-tag-error")).style.display = 'block';
          document.getElementById("".concat(this.jSPlugin.id, "-event-tag-error")).innerHTML = '请输入事件标签';
          document.getElementById("".concat(this.jSPlugin.id, "-event-tag")).setAttribute('class', 'ezuikit-input input-has-error');
          return false;
        } else {
          document.getElementById("".concat(this.jSPlugin.id, "-event-tag-error")).style.display = 'none';
          document.getElementById("".concat(this.jSPlugin.id, "-event-tag")).setAttribute('class', 'ezuikit-input');
          return true;
        }
      }

      // 视频窗口渲染
    }, {
      key: "renderVideo",
      value: function renderVideo(taskStatus, picUrl, videoUrl) {
        var _this = this;
        document.getElementById("".concat(this.jSPlugin.id, "-inspectEventDetail-videoPreview")).innerHTML = '';
        // 视频存证效果渲染
        if (taskStatus === 1 || taskStatus === 2) {
          //存储中 1–等待中 2–处理中
          document.getElementById("".concat(this.jSPlugin.id, "-inspectEventDetail-videoPreview")).innerHTML = "\n      <div class=\"video-stroage-exceptional-status-tips-wrap\" style=\"background:url(".concat(this.jSPlugin.staticPath, "/imgs/bg.svg) no-repeat 100%/cover\">\n        <div class=\"video-stroage-exceptional-status-icon\">\n        <div type=\"default\" class=\"ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white\"><span class=\"ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default\"><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i></span></div>\n        </div>\n        <span class=\"video-stroage-exceptional-status-tips\">\u89C6\u9891\u6B63\u5728\u5B58\u50A8\u4E2D\u2026</span>\n      </div>\n     ");
          if (this.type !== 1) {
            var evidenceId = this.currentEventInfo.evidenceId;
            this.timer.clearTimer('videoRecordingStatusTimer');
            this.timer.createInterval('videoRecordingStatusTimer', function () {
              getTaskDetail(_this.jSPlugin, evidenceId, function (data) {
                if (data.meta && data.meta.code === 200) {
                  var _data$data = data.data,
                    _taskStatus = _data$data.taskStatus,
                    fileUrl = _data$data.fileUrl,
                    videoCoverPic = _data$data.videoCoverPic;
                  var _picUrl = videoCoverPic || "".concat(_this.jSPlugin.staticPath, "/imgs/bg.svg");
                  _this.renderVideo(_taskStatus, _picUrl, fileUrl);
                }
              });
            }, 1000);
          }
        } else if (taskStatus === 4 || taskStatus === 5 || taskStatus === 6 || taskStatus === 7) {
          //存储失败 4–异常结束
          document.getElementById("".concat(this.jSPlugin.id, "-inspectEventDetail-videoPreview")).innerHTML = "\n        <div class=\"video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error\" style=\"background:url(".concat(this.jSPlugin.staticPath, "/imgs/bg.svg) no-repeat 100%/cover\">\n          <div class=\"video-stroage-exceptional-status-icon\">\n            <svg fill=\"currentColor\" t=\"1691567317943\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"1em\" height=\"1em\"><path d=\"M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z\"></path></svg>\n          </div>\n          <span class=\"video-stroage-exceptional-status-tips\">\u89C6\u9891\u5B58\u50A8\u5931\u8D25</span>\n        </div>\n       ");
          this.timer.clearTimer('videoRecordingStatusTimer');
        } else if (taskStatus === 0 || taskStatus === 3) {
          //存储完成 0–已完成 3–已结束
          new Video({
            id: "".concat(this.jSPlugin.id, "-inspectEventDetail-videoPreview"),
            poster: picUrl,
            fallback: "".concat(this.jSPlugin.staticPath, "/imgs/bg.svg"),
            src: videoUrl
          });
          this.timer.clearTimer('videoRecordingStatusTimer');
        }
      }

      // 渲染事件详情
    }, {
      key: "renderEventDetail",
      value: function renderEventDetail() {
        var _this2 = this;
        var _this$currentEventInf = this.currentEventInfo,
          evidenceFileType = _this$currentEventInf.evidenceFileType,
          fileUrl = _this$currentEventInf.fileUrl,
          taskStatus = _this$currentEventInf.taskStatus,
          videoCoverPic = _this$currentEventInf.videoCoverPic;
        var objDOM = document.createElement('div');
        objDOM.setAttribute('class', 'inspectEventDetail');
        var picUrl = '';
        if (evidenceFileType === 1) {
          picUrl = videoCoverPic || "".concat(this.jSPlugin.staticPath, "/imgs/bg.svg");
        } else {
          picUrl = fileUrl || "".concat(this.jSPlugin.staticPath, "/imgs/bg.svg");
        }
        objDOM.innerHTML = "\n      <div class=\"inspectEventDetail-header\">\n        <div class=\"inspectEventDetail-back\" id=\"".concat(this.jSPlugin.id, "-inspectEventDetail-back\">\n          <svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"><path d=\"M605.888 137.344a6.4 6.4 0 0 1 1.472 4.032l0.64 70.784a6.4 6.4 0 0 1-2.368 5.056L281.6 480H876.8v64H279.744l325.376 264a6.4 6.4 0 0 1 2.368 4.928l0.128 69.632a6.4 6.4 0 0 1-10.432 4.992l-422.016-342.4a42.24 42.24 0 0 1-7.04-57.344l3.264-3.904 3.776-3.456 421.76-344a6.4 6.4 0 0 1 8.96 0.896z\"></path></svg>\n        </div>\n        <div class=\"inspectEventDetail-type\">").concat(this.type === 1 ? '编辑' : '').concat(evidenceFileType === 0 ? '图片存证' : '视频存证', "</div>\n      </div>\n      <div class=\"inspectEventDetail-content\" style=\"\n        height: ").concat(document.getElementById("".concat(this.jSPlugin.id, "-wrap")).clientHeight - 58 - 158, "px;\n        overflow: auto;\n      \">\n        ").concat(evidenceFileType === 0 ? "<div class=\"inspectEventDetail-content-img-box\">\n            <p class=\"inspectEventDetail-content-img-tips\" style=\"display: ".concat(this.type == 1 ? 'none' : 'blcok', ";\">\u56FE\u7247\u5DF2\u53D6\u8BC1\uFF0C\u8BF7\u586B\u5199\u5B58\u8BC1\u4FE1\u606F\uFF1A</p>\n            <div class=\"inspectEventDetail-content-img-detail\" id=\"").concat(this.jSPlugin.id, "-inspectEventDetail-picUrl\"></div>\n          </div>") : "<div class=\"inspectEventDetail-content-video-box\">\n            <div\n              id=\"".concat(this.jSPlugin.id, "-inspectEventDetail-content-video-timer\"\n              class=\"inspectEventDetail-content-video-timer\"\n              style=\"display: ").concat(this.type == 1 ? 'none' : 'flex', ";\"\n            >\n              <div class=\"video-recording-time-wrap\">\n                <svg fill=\"currentColor\" width=\"10\" height=\"10\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 10 10\" style=\"enable-background:new 0 0 10 10;\" xml:space=\"preserve\"><circle class=\"st0\" cx=\"5\" cy=\"5\" r=\"3\"/><path class=\"st1\" d=\"M5,10c-2.8,0-5-2.2-5-5c0-2.8,2.2-5,5-5s5,2.2,5,5C10,7.8,7.8,10,5,10z M5,0.5c-2.5,0-4.5,2-4.5,4.5c0,2.5,2,4.5,4.5,4.5s4.5-2,4.5-4.5C9.5,2.5,7.5,0.5,5,0.5z\"/></svg>\n                <div id=\"").concat(this.jSPlugin.id, "-video-recording-time\" class=\"video-recording-time\">00:00:00</div>\n              </div>\n              <button id=\"").concat(this.jSPlugin.id, "-video-recording-stop-btn\" class=\"inspectEventDetail-stop-btn ezuikit-btn\">\n              <span style=\"display:none\" class=\"ezuikit-btn-loading-icon\" style=\"\"><span role=\"img\" aria-label=\"loading\" class=\"anticon anticon-loading anticon-spin\"><svg viewBox=\"0 0 1024 1024\" focusable=\"false\" data-icon=\"loading\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\"></path></svg></span></span>\n              \u505C\u6B62\u5F55\u5236\n              </button>\n            </div>\n            <div id=\"").concat(this.jSPlugin.id, "-inspectEventDetail-content-video-info\" class=\"inspectEventDetail-content-video-info\" style=\"display: ").concat(this.type == 1 ? 'block' : 'none', ";\">\n              <p class=\"inspectEventDetail-content-video-tips\" style=\"display: ").concat(this.type == 1 ? 'none' : 'blcok', ";\">\u89C6\u9891\u5DF2\u53D6\u8BC1\uFF1A</p>\n              <div class=\"inspectEventDetail-content-video-detail\" id=\"").concat(this.jSPlugin.id, "-inspectEventDetail-videoPreview\"></div>\n            </div>\n          </div>"), "\n        <div class=\"inspectEventDetail-content-info\">\n          <div class=\"inspectEventDetail-content-info-item\">\n            <div class=\"inspectEventDetail-content-info-item-title\">\u4E8B\u4EF6\u65F6\u95F4\uFF1A</div>\n            <div id=\"").concat(this.jSPlugin.id, "-inspectEventDetail-content-info-time\" class=\"inspectEventDetail-content-info-item-value\"></div>\n          </div>\n          <div class=\"inspectEventDetail-content-info-item\">\n            <div class=\"inspectEventDetail-content-info-item-title\">\u5B58\u8BC1\u4EBA\u5458\uFF1A</div>\n            <div class=\"inspectEventDetail-content-info-item-value\">\n              ").concat(this.type === 1 ? this.currentEventInfo.depositaryOfficer ? this.currentEventInfo.depositaryOfficer === 'null' ? '-' : this.currentEventInfo.depositaryOfficer : '-' : this.inspectInfo.inspectPerson ? this.inspectInfo.inspectPerson === 'null' ? '-' : this.inspectInfo.inspectPerson : '-', "\n            </div>\n          </div>\n          <div class=\"inspectEventDetail-content-info-item\">\n            <div class=\"inspectEventDetail-content-info-item-title inspectEventDetail-content-info-item-title-required\">\u4E8B\u4EF6\u6807\u7B7E\uFF1A</div>\n            <div class=\"ezuikit-form-item-control-input\">\n              <div class=\"ezuikit-form-item-control-input-content\">\n                <input\n                  id=\"").concat(this.jSPlugin.id, "-event-tag\"\n                  maxlength=\"32\"\n                  type=\"text\"\n                  autocomplete=\"off\"\n                  id=\"control-ref_note\"\n                  class=\"ezuikit-input\"\n                  placeholder=\"\u8BF7\u8F93\u5165\u4E8B\u4EF6\u6807\u7B7E\"\n                  value=\"").concat(this.type === 1 ? this.currentEventInfo.eventType || '' : '', "\"\n                />\n              </div>\n              <div class=\"ezuikit-form-item-explain ezuikit-form-item-explain-connected\">\n                <div id=\"").concat(this.jSPlugin.id, "-event-tag-error\" class=\"ezuikit-form-item-explain-error\" style=\"display: none\">\u8BF7\u8F93\u5165\u4E8B\u4EF6\u6807\u7B7E</div>\n              </div>\n            </div>\n          </div>\n          <div class=\"inspectEventDetail-content-info-item\">\n            <div class=\"inspectEventDetail-content-info-item-title\">\u4E8B\u4EF6\u5907\u6CE8\uFF1A</div>\n            <div class=\"ezuikit-input-textarea ezuikit-input-textarea-show-count\" data-count=\"").concat(this.type === 1 ? this.currentEventInfo.eventRemark ? this.currentEventInfo.eventRemark.length : 0 : 0, " / 100\">\n              <textarea\n              id=\"").concat(this.jSPlugin.id, "-event-remark\"\n              maxlength=\"100\"\n              class=\"ezuikit-input\"\n              maxlength=\"100\"\n              placeholder=\"\u8BF7\u8F93\u5165\u4E8B\u4EF6\u5907\u6CE8\"\n              autocomplete=\"off\"\n              >").concat(this.type === 1 ? this.currentEventInfo.eventRemark || '' : '', "</textarea>\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class=\"inspectEventDetail-footer\">\n        <button id=\"").concat(this.jSPlugin.id, "-event-cancel\" class=\"inspectEventDetail-footer-btn ezuikit-btn\">\u53D6\u6D88</button>\n        <button id=\"").concat(this.jSPlugin.id, "-event-ok\" class=\"inspectEventDetail-footer-btn ezuikit-btn ezuikit-btn-primary\">\u4FDD\u5B58</button>\n      </div>\n    ");
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-detail-box")).appendChild(objDOM);
        if (this.type === 1) {
          // 编辑存证时
          document.getElementById("".concat(this.jSPlugin.id, "-inspectEventDetail-content-info-time")).innerHTML = "".concat(evidenceFileType === 1 ? this.currentEventInfo.eventBeginTime + " ~ " + this.currentEventInfo.eventEndTime : this.currentEventInfo.eventTime);
        } else {
          // 新增存证事件时
          document.getElementById("".concat(this.jSPlugin.id, "-inspectEventDetail-content-info-time")).innerHTML = "".concat(new Date().Format('yyyy-MM-dd hh:mm:ss')).concat(evidenceFileType === 1 ? ' ~ -' : '');
          // 视频录制计时效果
          if (evidenceFileType === 1 && document.getElementById("".concat(this.jSPlugin.id, "-video-recording-time")) && this.videoRecordingStatus) {
            this.type === 0 && document.getElementById("".concat(this.jSPlugin.id, "-event-ok")).setAttribute('disabled', 'disabled');
            this.timer.createInterval('videoRecordingTimer', function () {
              if (_this2.startTime) {
                document.getElementById("".concat(_this2.jSPlugin.id, "-video-recording-time")).innerHTML = formatDuring$1(_this2.startTime);
              }
              _this2.startTime += 1000;
              // 限制录制时长 ，如果超过最大录制时长，自动停止录制
              if (_this2.startTime > _this2.jSPlugin.inspectRecordingDuration) {
                document.getElementById("".concat(_this2.jSPlugin.id, "-video-recording-stop-btn")).click();
                _this2.timer && _this2.timer.clearTimer('videoRecordingTimer');
              }
            }, 1000);
          }
        }
        if (evidenceFileType === 1) {
          var videoSrc = this.currentEventInfo && this.currentEventInfo.fileUrl;
          this.renderVideo(taskStatus, picUrl, videoSrc);
        } else {
          // 图片存储效果渲染
          new Image$1({
            id: "".concat(this.jSPlugin.id, "-inspectEventDetail-picUrl"),
            src: picUrl,
            fallback: "".concat(this.jSPlugin.staticPath, "/imgs/fallback.svg"),
            showIcon: false
          });
        }
        this.show();
      }

      // 事件详情Dom事件监听
    }, {
      key: "eventDetailDomEvent",
      value: function eventDetailDomEvent() {
        var _this3 = this;
        var _this$currentEventInf2 = this.currentEventInfo,
          evidenceFileType = _this$currentEventInf2.evidenceFileType,
          evidenceId = _this$currentEventInf2.evidenceId;
        // 点击取消
        document.getElementById("".concat(this.jSPlugin.id, "-event-cancel")).addEventListener("click", function (e) {
          _this3.cancelPopover = new Popconfirm({
            id: "".concat(_this3.jSPlugin.id, "-event-cancel"),
            content: "\u786E\u5B9A\u8981\u53D6\u6D88\u5417\uFF1F".concat(_this3.type === 1 ? '取消后编辑的内容将不会保存。' : '取消后对应存证也将删除。'),
            placement: 'topRight',
            arrowPointAtCenter: true,
            onCancel: function onCancel() {
              _this3.cancelPopover.hide();
            },
            onConfirm: function onConfirm() {
              if (evidenceFileType === 1) {
                if (_this3.videoRecordingStatus && _this3.type === 0) {
                  _this3.timer && _this3.timer.clearTimer('videoRecordingTimer');
                  _this3.startTime = 1000;
                  document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).click();
                }
                _this3.timer.clearTimer('videoRecordingStatusTimer');
              }
              _this3.cancelPopover.hide();
              _this3.hide();
            }
          });
        });

        // 点击确定
        document.getElementById("".concat(this.jSPlugin.id, "-event-ok")).addEventListener("click", function () {
          var flag = _this3.validationEventTag();
          if (!flag) return;
          var _this3$currentEventIn = _this3.currentEventInfo,
            evidenceFileType = _this3$currentEventIn.evidenceFileType,
            evidenceId = _this3$currentEventIn.evidenceId;
          var _this3$inspectInfo = _this3.inspectInfo,
            inspectRecordId = _this3$inspectInfo.inspectRecordId,
            inspectPerson = _this3$inspectInfo.inspectPerson;
          var eTime = document.getElementById("".concat(_this3.jSPlugin.id, "-inspectEventDetail-content-info-time")).innerHTML;
          var params = {
            inspectRecordId: inspectRecordId,
            depositaryOfficer: inspectPerson,
            evidenceFileId: evidenceId,
            evidenceFileType: evidenceFileType,
            eventType: document.getElementById("".concat(_this3.jSPlugin.id, "-event-tag")).value,
            eventRemark: document.getElementById("".concat(_this3.jSPlugin.id, "-event-remark")).value
          };
          if (evidenceFileType === 1) {
            params.eventBeginTime = eTime.split('~')[0].trim();
            params.eventEndTime = eTime.split('~')[1].trim();
            _this3.timer.clearTimer('videoRecordingStatusTimer');
          }
          if (evidenceFileType === 0) {
            params.eventTime = eTime;
          }
          // 编辑存证事件
          if (_this3.type === 1) {
            params.inspectEventId = _this3.currentEventInfo.inspectEventId;
            delete params.depositaryOfficer;
            delete params.eventTime;
            delete params.eventBeginTime;
            delete params.eventEndTime;
            delete params.evidenceFileId;
            delete params.evidenceFileType;
            updateEvent(_this3.jSPlugin, params, function (data) {
              if (data.meta && data.meta.code === 200) {
                _this3.hide();
                _this3.saveSuccessCallback && _this3.saveSuccessCallback({
                  eventType: params.eventType,
                  eventRemark: params.eventRemark
                });
              } else {
                // 提示错误信息
                new Message({
                  type: 'error',
                  content: "\u4FDD\u5B58\u5931\u8D25\uFF0C".concat(data.meta && data.meta.message || '请稍后重试！'),
                  wrapNode: document.getElementById("".concat(_this3.jSPlugin.id, "-inspect-event-box")),
                  top: 40
                });
              }
            }, function () {
              // 提示错误信息
              new Message({
                type: 'error',
                content: '保存失败，请稍后重试！',
                wrapNode: document.getElementById("".concat(_this3.jSPlugin.id, "-inspect-event-box")),
                top: 40
              });
            });
          }
          // 新增存证事件
          if (_this3.type === 0) {
            addEvent(_this3.jSPlugin, params, function (data) {
              if (data.meta && data.meta.code === 200) {
                _this3.hide();
                _this3.saveSuccessCallback && _this3.saveSuccessCallback();
              } else {
                // 提示错误信息
                new Message({
                  type: 'error',
                  content: "\u4FDD\u5B58\u5931\u8D25\uFF0C".concat(data.meta && data.meta.message || '请稍后重试！'),
                  wrapNode: document.getElementById("".concat(_this3.jSPlugin.id, "-inspect-event-box")),
                  top: 40
                });
              }
            }, function () {
              // 提示错误信息
              new Message({
                type: 'error',
                content: '保存失败，请稍后重试！',
                wrapNode: document.getElementById("".concat(_this3.jSPlugin.id, "-inspect-event-box")),
                top: 40
              });
            });
          }
        });

        // 点击返回图片
        document.getElementById("".concat(this.jSPlugin.id, "-inspectEventDetail-back")).addEventListener("click", function () {
          _this3.backPopover = new Popconfirm({
            id: "".concat(_this3.jSPlugin.id, "-inspectEventDetail-back"),
            content: "\u786E\u5B9A\u8981\u8FD4\u56DE\u5417\uFF1F".concat(_this3.type === 1 ? '返回后编辑的内容将不会保存。' : '返回后对应存证也将删除。'),
            placement: 'bottomRight',
            arrowPointAtCenter: true,
            onCancel: function onCancel() {
              _this3.backPopover.hide();
            },
            onConfirm: function onConfirm() {
              if (evidenceFileType === 1) {
                if (_this3.videoRecordingStatus && _this3.type === 0) {
                  _this3.timer && _this3.timer.clearTimer('videoRecordingTimer');
                  _this3.startTime = 1000;
                  document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).click();
                }
                _this3.timer.clearTimer('videoRecordingStatusTimer');
              }
              _this3.backPopover.hide();
              _this3.hide();
            }
          });
        });

        // 点击停止录制
        if (document.getElementById("".concat(this.jSPlugin.id, "-video-recording-stop-btn"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-video-recording-stop-btn")).addEventListener("click", function () {
            document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).setAttribute('class', 'inspectEventDetail-stop-btn ezuikit-btn ezuikit-btn-loading');
            document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).querySelector('.ezuikit-btn-loading-icon').style.display = 'inline-block';
            evidenceStop(_this3.jSPlugin, evidenceId, function (res) {
              // 此处需要加上元素是否存在的判断，因为在视频录制过程中，点击返回/取消按钮的时候，会触发此事件，但是此时元素已经被删除了
              if (document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn"))) {
                document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).setAttribute('class', 'inspectEventDetail-stop-btn ezuikit-btn');
                document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).querySelector('.ezuikit-btn-loading-icon').style.display = 'none';
              }
              if (res.meta && res.meta.code === 200) {
                getTaskDetail(_this3.jSPlugin, evidenceId, function (data) {
                  if (data.meta && data.meta.code === 200) {
                    var _data$data2 = data.data,
                      taskStatus = _data$data2.taskStatus,
                      fileUrl = _data$data2.fileUrl,
                      videoCoverPic = _data$data2.videoCoverPic;
                    _this3.timer && _this3.timer.clearTimer('videoRecordingTimer');
                    var picUrl = videoCoverPic || "".concat(_this3.jSPlugin.staticPath, "/imgs/bg.svg");
                    _this3.renderVideo(taskStatus, picUrl, fileUrl);
                    document.getElementById("".concat(_this3.jSPlugin.id, "-inspectEventDetail-content-video-info")).style.display = 'block';
                    document.getElementById("".concat(_this3.jSPlugin.id, "-inspectEventDetail-content-video-timer")).style.display = 'none';
                    var currentTime = document.getElementById("".concat(_this3.jSPlugin.id, "-inspectEventDetail-content-info-time")).innerHTML;
                    document.getElementById("".concat(_this3.jSPlugin.id, "-inspectEventDetail-content-info-time")).innerHTML = "".concat(currentTime.split('~')[0], " ~ ").concat(new Date().Format('yyyy-MM-dd hh:mm:ss'));
                    _this3.videoRecordingStatus = false;
                    document.getElementById("".concat(_this3.jSPlugin.id, "-event-ok")).removeAttribute('disabled');
                  }
                });
              } else {
                new Message({
                  type: 'error',
                  content: '停止录制失败，请稍后重试！',
                  wrapNode: document.getElementById("".concat(_this3.jSPlugin.id, "-inspect-event-box")),
                  top: 40
                });
              }
            }, function () {
              // 此处需要加上元素是否存在的判断，因为在点击返回/取消按钮的时候，会先触发点击事件，然后才会触发录制成功的回调，如果在录制成功的回调中，再次点击停止录制，此时元素已经不存在了，所以会报错
              if (document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn"))) {
                document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).setAttribute('class', 'inspectEventDetail-stop-btn ezuikit-btn');
                document.getElementById("".concat(_this3.jSPlugin.id, "-video-recording-stop-btn")).querySelector('.ezuikit-btn-loading-icon').style.display = 'none';
              }
              new Message({
                type: 'error',
                content: '停止录制失败，请稍后重试！',
                wrapNode: document.getElementById("".concat(_this3.jSPlugin.id, "-inspect-event-box")),
                top: 40
              });
            });
          });
        }

        // 事件标签输入事件监听
        document.getElementById("".concat(this.jSPlugin.id, "-event-tag")).addEventListener('input', function () {
          _this3.validationEventTag();
        });

        // 事件备注输入事件监听
        document.getElementById("".concat(this.jSPlugin.id, "-event-remark")).addEventListener('input', function (e) {
          var value = e.target.value;
          e.target.parentNode.setAttribute('data-count', "".concat(value.length, " / 100"));
        });
        document.getElementById("".concat(this.jSPlugin.id, "-event-remark")).addEventListener('focus', function (e) {
          e.target.parentNode.setAttribute('class', 'ezuikit-input-textarea ezuikit-input-textarea-show-count ezuikit-input-textarea-focus');
        });
        document.getElementById("".concat(this.jSPlugin.id, "-event-remark")).addEventListener('blur', function (e) {
          e.target.parentNode.setAttribute('class', 'ezuikit-input-textarea ezuikit-input-textarea-show-count');
        });
      }
    }]);
    return InspectEventDetail;
  }();

  var InspectEvent = /*#__PURE__*/function () {
    function InspectEvent(jSPlugin, inspectRecordId, timer) {
      var _this = this;
      _classCallCheck$1(this, InspectEvent);
      // 删除二次确认框隐藏
      _defineProperty(this, "hideDelEConfirm", function () {
        // 滚动滚动条是隐藏删除事件的确认框
        for (var i = 0; i < _this.delEConfirmList.length; i++) {
          _this.delEConfirmList[i].hide();
        }
      });
      //巡检事件列表初始化
      _defineProperty(this, "initRender", function () {
        var that = _this;
        if (!document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box"))) {
          var objDOM = document.createElement('div');
          objDOM.id = "".concat(_this.jSPlugin.id, "-inspect-event-box");
          objDOM.setAttribute('class', 'inspect-event-box');
          var inspectInfoControlHeight = 0;
          if (document.getElementById("".concat(_this.jSPlugin.id, "-inspectInfoControl"))) {
            inspectInfoControlHeight = document.getElementById("".concat(_this.jSPlugin.id, "-inspectInfoControl")).clientHeight;
          }
          objDOM.style = "background: #fff;position: absolute;right: 0;bottom: 0; top:".concat(inspectInfoControlHeight, "px;");
          objDOM.innerHTML = "\n      <div id=\"".concat(_this.jSPlugin.id, "-inspect-event-list-box\" style=\"\n        width: 290px;\n        height: 100%;\n        overflow: hidden;\n        padding: 0;\n        box-sizing: border-box;\n      \">\n        <h1 style=\"\n          font-size: 16px;\n          color: #262626;\n          line-height: 24px;\n          font-weight: bold;\n          margin: 16px 16px 0;\n        \">\u5DE1\u68C0\u4E8B\u4EF6</h1>\n        <div id=\"").concat(_this.jSPlugin.id, "-inspect-event-btn-wrap\" style=\"\n          display: flex;\n          align-items: center;\n          justify-content: space-between;\n          padding: 16px 16px;\n        \">\n          <div>\n            <button\n              id=\"").concat(_this.jSPlugin.id, "-inspect-event-img\"\n              style=\"min-width: 88px; margin: 0 auto;\"\n              type=\"button\"\n              class=\"ezuikit-btn ezuikit-btn-primary\"\n            >\n            <span style=\"display:none\" class=\"ezuikit-btn-loading-icon\" style=\"\"><span role=\"img\" aria-label=\"loading\" class=\"anticon anticon-loading anticon-spin\"><svg viewBox=\"0 0 1024 1024\" focusable=\"false\" data-icon=\"loading\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\"></path></svg></span></span>\n            \u56FE\u7247\u5B58\u8BC1\n            </button>\n            <button\n              id=\"").concat(_this.jSPlugin.id, "-inspect-event-video\"\n              style=\"min-width: 88px; margin: 0 auto;\"\n              type=\"button\"\n              class=\"ezuikit-btn ezuikit-btn-primary\"\n            >\n            <span style=\"display:none\" class=\"ezuikit-btn-loading-icon\" style=\"\"><span role=\"img\" aria-label=\"loading\" class=\"anticon anticon-loading anticon-spin\"><svg viewBox=\"0 0 1024 1024\" focusable=\"false\" data-icon=\"loading\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\"></path></svg></span></span>\n            \u89C6\u9891\u5B58\u8BC1</button>\n          </div>\n          <div id=\"").concat(_this.jSPlugin.id, "-inspect-event-list-refresh\" style=\"\n            width: 17px;\n            height: 32px;\n            cursor: pointer;\n            display: flex;\n            align-items: center;\n            justify-content: center;\n          \">\n            <svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"13\" height=\"13\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n              <path fill=\"currentColor\" d=\"M960 416V192l-73.056 73.056a447.712 447.712 0 0 0-373.6-201.088C265.92 63.968 65.312 264.544 65.312 512S265.92 960.032 513.344 960.032a448.064 448.064 0 0 0 415.232-279.488 38.368 38.368 0 1 0-71.136-28.896 371.36 371.36 0 0 1-344.096 231.584C308.32 883.232 142.112 717.024 142.112 512S308.32 140.768 513.344 140.768c132.448 0 251.936 70.08 318.016 179.84L736 416h224z\"></path>\n            </svg>\n          </div>\n        </div>\n        <div\n          id=\"").concat(_this.jSPlugin.id, "-inspect-loading\"\n          class=\"inspect-loading\"\n          style=\"\n            height: calc(100% - 104px);\n            position: absolute; bottom: 0; right: 0;background: #fff; bottom: 0; right: 0; z-index: 99; width: 100%; align-items: center; justify-content: center;\n            display: ").concat(_this.listLoading ? 'flex' : 'none', "\n          \">\n          <div type=\"default\" class=\"ezuikit-spin ezuikit-spin-spinning\"><span class=\"ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default\"><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i></span></div>\n        </div>\n        <div id=\"").concat(_this.jSPlugin.id, "-inspect-event-list-nodata-wrap\" style=\"\n          display: none;\n          height: calc(100% - 104px);\n          text-align: center;overflow: auto;\n        \"> \n          <img style=\"width: 85px;height: 85px; margin: 120px auto 0;\" src=\"").concat(_this.jSPlugin.staticPath, "/imgs/empty.png\" />\n          <p style=\"font-size: 14px;color: #595959;text-align: center;line-height: 22px;margin: 0;\">\u6682\u65E0\u4E8B\u4EF6</p>\n        </div>\n        <div class=\"inspect-event-list-wrap\" id=\"").concat(_this.jSPlugin.id, "-inspect-event-list-wrap\"\n          style=\"display: none; height: calc(100% - 104px); overflow-x: hidden; overflow-y: auto; padding-top: 4px; box-sizing: border-box; \">\n          <div id=\"").concat(_this.jSPlugin.id, "-inspect-event-list-wrap-main\"></div>\n          <div id=\"").concat(_this.jSPlugin.id, "-inspect-event-list-more-loading\" style=\"display: none;align-items: center;justify-content: center;\" class=\"inspect-event-list-more-loading\">\n            <div type=\"default\" class=\"ezuikit-spin ezuikit-spin-spinning\"><span class=\"ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default\"><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i></span></div>\n          </div>\n        </div>\n      </div>\n      <div id=\"").concat(_this.jSPlugin.id, "-inspect-event-detail-wrap\" class=\"inspect-event-detail-wrap\" style=\"\n        height: 100%;\n      \">\n        <h1 style=\"\n          font-size: 16px;\n          color: #262626;\n          line-height: 24px;\n          font-weight: bold;\n          margin: 16px 16px 0;\n        \">\u5DE1\u68C0\u4E8B\u4EF6</h1>\n        <div id=\"").concat(_this.jSPlugin.id, "-inspect-event-detail-box\"></div>\n      </div>\n      ");
          document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).appendChild(objDOM);

          // 视频播放状态判断
          if (_this.jSPlugin.Theme.decoderState.state.play) {
            _this.enableEvidenceBtn();
          } else {
            _this.disableEvidenceBtn();
          }

          // 点击图片存证
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-img")).onclick = function () {
            if (_this.listLoading || _this.startEvidence) return;
            _this.startEvidence = true;
            // 滚动滚动条是隐藏删除事件的确认框
            _this.hideDelEConfirm();
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-img")).setAttribute('class', 'ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading');
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-img")).querySelector('.ezuikit-btn-loading-icon').style.display = 'inline-block';
            evidence(_this.jSPlugin, 0, function (data) {
              _this.startEvidence = false;
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-img")).setAttribute('class', 'ezuikit-btn ezuikit-btn-primary');
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-img")).querySelector('.ezuikit-btn-loading-icon').style.display = 'none';
              if (data.meta && data.meta.code === 200) {
                new InspectEventDetail(_this.jSPlugin, data.data, _this.timer, 0, function () {
                  _this.initEvent();
                  new Message({
                    type: 'success',
                    content: '保存成功',
                    wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                    top: 40
                  });
                });
              } else {
                new Message({
                  type: 'error',
                  content: "\u56FE\u7247\u5B58\u8BC1\u5931\u8D25\uFF0C".concat(data.meta && data.meta.message || '请稍后重试！'),
                  wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                  top: 40
                });
              }
            }, function () {
              _this.startEvidence = false;
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-img")).setAttribute('class', 'ezuikit-btn ezuikit-btn-primary');
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-img")).querySelector('.ezuikit-btn-loading-icon').style.display = 'none';
              new Message({
                type: 'error',
                content: '图片存证失败，请稍后重试！',
                wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                top: 40
              });
            });
          };

          // 点击视频存证
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-video")).onclick = function () {
            if (_this.listLoading || _this.startEvidence) return;
            _this.startEvidence = true;
            // 滚动滚动条是隐藏删除事件的确认框
            _this.hideDelEConfirm();
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-video")).setAttribute('class', 'ezuikit-btn ezuikit-btn-primary ezuikit-btn-loading');
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-video")).querySelector('.ezuikit-btn-loading-icon').style.display = 'inline-block';
            evidence(_this.jSPlugin, 1, function (data) {
              _this.startEvidence = false;
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-video")).setAttribute('class', 'ezuikit-btn ezuikit-btn-primary');
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-video")).querySelector('.ezuikit-btn-loading-icon').style.display = 'none';
              if (data.meta && data.meta.code === 200) {
                new InspectEventDetail(_this.jSPlugin, data.data, _this.timer, 0, function () {
                  _this.initEvent();
                  new Message({
                    type: 'success',
                    content: '保存成功',
                    wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                    top: 40
                  });
                });
              } else {
                new Message({
                  type: 'error',
                  content: "\u89C6\u9891\u5B58\u8BC1\u5931\u8D25\uFF0C".concat(data.meta && data.meta.message || '请稍后重试！'),
                  wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                  top: 40
                });
              }
            }, function () {
              _this.startEvidence = false;
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-video")).setAttribute('class', 'ezuikit-btn ezuikit-btn-primary');
              document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-video")).querySelector('.ezuikit-btn-loading-icon').style.display = 'none';
              new Message({
                type: 'error',
                content: '视频存证失败，请稍后重试！',
                wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                top: 40
              });
            });
          };

          // 点击刷新
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-refresh")).onclick = function () {
            if (_this.listLoading || _this.startEvidence) return;
            // 滚动滚动条是隐藏删除事件的确认框
            _this.hideDelEConfirm();
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-loading")).style.display = 'block';
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-wrap")).style.display = 'none';
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-nodata-wrap")).style.display = 'none';
            that.initEvent();
          };
        } else {
          if (document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box"))) {
            document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).removeChild(document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")));
          }
          that.initRender();
        }
      });
      /**
       * 渲染巡检事件列表
       * @param {*} list 
       */
      _defineProperty(this, "renderList", function (data) {
        // 隐藏loading
        document.getElementById("".concat(_this.jSPlugin.id, "-inspect-loading")).style.display = 'none';
        var list = data.data || [];
        if (list.length > 0) {
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-wrap")).style.display = 'block';
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-nodata-wrap")).style.display = 'none';
          var _loop = function _loop() {
            var objItem = document.createElement('div');
            objItem.setAttribute('class', 'inspect-event-item');
            var innerHTML = '';
            var item = list[i];
            objItem.setAttribute('id', "".concat(_this.jSPlugin.id, "-inspect-event-item-").concat(item.inspectEventId));
            objItem.innerHTML = innerHTML;
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-wrap-main")).appendChild(objItem);
            // 头部
            var itemHeader = document.createElement('div');
            itemHeader.setAttribute('class', 'inspect-event-item-header-wrap');
            var time;
            if (item.evidenceFileType == 1) {
              time = "".concat(item.eventBeginTime.split(' ')[1], "~").concat(item.eventEndTime.split(' ')[1]);
            }
            if (item.evidenceFileType == 0) {
              time = "".concat(item.eventTime.split(' ')[1]);
            }
            var videoInspectStatus = '';
            if (item.evidenceFileType === 1) {
              if (item.taskStatus === 1 || item.taskStatus === 2) {
                //存储中 1–等待中 2–处理中
                videoInspectStatus = 'storage';
              } else if (item.taskStatus === 4 || item.taskStatus === 5 || item.taskStatus === 6 || item.taskStatus === 7) {
                //存储失败 4–异常结束
                videoInspectStatus = 'storage-error';
              } else if (item.taskStatus === 0 || item.taskStatus === 3) {
                //存储完成 0–已完成 3–已结束
                videoInspectStatus = 'storage-success';
              }
            }
            itemHeader.innerHTML = "\n        <div class=\"inspect-event-item-header ".concat(videoInspectStatus, "\">\n        <div class=\"inspect-event-item-header-left\">\n          <span class=\"inspect-event-item-status-wrap\">\n            <span class=\"inspect-event-item-status\"></span>\n          </span>\n          <svg fill=\"currentColor\" style=\"display: ").concat(item.evidenceFileType === 1 ? 'block' : 'none', "\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n\t          viewBox=\"0 0 14 12\" style=\"enable-background:new 0 0 14 12;\" xml:space=\"preserve\">\n            <path d=\"M1,12c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1h12c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1z M1,11h1.6l0-3.5H1V11z\n            M10.5,1h-7v10h7V1z M13,7.5h-1.6l0,3.5H13V7.5z M6.1,4.2l2.3,1.2c0.4,0.2,0.4,0.6,0,0.8L8.1,6.3l-2,1c-0.2,0.1-0.4,0-0.4-0.2V4.4\n            C5.7,4.2,5.9,4.1,6.1,4.2z M13,6.6V4.9h-1.6v1.8H13z M1,6.6h1.6V4.9H1V6.6z M13,4V1h-1.6l0,3H13z M2.6,1H1v3h1.6L2.6,1z\"/>\n          </svg>\n          <svg fill=\"currentColor\" style=\"display: ").concat(item.evidenceFileType === 1 ? 'none' : 'block', "\" width=\"16\" height=\"16\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\"\n            viewBox=\"0 0 14 12\" style=\"enable-background:new 0 0 14 12;\" xml:space=\"preserve\">\n            <path class=\"st0\" d=\"M13,0c0.6,0,1,0.4,1,1v10c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1H13z M10.4,6.2L5.6,9.8L3.8,8\n            L1,10v1h12V9L10.4,6.2z M13,1H1v7.8l2.9-2.1l1.8,1.8l4.9-3.6L13,7.5V1z M5.5,2C6.3,2,7,2.7,7,3.5S6.3,5,5.5,5S4,4.3,4,3.5\n            S4.7,2,5.5,2z M5.5,3C5.2,3,5,3.2,5,3.5S5.2,4,5.5,4S6,3.8,6,3.5S5.8,3,5.5,3z\"/>\n          </svg>\n          <span class=\"inspect-event-item-time\">").concat(time || '-', "</span>\n        </div>\n        <div class=\"inspect-event-item-header-right\">\n          <span class=\"inspect-event-item-header-toggle\">\n          <svg fill=\"currentColor\" class=\"inspect-event-item-header-toggle-up\" style=\"display: none;\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\"><path d=\"M218.496 645.312l46.464 44.032 247.616-261.568 246.4 261.504 46.528-43.904-292.8-310.72z\"></path></svg>  \n          <svg fill=\"currentColor\" class=\"inspect-event-item-header-toggle-down\"  viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\"><path d=\"M218.496 378.688l46.464-44.032 247.616 261.568 246.4-261.504 46.528 43.904-292.8 310.72z\"></path></svg>\n          </span>\n        </div>\n        </div>\n        ");
            objItem.appendChild(itemHeader);
            // 点击头部展开/收起切换效果
            itemHeader.onclick = function (e) {
              var tag = itemHeader.querySelector('.inspect-event-item-header-toggle-up').style.display;
              if (tag === 'none') {
                itemHeader.querySelector('.inspect-event-item-header-toggle-up').style.display = 'block';
                itemHeader.querySelector('.inspect-event-item-header-toggle-down').style.display = 'none';
                objItem.querySelector('.inspect-event-item-body').style.display = 'block';
              } else {
                itemHeader.querySelector('.inspect-event-item-header-toggle-up').style.display = 'none';
                itemHeader.querySelector('.inspect-event-item-header-toggle-down').style.display = 'block';
                objItem.querySelector('.inspect-event-item-body').style.display = 'none';
              }
            };
            var itemBody = document.createElement('div');
            itemBody.setAttribute('class', 'inspect-event-item-body');
            itemBody.style.display = 'none';
            var imgSrc = (item.evidenceFileType === 1 ? item.videoCoverPic : item.fileUrl) || "".concat(_this.jSPlugin.staticPath, "/imgs/bg.svg");
            itemBody.innerHTML = "\n        <div class=\"inspect-event-item-img\" id=\"".concat(_this.jSPlugin.id, "-inspect-view-").concat(item.inspectEventId, "\"></div>\n        <div class=\"inspect-event-item-body-info\">\n          <div class=\"inspect-event-item-body-info-tag\">\n            <span class=\"inspect-event-item-body-info-tag-label\" title=\"").concat(item.eventType, "\">").concat(item.eventType, "</span>\n          </div>\n        </div>\n        ");
            objItem.appendChild(itemBody);
            if (item.evidenceFileType == 1) {
              if (item.taskStatus === 1 || item.taskStatus === 2) {
                //存储中 1–等待中 2–处理中
                document.getElementById("".concat(_this.jSPlugin.id, "-inspect-view-").concat(item.inspectEventId)).innerHTML = "\n              <div class=\"video-stroage-exceptional-status-tips-wrap\" style=\"background:url(".concat(_this.jSPlugin.staticPath, "/imgs/bg.svg) no-repeat 100%/cover\">\n                <div class=\"video-stroage-exceptional-status-icon\">\n                <div type=\"default\" class=\"ezuikit-spin ezuikit-spin-sm ezuikit-spin-spinning ezuikit-spin-dot-white\"><span class=\"ezuikit-spin-dot ezuikit-spin-dot-spin ezuikit-spin-dot-default\"><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i><i class=\"ezuikit-spin-dot-item\"></i></span></div>\n                </div>\n                <span class=\"video-stroage-exceptional-status-tips\">\u89C6\u9891\u6B63\u5728\u5B58\u50A8\u4E2D\u2026</span>\n              </div>\n            ");
              } else if (item.taskStatus === 4) {
                //存储失败 4–异常结束
                //存储失败 4–异常结束
                document.getElementById("".concat(_this.jSPlugin.id, "-inspect-view-").concat(item.inspectEventId)).innerHTML = "\n            <div class=\"video-stroage-exceptional-status-tips-wrap video-stroage-exceptional-status-tips-error\" style=\"background:url(".concat(_this.jSPlugin.staticPath, "/imgs/bg.svg) no-repeat 100%/cover\">\n              <div class=\"video-stroage-exceptional-status-icon\">\n                <svg fill=\"currentColor\" t=\"1691567317943\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"1em\" height=\"1em\"><path d=\"M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m32 664a8 8 0 0 1-8 8h-48a8 8 0 0 1-8-8v-272c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272zM512 384a48 48 0 1 1 0-96A48 48 0 0 1 512 384z\"></path></svg>\n              </div>\n              <span class=\"video-stroage-exceptional-status-tips\">\u89C6\u9891\u5B58\u50A8\u5931\u8D25</span>\n            </div>\n            ");
              } else if (item.taskStatus === 0 || item.taskStatus === 3) {
                //存储完成 0–已完成 3–已结束
                new Video({
                  id: "".concat(_this.jSPlugin.id, "-inspect-view-").concat(item.inspectEventId),
                  src: item.fileUrl,
                  poster: imgSrc,
                  fallback: "".concat(_this.jSPlugin.staticPath, "/imgs/bg.svg")
                });
              }
            }
            if (item.evidenceFileType == 0) {
              new Image$1({
                id: "".concat(_this.jSPlugin.id, "-inspect-view-").concat(item.inspectEventId),
                src: imgSrc,
                fallback: "".concat(_this.jSPlugin.staticPath, "/imgs/bg.svg"),
                showIcon: false
              });
            }
            var oprItm = document.createElement('div');
            oprItm.setAttribute('class', 'inspect-event-item-body-info-opr');
            var updateEventDom = document.createElement('span');
            updateEventDom.setAttribute('class', 'inspect-event-item-body-info-opr-icon');
            updateEventDom.innerHTML = "\n          <svg fill=\"currentColor\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\"><path d=\"M612.992 121.984a64 64 0 0 1 90.496 0l153.92 153.92a64 64 0 0 1 0 90.496l-435.2 435.2a96 96 0 0 1-23.04 17.024l525.312-0.128v64H175.808v-2.304a64 64 0 0 1-66.496-77.632l43.776-199.296a96 96 0 0 1 25.92-47.296zM523.072 302.4l-298.88 298.88a32 32 0 0 0-8.576 15.744l-43.776 199.296 190.848-51.712a32 32 0 0 0 14.272-8.256l300.032-300.032-153.92-153.92z m135.168-135.168L568.32 257.088l153.92 153.984 89.92-89.92-153.92-153.92z\"></path></svg>\n        ";
            oprItm.appendChild(updateEventDom);
            var delEventDom = document.createElement('span');
            delEventDom.setAttribute('class', 'inspect-event-item-body-info-opr-icon');
            delEventDom.id = "".concat(_this.jSPlugin.id, "-inspect-event-del-").concat(item.inspectEventId);
            delEventDom.innerHTML = " \n          <svg fill=\"currentColor\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"16\" height=\"16\"><path d=\"M128 320V256h767.872v64H832v512a64 64 0 0 1-64 64H256a64 64 0 0 1-64-64V320H128z m640 0H256v512h512V320zM464 432v256h-64v-256h64z m160 0v256h-64v-256h64zM704 128v64H320V128h384z\"></path></svg>\n        ";
            oprItm.appendChild(delEventDom);
            // 修改事件
            updateEventDom.onclick = function (e) {
              if (_this.startEvidence) return;
              new InspectEventDetail(_this.jSPlugin, item, _this.timer, 1, function (updateData) {
                new Message({
                  type: 'success',
                  content: '保存成功',
                  wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                  top: 40
                });
                item = Object.assign(item, updateData);
                document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-item-").concat(item.inspectEventId)).querySelector('.inspect-event-item-body-info-tag-label').innerHTML = item.eventType;
                document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-item-").concat(item.inspectEventId)).querySelector('.inspect-event-item-body-info-tag-label').setAttribute('title', item.eventType);
              });
            };
            // 删除事件
            delEventDom.onclick = function (e) {
              if (_this.startEvidence) return;
              _this.delE = new Popconfirm({
                id: "".concat(_this.jSPlugin.id, "-inspect-event-del-").concat(item.inspectEventId),
                // parentNodeId: `${this.jSPlugin.id}-inspect-event-list-wrap`,
                content: '确定要删除该事件吗？',
                placement: 'topRight',
                arrowPointAtCenter: true,
                onCancel: function onCancel() {
                  _this.delE.hide();
                },
                onConfirm: function onConfirm() {
                  deleteEvent(_this.jSPlugin, {
                    inspectEventId: item.inspectEventId
                  }, function (data) {
                    if (data.meta && data.meta.code === 200) {
                      _this.delE.hide();
                      _this.initEvent();
                      setTimeout(function () {
                        new Message({
                          type: 'success',
                          content: '删除成功',
                          wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                          top: 40
                        });
                      }, 10);
                    } else {
                      new Message({
                        type: 'error',
                        content: "\u5220\u9664\u5931\u8D25\uFF0C".concat(data.meta && data.meta.message || '请稍后重试！'),
                        wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                        top: 40
                      });
                    }
                  }, function () {
                    new Message({
                      type: 'error',
                      content: '删除失败，请稍后重试！',
                      wrapNode: document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-box")),
                      top: 40
                    });
                  });
                }
              });
              _this.delEConfirmList.push(_this.delE);
            };
            objItem.querySelector('.inspect-event-item-body-info').appendChild(oprItm);
            /**
             *  -inspect-event-list-wrap 增加滚动监听事件
             * 滚动到底部时，加载更多数据
             */
            document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-wrap")).onscroll = function (e) {
              var target = e.target;
              // 滚动滚动条是隐藏删除事件的确认框
              _this.hideDelEConfirm();

              // 滚动到底部时，加载更多数据
              if (target.scrollTop + target.offsetHeight >= target.scrollHeight - 48 && !_this.listLoading) {
                if ((data.start + 1) * data.size < data.total) {
                  _this.initEvent(data.start + 1);
                }
              }
            };
          };
          for (var i = 0; i < list.length; i++) {
            _loop();
          }
        } else {
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-wrap")).style.display = 'none';
          document.getElementById("".concat(_this.jSPlugin.id, "-inspect-event-list-nodata-wrap")).style.display = 'block';
        }
      });
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度
      this.inspectRecordId = inspectRecordId;
      this.timer = timer;
      this.listLoading = false; // 列表loading
      this.startEvidence = false; // 是否开始存证
      this.delEConfirmList = []; // 删除事件确认框
      this.videoHeight = document.getElementById("".concat(jSPlugin.id, "-wrap")).clientHeight - document.getElementById("".concat(jSPlugin.id, "-inspectInfoControl")).clientHeight || jSPlugin.height; //视频窗口高度
      this.initEvent();
    }
    _createClass$1(InspectEvent, [{
      key: "initEvent",
      value: function initEvent() {
        var _this2 = this;
        var startPage = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
        var pageSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 30;
        var that = this;
        that.listLoading = true;
        if (startPage === 0) {
          that.initRender(startPage);
        } else {
          // 显示加载更多loading效果
          document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-list-more-loading")).style.display = 'flex';
        }
        var errorCallback = function errorCallback(data) {
          new Message({
            type: 'error',
            content: data.meta && data.meta.message || '列表获取失败，请稍后重试！',
            wrapNode: document.getElementById("".concat(_this2.jSPlugin.id, "-inspect-event-box")),
            top: 40
          });
          // 显示列表为空效果
          that.renderList({});
        };
        getEventList(that.jSPlugin, that.inspectRecordId, startPage, pageSize, function (data) {
          that.listLoading = false;
          document.getElementById("".concat(_this2.jSPlugin.id, "-inspect-event-list-more-loading")).style.display = 'none';
          if (data.meta && data.meta.code === 200) {
            that.renderList(data.data || {});
          } else {
            errorCallback(data);
          }
        }, function (err) {
          that.listLoading = false;
          document.getElementById("".concat(_this2.jSPlugin.id, "-inspect-event-list-more-loading")).style.display = 'none';
          errorCallback(err);
        });
      }
    }, {
      key: "disableEvidenceBtn",
      value:
      /**
       * 图片存证和视频存证按钮不可用
       */
      function disableEvidenceBtn() {
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-img")).setAttribute('disabled', 'disabled');
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-video")).setAttribute('disabled', 'disabled');
      }

      /**
       * 图片存证和视频存证按钮可用
       */
    }, {
      key: "enableEvidenceBtn",
      value: function enableEvidenceBtn() {
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-img")).removeAttribute('disabled');
        document.getElementById("".concat(this.jSPlugin.id, "-inspect-event-video")).removeAttribute('disabled');
      }
    }]);
    return InspectEvent;
  }();

  //远程解锁组件-pc
  var SmallWinControl = /*#__PURE__*/function () {
    function SmallWinControl(jSPlugin, inspectMode, inspectMapWin, changeInspectMode, decoderState) {
      var _this = this;
      _classCallCheck$1(this, SmallWinControl);
      /**
       * 百度自定义控件
       * 点击回到设备位置（轨迹定最后一个位置）
       */
      _defineProperty(this, "createLocationControl", function () {
        var that = _this;
        // 定位控件
        function LocationControl() {
          // 默认停靠位置和偏移量
          this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT;
          this.defaultOffset = new BMapGL.Size(40, 105);
        }
        // 通过JavaScript的prototype属性继承于BMap.Control
        LocationControl.prototype = new BMapGL.Control();

        // 自定义控件必须实现initialize方法，并且将控件的DOM元素返回
        // 在本方法中创建个div元素作为控件的容器，并将其添加到地图容器中
        LocationControl.prototype.initialize = function (map) {
          // 创建一个DOM元素
          var div = document.createElement("div");
          // 添加样式
          div.style.cssText = "width: 26px;height: 26px;display: flex;align-items: center;justify-content: center; box-shadow: 1px 2px 1px rgb(0 0 0 / 15%); background: #fff; cursor: pointer;";
          div.id = "".concat(that.jSPlugin.id, "-location-btn");
          div.innerHTML = "<svg fill=\"#3385ff\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n        <path d=\"M510.976716 128.626761c-211.205756 0-382.401119 171.195363-382.401119 382.401119s171.195363 382.401119 382.401119 382.401119S893.377836 722.131308 893.377836 510.925552 722.182472 128.626761 510.976716 128.626761zM736.508444 736.45728c-29.265914 29.265914-63.443589 52.289797-101.407415 68.355351-29.265914 12.381733-59.964425 20.158689-91.481563 23.433197L543.619466 704.019187l-63.443589 0 0 124.431298c-32.233437-3.069851-63.443589-10.949136-93.323474-23.535525-37.963825-16.065554-72.039173-39.089437-101.407415-68.355351-29.265914-29.265914-52.289797-63.443589-68.355351-101.407415-12.381733-29.265914-20.158689-59.964425-23.433197-91.481563l126.273209 0 0-63.443589L193.554112 480.227041c3.069851-32.233437 10.949136-63.443589 23.535525-93.323474 16.065554-37.963825 39.089437-72.039173 68.355351-101.407415 29.265914-29.265914 63.443589-52.289797 101.407415-68.355351 29.879884-12.58639 61.090037-20.465674 93.323474-23.535525l0 125.863895 63.443589 0L543.619466 193.707605c31.517138 3.172179 62.215649 11.051464 91.481563 23.433197 37.963825 16.065554 72.039173 39.089437 101.407415 68.355351 29.265914 29.265914 52.289797 63.443589 68.355351 101.407415 12.58639 29.879884 20.465674 61.090037 23.535525 93.323474L703.251724 480.227041l0 63.443589 125.045268 0c-3.172179 31.517138-11.051464 62.215649-23.433197 91.481563C788.798241 673.01369 765.876686 707.089038 736.508444 736.45728z\" p-id=\"1506\"></path><path d=\"M516.093135 415.248526c-56.280604 0-100.793445 43.489557-100.793445 99.770161s44.512841 101.816728 100.793445 101.816728S616.886579 571.29929 616.886579 515.018687 572.373738 415.248526 516.093135 415.248526z\" p-id=\"1507\"></path>\n      </svg>";
          // 绑定事件
          div.onclick = function (e) {
            setTimeout(function () {
              that.inspectMapWin.centerToTrack(18);
            }, 100);
          };
          // 添加DOM元素到地图中
          map.getContainer().appendChild(div);
          // 将DOM元素返回
          return div;
        };
        // 创建控件
        return new LocationControl();
      });
      /**
       * 初始化小窗口切换按钮
       */
      _defineProperty(this, "initSwithcBtn", function () {
        var miniSwitchDOM = document.createElement('div');
        miniSwitchDOM.id = "".concat(_this.jSPlugin.id, "-miniSwitch");
        miniSwitchDOM.style = "cursor: pointer;position: absolute; bottom: 106px; right: ".concat(_this.jSPlugin.inspectVideoWidth + 10, "px; z-index: 999;");
        miniSwitchDOM.innerHTML = "<div id='".concat(_this.jSPlugin.id, "-miniSwitch-btn' style=\"width: 32px;height: 32px;display: flex;align-items: center;justify-content: center;border-radius: 50%;background: rgba(0,0,0,0.70);\">\n      <svg width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n          <title>\u5927\u5C0F\u7A97\u5207\u6362</title>\n          <g id=\"icon/\u5927\u5C0F\u7A97\u5207\u6362\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n              <rect id=\"\u77E9\u5F62\" x=\"0\" y=\"0\" width=\"24\" height=\"24\"></rect>\n              <path d=\"M16,3.25 C17.5187831,3.25 18.75,4.48121694 18.75,6 L18.75,6 L18.75,6.644 L19.095177,6.64456257 C20.6299163,6.64456257 21.9388658,7.64624846 22.0337198,8.99291851 L22.0392202,9.14979714 L22.0392202,17.639328 C22.0392202,19.0115638 20.7871129,20.0640733 19.2712041,20.1401546 L19.095177,20.1445626 L8.48326347,20.1445626 C6.94852423,20.1445626 5.63957467,19.1428767 5.54472071,17.7962066 L5.53922025,17.639328 L5.539,16.75 L5,16.75 C3.53746816,16.75 2.34159572,15.6082954 2.25501879,14.1675223 L2.25,14 L2.25,6 C2.25,4.48121694 3.48121694,3.25 5,3.25 L5,3.25 Z M18.75,14 C18.75,15.5187831 17.5187831,16.75 16,16.75 L16,16.75 L7.039,16.75 L7.03922025,17.639328 C7.03922025,18.1209822 7.57916546,18.5830417 8.33031492,18.6389177 L8.48326347,18.6445626 L19.095177,18.6445626 C19.873026,18.6445626 20.4615868,18.2126064 20.5321184,17.735283 L20.5392202,17.639328 L20.5392202,9.14979714 C20.5392202,8.66814298 19.999275,8.20608342 19.2481256,8.15020744 L19.095177,8.14456257 L18.75,8.144 Z M16,4.75 L5,4.75 C4.30964406,4.75 3.75,5.30964406 3.75,6 L3.75,6 L3.75,14 C3.75,14.6903559 4.30964406,15.25 5,15.25 L5,15.25 L16,15.25 C16.6903559,15.25 17.25,14.6903559 17.25,14 L17.25,14 L17.25,8.144 L17.2422027,8.14456257 L17.2422027,6.64456257 L17.25,6.644 L17.25,6 C17.25,5.35279131 16.7581253,4.8204661 16.1278052,4.75645361 L16,4.75 Z\" id=\"\u5F62\u72B6\u7ED3\u5408\" fill=\"#FFFFFF\" fill-rule=\"nonzero\"></path>\n          </g>\n      </svg>\n    </div>");
        document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).appendChild(miniSwitchDOM);
        document.getElementById("".concat(_this.jSPlugin.id, "-miniSwitch-btn")).onclick = function () {
          //小窗口切换
          _.throttle(function () {
            return _this.miniRecSwitchClick();
          }, 1000)();
          // this.miniRecSwitchClick()
        };
      });
      /**
       * 初始化小窗口收缩展开按钮
       */
      _defineProperty(this, "initMiniWinToggleBtn", function () {
        var clientWidth = _this.videoWidth;
        var clientHeight = _this.videoHeight;
        var smallWinWidth = clientWidth * 0.3333;
        var smallWinHeight = clientHeight * 0.3333;
        var miniToggleDOM = document.createElement('div');
        miniToggleDOM.id = "".concat(_this.jSPlugin.id, "-miniToggle");
        miniToggleDOM.style = "cursor: pointer;position: absolute; bottom: ".concat(smallWinHeight / 2 + 96 - 30, "px; right: ").concat(_this.jSPlugin.inspectVideoWidth + smallWinWidth, "px; z-index: 999; height:60px; box-sizing: border-box; padding-top: 20px; text-align: center; width:20px; overflow: hidden; background: #000000; border-radius: 2px 0px 0px 2px; opacity: 0.7;");
        miniToggleDOM.innerHTML = "<div id='".concat(_this.jSPlugin.id, "-miniToggle-btn'>\n    <svg id=\"").concat(_this.jSPlugin.id, "-min-win-close-icon\" style=\"display: inline-block\" width=\"20px\" height=\"20px\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"10867\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n        <path d=\"M378.688 217.856l-44.032 46.464 261.568 247.616-261.504 246.4 43.904 46.528 310.72-292.8z\" fill=\"#ffffff\" p-id=\"10868\"></path>\n      </svg>\n    <svg id=\"").concat(_this.jSPlugin.id, "-min-win-open-icon\" style=\"display: none\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"10671\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"20\" height=\"20\">\n        <path d=\"M645.312 217.856l44.032 46.464-261.568 247.616 261.504 246.4-43.904 46.528-310.72-292.8z\" fill=\"#ffffff\" p-id=\"10672\"></path>\n      </svg>\n    </div>");
        document.getElementById("".concat(_this.jSPlugin.id, "-wrap")).appendChild(miniToggleDOM);
        document.getElementById("".concat(_this.jSPlugin.id, "-miniToggle")).onclick = function () {
          //小窗口切换
          _this.miniWinToggleClick();
        };
      });
      //小窗口窗口绘制
      _defineProperty(this, "init", function () {
        _this.initSwithcBtn();
        _this.initMiniWinToggleBtn();
      });
      /**
      * 根据多个id查询元素，修改对应元素多个样式列表
      * @param {Array} 内部包含id和styleList的对象数组
      */
      _defineProperty(this, "setStyleListByIds", function (ids) {
        ids.map(function (item) {
          var dom = document.getElementById(item.id);
          if (dom) {
            Object.keys(item.styleList).map(function (styleItem) {
              dom.style[styleItem] = item.styleList[styleItem];
            });
          }
        });
      });
      this.jSPlugin = jSPlugin;
      this.inspectMode = inspectMode;
      this.inspectMapWin = inspectMapWin;
      this.changeInspectMode = changeInspectMode;
      this.videoWidth = jSPlugin.width; //视频窗口宽度
      this.videoHeight = jSPlugin.height; //视频窗口高德
      this.minWinStatus = 'open'; //小窗口状态
      this.decoderState = decoderState;
      //左上角，添加默认缩放平移控件
      this.ZoomControl = new BMapGL.ZoomControl({
        anchor: BMAP_ANCHOR_BOTTOM_LEFT,
        offset: new BMapGL.Size(40, 50)
      });
      // 百度地图定位控件
      this.LocationControl = this.createLocationControl();
      this.NavigationControl3D = new BMapGL.NavigationControl3D({
        anchor: BMAP_ANCHOR_BOTTOM_LEFT,
        offset: new BMapGL.Size(28, 105)
      });
      this.init();
    }
    _createClass$1(SmallWinControl, [{
      key: "miniWinToggleClick",
      value:
      /**
       * 小窗口收缩展开
       */
      function miniWinToggleClick() {
        var clientWidth = this.jSPlugin.width;
        var smallWinWidth = clientWidth * 0.3333;
        if (this.minWinStatus === 'open') {
          this.setStyleListByIds([{
            // 视频OR地图窗口
            id: this.inspectMode === 'video' ? "".concat(this.jSPlugin.id, "-mapbox") : "".concat(this.jSPlugin.id),
            styleList: {
              width: '0px'
            }
          }, {
            // 大小窗口切换按钮
            id: "".concat(this.jSPlugin.id, "-miniSwitch"),
            styleList: {
              display: 'none'
            }
          }, {
            // 小窗口收缩展开按钮
            id: "".concat(this.jSPlugin.id, "-miniToggle"),
            styleList: {
              right: "".concat(this.jSPlugin.inspectVideoWidth, "px")
            }
          }, {
            // 小窗口收缩按钮
            id: "".concat(this.jSPlugin.id, "-min-win-close-icon"),
            styleList: {
              display: 'none'
            }
          }, {
            // 小窗口展开按钮
            id: "".concat(this.jSPlugin.id, "-min-win-open-icon"),
            styleList: {
              display: 'inline-block'
            }
          }]);
          this.minWinStatus = 'close';
        } else {
          this.setStyleListByIds([{
            // 视频OR地图窗口
            id: this.inspectMode === 'video' ? "".concat(this.jSPlugin.id, "-mapbox") : "".concat(this.jSPlugin.id),
            styleList: {
              width: smallWinWidth + 'px'
            }
          }, {
            // 大小窗口切换按钮
            id: "".concat(this.jSPlugin.id, "-miniSwitch"),
            styleList: {
              display: 'block'
            }
          }, {
            // 小窗口收缩展开按钮
            id: "".concat(this.jSPlugin.id, "-miniToggle"),
            styleList: {
              right: "".concat(this.jSPlugin.inspectVideoWidth + smallWinWidth, "px")
            }
          }, {
            // 小窗口收缩按钮
            id: "".concat(this.jSPlugin.id, "-min-win-close-icon"),
            styleList: {
              display: 'inline-block'
            }
          }, {
            // 小窗口展开按钮
            id: "".concat(this.jSPlugin.id, "-min-win-open-icon"),
            styleList: {
              display: 'none'
            }
          }]);
          this.minWinStatus = 'open';
        }
      }

      //小窗口切换
    }, {
      key: "miniRecSwitchClick",
      value: function miniRecSwitchClick() {
        var _this2 = this;
        var clientWidth = this.jSPlugin.width;
        var clientHeight = this.jSPlugin.height;
        var smallWinWidth = clientWidth * 0.3333;
        var smallWinHeight = clientHeight * 0.3333;
        if (this.inspectMode === 'video') {
          if (this.jSPlugin.Zoom) {
            this.jSPlugin.Zoom.stopZoom();
          }
          this.setStyleListByIds([{
            id: "".concat(this.jSPlugin.id, "-mapbox"),
            styleList: {
              width: this.jSPlugin.width + 'px',
              height: this.jSPlugin.height + 'px',
              marginBottom: '-40px'
            }
          }, {
            id: "".concat(this.jSPlugin.id, "-ez-iframe-footer-container"),
            styleList: {
              top: this.jSPlugin.height + 'px'
            }
          }, {
            id: "".concat(this.jSPlugin.id),
            styleList: {
              position: 'absolute',
              zIndex: '100',
              bottom: '96px',
              right: "".concat(this.jSPlugin.inspectVideoWidth, "px"),
              overflow: 'hidden'
            }
          }]);
          this.jSPlugin.Theme.inspect.reSizeVideo(smallWinWidth, smallWinHeight);
          this.inspectMode = 'map';
          this.changeInspectMode('map');
          this.inspectMapWin.map.addControl(this.NavigationControl3D);
          this.inspectMapWin.map.addControl(this.LocationControl);
          this.inspectMapWin.map.addControl(this.ZoomControl);
          this.inspectMapWin.map.addOverlay(this.inspectMapWin.inspectRange);
          if (document.getElementById("".concat(this.jSPlugin.id, "-loading-item-btn-wrap"))) {
            this.setStyleListByIds([{
              id: "".concat(this.jSPlugin.id, "-loading-item-btn"),
              styleList: {
                display: 'none'
              }
            }, {
              id: "".concat(this.jSPlugin.id, "-loading-item-btn-svg"),
              styleList: {
                display: 'block'
              }
            }, {
              id: "".concat(this.jSPlugin.id, "-loading-item-btn-wrap"),
              styleList: {
                border: 'none',
                width: '32px',
                height: '14px'
              }
            }]);
          }
          setTimeout(function () {
            _this2.inspectMapWin.centerToTrack(18);
          }, 100);
        } else {
          this.setStyleListByIds([{
            id: "".concat(this.jSPlugin.id, "-mapbox"),
            styleList: {
              width: smallWinWidth + 'px',
              height: smallWinHeight + 'px',
              marginBottom: '0'
            }
          }, {
            id: "".concat(this.jSPlugin.id, "-ez-iframe-footer-container"),
            styleList: {
              top: '0px'
            }
          }, {
            id: "".concat(this.jSPlugin.id),
            styleList: {
              position: 'relative',
              zIndex: '0',
              bottom: '0',
              right: '0'
            }
          }]);
          this.jSPlugin.Theme.inspect.reSizeVideo(this.jSPlugin.width, this.jSPlugin.height);
          this.inspectMode = 'video';
          this.changeInspectMode('video');
          this.inspectMapWin.map.removeControl(this.ZoomControl);
          this.inspectMapWin.map.removeControl(this.NavigationControl3D);
          this.inspectMapWin.map.removeControl(this.LocationControl);
          this.inspectMapWin.map.removeOverlay(this.inspectMapWin.inspectRange);
          if (document.getElementById("".concat(this.jSPlugin.id, "-loading-item-btn-wrap"))) {
            this.setStyleListByIds([{
              id: "".concat(this.jSPlugin.id, "-loading-item-btn"),
              styleList: {
                display: 'block'
              }
            }, {
              id: "".concat(this.jSPlugin.id, "-loading-item-btn-svg"),
              styleList: {
                display: 'none'
              }
            }, {
              id: "".concat(this.jSPlugin.id, "-loading-item-btn-wrap"),
              styleList: {
                border: '1px solid rgb(255, 255, 255)',
                width: '80px',
                height: '32px',
                color: '#fff',
                'text-align': 'center',
                'line-height': '32px',
                'font-size': '14px'
              }
            }]);
          }
          setTimeout(function () {
            _this2.inspectMapWin.centerToTrack();
          }, 100);
          if (this.jSPlugin.Zoom && this.decoderState.state.play) {
            this.jSPlugin.Zoom.startZoom();
          }
        }
        this.setStyleListByIds([{
          id: "".concat(this.jSPlugin.id, "-wrap"),
          styleList: {
            width: this.jSPlugin.width + this.jSPlugin.inspectVideoWidth + 'px',
            height: this.jSPlugin.height + this.jSPlugin.inspectVideoHeight + 'px'
          }
        }]);
      }
    }]);
    return SmallWinControl;
  }();

  var data$1 = {
  	customConfig: {
  		defaultMicro: 0,
  		defaultPlay: 0,
  		maxTalkTime: 0,
  		bellPoster: 0,
  		maxBellTime: 0,
  		inspectInfo: {
  			color: "#000000",
  			backgroundColor: "#ffffff",
  			activeColor: "#1890FF",
  			btnList: [
  				{
  					btnKey: "inspectName",
  					iconId: "inspectName",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#262626"
  				},
  				{
  					btnKey: "inspectBeginTime",
  					iconId: "inspectBeginTime",
  					part: "left",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#262626"
  				},
  				{
  					btnKey: "inspectPerson",
  					iconId: "inspectPerson",
  					part: "right",
  					defaultActive: 0,
  					isrender: 1,
  					color: "#262626"
  				}
  			]
  		}
  	},
  	header: {
  		color: "#2c2c2c",
  		backgroundColor: "#000000",
  		activeColor: "#1890FF",
  		btnList: [
  			{
  				btnKey: "deviceName",
  				iconId: "deviceName",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1,
  				color: "#ffffff"
  			},
  			{
  				btnKey: "inspectTime",
  				iconId: "inspectTime",
  				part: "left",
  				defaultActive: 0,
  				isrender: 1,
  				color: "#ffffff"
  			},
  			{
  				btnKey: "signalType",
  				iconId: "signalType",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1,
  				color: "#ffffff"
  			},
  			{
  				btnKey: "batteryStatus",
  				iconId: "batteryStatus",
  				part: "right",
  				defaultActive: 0,
  				isrender: 1,
  				color: "#ffffff"
  			}
  		]
  	},
  	footer: {
  		color: "#ffffff",
  		backgroundColor: "#000000",
  		activeColor: "blue",
  		btnList: [
  			{
  				btnKey: "talk",
  				iconId: "talk",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1,
  				backgroundColor: "#cccccc"
  			},
  			{
  				btnKey: "sound",
  				iconId: "sound",
  				part: "left",
  				defaultActive: 1,
  				isrender: 1,
  				backgroundColor: "#cccccc"
  			}
  		]
  	}
  };
  var webInspect = {
  	data: data$1
  };

  var styleToString = function styleToString(obj) {
    var styleString = "";
    Object.keys(obj).map(function (item, index) {
      styleString += "".concat(item, ":").concat(obj[item]).concat(index < Object.keys(obj).length - 1 ? ';' : "");
    });
    return styleString;
  };
  function formatDuring(millisecond) {
    var hours = parseInt(millisecond % (1000 * 60 * 60 * 24) / (1000 * 60 * 60));
    var minutes = parseInt(millisecond % (1000 * 60 * 60) / (1000 * 60));
    var seconds = parseInt(millisecond % (1000 * 60) / 1000);
    return (hours < 10 ? "0".concat(hours) : hours) + ":" + (minutes < 10 ? "0".concat(minutes) : minutes) + ":" + (seconds < 10 ? "0".concat(seconds) : seconds);
  }
  var MEDIAWIDTH = 500;

  //pc-呼叫模板
  var Inspect = /*#__PURE__*/function () {
    function Inspect(jSPlugin, themeData, setDecoderState, decoderState, inspectMode, changeInspectMode, timer) {
      _classCallCheck$1(this, Inspect);
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度 
      this.videoHeight = jSPlugin.height;
      this.themeData = themeData;
      this.setDecoderState = setDecoderState;
      this.decoderState = decoderState;
      this.isNeedRenderInspectInfo = false;
      this.isNeedRenderHeader = false;
      this.isNeedRenderFooter = false;
      this.inspectMode = inspectMode; //巡检窗口模式
      this.changeInspectMode = changeInspectMode;
      this.themeInited = false;
      this.inspectRecordId = null;
      this.inspectInfo = {};
      this.activeThemeStatus = true; //模板是否激活
      this.activeThemeStatusTxt = '模板未激活'; //模板不能使用的提示语title
      this.globalContainer = new GlobalContainer(this.jSPlugin);
      this.toastCustom = new ToastCustom(jSPlugin, false); // 自定义toast
      this.InspectEvent = null;
      this.timer = timer;
    }

    /**
     * 根据信号类型渲染设备信号
     * @param {*} signalType 示例：2G ,4G,WiFi
     * wifi类型需要渲染信号强度svg图片，其他类型直接显示信号类型
     * wifi判断转换为大写在判断
     */
    _createClass$1(Inspect, [{
      key: "renderSignalType",
      value: function renderSignalType(signalType) {
        if (!signalType) {
          return null;
        }
        var objDomString;
        var signalTypeStr = signalType.toUpperCase();
        if (signalTypeStr === 'WIFI') {
          objDomString = "<span><svg t=\"1688983236732\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n        <path d=\"M0 352.832l93.12 98.752c231.296-245.44 606.464-245.44 837.76 0L1024 352.832C741.44 53.056 283.008 53.056 0 352.832z m372.352 395.008L512 896l139.648-148.16c-76.8-81.92-202.048-81.92-279.296 0zM186.24 550.4l93.12 98.752c128.448-136.32 336.96-136.32 465.408 0L837.824 550.4c-179.648-190.592-471.488-190.592-651.648 0z\" fill=\"#ffffff\" p-id=\"1530\"></path>\n      </svg></span>";
        } else {
          objDomString = "<span>".concat(signalType, "</span>");
        }
        return objDomString;
      }

      /**
       * 根据batteryStatus渲染设备电量
       * @param {*} batteryStatus 示例：0,1,2,3,4
       * 包含电量百分比
       * 包含电池效果，>20 & <=100, 电量颜色#FFFFFF； >0 && <=20 ,电量颜色为#FF4D4F
       */
    }, {
      key: "renderBatteryStatus",
      value: function renderBatteryStatus(batteryStatus) {
        // batteryStatus = 96;
        var objDomString;
        if (!batteryStatus || batteryStatus == 0) return null;
        objDomString = "\n    <div style=\"\n      display: flex;\n      align-items: center;\n      position: relative;\n    \">\n      <span style=\"\n        margin-right: 3px; \n        color: ".concat(batteryStatus <= 20 ? '#FF4D4F' : '#FFFFFF', "\n      \">").concat(batteryStatus, "%</span>\n      <div style=\"\n        position: absolute;\n        right: 6px;\n        height: 8px;\n        width: 15px;\n      \">\n        <div style=\"\n          width: ").concat(batteryStatus, "%;\n          height: 100%;\n          background: ").concat(batteryStatus <= 20 ? '#FF4D4F' : '#FFFFFF', "\n          \"></div>\n      </div>\n      <svg viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"32\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n        <path fill=\"").concat(batteryStatus <= 20 ? '#FF4D4F' : '#FFFFFF', "\"  d=\"M128 213.333333l640 0q52.992 0 90.496 37.504t37.504 90.496q52.992 0 90.496 37.504t37.504 90.496l0 85.333333q0 52.992-37.504 90.496t-90.496 37.504q0 52.992-37.504 90.496t-90.496 37.504l-640 0q-52.992 0-90.496-37.504t-37.504-90.496l0-341.333333q0-52.992 37.504-90.496t90.496-37.504zM768 298.666667l-640 0q-17.664 0-30.165333 12.501333t-12.501333 30.165333l0 341.333333q0 17.664 12.501333 30.165333t30.165333 12.501333l640 0q17.664 0 30.165333-12.501333t12.501333-30.165333l0-341.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333zM896 426.666667l0 170.666667q17.664 0 30.165333-12.501333t12.501333-30.165333l0-85.333333q0-17.664-12.501333-30.165333t-30.165333-12.501333z\"></path>\n      </svg>\n    </div>\n    ");
        return objDomString;
      }

      /**
       * 根据inspectTime渲染巡检时长
       * @param {*} inspectTime: 示例：2021-08-09 10:00:00
       * @returns 
       */
    }, {
      key: "renderInspectTime",
      value: function renderInspectTime(inspectTime) {
        if (!inspectTime) {
          return null;
        }
        // 时间格式化, 部分低版本safari不支持new Date('2021-08-09 10:00:00')这种格式
        var dateParts = inspectTime.split(' ');
        var date = dateParts[0].split('-');
        var time = dateParts[1].split(':');
        var dateTime = new Date(date[0], date[1] - 1, date[2], time[0], time[1], time[2]);
        // 时间差,单位毫秒。
        var time_Interval = new Date().getTime() - new Date(dateTime).getTime();
        var objDomString;
        objDomString = "\n    <span style=\"\n      display: inline-block;\n      width:8px;\n      height:8px;\n      border-radius: 100%;\n      background: #FF4D4F;\n      margin-right: 4px;\n    \"></span>\n    ".concat(formatDuring(time_Interval), "\n    ");
        return objDomString;
      }

      // 处理按钮
    }, {
      key: "matchBtn",
      value: function matchBtn(btnId, btnData) {
        var _this = this;
        var _this$themeData = this.themeData,
          customConfig = _this$themeData.customConfig,
          header = _this$themeData.header,
          footer = _this$themeData.footer;
        var inspectInfo = customConfig.inspectInfo;
        var btnItem = {
          title: "",
          id: "",
          domString: "",
          color: "#FFFFFF",
          activeColor: "#FFFFFF",
          onclick: function onclick() {},
          onmoveleft: function onmoveleft() {},
          onmoveright: function onmoveright() {},
          onremove: function onremove() {}
        };
        var _index = inspectInfo.btnList.findIndex(function (item) {
          return item.iconId === btnId;
        });
        if (_index !== -1) {
          btnItem.color = inspectInfo.color;
          btnItem.backgroundColor = inspectInfo.backgroundColor;
          btnItem.activeColor = inspectInfo.activeColor;
        } else {
          _index = header.btnList.findIndex(function (item) {
            return item.iconId === btnId;
          });
          if (_index !== -1) {
            btnItem.color = header.color;
            btnItem.backgroundColor = header.backgroundColor;
            btnItem.activeColor = header.activeColor;
          } else {
            btnItem.color = footer.color;
            btnItem.backgroundColor = footer.backgroundColor;
            btnItem.activeColor = footer.activeColor;
          }
        }
        switch (btnId) {
          case 'inspectName':
            btnItem.title = "巡检名称";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"".concat(this.jSPlugin.id, "-inspectInfo-inspectName\" \n        style=\"\n        color:").concat(btnData.color || '#262626', ";\n        font-size: 18px;\n        text-align: left;\n        font-weight: bold;\n        padding: 0 16px;\n        \">\u5DE1\u68C0\u540D\u79F0</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'inspectBeginTime':
            btnItem.title = "巡检开始时间";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"".concat(this.jSPlugin.id, "-inspectInfo-inspectBeginTime\" \n        style=\"\n        color:").concat(btnData.color || '#FFFFFF', ";\n        font-size: 14px;\n        text-align: left;\n        padding-left: 16px;\n        border-left: 1px solid #d9d9d9;\n        line-height: 16px;\n        margin-top: 1px;\n        \">\u5DE1\u68C0\u5F00\u59CB\u65F6\u95F4\uFF1A-</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'inspectPerson':
            btnItem.title = "本地巡检员";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"".concat(this.jSPlugin.id, "-inspectInfo-inspectPerson\" \n        style=\"\n        color:").concat(btnData.color || '#FFFFFF', ";\n        font-size: 14px;\n        display: block;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        padding-right: 16px;\n        \">\u672C\u5730\u5DE1\u68C0\u5458\uFF1A-</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'deviceName':
            btnItem.title = "设备名称";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"".concat(this.jSPlugin.id, "-header-deviceName\" \n        style=\"\n        color:").concat(btnData.color || '#FFFFFF', ";\n        font-size: 16px;\n        display: block;\n        max-width: ").concat(this.jSPlugin.width * 0.33, "px;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        \">\u8BBE\u5907\u540D\u79F0</span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'inspectTime':
            btnItem.title = "巡检时长";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"".concat(this.jSPlugin.id, "-header-inspectTime-wrap\" \n        style=\"\n        color:").concat(btnData.color || '#FFFFFF', ";\n        font-size: 14px;\n        display: flex;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        margin-left: 32px;\n        \">\u5DE1\u68C0\u65F6\u957F\uFF1A<span id=\"").concat(this.jSPlugin.id, "-header-inspectTime\" style=\"display: flex; align-items: center;\">-</span></span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'signalType':
            btnItem.title = "信号类型";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"".concat(this.jSPlugin.id, "-header-signalType\" \n        style=\"\n        color:").concat(btnData.color || '#FFFFFF', ";\n        font-size: 14px;\n        display: block;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        \"></span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'batteryStatus':
            btnItem.title = "设备电量";
            btnItem.id = btnId;
            btnItem.domString = "<span id=\"".concat(this.jSPlugin.id, "-header-batteryStatus\" \n        style=\"\n        color:").concat(btnData.color || '#FFFFFF', ";\n        font-size: 14px;\n        display: flex;\n        max-width: 100%;\n        overflow: hidden;\n        text-overflow: ellipsis;\n        white-space: nowrap;\n        text-align: left;\n        margin-left: 12px;\n        align-items: center;\n        \"></span>");
            btnItem.onclick = function () {};
            return btnItem;
          case 'talk':
            btnItem.title = "对讲";
            btnItem.id = btnId;
            btnItem.domString = '<div></div>' + "<svg id=\"".concat(this.jSPlugin.id, "-talk-icon\" class=\"theme-icon-item-icon\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH ? 48 : 32, "\" viewBox=\"-6 -6 32 32\">") + '<path d="M10.1,2.7C8.5,2.7,7.2,4,7.2,5.6v5.2c0,1.6,1.3,2.9,2.9,2.9l0.2,0c1.5-0.1,2.7-1.4,2.7-2.9V5.6	C13,4,11.7,2.7,10.1,2.7z M10.1,3.7c1.1,0,1.9,0.9,1.9,1.9v5.2c0,1-0.8,1.8-1.8,1.9l-0.1,0c-1,0-1.9-0.9-1.9-1.9V5.6 C8.2,4.5,9,3.7,10.1,3.7z" />' + '<path d="M15.1,8.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,3-2.5,5.5-5.5,5.5c-3,0-5.4-2.3-5.5-5.3l0-0.2V9 c0-0.3,0.2-0.5,0.5-0.5c0.2,0,0.4,0.2,0.5,0.4l0,0.1v1.7c0,2.5,2,4.5,4.5,4.5c2.4,0,4.4-1.9,4.5-4.3l0-0.2V9 C14.6,8.7,14.8,8.5,15.1,8.5z" />' + '<path d="M13.5,17.7c0.3,0,0.5,0.2,0.5,0.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-7c-0.3,0-0.5-0.2-0.5-0.5 c0-0.2,0.2-0.4,0.4-0.5l0.1,0H13.5z" />' + '<path d="M10.1,15.2c0.2,0,0.4,0.2,0.5,0.4l0,0.1v2.5c0,0.3-0.2,0.5-0.5,0.5c-0.2,0-0.4-0.2-0.5-0.4l0-0.1 v-2.5C9.6,15.4,9.8,15.2,10.1,15.2z" />' + "</svg><span id=\"".concat(this.jSPlugin.id, "-talk-label\" style=\"margin-left: -3px\">\u5BF9\u8BB2</span>");
            btnItem.onclick = function () {
              var _this$decoderState$st = _this.decoderState.state,
                talk = _this$decoderState$st.talk,
                sound = _this$decoderState$st.sound,
                play = _this$decoderState$st.play;
              if (play) {
                if (talk) {
                  console.log('结束对讲');
                  _this.setDecoderState({
                    talk: false
                  });
                  _this.jSPlugin.Talk.stopTalk();
                  var isReOpenSound = _.findIndex(_this.themeData.footer.btnList, function (v) {
                    return v.iconId === 'sound' && v.isrender === 1 && v.defaultActive === 1;
                  }) > -1;
                  if (_this.themeData && isReOpenSound) {
                    _this.jSPlugin.openSound();
                    _this.setDecoderState({
                      sound: true
                    });
                  }
                } else {
                  console.log('开始对讲');
                  _this.setDecoderState({
                    talk: true
                  });
                  _this.jSPlugin.Talk.startTalk(function (isGb) {
                    if (sound && !isGb) {
                      // 非国标设开启对讲时关闭视频流声音
                      _this.jSPlugin.closeSound();
                      _this.setDecoderState({
                        sound: false
                      });
                    }
                  });
                }
              }
            };
            return btnItem;
          case 'sound':
            btnItem.title = "音量";
            btnItem.id = btnId;
            btnItem.domString = '<span style="height: 100%">' + "<svg class=\"theme-icon-item-icon\" id=\"".concat(this.jSPlugin.id, "-nosound-icon\" style=\"display:none\" fill=\"").concat(btnItem.color, "\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH ? 48 : 32, "\" viewBox=\"-6 -7 32 31\">\n          <path d=\"M8.5,4.2c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8C5,13.2,5,12.9,5.1,12.7 c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3L9.2,5L5.9,7.8 C5.6,7.9,5.3,7.9,5.1,7.7C5,7.5,5,7.3,5.1,7.1L5.2,7L8.5,4.2z\"/>\n          <path d=\"M5.5,6.9C5.8,6.9,6,7.1,6,7.4c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2C3.4,7.9,3.3,8,3.2,8.2l0,0.1v4 c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,12.5,6,12.7,6,13c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4 c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z\"/>\n          <path d=\"M17.4,7.9c0.2-0.2,0.5-0.2,0.7,0c0.2,0.2,0.2,0.4,0.1,0.6l-0.1,0.1l-3.8,3.8c-0.2,0.2-0.5,0.2-0.7,0 c-0.2-0.2-0.2-0.4-0.1-0.6l0.1-0.1L17.4,7.9z\"/>\n          <path d=\"M13.7,7.9c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.8,3.8c0.2,0.2,0.2,0.5,0,0.7c-0.2,0.2-0.4,0.2-0.6,0.1l-0.1-0.1 l-3.7-3.8C13.5,8.4,13.5,8.1,13.7,7.9z\"/>\n          </svg>") + "<svg class=\"theme-icon-item-icon\" id=\"".concat(this.jSPlugin.id, "-sound-icon\" style=\"display:inline-block\" width=\"").concat(this.jSPlugin.width > MEDIAWIDTH ? 48 : 32, "\" height=\"").concat(this.jSPlugin.width > MEDIAWIDTH ? 48 : 32, "\" fill=\"").concat(btnItem.color, "\" viewBox=\"-6 -7 32 32\">\n            <path d=\"M13.2,7.1c0.1-0.2,0.5-0.3,0.7-0.2c1.1,0.7,1.9,2.2,1.9,3.7c0,1.6-0.7,3-1.9,3.7\n              c-0.2,0.1-0.5,0.1-0.7-0.2c-0.1-0.2-0.1-0.5,0.2-0.7c0.8-0.5,1.4-1.6,1.4-2.9c0-1.3-0.6-2.4-1.4-2.9C13.1,7.6,13,7.3,13.2,7.1z\"/>\n            <path d=\"M15.7,4.5c0.2-0.2,0.5-0.2,0.7-0.1C18,5.8,19,8.2,19,10.7c0,2.5-1,4.8-2.7,6.3\n              c-0.2,0.2-0.5,0.2-0.7-0.1c-0.2-0.2-0.2-0.5,0.1-0.7c1.4-1.2,2.3-3.3,2.3-5.5c0-2.2-0.9-4.3-2.3-5.5C15.5,5,15.5,4.7,15.7,4.5z\"/>\n            <path id=\"Stroke-5\" class=\"st1\" d=\"M8.5,4.7c0.8-0.7,2.1-0.2,2.2,0.9l0,0.1v10c0,1.1-1.2,1.7-2.1,1.1l-0.1-0.1l-3.3-2.8\n              C5,13.7,5,13.4,5.1,13.2c0.2-0.2,0.4-0.2,0.6-0.1l0.1,0.1l3.3,2.8c0.2,0.2,0.5,0.1,0.5-0.2l0-0.1v-10c0-0.3-0.3-0.4-0.5-0.3l-0.1,0\n              L5.9,8.3C5.6,8.4,5.3,8.4,5.1,8.2C5,8,5,7.7,5.1,7.6l0.1-0.1L8.5,4.7z\"/>\n            <path  d=\"M5.5,7.4C5.8,7.4,6,7.6,6,7.9c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.2,0-0.3,0.1-0.3,0.3l0,0.1v4\n              c0,0.2,0.1,0.3,0.3,0.3l0.1,0h2C5.8,13,6,13.2,6,13.5c0,0.2-0.2,0.4-0.4,0.5l-0.1,0h-2c-0.7,0-1.3-0.5-1.3-1.2l0-0.1v-4\n              c0-0.7,0.5-1.3,1.2-1.3l0.1,0H5.5z\"/>\n          </svg>") + "</span><span id=\"".concat(this.jSPlugin.id, "-sound-label\" style=\"margin-left: -3px; color: ").concat(btnItem.color, "\">\u97F3\u91CF</span>");
            btnItem.onclick = function () {
              var _this$decoderState$st2 = _this.decoderState.state,
                play = _this$decoderState$st2.play,
                sound = _this$decoderState$st2.sound,
                talk = _this$decoderState$st2.talk;
              if (play && !talk) {
                if (sound) {
                  _this.jSPlugin.closeSound();
                  _this.setDecoderState({
                    sound: false
                  });
                } else {
                  _this.jSPlugin.openSound();
                  _this.setDecoderState({
                    sound: true
                  });
                }
              }
            };
            return btnItem;
          default:
            return btnItem;
        }
      }

      // 加载InspectInfo
    }, {
      key: "renderInspectInfo",
      value: function renderInspectInfo(id, item) {
        var objItem = this.matchBtn(id, item);
        var childDOM = document.createElement('sapn');
        childDOM.innerHTML = "".concat(objItem.domString);
        if (item.part === 'left') {
          document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl-left")).appendChild(childDOM);
        } else {
          document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl-right")).appendChild(childDOM);
        }
      }

      // 加载header
    }, {
      key: "renderHeader",
      value: function renderHeader(id, item) {
        var objItem = this.matchBtn(id, item);
        var objDOM = document.createElement('span');
        objDOM.className = "".concat(this.jSPlugin.id, "-header-content");
        objDOM.style = "display: flex; align-items: center; ";
        objDOM.innerHTML = "\n      ".concat(objItem.domString, "\n    ");
        if (item.part === 'left') {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl-left")).appendChild(objDOM);
        } else {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl-right")).appendChild(objDOM);
        }
      }

      // 加载footer
    }, {
      key: "renderFooter",
      value: function renderFooter(id, item) {
        var _this2 = this;
        var objItem = this.matchBtn(id, item);
        var btnWidth = this.videoWidth / 6; // 按钮宽度
        var objDOM = document.createElement('div');
        objDOM.className = "theme-icon-item";
        if (!!this.jSPlugin.isWebConsole) {
          objDOM.style = "padding:0 ".concat(btnWidth * 0.1, "px;");
        } else {
          objDOM.style = "padding:0 ".concat(btnWidth * 0.1, "px;cursor: pointer;");
        }
        objDOM.innerHTML = "".concat("<span id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "\" style=\"position:relative;\">") + "<div id=\"".concat(this.jSPlugin.id, "-").concat(objItem.id, "-content\" title=\"").concat(objItem.title, "\" style=\"display: flex;align-items: center;position:relative;\">")).concat(objItem.domString, "</div>") + '</span>';
        objDOM.onclick = function (e) {
          if (_this2.decoderState.state.isEditing || !_this2.activeThemeStatus) {
            return false;
          }
          objItem.onclick(e);
        };
        if (objItem.onmouseenter) {
          objDOM.onmouseenter = function (e) {
            if (_this2.decoderState.state.isEditing || !_this2.activeThemeStatus) {
              return false;
            }
            objItem.onmouseenter(e);
          };
        }
        if (objItem.onmouseleave) {
          objDOM.onmouseleave = function (e) {
            if (_this2.decoderState.state.isEditing || !_this2.activeThemeStatus) {
              return false;
            }
            objItem.onmouseleave(e);
          };
        }
        document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).appendChild(objDOM);
      }

      //加载渲染模板数据
    }, {
      key: "initThemeData",
      value: function initThemeData() {
        var _this3 = this;
        var _this$themeData2 = this.themeData,
          customConfig = _this$themeData2.customConfig,
          header = _this$themeData2.header,
          footer = _this$themeData2.footer;
        var inspectInfo = customConfig.inspectInfo;
        var videoId = this.jSPlugin.id;
        this.isNeedRenderInspectInfo = _.findIndex(inspectInfo.btnList, function (v) {
          return v.isrender > 0;
        }) >= 0;
        this.isNeedRenderHeader = _.findIndex(header.btnList, function (v) {
          return v.isrender > 0;
        }) >= 0;
        this.isNeedRenderFooter = _.findIndex(footer.btnList, function (v) {
          return v.isrender > 0;
        }) >= 0;
        if (this.isNeedRenderInspectInfo) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl"))) {
            var inspectInfoContainer = document.createElement('div');
            inspectInfoContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-inspectInfoControl"));
            inspectInfoContainer.setAttribute('class', 'inspectInfo-controls');
            inspectInfoContainer.innerHTML = "<div id='".concat(this.jSPlugin.id, "-inspectInfoControl-left' class=\"inspectInfo-controls-left\" style='display:flex;overflow:hidden;'></div><div id='").concat(this.jSPlugin.id, "-inspectInfoControl-right' class=\"inspectInfo-controls-right\" style='display:flex;'></div>");
            var inspectInfoHeight = '58px';
            var inspectInfoStyle = {
              height: inspectInfoHeight,
              display: "flex",
              "justify-content": "space-between",
              top: 0,
              "z-index": 999,
              color: "#000000",
              width: "".concat(this.jSPlugin.width + 290, "px"),
              position: "relative",
              "align-items": 'center',
              "background": "#ffffff",
              "border-bottom": "1px solid #D9D9D9",
              "box-sizing": "border-box"
            };
            inspectInfoContainer.style = styleToString(inspectInfoStyle);
            document.getElementById("".concat(videoId, "-wrap")).insertBefore(inspectInfoContainer, document.getElementById(this.jSPlugin.id));
            // 头部预留x像素空间
            var checkTimer = setInterval(function () {
              if (window.EZUIKit[_this3.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(checkTimer);
              }
            }, 50);
          } else {
            document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")).innerHTML = "<div id='".concat(this.jSPlugin.id, "-inspectInfoControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id, "-inspectInfoControl-right' style='display:flex'></div>");
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")));
          }
        }
        if (this.isNeedRenderHeader) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            var headerContainer = document.createElement('div');
            headerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-headControl"));
            headerContainer.setAttribute('class', 'header-controls');
            headerContainer.innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' class=\"header-controls-left\" style='display:flex; max-width: 70%; align-items: center; overflow: hidder;'></div><div id='").concat(this.jSPlugin.id, "-headControl-right' class=\"header-controls-right\" style='display:flex; align-items: center;'></div>");
            var headerHeight = '56px';
            var headerStyle = {
              height: headerHeight,
              display: "flex",
              "justify-content": "space-between",
              top: 0,
              "z-index": 999,
              color: "#FFFFFF",
              width: this.jSPlugin.width + 'px',
              padding: "0 16px",
              "box-sizing": "border-box",
              position: "relative",
              "align-items": 'center',
              "background": "#000000"
            };
            headerContainer.style = styleToString(headerStyle);
            document.getElementById("".concat(videoId, "-wrap")).insertBefore(headerContainer, document.getElementById(videoId));
            // 头部预留x像素空间
            var _checkTimer = setInterval(function () {
              if (window.EZUIKit[_this3.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer);
              }
            }, 50);
          } else {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).innerHTML = "<div id='".concat(this.jSPlugin.id, "-headControl-left' style='display:flex;'></div><div id='").concat(this.jSPlugin.id, "-headControl-right' style='display:flex'></div>");
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-headControl")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-headControl")));
          }
        }
        var footerHeight = '56px';
        if (this.isNeedRenderFooter) {
          if (!document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            var footerContainer = document.createElement('div');
            footerContainer.setAttribute('id', "".concat(this.jSPlugin.id, "-ez-iframe-footer-container"));
            footerContainer.setAttribute('class', 'ez-iframe-footer-container');
            var footerStyle = {
              "position": "relative",
              display: "flex",
              height: '56px',
              "flex-wrap": "wrap",
              "justify-content": "center",
              "z-index": 999,
              top: 0,
              color: "#FFFFFF",
              width: this.jSPlugin.width + 'px',
              "align-items": 'center',
              "background-color": "#000000",
              "font-size": "14px"
            };
            footerContainer.style = styleToString(footerStyle);
            footerContainer.innerHTML = "\n          <div id=\"".concat(this.jSPlugin.id, "-audioControls\" class=\"footer-controls\" style='display:flex;justify-content: center;padding: 0 4%;width:100%;z-index:999;position: relative;'>\n            <div id='").concat(this.jSPlugin.id, "-audioControls-left' class=\"footer-controls-left\" style='display:flex;margin-lefacti'></div><div id='").concat(this.jSPlugin.id, "-audioControls-right' class=\"footer-controls-right\" style='display:flex'></div>\n          </div>\n          ");
            insertAfter(footerContainer, document.getElementById(videoId));
          } else {
            if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
              document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.marginTop = "-".concat(footerHeight, "px");
            }
          }
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).parentElement.removeChild(document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")));
          }
        }
        if (this.isNeedRenderInspectInfo && document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")).style.background = inspectInfo.backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")).style.color = inspectInfo.color;
          inspectInfo.btnList.map(function (item, index) {
            if (item.isrender) {
              _this3.renderInspectInfo(item.iconId, item);
            }
          });
        }
        if (this.isNeedRenderHeader && document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.background = header.backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.color = header.color;
          header.btnList.map(function (item, index) {
            if (item.isrender) {
              _this3.renderHeader(item.iconId, item);
            }
          });
        }
        if (this.isNeedRenderFooter && document.getElementById("".concat(this.jSPlugin.id, "-audioControls"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer.backgroundColor;
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer.color;
          footer.btnList.map(function (item, index) {
            if (item.isrender) {
              _this3.renderFooter(item.iconId, item);
            }
          });
        }
        this.inspectMapWin = new InspectMap(this.jSPlugin);
        this.inspectSmallWin = new SmallWinControl(this.jSPlugin, this.inspectMode, this.inspectMapWin, this.changeInspectMode, this.decoderState);
      }
    }, {
      key: "renderThemeData",
      value: function renderThemeData() {
        var _this4 = this;
        var isEditing = this.decoderState.state.isEditing;
        var _this$themeData3 = this.themeData,
          inspectInfo = _this$themeData3.inspectInfo,
          header = _this$themeData3.header,
          footer = _this$themeData3.footer;
        if (this.isNeedRenderInspectInfo && inspectInfo) {
          document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")).style.background = inspectInfo.backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")).style.color = inspectInfo.color.replace("-diy", "");
          inspectInfo.btnList.map(function (item, index) {
            if (item.isrender) {
              _this4.setDecoderState(_defineProperty({}, item.iconId, _this4.decoderState.state[item.iconId]));
            }
          });
        }
        if (this.isNeedRenderHeader && header) {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.background = header.backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.color = header.color.replace("-diy", "");
          header.btnList && header.btnList.map(function (item, index) {
            if (item.isrender) {
              _this4.setDecoderState(_defineProperty({}, item.iconId, _this4.decoderState.state[item.iconId]));
            }
          });
        }
        if (this.isNeedRenderFooter && footer) {
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.background = footer.backgroundColor.replace("-diy", "");
          document.getElementById("".concat(this.jSPlugin.id, "-audioControls")).style.color = footer.color.replace("-diy", "");
          footer.btnList.map(function (item, index) {
            if (item.isrender) {
              _this4.setDecoderState(_defineProperty({}, item.iconId, _this4.decoderState.state[item.iconId]));
            }
            if (index == 0 && !_this4.themeInited && _this4.activeThemeStatus) {
              //直接开始播放 xuehb
              var checkTimer = setInterval(function () {
                if (window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init) {
                  clearInterval(checkTimer);
                  if (_this4.themeData.customConfig.bellPoster == 1 && !isEditing) {
                    _this4.jSPlugin.pluginStatus.loadingClear();
                  } else {
                    _this4.jSPlugin.play();
                  }
                  _this4.themeInited = true;
                }
              }, 50);
            }
          });
          // 设置当前播放类型
          this.setDecoderState({
            cloudRec: matchEzopenUrl(this.jSPlugin.url).type === 'cloud.rec',
            rec: matchEzopenUrl(this.jSPlugin.url).type === 'rec',
            type: matchEzopenUrl(this.jSPlugin.url).type
          });
        } else {
          if (!this.themeInited && this.activeThemeStatus) {
            var _checkTimer2 = setInterval(function () {
              if (window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init) {
                clearInterval(_checkTimer2);
                // this.jSPlugin.play();
                if (_this4.themeData && _this4.themeData.customConfig && _this4.themeData.customConfig.bellPoster == 1 && !isEditing) {
                  _this4.jSPlugin.pluginStatus.loadingClear();
                } else {
                  _this4.jSPlugin.play();
                }
                _this4.themeInited = true;
              }
            }, 50);
          }
        }
        var checkTimer = setInterval(function () {
          if (window.EZUIKit[_this4.jSPlugin.id].state.EZUIKitPlayer.init) {
            clearInterval(checkTimer);
            // 执行一次reSize
            _this4.reSizeVideo(_this4.videoWidth, _this4.videoHeight);
          }
        }, 50);
        if (!this.jSPlugin.Zoom) this.jSPlugin.Zoom = new Zoom(this.jSPlugin);
        //设备信息
        this.getInspectDevInfo(this.jSPlugin, true, false);
      }

      // 巡检记录信息查询
    }, {
      key: "getInspectRecord",
      value: function getInspectRecord() {
        var _this5 = this;
        var successCallback = function successCallback(data) {
          if (data.meta.code == 200 && data.data) {
            var resultData = data.data;
            // 绘制巡检范围
            resultData.inspectRange && _this5.inspectMapWin.createPolygon(resultData.inspectRange, '#407AFF', 'dashed', 4, 1, '#407AFF', 0.08);
            // 绘制关键巡检点
            resultData.inspectPoints && resultData.inspectPoints.length > 0 && _this5.inspectMapWin.createInspectPoints(resultData.inspectPoints);
            if (_this5.inspectMode === 'video') {
              // 初始默认视频模式，需要隐藏巡检范围
              _this5.inspectMapWin.map.removeOverlay(_this5.inspectMapWin.inspectRange);
            }
            // 巡检名称
            if (document.getElementById("".concat(_this5.jSPlugin.id, "-inspectInfo-inspectName")) && resultData.inspectName) {
              document.getElementById("".concat(_this5.jSPlugin.id, "-inspectInfo-inspectName")).innerText = '' + resultData.inspectName;
            }
            // 巡检名称
            if (document.getElementById("".concat(_this5.jSPlugin.id, "-inspectInfo-inspectBeginTime")) && resultData.beginTime) {
              document.getElementById("".concat(_this5.jSPlugin.id, "-inspectInfo-inspectBeginTime")).innerText = '巡检开始时间：' + resultData.beginTime;
            }
            if (document.getElementById("".concat(_this5.jSPlugin.id, "-header-inspectTime"))) {
              _this5.timer.createInterval('InspectTimer', function () {
                document.getElementById("".concat(_this5.jSPlugin.id, "-header-inspectTime")).innerHTML = _this5.renderInspectTime(resultData.beginTime);
              }, 1000);
            }
            // 巡检名称
            if (document.getElementById("".concat(_this5.jSPlugin.id, "-inspectInfo-inspectPerson")) && resultData.inspectPerson) {
              document.getElementById("".concat(_this5.jSPlugin.id, "-inspectInfo-inspectPerson")).innerText = '本地巡检员：' + resultData.inspectPerson;
            }

            // this.inspectRecordId = resultData.inspectRecordId;
            _this5.inspectInfo = resultData;

            // 最近一次巡检的轨迹列表
            resultData.inspectRecordId && getDeviceTrace(_this5.jSPlugin, resultData.inspectRecordId, function (data) {
              if (data.meta.code == 200 && data.data) {
                // 绘制页面加载完成后，设备已完成的巡检轨迹
                _this5.inspectMapWin.createTrack(data.data, true);
                _this5.timer.createInterval('TraceTimer', function () {
                  resultData.inspectRecordId && getDeviceTrace(_this5.jSPlugin, resultData.inspectRecordId, function (data) {
                    if (data.meta.code == 200 && data.data) {
                      // 绘制页面加载完成后，设备已完成的巡检轨迹
                      _this5.inspectMapWin.createTrack(data.data, false);
                    }
                  }, function () {});
                }, 5000);
              }
            }, function () {});

            // 初始化巡检事件列表
            _this5.InspectEvent = new InspectEvent(_this5.jSPlugin, resultData.inspectRecordId, _this5.timer);
          }
        };
        var errorCallback = function errorCallback(err) {};
        getInspectDetail(this.jSPlugin, successCallback, errorCallback);
      }

      /**
       * 获取设备详细信息
       */
    }, {
      key: "getInspectDevInfo",
      value: function getInspectDevInfo(jSPlugin) {
        var _this6 = this;
        var isFirst = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        var isRefreshVideo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
        var successCallback = function successCallback(data) {
          if (data.meta && data.meta.code == 200 && data.data) {
            // 判断设备是否在线 1 在线，其他的离线
            if (data.data.status === 1) {
              if (isRefreshVideo && !_this6.decoderState.state.play) {
                _this6.jSPlugin.pluginStatus.loadingStart(_this6.jSPlugin.id);
                _this6.jSPlugin.pluginStatus.loadingSetText({
                  text: '视频加载中'
                });
                _this6.jSPlugin.play();
              }
              _this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id, "-inspect-global-box"), false);
              if (document.getElementById("".concat(_this6.jSPlugin.id, "-header-deviceName"))) {
                document.getElementById("".concat(_this6.jSPlugin.id, "-header-deviceName")).innerText = "".concat(data.data.deviceName, "(").concat(data.data.deviceSerial, ")");
                document.getElementById("".concat(_this6.jSPlugin.id, "-header-deviceName")).setAttribute('title', "".concat(data.data.deviceName, "(").concat(data.data.deviceSerial, ")"));
              }
              if (document.getElementById("".concat(_this6.jSPlugin.id, "-header-signalType"))) {
                document.getElementById("".concat(_this6.jSPlugin.id, "-header-signalType")).innerHTML = _this6.renderSignalType(data.data.signalType);
              }
              if (document.getElementById("".concat(_this6.jSPlugin.id, "-header-batteryStatus"))) {
                document.getElementById("".concat(_this6.jSPlugin.id, "-header-batteryStatus")).innerHTML = _this6.renderBatteryStatus(data.data.batteryStatus);
              }
              _this6.timer.createInterval('InspectDevInfoTimer', function () {
                _this6.getInspectDevInfo(jSPlugin, false, false);
              }, 300000); // 5min做查询一次设备电量等信息
              isFirst && _this6.getInspectRecord();
            } else {
              // 设备不在线，提示“当前设备未在巡检中”
              _this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id, "-inspect-loading-box"), false);
              _this6.jSPlugin.stop();
              _this6.globalContainer.deviceErrorInfo({
                tips: '当前设备未在巡检中',
                refreshBtn: '刷新',
                refreshShow: true
              }, function () {
                _this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id, "-no-inspect-box"), false);
                _this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id, "-inspect-loading-box"), true);
                _this6.getInspectDevInfo(jSPlugin, true, true);
              });
            }
          } else {
            _this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id, "-inspect-loading-box"), false);
            _this6.jSPlugin.stop();
            _this6.globalContainer.deviceErrorInfo({
              tips: data.meta.message,
              refreshShow: false
            });
          }
        };
        var errorCallback = function errorCallback() {
          _this6.globalContainer.globalContainerToggle("".concat(_this6.jSPlugin.id, "-inspect-global-box"), false);
        };
        getDeviceInfo(jSPlugin, successCallback, errorCallback);
      }

      //获取模板数据
    }, {
      key: "fetchThemeData",
      value: function fetchThemeData(themeId) {
        var _this7 = this;
        var successCallback = function successCallback(data) {
          if (data.meta.code === 0 && data.data) {
            _this7.activeThemeStatus = true;
            _this7.themeData = data.data;
            if (!_this7.jSPlugin.capacity) {
              setTimeout(function () {
                _this7.initThemeData();
                _this7.renderThemeData();
              }, 300);
            } else {
              _this7.initThemeData();
              _this7.renderThemeData();
            }
          } else {
            //未试用和购买（无权限试用）
            _this7.activeThemeStatus = false;
            _this7.jSPlugin.pluginStatus.loadingClear();
            if (data.meta.code == '111021') {
              // 轻应用模板不存在 
              _this7.globalContainer.globalContainerToggle("".concat(_this7.jSPlugin.id, "-inspect-loading-box"), false);
              _this7.jSPlugin.stop();
              _this7.globalContainer.deviceErrorInfo({
                tips: '无效的模板id',
                refreshBtn: '刷新',
                refreshShow: false
              });
              _this7.activeThemeStatusTxt = '无效的模板id';
              return;
            } else if (data.meta.code == '111023') {
              // 轻应用模板试用已过期
              _this7.globalContainer.globalContainerToggle("".concat(_this7.jSPlugin.id, "-inspect-loading-box"), false);
              _this7.jSPlugin.stop();
              _this7.globalContainer.deviceErrorInfo({
                tips: '您的试用特权已到期，需前往轻应用控制台购买后使用。',
                refreshBtn: '刷新',
                refreshShow: false
              });
              _this7.activeThemeStatusTxt = '试用特权已到期';
              return;
            } else {
              // 轻应用模板未激活
              _this7.globalContainer.globalContainerToggle("".concat(_this7.jSPlugin.id, "-inspect-loading-box"), false);
              _this7.jSPlugin.stop();
              _this7.globalContainer.deviceErrorInfo({
                tips: '模板未激活，请先在开放平台轻应用控制台购买模板',
                refreshBtn: '刷新',
                refreshShow: false
              });
              _this7.activeThemeStatusTxt = '模板未激活';
              return;
            }
          }
        };
        var errorCallback = function errorCallback() {
          _this7.themeData = webInspect.data;
          if (_this7.themeData.header) {
            _this7.themeData.header.btnList = _this7.themeData.header.btnList.sort(function (a, b) {
              return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
            });
          }
          if (_this7.themeData.footer) {
            _this7.themeData.footer.btnList = _this7.themeData.footer.btnList.sort(function (a, b) {
              return a.btnKey.split("-")[3] - b.btnKey.split("-")[3];
            });
          }
          _this7.initThemeData();
          _this7.renderThemeData();
        };
        templateDetailApi(this.jSPlugin, themeId, successCallback, errorCallback);
      }

      /**
       * @description 调整播放器尺寸
       * 
       * @param {number} width 播放器宽
       * @param {number} height 播放器高
       * @returns {void}
       */
    }, {
      key: "reSizeVideo",
      value: function reSizeVideo(width, height) {
        document.getElementById("".concat(this.jSPlugin.id)).style.width = width + 'px';
        document.getElementById("".concat(this.jSPlugin.id)).style.height = height + 'px';
        if (this.jSPlugin && this.jSPlugin.bPlay) {
          this.jSPlugin.JS_Resize(width, height);
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-player"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-player")).width = width;
            document.getElementById("".concat(this.jSPlugin.id, "-player")).height = height;
            document.getElementById("".concat(this.jSPlugin.id, "-player")).style.width = width + "px";
            document.getElementById("".concat(this.jSPlugin.id, "-player")).style.height = height + "px";
            document.getElementById("".concat(this.jSPlugin.id, "-container-0")).style.height = height + "px";
          }
          var scale = 1;
          if (document.getElementById("".concat(this.jSPlugin.id, "canvas0"))) {
            var isNeedScale = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
            if (isNeedScale) {
              scale = 2;
            }
            document.getElementById("".concat(this.jSPlugin.id, "canvas0")).style.width = width * scale + "px";
            document.getElementById("".concat(this.jSPlugin.id, "canvas0")).style.height = height * scale + "px";
            document.getElementById("".concat(this.jSPlugin.id, "canvas0")).width = width * scale;
            document.getElementById("".concat(this.jSPlugin.id, "canvas0")).height = height * scale;
            document.getElementById("".concat(this.jSPlugin.id, "canvas0")).parentNode.style.width = width * scale + "px";
            document.getElementById("".concat(this.jSPlugin.id, "canvas0")).parentNode.style.height = height * scale + "px";
            document.getElementById("".concat(this.jSPlugin.id, "canvas_draw0")).height = height * scale;
          }
        }
      }

      /**
       * @description 主题模板大小变化
       * 播放器大小变化
       * 头部大小变化
       * 底部大小变化
       * 地图大小变化
       */
    }, {
      key: "reSize",
      value: function reSize(width, height) {
        var smallWidth = width * 0.3333;
        // const smallHeight = height * 0.3333*0.5625;
        var smallHeight = height * 0.3333;
        if (document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-inspectInfoControl")).style.width = width + this.jSPlugin.inspectVideoWidth + 'px';
        }
        if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-headControl")).style.width = width + 'px';
        }
        if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
          document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.width = width + 'px';
        }
        if (this.jSPlugin.Theme.inspectMode === 'video') {
          this.reSizeVideo(width, height);
          if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.top = 0;
          }
          document.getElementById("".concat(this.jSPlugin.id, "-mapbox")).style.width = smallWidth + 'px';
          document.getElementById("".concat(this.jSPlugin.id, "-mapbox")).style.height = smallHeight + 'px';
        } else {
          if (document.getElementById("".concat(this.jSPlugin.id, "-headControl"))) {
            document.getElementById("".concat(this.jSPlugin.id, "-ez-iframe-footer-container")).style.top = height + 'px';
          }
          this.reSizeVideo(smallWidth, smallHeight);
          document.getElementById("".concat(this.jSPlugin.id, "-mapbox")).style.width = width + 'px';
          document.getElementById("".concat(this.jSPlugin.id, "-mapbox")).style.height = height + 'px';
        }
        document.getElementById("".concat(this.jSPlugin.id, "-miniToggle")).style.bottom = smallHeight / 2 + 96 - 30 + 'px';
        document.getElementById("".concat(this.jSPlugin.id, "-miniToggle")).style.right = this.jSPlugin.inspectVideoWidth + smallWidth + 'px';
      }
    }]);
    return Inspect;
  }();

  //巡检模板-Theme
  var InspectTheme = /*#__PURE__*/function () {
    function InspectTheme(jSPlugin) {
      var _this = this;
      _classCallCheck$1(this, InspectTheme);
      /**
      * 修改inspectMode
      */
      _defineProperty(this, "changeInspectMode", function (mode) {
        _this.inspectMode = mode;
      });
      this.jSPlugin = jSPlugin;
      this.videoWidth = jSPlugin.width; //视频窗口宽度
      this.videoHeight = jSPlugin.height; //视频窗口高度
      this.inspectMode = 'video'; //巡检窗口模式
      this.autoFocus = 0, this.decoderState = {
        state: {
          isEditing: false,
          play: false,
          sound: false,
          recordvideo: false,
          recordCount: "00:00",
          talk: false,
          mute: false,
          rejection: false,
          cloudRec: matchEzopenUrl(jSPlugin.url).type === 'cloud.rec',
          rec: matchEzopenUrl(jSPlugin.url).type === 'rec',
          type: matchEzopenUrl(jSPlugin.url).type
        }
      };
      this.isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
      if (typeof jSPlugin.isMobile !== 'undefined') {
        this.isMobile = jSPlugin.isMobile;
      }
      // 默认主题 - 按钮全部展示 todo
      this.themeData = webInspect.data;
      if (this.jSPlugin.themeId == 'themeData') {
        this.themeData = this.jSPlugin.params.themeData;
      }
      if (!this.timer) {
        this.timer = new Timer(jSPlugin);
      }
      // 自适应主题数据
      if (this.jSPlugin.themeId) {
        if (this.isMobile) ; else {
          this.inspect = new Inspect(this.jSPlugin, this.themeData, this.setDecoderState, this.decoderState, this.inspectMode, this.changeInspectMode, this.timer);
        }
        switch (this.jSPlugin.themeId) {
          case 'themeData':
            this.themeData = this.jSPlugin.params.themeData;
            this.inspect.initThemeData();
            this.inspect.renderThemeData();
            break;
          default:
            this.inspect.fetchThemeData(this.jSPlugin.themeId);
            break;
        }
      }
      if (!this.jSPlugin.Talk) {
        this.jSPlugin.Talk = new Talk(this.jSPlugin);
      }
      addCss("".concat(this.jSPlugin.staticPath, "/css/theme.css"));
      addCss("".concat(this.jSPlugin.staticPath, "/css/component.css"));
      addCss("".concat(this.jSPlugin.staticPath, "/css/inspectTheme.css"));
    }

    //设置按钮状态
    _createClass$1(InspectTheme, [{
      key: "setDecoderState",
      value: function setDecoderState(options, backgroundColor) {
        var _this2 = this;
        var color = "#FFFFFF";
        var activeColor = "#1890FF";
        Object.keys(options).map(function (item) {
          switch (item) {
            case 'talk':
              if (document.getElementById("".concat(_this2.jSPlugin.id, "-talk"))) {
                document.getElementById("".concat(_this2.jSPlugin.id, "-talk")).className = options[item] ? 'active' : '';
                document.getElementById("".concat(_this2.jSPlugin.id, "-talk-content")).childNodes[1].style.fill = options[item] ? activeColor : color;
                document.getElementById("".concat(_this2.jSPlugin.id, "-talk-content")).childNodes[2].style.color = options[item] ? activeColor : color;
              }
              break;
            case 'sound':
              if (document.getElementById("".concat(_this2.jSPlugin.id, "-sound"))) {
                if (options[item]) {
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound-content")).children[0].children[1].style = "display:inline-block";
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound-content")).children[0].children[0].style = "display:none";
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound")).className = options[item] ? 'active' : '';
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound-content")).childNodes[0].children[1].style.fill = options[item] ? activeColor : color;
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound-label")).style.color = options[item] ? activeColor : color;
                } else {
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound-content")).children[0].children[0].style = "display:inline-block";
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound-content")).children[0].children[1].style = "display:none";
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound")).className = options[item] ? 'active' : '';
                  document.getElementById("".concat(_this2.jSPlugin.id, "-sound-label")).style.color = options[item] ? activeColor : color;
                }
              }
              break;
          }
          _this2.decoderState.state = Object.assign(_this2.decoderState.state, options);
        });
      }
    }, {
      key: "setDisabled",
      value: function setDisabled(status) {
        var _this$decoderState$st = this.decoderState.state,
          sound = _this$decoderState$st.sound;
          _this$decoderState$st.hd;
        //设置按钮禁止点击状态
        document.getElementById(sound ? "".concat(this.jSPlugin.id, "-sound-icon") : "".concat(this.jSPlugin.id, "-nosound-icon")) != null && document.getElementById(sound ? "".concat(this.jSPlugin.id, "-sound-icon") : "".concat(this.jSPlugin.id, "-nosound-icon")).setAttribute('style', status ? 'cursor: not-allowed;fill: gray' : 'cursor: default');
        document.getElementById("".concat(this.jSPlugin.id, "-sound-label")) != null && document.getElementById("".concat(this.jSPlugin.id, "-sound-label")).setAttribute('style', status ? 'cursor: not-allowed; color: gray' : 'cursor: default');
        document.getElementById("".concat(this.jSPlugin.id, "-talk-icon")) != null && document.getElementById("".concat(this.jSPlugin.id, "-talk-icon")).setAttribute('style', status ? 'cursor: not-allowed;fill: gray' : 'cursor: default');
        document.getElementById("".concat(this.jSPlugin.id, "-talk-label")) != null && document.getElementById("".concat(this.jSPlugin.id, "-talk-label")).setAttribute('style', status ? 'cursor: not-allowed; color: gray' : 'cursor: default');
      }

      /**
       * 渲染巡检已结束效果
       */
    }, {
      key: "inspectEnding",
      value: function inspectEnding() {
        var objDOM = document.createElement('div');
        objDOM.id = "".concat(this.jSPlugin.id, "-inspect-ending-box");
        objDOM.style = "width:100%; position: absolute; z-index: 10000;  top:58px; bottom:0; left:0; background: #ffffff;";
        objDOM.innerHTML = "<div style=\"\n      overflow: auto;\n      box-sizing: border-box;\n      font-size: 14px;\n      color: #595959;\n      text-align: center;\n      display: flex;\n      align-items: center;\n      justify-content: center;\n      height: 100%;\n    \">\n      <div>\n        <div style=\"text-align:center; height: 21px;\">\n          <svg t=\"1689074472491\" class=\"icon\" viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"7172\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"21\" height=\"21\"><path d=\"M512 64a448 448 0 1 0 0 896A448 448 0 0 0 512 64z m-32 232c0-4.416 3.584-8 8-8h48c4.416 0 8 3.584 8 8v272A8 8 0 0 1 536 576h-48a8 8 0 0 1-8-8v-272zM512 736A48 48 0 1 1 512 640a48 48 0 0 1 0 96z\" fill=\"#FF4D4F\" p-id=\"7173\"></path></svg>\n        </div>\n        <div style=\"color: #595959; font-size:14px; margin: 5px 0 16px;font-weight: 400; text-align: center;\">\u5DE1\u68C0\u5DF2\u7ED3\u675F</div>\n      </div>\n    </div>\n    ";
        document.getElementById("".concat(this.jSPlugin.id, "-wrap")).appendChild(objDOM);
        this.jSPlugin.Zoom && this.jSPlugin.Zoom.stopZoom();
      }
    }]);
    return InspectTheme;
  }();

  var EventEmitter = /*#__PURE__*/function () {
    function EventEmitter() {
      _classCallCheck$1(this, EventEmitter);
      this.events = {};
    }

    /** 
     * 注册监听器 
     * @param {string} type - 事件类型 
     * @param {function} listener - 事件处理函数 
    */
    _createClass$1(EventEmitter, [{
      key: "on",
      value: function on(type, listener) {
        if (!type || !listener) return;
        this.events[type] = this.events[type] || [];
        this.events[type].push(listener);
      }

      /** 
      * 触发事件 
      * @param {string} type - 事件类型 
      * @param {*} arg - 传递给处理函数的参数 
      */
    }, {
      key: "emit",
      value: function emit(type, arg) {
        if (!type) return;
        if (this.events[type]) {
          this.events[type].forEach(function (listener) {
            return listener(arg);
          });
        }
      }

      /** 
       * 注销监听器 
       * @param {string} type - 事件类型 
       * @param {function} listener - 要注销的监听器处理函数 
      */
    }, {
      key: "off",
      value: function off(type, listener) {
        if (!type || !listener) return;
        if (this.events[type]) {
          this.events[type].splice(this.events[type].indexOf(listener), 1);
        }
      }

      /** 
       * 一次性监听器 
       * @param {string} type - 事件类型 
       * @param {function} listener - 事件处理函数 
      */
    }, {
      key: "once",
      value: function once(type, listener) {
        var self = this;
        function fn() {
          var args = Array.prototype.slice.call(arguments);
          listener.apply(null, args);
          self.off(type, fn);
        }
        this.on(type, fn);
      }

      /** 
      * 移除所有监听器 
      */
    }, {
      key: "removeAllListener",
      value: function removeAllListener() {
        this.events = {};
      }
    }]);
    return EventEmitter;
  }();

  (function (global, factory) {

    if ((typeof module === "undefined" ? "undefined" : _typeof(module)) === "object" && _typeof(module.exports) === "object") {
      module.exports = global.document ? factory(global, true) : function (w) {
        if (!w.document) {
          throw new Error("EZUIPlayer requires a window with a document");
        }
        return factory(w);
      };
    } else {
      factory(global);
    } // Pass this if window is not defined yet
  })(typeof window !== "undefined" ? window : void 0, function (window, noGlobal) {
    var _state;
    // 加载js
    function addJs(filepath, callback) {
      var headerScript = document.getElementsByTagName('head')[0].getElementsByTagName("script");
      var isReady = false;
      for (var i = 0; i < headerScript.length; i++) {
        if (headerScript[i].getAttribute("src") == filepath) {
          isReady = true;
          callback();
        }
      }
      if (!isReady) {
        var oJs = document.createElement("script");
        oJs.setAttribute("src", filepath);
        oJs.onload = callback;
        document.getElementsByTagName("head")[0].appendChild(oJs);
      }
    } // 加载css

    function addCss(filepath, callback) {
      var headerLink = document.getElementsByTagName('head')[0].getElementsByTagName("link");
      var isReady = false;
      for (var i = 0; i < headerLink.length; i++) {
        if (headerLink[i].getAttribute("href") == filepath) {
          isReady = true;
          callback();
        }
      }
      if (!isReady) {
        var oJs = document.createElement('link');
        oJs.rel = 'stylesheet';
        oJs.type = 'text/css';
        oJs.href = filepath;
        oJs.onload = callback;
        document.getElementsByTagName("head")[0].appendChild(oJs);
      }
    } // 通用请求方法

    function request(url, method, params, header, success, error) {
      var _url = url;
      var http_request = new XMLHttpRequest();
      http_request.onreadystatechange = function () {
        if (http_request.readyState == 4) {
          if (http_request.status == 200) {
            var _data = JSON.parse(http_request.responseText);
            success(_data);
          }
        }
      };
      http_request.open(method, _url, true); // http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

      var data = new FormData();
      for (var i in params) {
        data.append(i, params[i]);
      }
      http_request.send(data);
    }

    var EZUIKit = {
      EZUIKitPlayer: undefined,
      EZUIKitTalk: undefined,
      opt: {
        apiDomain: 'https://open.ys7.com/api/lapp/live/talk/url',
        filePath: 'https://open.ys7.com/assets/ezuikit_v2.6.4',
        accessToken: '',
        url: '',
        deviceSerial: '',
        channelNo: '',
        id: '',
        talkLink: '',
        rtcUrl: '',
        ttsUrl: '',
        stream: '',
        // 对讲插件依赖
        isReliesReady: false,
        template: 'simple',
        plugin: [],
        // 加载插件，talk-对讲
        audio: 1,
        // 声音id  0-不开启 1-开启
        autoplay: 1,
        videoLoading: false
      },
      state: (_state = {
        countTimer: undefined,
        // countTime 计时器
        recodeTime: 0,
        // 录音时间
        recodeTimer: undefined
      }, _defineProperty(_state, "recodeTime", 0), _defineProperty(_state, "fetchDefaultList", false), _defineProperty(_state, "page", 0), _defineProperty(_state, "pageSize", 5), _state),
      handleTalkSuccess: function handleTalkSuccess() {},
      handleTalkError: function handleTalkError() {}
    };
    /**
     * 视频播放器-开始
     */

    var domain = "https://open.ys7.com";
    var filePathDomain = domain;
    var EZUIKitPlayer = function EZUIKitPlayer(params) {
      var _this = this;
      this.opt = {
        id: params.id,
        apiDomain: domain + '/api/lapp/live/talk/url',
        filePath: filePathDomain + '/assets/ezuikit_v2.6.4',
        decoderVersion: '',
        accessToken: '',
        url: '',
        deviceSerial: '',
        channelNo: '',
        talkLink: '',
        rtcUrl: '',
        ttsUrl: '',
        stream: '',
        // 对讲插件依赖
        isReliesReady: false,
        template: 'simple',
        plugin: [],
        // 加载插件，talk-对讲
        audio: 1,
        // 声音id  0-不开启 1-开启
        autoplay: 1,
        fullScreenStatus: 0,
        bSupporDoubleClickFull: true,
        videoLoading: false
      };
      this.params = params;
      if (params.id) {
        this.opt.id = params.id;
      }
      if (params.accessToken) {
        this.opt.accessToken = params.accessToken;
      }
      if (typeof params.audio !== 'undefined') {
        this.opt.audio = params.audio;
      }
      if (typeof params.decoderVersion !== 'undefined') {
        this.opt.decoderVersion = params.decoderVersion;
      }
      if (typeof params.env !== 'undefined') {
        if (typeof params.env.domain !== 'undefined') {
          domain = params.env.domain;
          this.opt.apiDomain = domain + '/api/lapp/live/talk/url';
        }
        if (typeof params.env.filePathDomain !== 'undefined') {
          filePathDomain = params.env.filePathDomain;
          this.opt.filePathDomain = params.env.filePathDomain;
        }
      }
      // if(typeof params.domain !== 'undefined'){
      //   this.opt.apiDomain = params.domain + '/api/lapp/live/talk/url';
      // }

      if (params.url) {
        this.opt.url = params.url;
        this.opt.deviceSerial = params.url.split("/")[3];
        this.opt.channelNo = params.url.split("/")[4].split(".")[0];
      }
      if (typeof params.template !== 'undefined') {
        this.opt.template = params.template;
      }
      if (params.plugin) {
        this.opt.plugin = params.plugin;
      }
      if (typeof params.autoplay !== 'undefined') {
        this.opt.autoplay = params.autoplay ? 1 : 0;
      }
      if (typeof params.bSupporDoubleClickFull !== 'undefined') {
        this.opt.bSupporDoubleClickFull = params.bSupporDoubleClickFull;
      }
      if (typeof params.handleTalkSuccess !== 'undefined') {
        window.EZUIKit.handleTalkSuccess = params.handleTalkSuccess;
      }
      if (typeof params.handleTalkError !== 'undefined') {
        window.EZUIKit.handleTalkError = params.handleTalkError;
      }
      var id = this.opt.id;
      var domElement = document.getElementById(id); // 间隙

      domElement.style.fontSize = 0;
      domElement.style.overflowY = 'auto';
      domElement.style.position = 'relative';
      /**
       * 渲染iframe视频框
       */

      var iframe = document.createElement('iframe');
      function matchIframeUrl() {
        switch (_this.opt.template) {
          case 'simple':
            var iframeUrl = domain + "/ezopen/h5/iframe?bSupporDoubleClickFull=0&url=" + _this.opt.url.replace("?", "&") + "&autoplay=" + _this.opt.autoplay + "&audio=" + _this.opt.audio + "&accessToken=" + params.accessToken + "&templete=0" + "&id=" + id + "&decoderVersion=" + _this.opt.decoderVersion;
            var controlsValue = "";
            if (typeof params.controls !== 'undefined' && params.controls) {
              console.log("typeof", _typeof(params.controls));
              controlsValue = "play,voice,hd,fullScreen";
              if (params.controls.length > 0) {
                controlsValue = params.controls.join(",");
                iframeUrl += '&controls=' + controlsValue;
              }
            }
            if (params.websocketParams) {
              iframeUrl += '&websocketParams=' + JSON.stringify(params.websocketParams);
            }
            return iframeUrl;
          case 'standard':
            return domain + "/ezopen/h5/iframe?bSupporDoubleClickFull=0&url=" + _this.opt.url.replace("?", "&") + "&autoplay=" + _this.opt.autoplay + "&audio=" + _this.opt.audio + "&accessToken=" + params.accessToken + "&templete=1" + "&id=" + id + "&decoderVersion=" + _this.opt.decoderVersion;
          case 'security':
            return domain + "/ezopen/h5/iframe_se?bSupporDoubleClickFull=0&url=" + _this.opt.url.replace("?", "&") + "&autoplay=" + _this.opt.autoplay + "&audio=" + _this.opt.audio + "&accessToken=" + params.accessToken + "&templete=0" + "&id=" + id + "&decoderVersion=" + _this.opt.decoderVersion;
          case 'theme':
            iframeUrl = domain + "/jssdk/theme.html?url=".concat(params.url, "&accessToken=").concat(params.accessToken, "&id=").concat(id, "&isMobile=").concat(params.isMobile);
            if (typeof params.isMobile !== 'undefined') {
              iframeUrl += '&isMobile=' + params.isMobile;
            }
            if (typeof params.autoplay !== 'undefined') {
              iframeUrl += '&autoplay=' + params.autoplay;
            }
            if (typeof params.domain !== 'undefined') {
              if (params.domain == 'https://test12open.ys7.com') iframeUrl += '&env=' + 'test12';
            }
            if (typeof params.env !== 'undefined') {
              if (typeof params.env.domain !== 'undefined') {
                if (params.env.domain == 'https://test12open.ys7.com') {
                  iframeUrl += '&env=' + 'test12';
                }
              }
            }
            if (typeof params.header !== 'undefined') {
              iframeUrl += '&header=' + params.header;
            }
            return iframeUrl;
          default:
            return domain + "/ezopen/h5/iframe?bSupporDoubleClickFull=0&url=" + _this.opt.url.replace("?", "&") + "&autoplay=" + _this.opt.autoplay + "&audio=" + _this.opt.audio + "&accessToken=" + params.accessToken + "&templete=0" + "&id=" + id + "&decoderVersion=" + _this.opt.decoderVersion;
        }
      }
      iframe.src = matchIframeUrl(); // 默认取容器宽高

      var iframeHeight = document.getElementById(id).offsetHeight;
      var iframeWidth = document.getElementById(id).offsetWidth;
      if (params.height) {
        iframeHeight = parseInt(params.height);
        if (/\%$/.test(params.height)) {
          iframeWidth = document.getElementById(id).offsetWidth * (parseInt(params.height) / 100);
        }
      }
      if (params.width) {
        iframeWidth = parseInt(params.width);
        if (/\%$/.test(params.width)) {
          iframeWidth = document.getElementById(id).offsetWidth * (parseInt(params.width) / 100);
        }
      }
      iframe.width = iframeWidth;
      iframe.height = iframeHeight;
      iframe.id = 'EZUIKitPlayer-' + id; // 部分iframe属性

      iframe.setAttribute("allowfullscreen", true);
      iframe.setAttribute("allow", "autoplay");
      iframe.setAttribute("frameborder", 0);
      domElement.appendChild(iframe);
      var jqueryJS = _this.opt.filePath + '/js/jquery.js';
      var layerJs = 'https://open.ys7.com/assets/layer/layer.js';
      addJs(jqueryJS, function () {
        addJs(layerJs, function () {
          //   });
          // });
          /**
          * 渲染header
          */

          if (matchHeaderOpt().headerContainer) {
            // if (params.header && params.header instanceof Array) {
            var headerContainer = document.createElement('div');
            headerContainer.setAttribute('class', 'panel-top');
            var controsDOM = document.createElement('div');
            controsDOM.setAttribute('class', 'contros');
            headerContainer.appendChild(controsDOM);
            domElement.insertBefore(headerContainer, iframe);
            if (matchHeaderOpt().capturePictureModule) {
              // 截图
              var capturePictureDOM = document.createElement('span');
              capturePictureDOM.innerHTML = '<span title="截图">' + '<svg id="capturePicture" title="截图" t="1578882764585" class="icon" viewBox="0 0 1024 1024" version="1.1"' + '  xmlns="http://www.w3.org/2000/svg" p-id="5958" width="24" height="24">' + '  <path' + '    d="M887.296 315.904h-153.6c-51.2 0-68.096-102.4-119.296-102.4H392.704c-34.304 0-51.2 102.4-102.4 102.4h-153.6c-29.696 0-51.2 21.504-51.2 51.2v439.296c0 25.6 21.504 47.104 51.2 47.104h751.104c29.696 0 51.2-21.504 51.2-51.2v-435.2c-0.512-30.208-21.504-51.2-51.712-51.2zM512 768c-115.2 0-204.8-89.6-204.8-200.704s89.6-200.704 204.8-200.704 204.8 89.6 204.8 200.704-93.696 200.704-204.8 200.704z m247.296-354.304c-12.8 0-25.6-12.8-25.6-25.6s12.8-25.6 25.6-25.6 25.6 12.8 25.6 25.6c0 17.408-12.8 25.6-25.6 25.6zM256 264.704c0-8.704-8.704-16.896-16.896-16.896h-51.2c-8.704 0-16.896 8.704-16.896 16.896V281.6H256v-16.896z m256 148.992c-85.504 0-153.6 68.096-153.6 153.6s68.096 153.6 153.6 153.6 153.6-68.096 153.6-153.6-68.096-153.6-153.6-153.6z"' + '    fill="#ffffff" p-id="5959"></path>' + '</svg>' + '</span>';
              capturePictureDOM.onclick = function () {
                _this.capturePicture();
              };
              controsDOM.appendChild(capturePictureDOM);
            }
            console.log("matchHeaderOpt().saveModule", matchHeaderOpt().saveModule);
            if (matchHeaderOpt().saveModule) {
              var startSaveDOM = document.createElement('span');
              startSaveDOM.innerHTML = '<span title="开始录像">' + '  <svg id="startSave" t="1578882716693" class="icon" viewBox="0 0 1024 1024" version="1.1"' + '    xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24">' + '    <path' + '      d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0"' + '      p-id="3783" fill="#ffffff"></path>' + '  </svg>' + '</span>';
              startSaveDOM.onclick = function () {
                _this.startSave();
                document.getElementById('startSave').setAttribute('class', 'icon hide');
                document.getElementById('stopSave').setAttribute('class', 'icon');
              };
              controsDOM.appendChild(startSaveDOM);
              var stopSaveDOM = document.createElement('span');
              stopSaveDOM.innerHTML = '<span title="结束录像">' + ' <svg id="stopSave" t="1578882716693" class="icon hide" viewBox="0 0 1024 1024" version="1.1"' + '   xmlns="http://www.w3.org/2000/svg" p-id="3782" width="24" height="24">' + '   <path' + '     d="M915.2 729.6l-128-76.8c-25.6-12.8-44.8-32-44.8-51.2V435.2c0-25.6 19.2-38.4 44.8-51.2l128-76.8c25.6-12.8 44.8 0 44.8 19.2V704c0 32-19.2 38.4-44.8 25.6z m-332.8 89.6H96c-51.2 0-89.6-38.4-89.6-89.6V332.8c0-51.2 38.4-89.6 89.6-89.6h486.4c51.2 0 89.6 38.4 89.6 89.6v396.8c0 51.2-38.4 89.6-89.6 89.6zM192 364.8c-32 6.4-57.6 32-64 64-12.8 57.6 38.4 115.2 96 102.4 32-6.4 57.6-32 64-70.4 12.8-57.6-38.4-108.8-96-96z m0 0"' + '     p-id="3783" fill="red"></path>' + ' </svg>' + ' </span>';
              stopSaveDOM.onclick = function () {
                _this.stopSave();
                document.getElementById('stopSave').setAttribute('class', 'icon hide');
                document.getElementById('startSave').setAttribute('class', 'icon');
              };
              controsDOM.appendChild(stopSaveDOM);
            }
            if (matchHeaderOpt().zoomModule) {
              var enableZoomDOM = document.createElement('span');
              enableZoomDOM.innerHTML = '<span title="开启电子放大">' + '  <svg id="enableZoom" t="1578882639834" class="icon" viewBox="0 0 1000 1000" version="1.1"' + '    xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24">' + '    <path' + '      d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z"' + '      p-id="2228" fill="#ffffff"></path>' + '  </svg>' + '</span>';
              enableZoomDOM.onclick = function () {
                _this.enableZoom();
                document.getElementById('enableZoom').setAttribute('class', 'icon hide');
                document.getElementById('closeZoom').setAttribute('class', 'icon');
              };
              controsDOM.appendChild(enableZoomDOM);
              var closeZoomDOM = document.createElement('span');
              closeZoomDOM.innerHTML = '<span title="关闭电子放大">' + '  <svg id="closeZoom" t="1578882639834" class="icon hide" viewBox="0 0 1000 1000" version="1.1"' + '    xmlns="http://www.w3.org/2000/svg" p-id="2227" width="24" height="24">' + '    <path' + '      d="M830.6119 441.1089c0-193.7756-157.0939-350.8641-350.8775-350.8641S128.8559 247.3333 128.8559 441.1089 285.9508 791.972 479.7344 791.972 830.6119 634.8845 830.6119 441.1089zM483.2821 710.4863c-146.7975 0-265.8187-118.9953-265.8187-265.8088S336.4847 178.8697 483.2821 178.8697s265.8197 118.9953 265.8197 265.8078S630.0796 710.4863 483.2821 710.4863zM770.6031 653.5739l-72.6417 75.9485 141.6917 160.1814 82.0737-90.0739L770.6031 653.5739zM527.5849 267.4727h-88.60655762279428v132.90489048425167H306.0690340253259v88.60292721534799h132.90933675248866v132.9038911617923h88.60655762279428V488.9794719180395h132.90933675248866v-88.60292721534799H527.5849284006089V267.4726535408993z"' + '      p-id="2228" fill="red"></path>' + '  </svg>' + '</span>';
              closeZoomDOM.onclick = function () {
                _this.closeZoom();
                document.getElementById('closeZoom').setAttribute('class', 'icon hide');
                document.getElementById('enableZoom').setAttribute('class', 'icon');
              };
              controsDOM.appendChild(closeZoomDOM);
            }
          }
          /**
           * 渲染footer
           */
          /** 根据配置匹配底部footer渲染 */
          function matchFooterOpt() {
            var result = {
              footerContainer: false,
              talkModule: false,
              broadcastModule: false,
              hdModule: false,
              fullScreenModule: false
            };
            var template = _this.opt.template;
            switch (template) {
              case 'simple':
                if (params.footer && params.footer instanceof Array) {
                  var footer = params.footer;
                  result = {
                    footerContainer: true,
                    talkModule: footer.indexOf('talk') !== -1,
                    broadcastModule: footer.indexOf('broadcast') !== -1,
                    hdModule: footer.indexOf('hd') !== -1,
                    fullScreenModule: footer.indexOf('fullScreen') !== -1
                  };
                }
                break;
              case 'standard':
                if (params.footer && params.footer instanceof Array) {
                  var footer = params.footer;
                  result = {
                    footerContainer: true,
                    talkModule: footer.indexOf('talk') !== -1,
                    broadcastModule: footer.indexOf('broadcast') !== -1,
                    hdModule: footer.indexOf('hd') !== -1,
                    fullScreenModule: footer.indexOf('fullScreen') !== -1
                  };
                }
                break;
              case 'security':
                break;
              case 'voice':
                result = {
                  footerContainer: true,
                  talkModule: true,
                  broadcastModule: true,
                  hdModule: true,
                  fullScreenModule: true
                };
                break;
            }
            return result;
          }

          /** 根据配置匹配header渲染 */
          function matchHeaderOpt() {
            var result = {
              headerContainer: false,
              capturePictureModule: false,
              saveModule: false,
              zoomModule: false
            };
            var template = _this.opt.template;
            switch (template) {
              case 'simple':
                if (params.header && params.header instanceof Array) {
                  var header = params.header;
                  result = {
                    headerContainer: true,
                    capturePictureModule: header.indexOf('capturePicture') !== -1,
                    saveModule: header.indexOf('save') !== -1,
                    zoomModule: header.indexOf('zoom') !== -1
                  };
                }
                break;
              case 'standard':
                break;
              case 'security':
                break;
              case 'voice':
                result = {
                  headerContainer: true,
                  capturePictureModule: true,
                  saveModule: true,
                  zoomModule: true
                };
                break;
            }
            return result;
          }
          if (matchFooterOpt().footerContainer || _this.opt.plugin.indexOf('talk') !== -1) {
            var recoderCSS = _this.opt.filePath + '/npm/css/recoder.css';
            var recoderJs = _this.opt.filePath + '/npm/js/recoder.js';
            var recorderJs = _this.opt.filePath + '/recorder.js'; // addCss()

            addCss(recoderCSS, function () {});
            addJs(recoderJs, function () {
              addJs(recorderJs, function () {});
            }); // 对讲模块

            if (_this.opt.plugin.indexOf('talk') !== -1 || matchFooterOpt().talkModule) {
              var apiSuccess = function apiSuccess(data) {
                console.log("data", data);
                if (data.code == 200) {
                  var apiResult = data.data;
                  if (apiResult) {
                    // 临时将https转换为websocket
                    var rtcTrunk = apiResult.rtcUrl;
                    if (rtcTrunk.indexOf("ws") === -1) {
                      rtcTrunk = rtcTrunk.replace("https", "wss").replace("rtcgw", "rtcgw-ws");
                    }
                    _this.opt.rtcUrl = rtcTrunk;
                    _this.opt.ttsUrl = "tts://" + apiResult.ttsUrl;
                    var talk = "talk://" + _this.opt.deviceSerial + ":0:" + _this.opt.channelNo + ":cas.ys7.com:6500";
                    _this.opt.talkLink = _this.opt.ttsUrl + "/" + talk;
                    _this.opt.stream = apiResult.stream;
                    console.log("_this.opt", _this.opt); // 加载依赖

                    if (!_this.opt.isReliesReady) {
                      var adapeterJS = _this.opt.filePath + '/npm/js/adapeter.js';
                      var janusJS = _this.opt.filePath + '/npm/js/janus.js';
                      var ttsJS = _this.opt.filePath + '/npm/js/tts.js';
                      console.log("加载jquery.js");
                      addJs(adapeterJS, function () {
                        console.log("加载adapeter.js");
                        addJs(janusJS, function () {
                          console.log("加载janus.js");
                          addJs(ttsJS, function () {
                            console.log("加载tts.js"); // 文件加载完毕;

                            _this.opt.isReliesReady = true;
                          });
                        });
                      }, function () {
                        return !!window.adapter;
                      });
                    } // 创建DOM

                    if (!document.getElementById("audioleft")) {
                      var audioleft = document.createElement('div');
                      audioleft.style.display = 'none';
                      audioleft.id = 'audioleft';
                      document.body.appendChild(audioleft);
                    }
                    if (!document.getElementById("audioright")) {
                      var audioright = document.createElement('div');
                      audioright.style.display = 'none';
                      audioright.id = 'audioright';
                      document.body.appendChild(audioright);
                    }
                  }
                }
                EZUIKit.opt = _this.opt;
                if (window.EZUIKit) {
                  window.EZUIKit.opt = _this.opt;
                }
              };
              request(_this.opt.apiDomain, 'POST', {
                accessToken: _this.opt.accessToken,
                deviceSerial: _this.opt.deviceSerial,
                channelNo: _this.opt.channelNo
              }, '', apiSuccess);
            }
            if (matchFooterOpt().footerContainer) {
              /* 时间计数 */
              var countTime = function countTime(type, start) {
                clearInterval(EZUIKit.state.countTimer);
                if (type === 'add') {
                  var i = start;
                  EZUIKit.state.countTimer = setInterval(function () {
                    ++i;
                    document.getElementById("time-area").innerHTML = formatSeconds(i);
                  }, 1000);
                } else if (type === 'sub') {
                  var i = start;
                  EZUIKit.state.countTimer = setInterval(function () {
                    if (i > 0) {
                      i--;
                      document.getElementById("time-area").innerHTML = formatSeconds(i);
                    } else {
                      clearInterval(EZUIKit.state.countTimer);
                      EZUIKit.state.countTimer = undefined;
                      console.log("倒计时结束，开启声音"); // decoder.openSound(0);
                    }
                  }, 1000);
                } else if (type === 'destory') {
                  clearInterval(EZUIKit.state.countTimer);
                  EZUIKit.state.countTimer = undefined;
                  document.getElementById("time-area").innerHTML = '00:00';
                } //将秒数转换为时分秒格式

                function formatSeconds(value) {
                  var theTime = parseInt(value); // 秒

                  var middle = 0; // 分

                  var hour = 0; // 小时

                  var secondV = '00';
                  var minV = '00';
                  var hourV = '00';
                  if (theTime > 59) {
                    middle = parseInt(theTime / 60);
                    theTime = parseInt(theTime % 60);
                    if (middle > 59) {
                      hour = parseInt(middle / 60);
                      middle = parseInt(middle % 60);
                    }
                  }
                  secondV = parseInt(theTime) > 9 ? parseInt(theTime) : '0' + parseInt(theTime);
                  minV = parseInt(middle) > 9 ? parseInt(middle) : '0' + parseInt(middle);
                  hourV = parseInt(hour) > 9 ? parseInt(hour) : '0' + parseInt(hour);
                  if (hour > 0) {
                    return hourV + ':' + minV + ':' + secondV;
                  } else if (middle > 0) {
                    return minV + ':' + secondV;
                  } else {
                    return '00:' + secondV;
                  }
                }
              };
              // 底部容器
              var footerContainer = document.createElement('div');
              footerContainer.setAttribute("class", 'audio-controls');
              domElement.appendChild(footerContainer);
              if (matchFooterOpt().hdModule || matchFooterOpt().fullScreenModule) {
                // 底部右侧元素
                var rightContros = document.createElement('div');
                rightContros.setAttribute('class', 'contros');
                footerContainer.appendChild(rightContros);
                if (matchFooterOpt().hdModule) {
                  // 高清-标清切换
                  var hdDom = document.createElement('span');
                  hdDom.setAttribute('id', 'video-hd');
                  hdDom.innerHTML = _this.opt.url.indexOf('.hd') === -1 ? '标清' : '高清';
                  hdDom.onclick = function () {
                    // 停止
                    if (_this.opt.videoLoading) {
                      layer.msg("视频加载中，请稍后");
                      return false;
                    } else {
                      var stopPromise = _this.stop();
                      _this.opt.videoLoading = true;
                      stopPromise.then(function (data) {
                        _this.opt.videoLoading = false;
                        if (_this.opt.url.indexOf('.hd') === -1) {
                          _this.opt.url = _this.opt.url.replace('.live', '.hd.live');
                          hdDom.innerHTML = _this.opt.url.indexOf('.hd') === -1 ? '标清' : '高清';
                        } else {
                          _this.opt.url = _this.opt.url.replace('.hd.live', '.live');
                          hdDom.innerHTML = _this.opt.url.indexOf('.hd') === -1 ? '标清' : '高清';
                        }
                        _this.play(_this.opt.url);
                      })["catch"](function (error) {
                        console.log("error", error);
                      });
                    }
                    //iframe.src = domain +"/ezopen/h5/iframe?url=" + _this.opt.url.replace('.hd.live', '.live') + "&autoplay=1&audio=" + _this.opt.audio + "&accessToken=" + _this.opt.accessToken + "&templete=" + 0;
                  };

                  rightContros.appendChild(hdDom);
                }
                if (matchFooterOpt().fullScreenModule) {
                  // 声音控制
                  var openSoundDOM = document.createElement('span');
                  openSoundDOM.setAttribute('class', 'hide');
                  openSoundDOM.setAttribute('id', 'ezuikit-open-sound');
                  openSoundDOM.setAttribute('title', '打开声音');
                  openSoundDOM.setAttribute('style', 'vertical-align: top;');
                  openSoundDOM.innerHTML = '<svg t="1590476263239" class="icon" viewBox="0 0 1178 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2273" width="16" height="16"><path d="M665.6 51.2 665.6 51.2c-10.24-30.72-40.96-51.2-71.68-51.2-5.12 0-15.36 0-20.48 5.12l0 0L358.4 153.6 51.2 209.92l0 0C20.48 220.16 0 250.88 0 281.6 0 286.72 0 291.84 0 307.2l0 0 0 409.6 0 0c0 15.36 0 20.48 0 25.6 0 30.72 20.48 61.44 51.2 71.68l0 0L358.4 870.4l97.28 71.68 107.52 76.8 0 0c5.12 5.12 15.36 5.12 25.6 5.12 40.96 0 76.8-35.84 76.8-76.8 0-10.24 0-10.24 0-25.6l0 0L665.6 51.2zM563.2 870.4l-153.6-102.4-307.2-51.2L102.4 307.2l307.2-51.2 153.6-102.4L563.2 870.4z" p-id="2274" fill="#FF0000"></path><path d="M1049.6 537.6l112.64-112.64c20.48-20.48 20.48-56.32 0-76.8-20.48-20.48-56.32-20.48-76.8 0L972.8 460.8l-112.64-112.64c0 0 0 0 0 0-20.48-20.48-56.32-20.48-76.8 0 0 0 0 0 0 0-20.48 20.48-20.48 56.32 0 76.8l112.64 112.64-112.64 112.64c-20.48 20.48-20.48 56.32 0 76.8 20.48 20.48 56.32 20.48 76.8 0L972.8 614.4l112.64 112.64c20.48 20.48 56.32 20.48 76.8 0s20.48-56.32 0-76.8L1049.6 537.6z" p-id="2275" fill="#FF0000"></path></svg>';
                  openSoundDOM.onclick = function () {
                    _this.openSound(0);
                    openSoundDOM.setAttribute('class', 'hide');
                    closeSoundDOM.setAttribute('class', '');
                  }; // 声音控制

                  var closeSoundDOM = document.createElement('span');
                  openSoundDOM.setAttribute('id', 'ezuikit-close-sound');
                  closeSoundDOM.setAttribute('class', 'hide');
                  closeSoundDOM.setAttribute('title', '关闭声音');
                  closeSoundDOM.setAttribute('style', 'vertical-align: top;');
                  closeSoundDOM.innerHTML = '<svg t="1590414410633" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="20545" width="16" height="16"><path d="M840.533333 98.133333c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733334C883.2 256 938.666667 392.533333 938.666667 533.333333c0 140.8-55.466667 277.333333-157.866667 375.466667-17.066667 17.066667-17.066667 42.666667 0 59.733333 8.533333 8.533333 21.333333 12.8 29.866667 12.8 8.533333 0 21.333333-4.266667 29.866666-12.8 115.2-110.933333 183.466667-268.8 183.466667-435.2 0-166.4-68.266667-324.266667-183.466667-435.2zM571.733333 12.8c-17.066667-8.533333-34.133333-4.266667-46.933333 8.533333L281.6 256H42.666667c-25.6 0-42.666667 17.066667-42.666667 42.666667v426.666666c0 25.6 17.066667 42.666667 42.666667 42.666667h238.933333l243.2 234.666667c8.533333 8.533333 17.066667 12.8 29.866667 12.8 4.266667 0 12.8 0 17.066666-4.266667 17.066667-8.533333 25.6-21.333333 25.6-38.4V51.2c0-17.066667-8.533333-34.133333-25.6-38.4zM512 870.4l-183.466667-179.2c-8.533333-4.266667-17.066667-8.533333-29.866666-8.533333H85.333333V341.333333h213.333334c12.8 0 21.333333-4.266667 29.866666-12.8L512 153.6v716.8z" p-id="20546" fill="#ffffff"></path><path d="M759.466667 349.866667c-12.8-21.333333-38.4-25.6-59.733334-8.533334-21.333333 12.8-25.6 38.4-8.533333 59.733334 21.333333 29.866667 34.133333 76.8 34.133333 123.733333 0 46.933333-12.8 93.866667-34.133333 123.733333-12.8 21.333333-8.533333 46.933333 8.533333 59.733334 8.533333 4.266667 17.066667 8.533333 25.6 8.533333 12.8 0 25.6-4.266667 34.133334-17.066667 34.133333-46.933333 51.2-106.666667 51.2-174.933333 0-68.266667-17.066667-128-51.2-174.933333z" p-id="20547" fill="#ffffff"></path></svg>';
                  closeSoundDOM.onclick = function () {
                    _this.closeSound(0);
                    openSoundDOM.setAttribute('class', '');
                    closeSoundDOM.setAttribute('class', 'hide');
                  };
                  rightContros.appendChild(openSoundDOM);
                  rightContros.appendChild(closeSoundDOM);
                } // 根据当前音频配置展示

                if (_this.opt.audio == 1) {
                  closeSoundDOM.setAttribute('class', '');
                } else {
                  openSoundDOM.setAttribute('class', '');
                  _this.closeSound(0);
                }
                if (matchFooterOpt().fullScreenModule) {
                  // 全屏控制
                  var fullScreenDOM = document.createElement('span');
                  fullScreenDOM.setAttribute('title', '全屏');
                  fullScreenDOM.setAttribute('style', 'vertical-align: top;');
                  fullScreenDOM.innerHTML = '<svg id="fullScreen" t="1578020167938" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5035" width="16" height="16"> <path d="M348.373333 625.706667l-128 128-64 64v-128a33.28 33.28 0 0 0-35.413333-35.413334A33.493333 33.493333 0 0 0 85.333333 689.706667v213.333333A33.706667 33.706667 0 0 0 120.96 938.666667h213.333333a35.626667 35.626667 0 0 0 0-71.04h-128l64-64 128-128a35.2 35.2 0 0 0-49.92-49.92zM206.293333 156.373333h128a33.28 33.28 0 0 0 35.413334-35.413333A33.493333 33.493333 0 0 0 334.293333 85.333333H113.706667c-7.04 0-14.08 7.04-21.333334 14.293334a26.026667 26.026667 0 0 0-7.04 21.333333v213.333333a33.493333 33.493333 0 0 0 35.626667 35.413334 33.28 33.28 0 0 0 35.413333-35.413334v-128l192 192a35.2 35.2 0 0 0 49.92-49.92zM903.04 85.333333h-213.333333a33.493333 33.493333 0 0 0-35.413334 35.626667 33.28 33.28 0 0 0 35.413334 35.413333h128l-64 64-128 128a35.2 35.2 0 0 0 49.92 49.92l128-128 64-64v128a35.626667 35.626667 0 0 0 71.04 0v-213.333333A33.706667 33.706667 0 0 0 903.04 85.333333zM903.04 654.293333a33.28 33.28 0 0 0-35.413333 35.413334v128l-64-64-128-128a35.2 35.2 0 0 0-49.92 49.92l128 128 64 64h-128a35.626667 35.626667 0 0 0 0 71.04h213.333333A33.706667 33.706667 0 0 0 938.666667 903.04v-213.333333a33.493333 33.493333 0 0 0-35.626667-35.413334z" p-id="5036" fill="#ffffff"></path></svg>';
                  fullScreenDOM.onclick = function () {
                    _this.fullScreen();
                  };
                  rightContros.appendChild(fullScreenDOM);
                }
              }
              if (matchFooterOpt().talkModule) {
                // 对讲
                var startTalkDOM = document.createElement('div');
                var stopTalkDOM = document.createElement('div');
                startTalkDOM.setAttribute("class", "ptp-talk off");
                startTalkDOM.innerHTML = '<span title="对讲">' + '<svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"' + '  p-id="1641" width="16" height="16">' + '  <path' + '    d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z"' + '    p-id="1642" fill="#ffffff"></path>' + '  <path' + '    d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z"' + '    p-id="1643" fill="#ffffff"></path>' + '  <path' + '    d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z"' + '    p-id="1644" fill="#ffffff"></path>' + ' </svg>' + ' </span>' + ' <span>开启对讲</span>';
                startTalkDOM.onclick = function () {
                  console.log("EZUIKit.state.countTimer", EZUIKit.state.countTimer);
                  if (EZUIKit.state.countTimer) {
                    window.layer.msg("语音设备正忙，请稍后重试");
                    return false;
                  }
                  countTime('add', 0);
                  console.log("开始对讲，关闭声音");
                  _this.closeSound(0);
                  console.log(_this.opt);
                  _this.startTalk();
                  this.setAttribute("class", "ptp-talk off hide");
                  stopTalkDOM.setAttribute("class", "ptp-talk on");
                };
                stopTalkDOM.setAttribute("class", "ptp-talk on hide");
                stopTalkDOM.innerHTML = '<span title="对讲">' + ' <svg t="1581930496966" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"' + '    p-id="1641" width="16" height="16">' + '    <path' + '      d="M715.648 647.872c-30.208-22.336-61.568 39.36-100.992 77.44-39.36 38.08-34.112 31.488-123.392-17.088S311.488 540.224 280 491.648C248.448 443.072 265.472 424.704 265.472 424.704s78.72-62.976 97.152-81.344c18.368-18.368 13.12-30.208 13.12-30.208l-128.64-190.144c-23.616-5.184-64.32 5.12-128.576 57.6C54.208 233.088 30.592 353.856 151.296 575.68c120.768 221.824 347.84 330.752 485.568 374.08 137.856 43.328 228.416-61.696 249.408-103.68 21.056-41.984 13.12-85.312 13.12-85.312S745.856 670.208 715.648 647.872z"' + '      p-id="1642" fill="#ff0000"></path>' + '    <path' + '      d="M715.328 64C580.992 64 472.192 172.864 472.192 307.2s108.8 243.2 243.136 243.2 243.2-108.864 243.2-243.2S849.6 64 715.328 64zM715.328 461.056c-84.992 0-153.856-68.864-153.856-153.856s68.864-153.856 153.856-153.856 153.856 68.928 153.856 153.856S800.32 461.056 715.328 461.056z"' + '      p-id="1643" fill="#ff0000"></path>' + '    <path' + '      d="M777.472 277.376c-18.176 0-32.96-14.784-32.96-33.024 0-8.448 3.136-16.064 8.32-21.888-11.52-5.12-24.128-8-37.568-8-51.2 0-92.672 41.472-92.672 92.736s41.472 92.736 92.672 92.736S808.064 358.4 808.064 307.2c0-13.696-3.072-26.688-8.384-38.4C793.728 274.112 786.048 277.376 777.472 277.376zM715.328 340.928c-18.624 0-33.664-15.104-33.664-33.728 0-18.624 15.04-33.728 33.664-33.728 18.688 0 33.728 15.104 33.728 33.728C749.056 325.824 734.016 340.928 715.328 340.928z"' + '      p-id="1644" fill="#ff0000"></path>' + '  </svg>' + ' </span>' + '<span>关闭对讲</span>';
                stopTalkDOM.onclick = function () {
                  console.log(_this.opt);
                  _this.stopTalk();
                  countTime('destory', 0);
                  _this.openSound(0);
                  this.setAttribute("class", "ptp-talk on hide");
                  startTalkDOM.setAttribute("class", "ptp-talk off");
                };
                footerContainer.appendChild(startTalkDOM);
                footerContainer.appendChild(stopTalkDOM);
              }
              if (matchFooterOpt().broadcastModule) {
                var fetchVoiceList = function fetchVoiceList(page) {
                  function apiSuccess(data) {
                    console.log("data", data);
                    if (data.code == 200) {
                      randerVoliceList(data.data, 5);
                      EZUIKit.state.page = data.page.page; // 如果用户语音列表为空

                      if (page == 0 && data.data.length == 0 && !EZUIKit.state.fetchDefaultList) {
                        // 获取用户语音为空
                        EZUIKit.state.fetchDefaultList = true;
                        fetchVoiceList(0);
                      }
                    }
                  }
                  request(domain + '/api/lapp/voice/query', 'POST', {
                    accessToken: _this.opt.accessToken,
                    pageStart: page,
                    pageSize: EZUIKit.state.pageSize,
                    "default": EZUIKit.state.fetchDefaultList ? 'true' : 'false'
                  }, '', apiSuccess);
                };
                var randerVoliceList = function randerVoliceList(data) {
                  console.log("renderVoliceList", data);
                  if (data && data.length > 0) {
                    for (var i = 0; i < data.length; i++) {
                      var voiceItem = document.createElement('li');
                      voiceItem.innerHTML = "<li class='voice-item' id='voice-item-" + i + "' data-time=" + (data[i]["duration"] || 20) + " data-url=" + data[i]["fileUrl"] + ">" + (data[i]["voiceName"].length > 10 ? data[i]["voiceName"].substr(0, 10) + "..." : data[i]["voiceName"]) + "</li>";
                      document.getElementsByClassName('voice-list-ul')[0].append(voiceItem); // "<li class='voice-item' id='voice-item-" + i + "' data-time=" + (data[i]["duration"] || 20) + " data-url=" + data[i]["fileUrl"] + ">" + (data[i]["voiceName"].length > 10 ? (data[i]["voiceName"].substr(0, 10) + "...") : data[i]["voiceName"]) + "</li>";
                      // $("#voice-list ul").append("<li class='voice-item' id='voice-item-" + i + "' data-time=" + (data[i]["duration"] || 20) + " data-url=" + data[i]["fileUrl"] + ">" + (data[i]["voiceName"].length > 10 ? (data[i]["voiceName"].substr(0, 10) + "...") : data[i]["voiceName"]) + "</li>");

                      voiceItem.onclick = function (e) {
                        console.log("点击元素", e.target, e.target.dataset.url);
                        var voiceUrl = e.target.dataset.url;
                        var time = e.target.dataset.time;
                        playListOfVoice(voiceUrl, time);
                      };
                    }
                    if (data.length === EZUIKit.state.pageSize) {
                      document.getElementById('voice-list-end').innerHTML = "向下滚动加载更多";
                    } else {
                      document.getElementById('voice-list-end').innerHTML = "没有更多数据了";
                    }
                  }
                };
                var playListOfVoice = function playListOfVoice(voiceUrl, time) {
                  console.log("播放语音", voiceUrl, time); // decoder && decoder.closeSound(0);

                  function apiSuccess(data) {
                    console.log("data.data", data.data);
                    if (data.code == 200) {
                      // $("#startBroadcast").show();
                      // $("#stopBroadcast").hide();
                      countTime('sub', parseInt(time));
                    } else if (data.code == "10001") {
                      window.layer.msg("未找到当前语音");
                    } else {
                      window.layer.msg(data.msg || '发送失败，请稍后再试');
                    } // padding = false;
                  }
                  request(domain + '/api/lapp/voice/send', 'POST', {
                    accessToken: _this.opt.accessToken,
                    deviceSerial: _this.opt.deviceSerial,
                    channelNo: _this.opt.channelNo,
                    fileUrl: voiceUrl
                  }, '', apiSuccess);
                }; // 自定义语音
                // 对讲
                var startBroadcastDOM = document.createElement('div');
                var stopBroadcastDOM = document.createElement('div');
                startBroadcastDOM.setAttribute("class", 'broadcast off');
                stopBroadcastDOM.setAttribute("class", "broadcast on hide");
                startBroadcastDOM.innerHTML = ' <span title="语音播报">' + '  <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"' + '    p-id="1126" width="16" height="16">' + '    <path' + '      d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z"' + '      fill="#ffffff" p-id="1127"></path>' + '  </svg>' + '</span>' + '<span>语音播报</span>';
                startBroadcastDOM.onclick = function () {
                  this.setAttribute("class", "broadcast off hide");
                  stopBroadcastDOM.setAttribute("class", "broadcast on");
                };
                stopBroadcastDOM.innerHTML = '<div class="pop-hover">' + '  <div class="pop-hover-content">' + '    <div class="vioce-list" id="voice-list">' + '      <ul class="voice-list-ul">' + '      </ul>' + '      <div id="voice-list-end"></div>' + '    </div>' + '    <div id="voice-custom" style="text-align: center;">自定义语音</div>' + '  </div>' + '</div>' + '<span title="语音播报">' + '  <svg t="1583561695846" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"' + '    p-id="1126" width="16" height="16">' + '    <path' + '      d="M513.82044445 964.38044445c-8.192 0-15.47377778-2.73066667-21.84533334-8.192 0 0-46.42133333-41.87022222-99.21422222-86.47111112-89.20177778-73.728-117.41866667-88.29155555-123.79022222-90.112H35.04355555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666V271.70133333c0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666666H246.21511111c7.28177778-2.73066667 37.31911111-15.47377778 137.44355556-91.02222222 58.25422222-43.69066667 111.04711111-86.47111111 111.04711111-86.47111112 5.46133333-4.55111111 12.74311111-7.28177778 20.02488889-7.28177778 4.55111111 0 10.01244445 0.91022222 14.56355555 3.6408889 10.92266667 5.46133333 18.20444445 17.29422222 18.20444445 30.03733333v837.40444444c0 12.74311111-7.28177778 25.48622222-19.11466667 30.94755556-5.46133333 1.82044445-10.01244445 2.73066667-14.56355555 2.73066667zM270.79111111 724.992c19.11466667 0 48.24177778 8.192 167.48088889 106.496 16.384 13.65333333 33.67822222 28.21688889 51.88266667 43.69066667l5.46133333 4.55111111V139.71911111l-5.46133333 3.64088889c-22.75555555 17.29422222-44.60088889 34.58844445-65.536 50.06222222C293.54666667 291.72622222 264.41955555 299.008 245.30488889 299.008H82.37511111c-20.02488889 0-21.84533333 12.74311111-21.84533333 26.39644445V694.04444445c0 23.66577778 6.37155555 30.03733333 28.21688889 30.03733333h180.224l1.82044444 0.91022222z m520.64711111 162.01955555c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666666 0-11.83288889 8.192-20.02488889 16.384-24.576 112.86755555-67.35644445 182.04444445-191.14666667 182.04444444-324.03911111 0-132.89244445-70.08711111-256.68266667-182.04444444-324.03911111-10.01244445-5.46133333-15.47377778-14.56355555-15.47377778-24.576 0-14.56355555 11.83288889-27.30666667 26.39644445-27.30666667 5.46133333 0 10.01244445 1.82044445 16.384 5.46133333 128.34133333 76.45866667 207.53066667 218.45333333 207.53066666 369.55022222 0 152.00711111-80.09955555 293.09155555-208.44088889 369.55022223-6.37155555 5.46133333-10.92266667 7.28177778-16.384 7.28177777z m-90.112-152.91733333c-14.56355555 0-26.39644445-11.83288889-26.39644444-27.30666667 0-10.01244445 4.55111111-18.20444445 12.74311111-23.66577777 61.89511111-34.58844445 100.12444445-100.12444445 100.12444444-171.12177778 0-70.08711111-37.31911111-134.71288889-96.48355555-170.21155555-8.192-4.55111111-12.74311111-13.65333333-12.74311111-23.66577778 0-14.56355555 11.83288889-27.30666667 26.39644444-27.30666667 4.55111111 0 11.83288889 2.73066667 15.47377778 4.55111111 74.63822222 44.60088889 121.96977778 127.43111111 121.96977778 215.72266667 0 90.112-48.24177778 173.85244445-125.61066667 218.45333333-1.82044445 0-9.10222222 4.55111111-15.47377778 4.55111111z"' + '      fill="#ff0000" p-id="1127"></path>' + '  </svg>' + '</span>' + '<span>语音播报</span>'; // //自定义语音唤起
                // document.getElementById("voice-custom").onclick = function(){
                //   console.log("显示自定义语音");
                // }

                stopBroadcastDOM.onclick = function () {
                  this.setAttribute("class", "broadcast on hide");
                  startBroadcastDOM.setAttribute("class", "broadcast off");
                };
                footerContainer.appendChild(startBroadcastDOM);
                footerContainer.appendChild(stopBroadcastDOM); // 召唤自定义语言

                document.getElementById("voice-custom").onclick = function () {
                  console.log("显示自定义语音");
                  startSpeakDOM.setAttribute('class', 'speak off');
                }; // 获取语音列表

                fetchVoiceList(0);
                var startSpeakDOM = document.createElement('div');
                var stopSpeakDOM = document.createElement('div');
                startSpeakDOM.setAttribute('class', 'speak off hide');
                stopSpeakDOM.setAttribute('class', 'speak on hide');
                startSpeakDOM.setAttribute('id', 'startSpeak');
                stopSpeakDOM.setAttribute('id', 'stopSpeak');
                startSpeakDOM.innerHTML = '<span title="按住说话">' + '  <svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"' + '    p-id="1639" width="16" height="16">' + '    <path' + '      d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z"' + '      p-id="1640" fill="#ffffff"></path>' + '  </svg>' + '</span>' + '<span>按住说话</span>';
                stopSpeakDOM.innerHTML = '<span title="按住说话">' + '<svg t="1581994757678" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"' + '  p-id="1639" width="16" height="16">' + '  <path' + '    d="M757.059829 393.846154v-52.512821h262.564103v52.512821H757.059829z m-420.102564 481.367521v96.273504h175.042735a8.752137 8.752137 0 0 1 8.752137 8.752137v35.008547a8.752137 8.752137 0 0 1-8.752137 8.752137H109.401709a8.752137 8.752137 0 0 1-8.752136-8.752137v-35.008547a8.752137 8.752137 0 0 1 8.752136-8.752137h175.042735v-96.273504C129.767932 875.213675 4.376068 749.821812 4.376068 595.145299V463.863248a26.25641 26.25641 0 1 1 52.512821 0v113.777778c0 140.174222 113.637744 253.811966 253.811966 253.811965s253.811966-113.637744 253.811966-253.811965V463.863248a26.25641 26.25641 0 1 1 52.51282 0v131.282051c0 154.676513-125.391863 280.068376-280.068376 280.068376z m-26.25641-96.273504c-111.178393 0-201.299145-90.120752-201.299146-201.299145V201.299145C109.401709 90.120752 199.522462 0 310.700855 0s201.299145 90.120752 201.299145 201.299145v376.341881c0 111.178393-90.120752 201.299145-201.299145 201.299145z m691.418803-280.068376H757.059829v-52.512821h245.059829v52.512821z m-17.504273 105.025641H757.059829v-52.512821h227.555556v52.512821z m-17.504274 105.025641H757.059829v-52.512821h210.051282v52.512821z m-8.752137 105.025641H757.059829v-52.512821h201.299145v52.512821z m-17.504273 105.025641H757.059829v-52.512821h183.794872v52.512821z m-26.25641 105.025641H757.059829v-52.512821h157.538462v52.512821z"' + '    p-id="1640" fill="#ff0000"></path>' + '</svg>' + '</span>' + '<span>松开发送</span>';
                footerContainer.appendChild(startSpeakDOM);
                footerContainer.appendChild(stopSpeakDOM);
                document.getElementById("voice-list").onscroll = function (e) {
                  var sum = this.scrollHeight;
                  console.log("sum", sum, this.scrollTop, document.getElementById("voice-list").clientHeight);
                  if (sum <= this.scrollTop + this.clientHeight) {
                    console.log("拖动到底，执行加载", EZUIKit.state.page);
                    fetchVoiceList(++EZUIKit.state.page);
                  }
                }; // $("#voice-list").unbind("scroll").bind("scroll", function (e) {
                //   // console.log("e",e,this.scrollHeight, $(this).scrollTop() + $(this).height())
                //   var sum = this.scrollHeight;
                //   if (sum <= $(this).scrollTop() + $(this).height()) {
                //     console.log("拖动到底，执行加载", page);
                //     fetchVoiceList(++page);
                //   }
                //   loading = false;
                // });
                // time-area 

                var timeAreaDOM = document.createElement('div');
                timeAreaDOM.setAttribute('class', 'time-area');
                timeAreaDOM.setAttribute('id', 'time-area');
                timeAreaDOM.innerHTML = '00:00';
                footerContainer.appendChild(timeAreaDOM); // 按住说话

                var recorder;
                document.getElementById('startSpeak').onmousedown = function () {
                  if (EZUIKit.state.countTimer) {
                    window.layer.msg("语音设备正忙，请稍后重试");
                    return false;
                  }
                  console.log("按住说话");
                  startSpeakDOM.setAttribute('class', 'speak off hide');
                  stopSpeakDOM.setAttribute('class', 'speak on'); // console.log("startRecording",startRecording);
                  // startRecording();

                  voiceInit();
                  countTime('add', 0);
                  setTimeout(function () {
                    EZUIKit.state.recodeTime = 0;
                    startRecording();
                  }, 1000);
                  if (EZUIKit.state.recodeTimer) {
                    // 先清空计数器
                    clearInterval(EZUIKit.state.recodeTimer);
                  }
                  EZUIKit.state.recodeTimer = setInterval(function () {
                    if (EZUIKit.state.recodeTime >= 59) {
                      _this.stopTalk();
                      countTime('destory', 0);
                      this.setAttribute("class", "ptp-talk on hide");
                      startTalkDOM.setAttribute("class", "ptp-talk off");
                      window.layer.msg("不超过1分钟");
                    } else {
                      EZUIKit.state.recodeTime = EZUIKit.state.recodeTime + 1;
                    }
                  }, 1000);
                  /** 录音控制 */

                  var audio_context;
                  function startUserMedia(stream) {
                    var input = audio_context.createMediaStreamSource(stream);
                    recorder = new window.Recorder(input);
                  }
                  function startRecording() {
                    recorder && recorder.record();
                  }
                  function voiceInit() {
                    console.log("run init");
                    try {
                      // webkit shim
                      window.AudioContext = window.AudioContext || window.webkitAudioContext;
                      navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia;
                      window.URL = window.URL || window.webkitURL;
                      audio_context = new AudioContext();
                      console.log('Audio context set up.');
                      console.log('navigator.getUserMedia ' + (navigator.getUserMedia ? 'available.' : 'not present!'));
                    } catch (e) {
                      console.log("err", e);
                      window.layer.msg('No web audio support in this browser!');
                    }
                    navigator.getUserMedia({
                      audio: true
                    }, startUserMedia, function (e) {
                      console.log('No live audio input: ' + e);
                    });
                  }
                }; // 松开发送

                document.getElementById('stopSpeak').onmouseup = function () {
                  console.log("松开发送");
                  stopSpeakDOM.setAttribute('class', 'speak on hide');
                  stopSpeakFun();
                  function stopSpeakFun() {
                    countTime('destory', 0);
                    if (EZUIKit.state.recodeTime < 1) {
                      window.layer.msg("说话时间过短");
                      clearInterval(EZUIKit.state.recodeTimer);
                      return false;
                    }
                    clearInterval(EZUIKit.state.recodeTimer);
                    wavUpload();
                  }
                  function wavUpload() {
                    try {
                      recorder && recorder.stop(); // createAudioDom();

                      recorder && recorder.exportWAV(function (wav_file) {
                        console.log("wav_file", wav_file);
                        if (wav_file.size < 1000) {
                          window.layer.msg("录音失败，请重试"); // recodeTime = 0;

                          EZUIKit.state.recodeTime = 0;
                          return false;
                        } // 测试

                        countTime('sub', EZUIKit.state.recodeTime + 2); // 延时

                        var formdata = new FormData(); // form 表单 {key:value}

                        formdata.append("voiceFile", wav_file); // form input type="file"

                        formdata.append("accessToken", _this.opt.accessToken);
                        formdata.append("deviceSerial", _this.opt.deviceSerial);
                        formdata.append("channelNo", _this.opt.channelNo); // padding = true;

                        function apiSuccess(data) {
                          console.log("data.data", data.data);
                          if (data.code == 200) {
                            // $("#startBroadcast").show();
                            // $("#stopBroadcast").hide();
                            countTime('sub', EZUIKit.state.recodeTime + 2);
                          } else if (data.code == "10001") {
                            window.layer.msg("未找到当前语音");
                          } else {
                            window.layer.msg(data.msg || '发送失败，请稍后再试');
                          } // padding = false;
                        }

                        function apiError(err) {
                          console.log("err", err);
                        }
                        request(domain + '/api/lapp/voice/sendonce', 'POST', {
                          voiceFile: wav_file,
                          accessToken: _this.opt.accessToken,
                          deviceSerial: _this.opt.deviceSerial,
                          channelNo: _this.opt.channelNo
                        }, '', apiSuccess, apiError);
                      });
                      recorder && recorder.clear();
                    } catch (err) {
                      console.log(err);
                    }
                  }
                };
              }
            }
          }
        });
      });
      // iframe 传递数据

      var _this = this;
      window.addEventListener("message", function (event) {
        event.origin;
        var id = _this.opt.id;
        if (event.data.type) {
          switch (event.data.type) {
            case 'openSound':
              if (id == event.data.id && params.openSoundCallBack) {
                params.openSoundCallBack(event.data);
              }
              break;
            case 'closeSound':
              if (id == event.data.id && params.closeSoundCallBack) {
                params.closeSoundCallBack(event.data);
              }
              break;
            case 'capturePicture':
              if (id == event.data.id && params.capturePictureCallBack) {
                params.capturePictureCallBack(event.data);
              }
              break;
            case 'startSave':
              if (id == event.data.id && params.startSaveCallBack) {
                params.startSaveCallBack(event.data);
              }
              break;
            case 'stopSave':
              if (id == event.data.id && params.stopSaveCallBack) {
                params.stopSaveCallBack(event.data);
              }
              break;
            case 'fullScreen':
              if (id == event.data.id && params.fullScreenCallBack) {
                params.fullScreenCallBack(event.data);
              }
              break;
            case 'getOSDTime':
              if (id == event.data.id && params.getOSDTimeCallBack) {
                params.getOSDTimeCallBack(event.data);
              }
              break;
            case 'handleSuccess':
              if (id == event.data.id && params.handleSuccess) {
                params.handleSuccess(event.data);
              }
              break;
            case 'handleError':
              if (id == event.data.id && params.handleError) {
                params.handleError(event.data);
              }
              break;
            case 'dblclick':
              if (id == event.data.id && _this.opt.bSupporDoubleClickFull) {
                if (_this.opt.fullScreenStatus === 0) {
                  _this.fullScreen();
                } else {
                  _this.cancelFullScreen();
                }
              }
              break;
            case 'startTalk':
              _this.startTalk();
              // params.startTalk();
              _this.closeSound();
              break;
            case 'stopTalk':
              // window.stopTalk()
              _this.stopTalk();
              _this.openSound();
              break;
            case 'clickEventHandle':
              console.log("event.data", event.data);
              if (params.clickEventHandle) {
                params.clickEventHandle(event.data);
              }
              break;
            case 'removeEventHandle':
              if (params.removeEventHandle) {
                params.removeEventHandle(event.data);
              }
              break;
            case 'esc':
              if (params.clickEventHandle) {
                params.clickEventHandle(event.data);
              }
              break;
            case 'iframeFullScreen':
              if (id == event.data.id) {
                var requestFullScreen = function requestFullScreen(element) {
                  var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
                  if (requestMethod) {
                    requestMethod.call(element);
                  } else if (typeof window.ActiveXObject !== "undefined") {
                    var wscript = new ActiveXObject("WScript.Shell");
                    if (wscript !== null) {
                      wscript.SendKeys("{F11}");
                    }
                  }
                };
                requestFullScreen(document.getElementById("EZUIKitPlayer-" + event.data.id));
              }
              break;
          }
        }
      });
      // 全屏变化回调
      function fullscreenchange(data) {
        _this.opt.fullScreenStatus = data ? 1 : 0;
        if (params.fullScreenChangeCallBack) {
          params.fullScreenChangeCallBack({
            data: data,
            id: _this.opt.id
          });
        }
      }
      if (typeof document.fullScreen !== "undefined") {
        document.addEventListener("fullscreenchange", function () {
          var e = document.fullscreen || false;
          fullscreenchange(e);
        });
      } else if (typeof document.webkitIsFullScreen !== "undefined") {
        document.addEventListener("webkitfullscreenchange", function () {
          var e = document.webkitIsFullScreen || false;
          fullscreenchange(e);
        });
      } else if (typeof document.mozFullScreen !== "undefined") {
        document.addEventListener("mozfullscreenchange", function () {
          var e = document.mozFullScreen || false;
          fullscreenchange(e);
        });
      }
    }; // 播放相关API

    EZUIKitPlayer.prototype.play = function (data) {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      if (_typeof(data) === 'object' && data.url) {
        this.opt.url = data.url;
      }
      if (_typeof(data) === 'object' && data.accessToken) {
        this.opt.accessToken = data.accessToken;
      }
      if (typeof data === 'string') {
        this.opt.url = data;
      }
      player.postMessage({
        action: "play",
        accessToken: this.opt.accessToken,
        url: this.opt.url
      }, domain + "/ezopen/h5/iframe");
      var _this = this;
      this.opt.videoLoading = true;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'handleSuccess') {
            setTimeout(function () {
              _this.opt.videoLoading = false;
            }, 1000);
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.stop = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("stop", domain + "/ezopen/h5/iframe");
      var _this = this;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'stop') {
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.openSound = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("openSound", domain + "/ezopen/h5/iframe");
      var _this = this;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'openSound') {
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.closeSound = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("closeSound", domain + "/ezopen/h5/iframe");
      var _this = this;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'closeSound') {
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.startSave = function (fileName) {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage({
        action: "startSave",
        fileName: fileName || 'default'
      }, domain + "/ezopen/h5/iframe");
      var _this = this;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'startSave') {
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.stopSave = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("stopSave", domain + "/ezopen/h5/iframe");
      var _this = this;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'stopSave') {
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.fullScreen = function () {
      if (this.opt.fullScreenStatus === 1) {
        return false;
      }
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) {
        // console.log('移动端全屏');
        var width = document.documentElement.clientWidth;
        var height = document.documentElement.clientHeight;
        // wrapper = document.getElementById("test"),
        var wrapper = document.body; //document.body 属性返回 <body> 元素， document.documentElement 属性返回 <html> 元素。
        wrapper = document.getElementById(id);
        var style = "";
        style += "width:" + height + "px;"; // 注意旋转后的宽高切换
        style += "height:" + width + "px;";
        style += "-webkit-transform: rotate(90deg); transform: rotate(90deg);";
        // 注意旋转中点的处理
        style += "-webkit-transform-origin: " + width / 2 + "px " + width / 2 + "px;";
        style += "transform-origin: " + width / 2 + "px " + width / 2 + "px;";
        style += 'position: fixed;top: 0;left: 0;z-index:10';
        wrapper.style.cssText = style;
        // var cancelFullDOM = document.createElement('div');
        // cancelFullDOM.id = id + "cancel-full-screen"
        // var cancelFullDOMStyle="width:30px;height:"+height+"px;z-index:1000;position:fixed;top:0px;right:0px;";
        // cancelFullDOMStyle += "background-image: url(https://resource.ys7cloud.com/group1/M00/00/7E/CtwQE1-01qeAH2wAAAABOliqQ5g167.png);"
        // cancelFullDOMStyle += "background-size: contain;background-repeat:no-repeat;background-color:rgba(0,0,0,0.2)"
        // cancelFullDOM.style = cancelFullDOMStyle;
        // cancelFullDOM.onclick = function(){
        //   _this.cancelFullScreen();
        // }
        // document.body.appendChild(cancelFullDOM);
        setTimeout(function () {
          player.postMessage('autoResize', domain + "/ezopen/h5/iframe");
        }, 500);
      } else {
        // console.log('pc端全屏');
        var requestFullScreen = function requestFullScreen(element) {
          var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullScreen;
          if (requestMethod) {
            requestMethod.call(element);
          } else if (typeof window.ActiveXObject !== "undefined") {
            var wscript = new ActiveXObject("WScript.Shell");
            if (wscript !== null) {
              wscript.SendKeys("{F11}");
            }
          }
        };
        requestFullScreen(document.getElementById(id));
      }
      if (this.params.fullScreenCallBack) {
        this.params.fullScreenCallBack(this.opt.id);
      }
      this.opt.fullScreenStatus = 1;
    };
    EZUIKitPlayer.prototype.cancelFullScreen = function () {
      if (this.opt.fullScreenStatus === 0) {
        return false;
      }
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      if (navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)) {
        var width = document.getElementById(id).width;
        var height = document.getElementById(id).height;
        // wrapper = document.getElementById("test"),
        var wrapper = document.body; //document.body 属性返回 <body> 元素， document.documentElement 属性返回 <html> 元素。
        wrapper = document.getElementById(id);
        var style = "";
        style += "width:" + width + "px;";
        style += "height:" + height + "px;";
        style += "-webkit-transform: none; transform: none;";
        style += "-webkit-transform-origin: 0 0;";
        style += "transform-origin: 0 0;";
        wrapper.style.cssText = style;
        setTimeout(function () {
          player.postMessage("autoResize", domain + "/ezopen/h5/iframe");
        }, 500);
        var cancelFullDOMId = id + "cancel-full-screen";
        var cancelFullDOM = document.getElementById(cancelFullDOMId);
        if (cancelFullDOM) {
          document.body.removeChild(cancelFullDOM);
        }
      } else {
        if (document.exitFullscreen) {
          document.exitFullscreen();
        } else if (document.webkitCancelFullScreen) {
          document.webkitCancelFullScreen();
        } else if (document.mozCancelFullScreen) {
          document.mozCancelFullScreen();
        }
      }
      if (this.params.cancelFullScreenCallBack) {
        this.params.cancelFullScreenCallBack(this.opt.id);
      }
      this.opt.fullScreenStatus = 0;
    };
    EZUIKitPlayer.prototype.capturePicture = function (fileName, isUndownload) {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage({
        action: "capturePicture",
        fileName: fileName || 'default',
        isUndownload: isUndownload
      }, domain + "/ezopen/h5/iframe");
      var _this = this;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'capturePicture') {
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.enableZoom = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("enableZoom", domain + "/ezopen/h5/iframe");
    };
    EZUIKitPlayer.prototype.closeZoom = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("closeZoom", domain + "/ezopen/h5/iframe");
    };
    EZUIKitPlayer.prototype.getOSDTime = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("getOSDTime", domain + "/ezopen/h5/iframe");
      var _this = this;
      var promise = new Promise(function (resolve, reject) {
        window.addEventListener("message", function (event) {
          var playId = _this.opt.id;
          if (playId == event.data.id && event.data.type === 'getOSDTime') {
            resolve(event.data);
          }
        });
      });
      return promise;
    };
    EZUIKitPlayer.prototype.autoResize = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("autoResize", domain + "/ezopen/h5/iframe");
    };
    EZUIKitPlayer.prototype.reSize = function (width, height) {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      var containerDOM = document.getElementById(this.opt.id);
      containerDOM.style.width = width + 'px';
      containerDOM.style.height = height + 'px';
      document.getElementById(this.opt.id).style.width = width + 'px';
      document.getElementById(this.opt.id).style.height = height + 'px';
      var playDOM = document.getElementById(id);
      playDOM.setAttribute("width", width);
      playDOM.setAttribute("height", height);
      playDOM.style.width = width + 'px';
      playDOM.style.height = height + 'px';
      setTimeout(function () {
        player.postMessage({
          action: 'autoResize'
        }, domain + "/ezopen/h5/iframe");
      }, 500);
    };
    EZUIKitPlayer.prototype.startTalk = function () {
      console.log("执行开始对讲");
      console.log(this.opt);
      var _this = this;
      EZUIKit.opt = this.opt;
      if (window.EZUIKit) {
        window.EZUIKit.opt = this.opt;
      }
      var apiSuccess = function apiSuccess(data) {
        if (data.code == 200) {
          var apiResult = data.data;
          if (apiResult) {
            // 临时将https转换为websocket
            var rtcTrunk = apiResult.rtcUrl;
            if (rtcTrunk.indexOf("ws") === -1) {
              rtcTrunk = rtcTrunk.replace("https", "wss").replace("rtcgw", "rtcgw-ws");
            }
            _this.opt.rtcUrl = rtcTrunk;
            _this.opt.ttsUrl = "tts://" + apiResult.ttsUrl;
            var talk = "talk://" + _this.opt.deviceSerial + ":0:" + _this.opt.channelNo + ":cas.ys7.com:6500";
            _this.opt.talkLink = _this.opt.ttsUrl + "/" + talk;
            _this.opt.stream = apiResult.stream;
            window.startTalk();
          }
        }
      };
      request(_this.opt.apiDomain, 'POST', {
        accessToken: _this.opt.accessToken,
        deviceSerial: _this.opt.deviceSerial,
        channelNo: _this.opt.channelNo
      }, '', apiSuccess);
    };
    EZUIKitPlayer.prototype.stopTalk = function () {
      console.log("执行结束对讲");
      window.stopTalk();
    };
    EZUIKitPlayer.prototype.edit = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage("edit", domain + "/ezopen/h5/iframe");
    };
    EZUIKitPlayer.prototype.btnReRender = function (data) {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage({
        action: "btnReRender",
        data: data
      }, domain + "/ezopen/h5/iframe");
    };
    EZUIKitPlayer.prototype.changePlayUrl = function (data) {
      if (data.deviceSerial) {
        this.opt.deviceSerial = data.deviceSerial;
      }
      if (data.channelNo) {
        this.opt.channelNo = data.channelNo;
      }
      if (data.accessToken) {
        this.opt.accessToken = data.accessToken;
      }
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage({
        action: "changePlayUrl",
        data: data
      }, domain + "/ezopen/h5/iframe");
    };
    EZUIKitPlayer.prototype.fetchThemeData = function () {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage({
        action: "fetchThemeData"
      }, domain + "/ezopen/h5/iframe");
    };
    EZUIKitPlayer.prototype.setThemeData = function (accessToken, header, footer) {
      var id = 'EZUIKitPlayer-' + this.opt.id;
      var player = document.getElementById(id).contentWindow;
      player.postMessage({
        action: "setThemeData",
        data: {
          accessToken: accessToken,
          header: header,
          footer: footer
        }
      }, domain + "/ezopen/h5/iframe");
    };
    /**
     * 视频播放器-结束
     */

    EZUIKit.EZUIKitPlayer = EZUIKitPlayer;
    window.EZUIKitV3 = EZUIKit;
    var EZUIKitV3 = EZUIKit;
    return EZUIKitV3;
  });
  var EZUIKitV3$1 = EZUIKitV3;

  /* global setTimeout, clearTimeout */

  var dist = function debounce(fn) {
    var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
    var lastCallAt = void 0;
    var deferred = void 0;
    var timer = void 0;
    var pendingArgs = [];
    return function debounced() {
      var currentWait = getWait(wait);
      var currentTime = new Date().getTime();
      var isCold = !lastCallAt || currentTime - lastCallAt > currentWait;
      lastCallAt = currentTime;
      for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      if (isCold && options.leading) {
        return options.accumulate ? Promise.resolve(fn.call(this, [args])).then(function (result) {
          return result[0];
        }) : Promise.resolve(fn.call.apply(fn, [this].concat(args)));
      }
      if (deferred) {
        clearTimeout(timer);
      } else {
        deferred = defer();
      }
      pendingArgs.push(args);
      timer = setTimeout(flush.bind(this), currentWait);
      if (options.accumulate) {
        var argsIndex = pendingArgs.length - 1;
        return deferred.promise.then(function (results) {
          return results[argsIndex];
        });
      }
      return deferred.promise;
    };
    function flush() {
      var thisDeferred = deferred;
      clearTimeout(timer);
      Promise.resolve(options.accumulate ? fn.call(this, pendingArgs) : fn.apply(this, pendingArgs[pendingArgs.length - 1])).then(thisDeferred.resolve, thisDeferred.reject);
      pendingArgs = [];
      deferred = null;
    }
  };
  function getWait(wait) {
    return typeof wait === 'function' ? wait() : wait;
  }
  function defer() {
    var deferred = {};
    deferred.promise = new Promise(function (resolve, reject) {
      deferred.resolve = resolve;
      deferred.reject = reject;
    });
    return deferred;
  }
  var debounce = /*@__PURE__*/getDefaultExportFromCjs(dist);

  /*! formdata-polyfill. MIT License. Jimmy W?rting <https://jimmy.warting.se/opensource> */
  (function () {
    var h;
    function l(a) {
      var b = 0;
      return function () {
        return b < a.length ? {
          done: !1,
          value: a[b++]
        } : {
          done: !0
        };
      };
    }
    var m = "function" == typeof Object.defineProperties ? Object.defineProperty : function (a, b, c) {
      if (a == Array.prototype || a == Object.prototype) return a;
      a[b] = c.value;
      return a;
    };
    function n(a) {
      a = ["object" == typeof globalThis && globalThis, a, "object" == typeof window && window, "object" == typeof self && self, "object" == typeof commonjsGlobal && commonjsGlobal];
      for (var b = 0; b < a.length; ++b) {
        var c = a[b];
        if (c && c.Math == Math) return c;
      }
      throw Error("Cannot find global object");
    }
    var q = n(this);
    function r(a, b) {
      if (b) a: {
        var c = q;
        a = a.split(".");
        for (var d = 0; d < a.length - 1; d++) {
          var e = a[d];
          if (!(e in c)) break a;
          c = c[e];
        }
        a = a[a.length - 1];
        d = c[a];
        b = b(d);
        b != d && null != b && m(c, a, {
          configurable: !0,
          writable: !0,
          value: b
        });
      }
    }
    r("Symbol", function (a) {
      function b(f) {
        if (this instanceof b) throw new TypeError("Symbol is not a constructor");
        return new c(d + (f || "") + "_" + e++, f);
      }
      function c(f, g) {
        this.A = f;
        m(this, "description", {
          configurable: !0,
          writable: !0,
          value: g
        });
      }
      if (a) return a;
      c.prototype.toString = function () {
        return this.A;
      };
      var d = "jscomp_symbol_" + (1E9 * Math.random() >>> 0) + "_",
        e = 0;
      return b;
    });
    r("Symbol.iterator", function (a) {
      if (a) return a;
      a = Symbol("Symbol.iterator");
      for (var b = "Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "), c = 0; c < b.length; c++) {
        var d = q[b[c]];
        "function" === typeof d && "function" != typeof d.prototype[a] && m(d.prototype, a, {
          configurable: !0,
          writable: !0,
          value: function () {
            return u(l(this));
          }
        });
      }
      return a;
    });
    function u(a) {
      a = {
        next: a
      };
      a[Symbol.iterator] = function () {
        return this;
      };
      return a;
    }
    function v(a) {
      var b = "undefined" != typeof Symbol && Symbol.iterator && a[Symbol.iterator];
      return b ? b.call(a) : {
        next: l(a)
      };
    }
    var w;
    if ("function" == typeof Object.setPrototypeOf) w = Object.setPrototypeOf;else {
      var y;
      a: {
        var z = {
            a: !0
          },
          A = {};
        try {
          A.__proto__ = z;
          y = A.a;
          break a;
        } catch (a) {}
        y = !1;
      }
      w = y ? function (a, b) {
        a.__proto__ = b;
        if (a.__proto__ !== b) throw new TypeError(a + " is not extensible");
        return a;
      } : null;
    }
    var B = w;
    function C() {
      this.m = !1;
      this.j = null;
      this.v = void 0;
      this.h = 1;
      this.u = this.C = 0;
      this.l = null;
    }
    function D(a) {
      if (a.m) throw new TypeError("Generator is already running");
      a.m = !0;
    }
    C.prototype.o = function (a) {
      this.v = a;
    };
    C.prototype.s = function (a) {
      this.l = {
        D: a,
        F: !0
      };
      this.h = this.C || this.u;
    };
    C.prototype.return = function (a) {
      this.l = {
        return: a
      };
      this.h = this.u;
    };
    function E(a, b) {
      a.h = 3;
      return {
        value: b
      };
    }
    function F(a) {
      this.g = new C();
      this.G = a;
    }
    F.prototype.o = function (a) {
      D(this.g);
      if (this.g.j) return G(this, this.g.j.next, a, this.g.o);
      this.g.o(a);
      return H(this);
    };
    function I(a, b) {
      D(a.g);
      var c = a.g.j;
      if (c) return G(a, "return" in c ? c["return"] : function (d) {
        return {
          value: d,
          done: !0
        };
      }, b, a.g.return);
      a.g.return(b);
      return H(a);
    }
    F.prototype.s = function (a) {
      D(this.g);
      if (this.g.j) return G(this, this.g.j["throw"], a, this.g.o);
      this.g.s(a);
      return H(this);
    };
    function G(a, b, c, d) {
      try {
        var e = b.call(a.g.j, c);
        if (!(e instanceof Object)) throw new TypeError("Iterator result " + e + " is not an object");
        if (!e.done) return a.g.m = !1, e;
        var f = e.value;
      } catch (g) {
        return a.g.j = null, a.g.s(g), H(a);
      }
      a.g.j = null;
      d.call(a.g, f);
      return H(a);
    }
    function H(a) {
      for (; a.g.h;) try {
        var b = a.G(a.g);
        if (b) return a.g.m = !1, {
          value: b.value,
          done: !1
        };
      } catch (c) {
        a.g.v = void 0, a.g.s(c);
      }
      a.g.m = !1;
      if (a.g.l) {
        b = a.g.l;
        a.g.l = null;
        if (b.F) throw b.D;
        return {
          value: b.return,
          done: !0
        };
      }
      return {
        value: void 0,
        done: !0
      };
    }
    function J(a) {
      this.next = function (b) {
        return a.o(b);
      };
      this.throw = function (b) {
        return a.s(b);
      };
      this.return = function (b) {
        return I(a, b);
      };
      this[Symbol.iterator] = function () {
        return this;
      };
    }
    function K(a, b) {
      b = new J(new F(b));
      B && a.prototype && B(b, a.prototype);
      return b;
    }
    function L(a, b) {
      a instanceof String && (a += "");
      var c = 0,
        d = !1,
        e = {
          next: function () {
            if (!d && c < a.length) {
              var f = c++;
              return {
                value: b(f, a[f]),
                done: !1
              };
            }
            d = !0;
            return {
              done: !0,
              value: void 0
            };
          }
        };
      e[Symbol.iterator] = function () {
        return e;
      };
      return e;
    }
    r("Array.prototype.entries", function (a) {
      return a ? a : function () {
        return L(this, function (b, c) {
          return [b, c];
        });
      };
    });
    if ("undefined" !== typeof Blob && ("undefined" === typeof FormData || !FormData.prototype.keys)) {
      var M = function (a, b) {
          for (var c = 0; c < a.length; c++) b(a[c]);
        },
        N = function (a) {
          return a.replace(/\r?\n|\r/g, "\r\n");
        },
        O = function (a, b, c) {
          if (b instanceof Blob) {
            c = void 0 !== c ? String(c + "") : "string" === typeof b.name ? b.name : "blob";
            if (b.name !== c || "[object Blob]" === Object.prototype.toString.call(b)) b = new File([b], c);
            return [String(a), b];
          }
          return [String(a), String(b)];
        },
        P = function (a, b) {
          if (a.length < b) throw new TypeError(b + " argument required, but only " + a.length + " present.");
        },
        Q = "object" === typeof globalThis ? globalThis : "object" === typeof window ? window : "object" === typeof self ? self : this,
        R = Q.FormData,
        S = Q.XMLHttpRequest && Q.XMLHttpRequest.prototype.send,
        T = Q.Request && Q.fetch,
        U = Q.navigator && Q.navigator.sendBeacon,
        V = Q.Element && Q.Element.prototype,
        W = Q.Symbol && Symbol.toStringTag;
      W && (Blob.prototype[W] || (Blob.prototype[W] = "Blob"), "File" in Q && !File.prototype[W] && (File.prototype[W] = "File"));
      try {
        new File([], "");
      } catch (a) {
        Q.File = function (b, c, d) {
          b = new Blob(b, d || {});
          Object.defineProperties(b, {
            name: {
              value: c
            },
            lastModified: {
              value: +(d && void 0 !== d.lastModified ? new Date(d.lastModified) : new Date())
            },
            toString: {
              value: function () {
                return "[object File]";
              }
            }
          });
          W && Object.defineProperty(b, W, {
            value: "File"
          });
          return b;
        };
      }
      var escape = function (a) {
          return a.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
        },
        X = function (a) {
          this.i = [];
          var b = this;
          a && M(a.elements, function (c) {
            if (c.name && !c.disabled && "submit" !== c.type && "button" !== c.type && !c.matches("form fieldset[disabled] *")) if ("file" === c.type) {
              var d = c.files && c.files.length ? c.files : [new File([], "", {
                type: "application/octet-stream"
              })];
              M(d, function (e) {
                b.append(c.name, e);
              });
            } else "select-multiple" === c.type || "select-one" === c.type ? M(c.options, function (e) {
              !e.disabled && e.selected && b.append(c.name, e.value);
            }) : "checkbox" === c.type || "radio" === c.type ? c.checked && b.append(c.name, c.value) : (d = "textarea" === c.type ? N(c.value) : c.value, b.append(c.name, d));
          });
        };
      h = X.prototype;
      h.append = function (a, b, c) {
        P(arguments, 2);
        this.i.push(O(a, b, c));
      };
      h.delete = function (a) {
        P(arguments, 1);
        var b = [];
        a = String(a);
        M(this.i, function (c) {
          c[0] !== a && b.push(c);
        });
        this.i = b;
      };
      h.entries = function b() {
        var c,
          d = this;
        return K(b, function (e) {
          1 == e.h && (c = 0);
          if (3 != e.h) return c < d.i.length ? e = E(e, d.i[c]) : (e.h = 0, e = void 0), e;
          c++;
          e.h = 2;
        });
      };
      h.forEach = function (b, c) {
        P(arguments, 1);
        for (var d = v(this), e = d.next(); !e.done; e = d.next()) {
          var f = v(e.value);
          e = f.next().value;
          f = f.next().value;
          b.call(c, f, e, this);
        }
      };
      h.get = function (b) {
        P(arguments, 1);
        var c = this.i;
        b = String(b);
        for (var d = 0; d < c.length; d++) if (c[d][0] === b) return c[d][1];
        return null;
      };
      h.getAll = function (b) {
        P(arguments, 1);
        var c = [];
        b = String(b);
        M(this.i, function (d) {
          d[0] === b && c.push(d[1]);
        });
        return c;
      };
      h.has = function (b) {
        P(arguments, 1);
        b = String(b);
        for (var c = 0; c < this.i.length; c++) if (this.i[c][0] === b) return !0;
        return !1;
      };
      h.keys = function c() {
        var d = this,
          e,
          f,
          g,
          k,
          p;
        return K(c, function (t) {
          1 == t.h && (e = v(d), f = e.next());
          if (3 != t.h) {
            if (f.done) {
              t.h = 0;
              return;
            }
            g = f.value;
            k = v(g);
            p = k.next().value;
            return E(t, p);
          }
          f = e.next();
          t.h = 2;
        });
      };
      h.set = function (c, d, e) {
        P(arguments, 2);
        c = String(c);
        var f = [],
          g = O(c, d, e),
          k = !0;
        M(this.i, function (p) {
          p[0] === c ? k && (k = !f.push(g)) : f.push(p);
        });
        k && f.push(g);
        this.i = f;
      };
      h.values = function d() {
        var e = this,
          f,
          g,
          k,
          p,
          t;
        return K(d, function (x) {
          1 == x.h && (f = v(e), g = f.next());
          if (3 != x.h) {
            if (g.done) {
              x.h = 0;
              return;
            }
            k = g.value;
            p = v(k);
            p.next();
            t = p.next().value;
            return E(x, t);
          }
          g = f.next();
          x.h = 2;
        });
      };
      X.prototype._asNative = function () {
        for (var d = new R(), e = v(this), f = e.next(); !f.done; f = e.next()) {
          var g = v(f.value);
          f = g.next().value;
          g = g.next().value;
          d.append(f, g);
        }
        return d;
      };
      X.prototype._blob = function () {
        var d = "----formdata-polyfill-" + Math.random(),
          e = [],
          f = "--" + d + '\r\nContent-Disposition: form-data; name="';
        this.forEach(function (g, k) {
          return "string" == typeof g ? e.push(f + escape(N(k)) + ('"\r\n\r\n' + N(g) + "\r\n")) : e.push(f + escape(N(k)) + ('"; filename="' + escape(g.name) + '"\r\nContent-Type: ' + (g.type || "application/octet-stream") + "\r\n\r\n"), g, "\r\n");
        });
        e.push("--" + d + "--");
        return new Blob(e, {
          type: "multipart/form-data; boundary=" + d
        });
      };
      X.prototype[Symbol.iterator] = function () {
        return this.entries();
      };
      X.prototype.toString = function () {
        return "[object FormData]";
      };
      V && !V.matches && (V.matches = V.matchesSelector || V.mozMatchesSelector || V.msMatchesSelector || V.oMatchesSelector || V.webkitMatchesSelector || function (d) {
        d = (this.document || this.ownerDocument).querySelectorAll(d);
        for (var e = d.length; 0 <= --e && d.item(e) !== this;);
        return -1 < e;
      });
      W && (X.prototype[W] = "FormData");
      if (S) {
        var Y = Q.XMLHttpRequest.prototype.setRequestHeader;
        Q.XMLHttpRequest.prototype.setRequestHeader = function (d, e) {
          Y.call(this, d, e);
          "content-type" === d.toLowerCase() && (this.B = !0);
        };
        Q.XMLHttpRequest.prototype.send = function (d) {
          d instanceof X ? (d = d._blob(), this.B || this.setRequestHeader("Content-Type", d.type), S.call(this, d)) : S.call(this, d);
        };
      }
      T && (Q.fetch = function (d, e) {
        e && e.body && e.body instanceof X && (e.body = e.body._blob());
        return T.call(this, d, e);
      });
      U && (Q.navigator.sendBeacon = function (d, e) {
        e instanceof X && (e = e._asNative());
        return U.call(this, d, e);
      });
      Q.FormData = X;
    }
  })();

  // ----------------------------------------------------------------------
  // 安装方式
  /** 壁装方式 */
  var FEC_PLACE_WALL = 0x1; // 壁装方式
  // const FEC_PLACE_FLOOR = 0x2; // 地面安装
  /** 顶装方式 */
  var FEC_PLACE_CEILING = 0x3; // 顶装方式

  /** 不矫正 */
  var FEC_CORRECT_NULL = 0x0000; //不矫正
  /** PTZ */
  var FEC_CORRECT_PTZ = 0x0100; // PTZ
  /** 360 全景矫正 */
  var FEC_CORRECT_360 = 0x0300; // 
  /** 鱼眼圆柱显示 - 顶装/底装 */
  var FEC_CORRECT_CYLINDER = 0x0600; // 
  /** 鱼眼水平弧面 - 壁装 */
  var FEC_CORRECT_ARCSPHERE_HORIZONTAL = 0x0900; // 

  /** 
   * @description 顶装方式模式 place = 0x3, 矫正列表中第一个值默认主屏 port = 0, hidden = true 隐藏当前屏（一般会在列表的第一个值中设置，隐藏主屏），
   *               每个屏的矫正可以自定义。如果没有correctList 默认只对主屏进行矫正，如果有 correctList, 会根据 correctList 进行矫正
   * 
   * @type {CorrectType[]}
   */
  var FEC_PLACE_CEILING_CORRECT_TYPE_LIST = [{
    place: FEC_PLACE_CEILING,
    name: "鱼眼不矫正",
    type: 0,
    // 矫正列表
    correctType: FEC_CORRECT_NULL // FEC_CORRECT_NULL = 0x0000; //不矫正
  }, {
    place: FEC_PLACE_CEILING,
    name: "360°全景",
    type: 1,
    correctType: FEC_CORRECT_360 //  FEC_CORRECT_360 = 0x0300; // 360 全景矫正
  },
  // {
  //   place: FEC_PLACE_CEILING,
  //   name: "全景5分屏",
  //   type: 2,
  //   correctType: FEC_CORRECT_PTZ, //  FEC_CORRECT_360 = 0x0300; // 360 全景矫正
  // },
  // {
  //   place: FEC_PLACE_CEILING,
  //   name: "5分屏",
  //   type: 3,
  //   hideOriginal: true,
  //   correctType: FEC_CORRECT_PTZ,
  // },
  {
    place: FEC_PLACE_CEILING,
    name: "4分屏",
    type: 4,
    // 矫正列表
    // 
    correctList: [{
      correctType: FEC_CORRECT_PTZ,
      x: 0.25,
      y: 0.25
    }, {
      correctType: FEC_CORRECT_PTZ,
      x: 0.75,
      y: 0.25
    }, {
      correctType: FEC_CORRECT_PTZ,
      x: 0.25,
      y: 0.75
    }, {
      correctType: FEC_CORRECT_PTZ,
      x: 0.75,
      y: 0.75
    }],
    correctType: FEC_CORRECT_PTZ
  }, {
    place: FEC_PLACE_CEILING,
    name: "柱状",
    type: 5,
    correctType: FEC_CORRECT_CYLINDER,
    // FEC_CORRECT_CYLINDER = 0x0600; // 鱼眼圆柱显示 - 顶装/底装
    // 默认视图拖动位置
    viewParam: {
      x: 0,
      y: 0
    }
  }];

  /**
   * 壁装方式模式 place = 0x1; 矫正列表中第一个值默认主屏 port = 0, hidden = true 隐藏当前屏（一般会在列表的第一个值中设置，隐藏主屏），
   *               每个屏的矫正可以自定义。如果没有correctList 默认只对主屏进行矫正，如果有 correctList, 会根据 correctList 进行矫正
   * @type {CorrectType[]}
   */
  var FEC_PLACE_WALL_CORRECT_TYPE_LIST = [{
    place: FEC_PLACE_WALL,
    name: "鱼眼不矫正",
    type: 0,
    correctType: FEC_CORRECT_NULL // FEC_CORRECT_NULL = 0x0000; //不矫正
  }, {
    place: FEC_PLACE_WALL,
    name: "360°全景",
    type: 1,
    correctType: FEC_CORRECT_360 //  FEC_CORRECT_360 = 0x0300; // 360 全景矫正
  }, {
    place: FEC_PLACE_WALL,
    name: "4分屏",
    type: 2,
    correctList: [{
      correctType: FEC_CORRECT_PTZ,
      x: 0.25,
      y: 0.25
    }, {
      correctType: FEC_CORRECT_PTZ,
      x: 0.75,
      y: 0.25
    }, {
      correctType: FEC_CORRECT_PTZ,
      x: 0.25,
      y: 0.75
    }, {
      correctType: FEC_CORRECT_PTZ,
      x: 0.75,
      y: 0.75
    }],
    correctType: FEC_CORRECT_PTZ
  },
  // {
  //   place: FEC_PLACE_WALL,
  //   name: "水平",
  //   type: 3,
  //   correctType: FEC_CORRECT_LAT, //  FEC_CORRECT_LAT = 0x0400; // 纬度展开
  // },
  {
    place: FEC_PLACE_WALL,
    name: "广角",
    type: 4,
    correctType: FEC_CORRECT_ARCSPHERE_HORIZONTAL // FEC_CORRECT_ARCSPHERE_HORIZONTAL = 0x0900; // 鱼眼水平弧面 - 壁装
    // viewParam: {
    //   zoom: 1.4
    // }
  }];

  // ----------------------------------------------------------------------

  var jsPluginV31_0_0_min = {exports: {}};

  (function(module,exports){(function(global,factory){module.exports=factory();})(commonjsGlobal,function(){var commonjsGlobal$1=typeof globalThis!=='undefined'?globalThis:typeof window!=='undefined'?window:typeof commonjsGlobal!=='undefined'?commonjsGlobal:typeof self!=='undefined'?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,'default')?x['default']:x;}var streamClient1_2_0_min={exports:{}};(function(module,exports){(function webpackUniversalModuleDefinition(root,factory){module.exports=factory();})(window,function(){return(/******/function(modules){// webpackBootstrap
  /******/ // The module cache
  /******/var installedModules={};/******/ /******/ // The require function
  /******/function __webpack_require__(moduleId){/******/ /******/ // Check if module is in cache
  /******/if(installedModules[moduleId]){/******/return installedModules[moduleId].exports;/******/}/******/ // Create a new module (and put it into the cache)
  /******/var module=installedModules[moduleId]={/******/i:moduleId,/******/l:false,/******/exports:{}/******/};/******/ /******/ // Execute the module function
  /******/modules[moduleId].call(module.exports,module,module.exports,__webpack_require__);/******/ /******/ // Flag the module as loaded
  /******/module.l=true;/******/ /******/ // Return the exports of the module
  /******/return module.exports;/******/}/******/ /******/ /******/ // expose the modules object (__webpack_modules__)
  /******/__webpack_require__.m=modules;/******/ /******/ // expose the module cache
  /******/__webpack_require__.c=installedModules;/******/ /******/ // define getter function for harmony exports
  /******/__webpack_require__.d=function(exports,name,getter){/******/if(!__webpack_require__.o(exports,name)){/******/Object.defineProperty(exports,name,{enumerable:true,get:getter});/******/}/******/};/******/ /******/ // define __esModule on exports
  /******/__webpack_require__.r=function(exports){/******/if(typeof Symbol!=='undefined'&&Symbol.toStringTag){/******/Object.defineProperty(exports,Symbol.toStringTag,{value:'Module'});/******/}/******/Object.defineProperty(exports,'__esModule',{value:true});/******/};/******/ /******/ // create a fake namespace object
  /******/ // mode & 1: value is a module id, require it
  /******/ // mode & 2: merge all properties of value into the ns
  /******/ // mode & 4: return value when already ns object
  /******/ // mode & 8|1: behave like require
  /******/__webpack_require__.t=function(value,mode){/******/if(mode&1)value=__webpack_require__(value);/******/if(mode&8)return value;/******/if(mode&4&&_typeof(value)==='object'&&value&&value.__esModule)return value;/******/var ns=Object.create(null);/******/__webpack_require__.r(ns);/******/Object.defineProperty(ns,'default',{enumerable:true,value:value});/******/if(mode&2&&typeof value!='string')for(var key in value)__webpack_require__.d(ns,key,function(key){return value[key];}.bind(null,key));/******/return ns;/******/};/******/ /******/ // getDefaultExport function for compatibility with non-harmony modules
  /******/__webpack_require__.n=function(module){/******/var getter=module&&module.__esModule?/******/function getDefault(){return module['default'];}:/******/function getModuleExports(){return module;};/******/__webpack_require__.d(getter,'a',getter);/******/return getter;/******/};/******/ /******/ // Object.prototype.hasOwnProperty.call
  /******/__webpack_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property);};/******/ /******/ // __webpack_public_path__
  /******/__webpack_require__.p="";/******/ /******/ /******/ // Load entry module and return exports
  /******/return __webpack_require__(__webpack_require__.s=1);/******/}/************************************************************************/ /******/([/* 0 */ /***/function(module,exports){var dbits;function BigInteger(a,b,c){a!=null&&("number"==typeof a?this.fromNumber(a,b,c):b==null&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b));}function nbi(){return new BigInteger(null);}function am3(a,b,c,d,e,g){var h=b&16383;for(b>>=14;--g>=0;){var f=this[a]&16383,o=this[a++]>>14,p=b*f+o*h,f=h*f+((p&16383)<<14)+c[d]+e,e=(f>>28)+(p>>14)+b*o;c[d++]=f&268435455;}return e;}BigInteger.prototype.am=am3,dbits=28;BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=[],rr,vv;rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(a){return BI_RM.charAt(a);}function intAt(a,b){var c=BI_RC[a.charCodeAt(b)];return c==null?-1:c;}function bnpCopyTo(a){for(var b=this.t-1;b>=0;--b)a[b]=this[b];a.t=this.t;a.s=this.s;}function bnpFromInt(a){this.t=1;this.s=a<0?-1:0;a>0?this[0]=a:a<-1?this[0]=a+DV:this.t=0;}function nbv(a){var b=nbi();b.fromInt(a);return b;}function bnpFromString(a,b){var c;if(b==16)c=4;else if(b==8)c=3;else if(b==256)c=8;else if(b==2)c=1;else if(b==32)c=5;else if(b==4)c=2;else {this.fromRadix(a,b);return;}this.s=this.t=0;for(var d=a.length,e=!1,g=0;--d>=0;){var h=c==8?a[d]&255:intAt(a,d);h<0?a.charAt(d)=="-"&&(e=!0):(e=!1,g==0?this[this.t++]=h:g+c>this.DB?(this[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this[this.t++]=h>>this.DB-g):this[this.t-1]|=h<<g,g+=c,g>=this.DB&&(g-=this.DB));}if(c==8&&(a[0]&128)!=0)this.s=-1,g>0&&(this[this.t-1]|=(1<<this.DB-g)-1<<g);this.clamp();e&&BigInteger.ZERO.subTo(this,this);}function bnpClamp(){for(var a=this.s&this.DM;this.t>0&&this[this.t-1]==a;)--this.t;}function bnToString(a){if(this.s<0)return "-"+this.negate().toString(a);if(a==16)a=4;else if(a==8)a=3;else if(a==2)a=1;else if(a==32)a=5;else if(a==64)a=6;else if(a==4)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,e="",g=this.t,h=this.DB-g*this.DB%a;if(g-->0){if(h<this.DB&&(c=this[g]>>h)>0)d=!0,e=int2char(c);for(;g>=0;)h<a?(c=(this[g]&(1<<h)-1)<<a-h,c|=this[--g]>>(h+=this.DB-a)):(c=this[g]>>(h-=a)&b,h<=0&&(h+=this.DB,--g)),c>0&&(d=!0),d&&(e+=int2char(c));}return d?e:"0";}function bnNegate(){var a=nbi();BigInteger.ZERO.subTo(this,a);return a;}function bnAbs(){return this.s<0?this.negate():this;}function bnCompareTo(a){var b=this.s-a.s;if(b!=0)return b;var c=this.t,b=c-a.t;if(b!=0)return b;for(;--c>=0;)if((b=this[c]-a[c])!=0)return b;return 0;}function nbits(a){var b=1,c;if((c=a>>>16)!=0)a=c,b+=16;if((c=a>>8)!=0)a=c,b+=8;if((c=a>>4)!=0)a=c,b+=4;if((c=a>>2)!=0)a=c,b+=2;a>>1!=0&&(b+=1);return b;}function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM);}function bnpDLShiftTo(a,b){var c;for(c=this.t-1;c>=0;--c)b[c+a]=this[c];for(c=a-1;c>=0;--c)b[c]=0;b.t=this.t+a;b.s=this.s;}function bnpDRShiftTo(a,b){for(var c=a;c<this.t;++c)b[c-a]=this[c];b.t=Math.max(this.t-a,0);b.s=this.s;}function bnpLShiftTo(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),h=this.s<<c&this.DM,f;for(f=this.t-1;f>=0;--f)b[f+g+1]=this[f]>>d|h,h=(this[f]&e)<<c;for(f=g-1;f>=0;--f)b[f]=0;b[g]=h;b.t=this.t+g+1;b.s=this.s;b.clamp();}function bnpRShiftTo(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else {var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b[0]=this[c]>>d;for(var h=c+1;h<this.t;++h)b[h-c-1]|=(this[h]&g)<<e,b[h-c]=this[h]>>d;d>0&&(b[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp();}}function bnpSubTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]-a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s;}else {for(d+=this.s;c<a.t;)d-=a[c],b[c++]=d&this.DM,d>>=this.DB;d-=a.s;}b.s=d<0?-1:0;d<-1?b[c++]=this.DV+d:d>0&&(b[c++]=d);b.t=c;b.clamp();}function bnpMultiplyTo(a,b){var c=this.abs(),d=a.abs(),e=c.t;for(b.t=e+d.t;--e>=0;)b[e]=0;for(e=0;e<d.t;++e)b[e+c.t]=c.am(0,d[e],b,e,0,c.t);b.s=0;b.clamp();this.s!=a.s&&BigInteger.ZERO.subTo(b,b);}function bnpSquareTo(a){for(var b=this.abs(),c=a.t=2*b.t;--c>=0;)a[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b[c],a,2*c,0,1);if((a[c+b.t]+=b.am(c+1,2*b[c],a,2*c+1,d,b.t-c-1))>=b.DV)a[c+b.t]-=b.DV,a[c+b.t+1]=1;}a.t>0&&(a[a.t-1]+=b.am(c,b[c],a,2*c,0,1));a.s=0;a.clamp();}function bnpDivRemTo(a,b,c){var d=a.abs();if(!(d.t<=0)){var e=this.abs();if(e.t<d.t)b!=null&&b.fromInt(0),c!=null&&this.copyTo(c);else {c==null&&(c=nbi());var g=nbi(),h=this.s,a=a.s,f=this.DB-nbits(d[d.t-1]);f>0?(d.lShiftTo(f,g),e.lShiftTo(f,c)):(d.copyTo(g),e.copyTo(c));d=g.t;e=g[d-1];if(e!=0){var o=e*(1<<this.F1)+(d>1?g[d-2]>>this.F2:0),p=this.FV/o,o=(1<<this.F1)/o,q=1<<this.F2,n=c.t,k=n-d,j=b==null?nbi():b;g.dlShiftTo(k,j);c.compareTo(j)>=0&&(c[c.t++]=1,c.subTo(j,c));BigInteger.ONE.dlShiftTo(d,j);for(j.subTo(g,g);g.t<d;)g[g.t++]=0;for(;--k>=0;){var l=c[--n]==e?this.DM:Math.floor(c[n]*p+(c[n-1]+q)*o);if((c[n]+=g.am(0,l,c,k,0,d))<l){g.dlShiftTo(k,j);for(c.subTo(j,c);c[n]<--l;)c.subTo(j,c);}}b!=null&&(c.drShiftTo(d,b),h!=a&&BigInteger.ZERO.subTo(b,b));c.t=d;c.clamp();f>0&&c.rShiftTo(f,c);h<0&&BigInteger.ZERO.subTo(c,c);}}}}function bnMod(a){var b=nbi();this.abs().divRemTo(a,null,b);this.s<0&&b.compareTo(BigInteger.ZERO)>0&&a.subTo(b,b);return b;}function Classic(a){this.m=a;}function cConvert(a){return a.s<0||a.compareTo(this.m)>=0?a.mod(this.m):a;}function cRevert(a){return a;}function cReduce(a){a.divRemTo(this.m,null,a);}function cMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c);}function cSqrTo(a,b){a.squareTo(b);this.reduce(b);}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;function bnpInvDigit(){if(this.t<1)return 0;var a=this[0];if((a&1)==0)return 0;var b=a&3,b=b*(2-(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return b>0?this.DV-b:-b;}function Montgomery(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t;}function montConvert(a){var b=nbi();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);a.s<0&&b.compareTo(BigInteger.ZERO)>0&&this.m.subTo(b,b);return b;}function montRevert(a){var b=nbi();a.copyTo(b);this.reduce(b);return b;}function montReduce(a){for(;a.t<=this.mt2;)a[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=a[b]&32767,d=c*this.mpl+((c*this.mph+(a[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a[c]+=this.m.am(0,d,a,b,0,this.m.t);a[c]>=a.DV;)a[c]-=a.DV,a[++c]++;}a.clamp();a.drShiftTo(this.m.t,a);a.compareTo(this.m)>=0&&a.subTo(this.m,a);}function montSqrTo(a,b){a.squareTo(b);this.reduce(b);}function montMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c);}Montgomery.prototype.convert=montConvert;Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return (this.t>0?this[0]&1:this.s)==0;}function bnpExp(a,b){if(a>4294967295||a<1)return BigInteger.ONE;var c=nbi(),d=nbi(),e=b.convert(this),g=nbits(a)-1;for(e.copyTo(c);--g>=0;)if(b.sqrTo(c,d),(a&1<<g)>0)b.mulTo(d,e,c);else var h=c,c=d,d=h;return b.revert(c);}function bnModPowInt(a,b){var c;c=a<256||b.isEven()?new Classic(b):new Montgomery(b);return this.exp(a,c);}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var a=nbi();this.copyTo(a);return a;}function bnIntValue(){if(this.s<0){if(this.t==1)return this[0]-this.DV;else {if(this.t==0)return -1;}}else if(this.t==1)return this[0];else if(this.t==0)return 0;return (this[1]&(1<<32-this.DB)-1)<<this.DB|this[0];}function bnByteValue(){return this.t==0?this.s:this[0]<<24>>24;}function bnShortValue(){return this.t==0?this.s:this[0]<<16>>16;}function bnpChunkSize(a){return Math.floor(Math.LN2*this.DB/Math.log(a));}function bnSigNum(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1;}function bnpToRadix(a){a==null&&(a=10);if(this.signum()==0||a<2||a>36)return "0";var b=this.chunkSize(a),b=Math.pow(a,b),c=nbv(b),d=nbi(),e=nbi(),g="";for(this.divRemTo(c,d,e);d.signum()>0;)g=(b+e.intValue()).toString(a).substr(1)+g,d.divRemTo(c,d,e);return e.intValue().toString(a)+g;}function bnpFromRadix(a,b){this.fromInt(0);b==null&&(b=10);for(var c=this.chunkSize(b),d=Math.pow(b,c),e=!1,g=0,h=0,f=0;f<a.length;++f){var o=intAt(a,f);o<0?a.charAt(f)=="-"&&this.signum()==0&&(e=!0):(h=b*h+o,++g>=c&&(this.dMultiply(d),this.dAddOffset(h,0),h=g=0));}g>0&&(this.dMultiply(Math.pow(b,g)),this.dAddOffset(h,0));e&&BigInteger.ZERO.subTo(this,this);}function bnpFromNumber(a,b,c){if("number"==typeof b){if(a<2)this.fromInt(1);else {this.fromNumber(a,c);this.testBit(a-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);for(this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(BigInteger.ONE.shiftLeft(a-1),this);}}else {var c=[],d=a&7;c.length=(a>>3)+1;b.nextBytes(c);d>0?c[0]&=(1<<d)-1:c[0]=0;this.fromString(c,256);}}function bnToByteArray(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(a-->0){if(c<this.DB&&(d=this[a]>>c)!=(this.s&this.DM)>>c)b[e++]=d|this.s<<this.DB-c;for(;a>=0;)if(c<8?(d=(this[a]&(1<<c)-1)<<8-c,d|=this[--a]>>(c+=this.DB-8)):(d=this[a]>>(c-=8)&255,c<=0&&(c+=this.DB,--a)),(d&128)!=0&&(d|=-256),e==0&&(this.s&128)!=(d&128)&&++e,e>0||d!=this.s)b[e++]=d;}return b;}function bnEquals(a){return this.compareTo(a)==0;}function bnMin(a){return this.compareTo(a)<0?this:a;}function bnMax(a){return this.compareTo(a)>0?this:a;}function bnpBitwiseTo(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=0;d<g;++d)c[d]=b(this[d],a[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c[d]=b(this[d],e);c.t=this.t;}else {e=this.s&this.DM;for(d=g;d<a.t;++d)c[d]=b(e,a[d]);c.t=a.t;}c.s=b(this.s,a.s);c.clamp();}function op_and(a,b){return a&b;}function bnAnd(a){var b=nbi();this.bitwiseTo(a,op_and,b);return b;}function op_or(a,b){return a|b;}function bnOr(a){var b=nbi();this.bitwiseTo(a,op_or,b);return b;}function op_xor(a,b){return a^b;}function bnXor(a){var b=nbi();this.bitwiseTo(a,op_xor,b);return b;}function op_andnot(a,b){return a&~b;}function bnAndNot(a){var b=nbi();this.bitwiseTo(a,op_andnot,b);return b;}function bnNot(){for(var a=nbi(),b=0;b<this.t;++b)a[b]=this.DM&~this[b];a.t=this.t;a.s=~this.s;return a;}function bnShiftLeft(a){var b=nbi();a<0?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b;}function bnShiftRight(a){var b=nbi();a<0?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b;}function lbit(a){if(a==0)return -1;var b=0;(a&65535)==0&&(a>>=16,b+=16);(a&255)==0&&(a>>=8,b+=8);(a&15)==0&&(a>>=4,b+=4);(a&3)==0&&(a>>=2,b+=2);(a&1)==0&&++b;return b;}function bnGetLowestSetBit(){for(var a=0;a<this.t;++a)if(this[a]!=0)return a*this.DB+lbit(this[a]);return this.s<0?this.t*this.DB:-1;}function cbit(a){for(var b=0;a!=0;)a&=a-1,++b;return b;}function bnBitCount(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c)a+=cbit(this[c]^b);return a;}function bnTestBit(a){var b=Math.floor(a/this.DB);return b>=this.t?this.s!=0:(this[b]&1<<a%this.DB)!=0;}function bnpChangeBit(a,b){var c=BigInteger.ONE.shiftLeft(a);this.bitwiseTo(c,b,c);return c;}function bnSetBit(a){return this.changeBit(a,op_or);}function bnClearBit(a){return this.changeBit(a,op_andnot);}function bnFlipBit(a){return this.changeBit(a,op_xor);}function bnpAddTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]+a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s;}else {for(d+=this.s;c<a.t;)d+=a[c],b[c++]=d&this.DM,d>>=this.DB;d+=a.s;}b.s=d<0?-1:0;d>0?b[c++]=d:d<-1&&(b[c++]=this.DV+d);b.t=c;b.clamp();}function bnAdd(a){var b=nbi();this.addTo(a,b);return b;}function bnSubtract(a){var b=nbi();this.subTo(a,b);return b;}function bnMultiply(a){var b=nbi();this.multiplyTo(a,b);return b;}function bnSquare(){var a=nbi();this.squareTo(a);return a;}function bnDivide(a){var b=nbi();this.divRemTo(a,b,null);return b;}function bnRemainder(a){var b=nbi();this.divRemTo(a,null,b);return b;}function bnDivideAndRemainder(a){var b=nbi(),c=nbi();this.divRemTo(a,b,c);return [b,c];}function bnpDMultiply(a){this[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp();}function bnpDAddOffset(a,b){if(a!=0){for(;this.t<=b;)this[this.t++]=0;for(this[b]+=a;this[b]>=this.DV;)this[b]-=this.DV,++b>=this.t&&(this[this.t++]=0),++this[b];}}function NullExp(){}function nNop(a){return a;}function nMulTo(a,b,c){a.multiplyTo(b,c);}function nSqrTo(a,b){a.squareTo(b);}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(a){return this.exp(a,new NullExp());}function bnpMultiplyLowerTo(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;d>0;)c[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c[d+this.t]=this.am(0,a[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a[d],c,d,0,b-d);c.clamp();}function bnpMultiplyUpperTo(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;--d>=0;)c[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c[this.t+d-b]=this.am(b-d,a[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,c);}function Barrett(a){this.r2=nbi();this.q3=nbi();BigInteger.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a;}function barrettConvert(a){if(a.s<0||a.t>2*this.m.t)return a.mod(this.m);else if(a.compareTo(this.m)<0)return a;else {var b=nbi();a.copyTo(b);this.reduce(b);return b;}}function barrettRevert(a){return a;}function barrettReduce(a){a.drShiftTo(this.m.t-1,this.r2);if(a.t>this.m.t+1)a.t=this.m.t+1,a.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);a.compareTo(this.r2)<0;)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);a.compareTo(this.m)>=0;)a.subTo(this.m,a);}function barrettSqrTo(a,b){a.squareTo(b);this.reduce(b);}function barrettMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c);}Barrett.prototype.convert=barrettConvert;Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;function bnModPow(a,b){var c=a.bitLength(),d,e=nbv(1),g;if(c<=0)return e;else d=c<18?1:c<48?3:c<144?4:c<768?5:6;g=c<8?new Classic(b):b.isEven()?new Barrett(b):new Montgomery(b);var h=[],f=3,o=d-1,p=(1<<d)-1;h[1]=g.convert(this);if(d>1){c=nbi();for(g.sqrTo(h[1],c);f<=p;)h[f]=nbi(),g.mulTo(c,h[f-2],h[f]),f+=2;}for(var q=a.t-1,n,k=!0,j=nbi(),c=nbits(a[q])-1;q>=0;){c>=o?n=a[q]>>c-o&p:(n=(a[q]&(1<<c+1)-1)<<o-c,q>0&&(n|=a[q-1]>>this.DB+c-o));for(f=d;(n&1)==0;)n>>=1,--f;if((c-=f)<0)c+=this.DB,--q;if(k)h[n].copyTo(e),k=!1;else {for(;f>1;)g.sqrTo(e,j),g.sqrTo(j,e),f-=2;f>0?g.sqrTo(e,j):(f=e,e=j,j=f);g.mulTo(j,h[n],e);}for(;q>=0&&(a[q]&1<<c)==0;)g.sqrTo(e,j),f=e,e=j,j=f,--c<0&&(c=this.DB-1,--q);}return g.revert(e);}function bnGCD(a){var b=this.s<0?this.negate():this.clone(),a=a.s<0?a.negate():a.clone();if(b.compareTo(a)<0)var c=b,b=a,a=c;var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(d<0)return b;c<d&&(d=c);d>0&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;b.signum()>0;)(c=b.getLowestSetBit())>0&&b.rShiftTo(c,b),(c=a.getLowestSetBit())>0&&a.rShiftTo(c,a),b.compareTo(a)>=0?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));d>0&&a.lShiftTo(d,a);return a;}function bnpModInt(a){if(a<=0)return 0;var b=this.DV%a,c=this.s<0?a-1:0;if(this.t>0)if(b==0)c=this[0]%a;else for(var d=this.t-1;d>=0;--d)c=(b*c+this[d])%a;return c;}function bnModInverse(a){var b=a.isEven();if(this.isEven()&&b||a.signum()==0)return BigInteger.ZERO;for(var c=a.clone(),d=this.clone(),e=nbv(1),g=nbv(0),h=nbv(0),f=nbv(1);c.signum()!=0;){for(;c.isEven();){c.rShiftTo(1,c);if(b){if(!e.isEven()||!g.isEven())e.addTo(this,e),g.subTo(a,g);e.rShiftTo(1,e);}else g.isEven()||g.subTo(a,g);g.rShiftTo(1,g);}for(;d.isEven();){d.rShiftTo(1,d);if(b){if(!h.isEven()||!f.isEven())h.addTo(this,h),f.subTo(a,f);h.rShiftTo(1,h);}else f.isEven()||f.subTo(a,f);f.rShiftTo(1,f);}c.compareTo(d)>=0?(c.subTo(d,c),b&&e.subTo(h,e),g.subTo(f,g)):(d.subTo(c,d),b&&h.subTo(e,h),f.subTo(g,f));}if(d.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(f.compareTo(a)>=0)return f.subtract(a);if(f.signum()<0)f.addTo(a,f);else return f;return f.signum()<0?f.add(a):f;}var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=67108864/lowprimes[lowprimes.length-1];function bnIsProbablePrime(a){var b,c=this.abs();if(c.t==1&&c[0]<=lowprimes[lowprimes.length-1]){for(b=0;b<lowprimes.length;++b)if(c[0]==lowprimes[b])return !0;return !1;}if(c.isEven())return !1;for(b=1;b<lowprimes.length;){for(var d=lowprimes[b],e=b+1;e<lowprimes.length&&d<lplim;)d*=lowprimes[e++];for(d=c.modInt(d);b<e;)if(d%lowprimes[b++]==0)return !1;}return c.millerRabin(a);}function bnpMillerRabin(a){var b=this.subtract(BigInteger.ONE),c=b.getLowestSetBit();if(c<=0)return !1;var d=b.shiftRight(c),a=a+1>>1;if(a>lowprimes.length)a=lowprimes.length;for(var e=nbi(),g=0;g<a;++g){e.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var h=e.modPow(d,this);if(h.compareTo(BigInteger.ONE)!=0&&h.compareTo(b)!=0){for(var f=1;f++<c&&h.compareTo(b)!=0;)if(h=h.modPowInt(2,this),h.compareTo(BigInteger.ONE)==0)return !1;if(h.compareTo(b)!=0)return !1;}}return !0;}BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.fromNumber=bnpFromNumber;BigInteger.prototype.bitwiseTo=bnpBitwiseTo;BigInteger.prototype.changeBit=bnpChangeBit;BigInteger.prototype.addTo=bnpAddTo;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo;BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo;BigInteger.prototype.modInt=bnpModInt;BigInteger.prototype.millerRabin=bnpMillerRabin;BigInteger.prototype.clone=bnClone;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.byteValue=bnByteValue;BigInteger.prototype.shortValue=bnShortValue;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.toByteArray=bnToByteArray;BigInteger.prototype.equals=bnEquals;BigInteger.prototype.min=bnMin;BigInteger.prototype.max=bnMax;BigInteger.prototype.and=bnAnd;BigInteger.prototype.or=bnOr;BigInteger.prototype.xor=bnXor;BigInteger.prototype.andNot=bnAndNot;BigInteger.prototype.not=bnNot;BigInteger.prototype.shiftLeft=bnShiftLeft;BigInteger.prototype.shiftRight=bnShiftRight;BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit;BigInteger.prototype.bitCount=bnBitCount;BigInteger.prototype.testBit=bnTestBit;BigInteger.prototype.setBit=bnSetBit;BigInteger.prototype.clearBit=bnClearBit;BigInteger.prototype.flipBit=bnFlipBit;BigInteger.prototype.add=bnAdd;BigInteger.prototype.subtract=bnSubtract;BigInteger.prototype.multiply=bnMultiply;BigInteger.prototype.divide=bnDivide;BigInteger.prototype.remainder=bnRemainder;BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder;BigInteger.prototype.modPow=bnModPow;BigInteger.prototype.modInverse=bnModInverse;BigInteger.prototype.pow=bnPow;BigInteger.prototype.gcd=bnGCD;BigInteger.prototype.isProbablePrime=bnIsProbablePrime;BigInteger.prototype.square=bnSquare;(function(a,b,c,d,e,g,h){function f(a){var b,d,e=this,g=a.length,f=0,h=e.i=e.j=e.m=0;e.S=[];e.c=[];for(g||(a=[g++]);f<c;)e.S[f]=f++;for(f=0;f<c;f++)b=e.S[f],h=h+b+a[f%g]&c-1,d=e.S[h],e.S[f]=d,e.S[h]=b;e.g=function(a){var b=e.S,d=e.i+1&c-1,g=b[d],f=e.j+g&c-1,h=b[f];b[d]=h;b[f]=g;for(var k=b[g+h&c-1];--a;)d=d+1&c-1,g=b[d],f=f+g&c-1,h=b[f],b[d]=h,b[f]=g,k=k*c+b[g+h&c-1];e.i=d;e.j=f;return k;};e.g(c);}function o(a,b,c,d,e){c=[];e=_typeof(a);if(b&&e=="object")for(d in a)if(d.indexOf("S")<5)try{c.push(o(a[d],b-1));}catch(g){}return c.length?c:a+(e!="string"?"\x00":"");}function p(a,b,d,e){a+="";for(e=d=0;e<a.length;e++){var g=b,f=e&c-1,h=(d^=b[e&c-1]*19)+a.charCodeAt(e);g[f]=h&c-1;}a="";for(e in b)a+=String.fromCharCode(b[e]);return a;}b.seedrandom=function(q,n){var k=[],j,q=p(o(n?[q,a]:arguments.length?q:[new Date().getTime(),a,window],3),k);j=new f(k);p(j.S,a);b.random=function(){for(var a=j.g(d),b=h,f=0;a<e;)a=(a+f)*c,b*=c,f=j.g(1);for(;a>=g;)a/=2,b/=2,f>>>=1;return (a+f)/b;};return q;};h=b.pow(c,d);e=b.pow(2,e);g=e*2;p(b.random(),a);})([],Math,256,6,52);function SeededRandom(){}function SRnextBytes(a){var b;for(b=0;b<a.length;b++)a[b]=Math.floor(Math.random()*256);}SeededRandom.prototype.nextBytes=SRnextBytes;function Arcfour(){this.j=this.i=0;this.S=[];}function ARC4init(a){var b,c,d;for(b=0;b<256;++b)this.S[b]=b;for(b=c=0;b<256;++b)c=c+this.S[b]+a[b%a.length]&255,d=this.S[b],this.S[b]=this.S[c],this.S[c]=d;this.j=this.i=0;}function ARC4next(){var a;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;a=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=a;return this.S[a+this.S[this.i]&255];}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour();}var rng_psize=256,rng_state,rng_pool,rng_pptr;function rng_seed_int(a){rng_pool[rng_pptr++]^=a&255;rng_pool[rng_pptr++]^=a>>8&255;rng_pool[rng_pptr++]^=a>>16&255;rng_pool[rng_pptr++]^=a>>24&255;rng_pptr>=rng_psize&&(rng_pptr-=rng_psize);}function rng_seed_time(){rng_seed_int(new Date().getTime());}if(rng_pool==null){rng_pool=[];rng_pptr=0;var t;for(;rng_pptr<rng_psize;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=t&255;rng_pptr=0;rng_seed_time();}function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0;}return rng_state.next();}function rng_get_bytes(a){var b;for(b=0;b<a.length;++b)a[b]=rng_get_byte();}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;function SHA256(a){function b(a,b){var c=(a&65535)+(b&65535);return (a>>16)+(b>>16)+(c>>16)<<16|c&65535;}function c(a,b){return a>>>b|a<<32-b;}a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var h=a.charCodeAt(c);h<128?b+=String.fromCharCode(h):(h>127&&h<2048?b+=String.fromCharCode(h>>6|192):(b+=String.fromCharCode(h>>12|224),b+=String.fromCharCode(h>>6&63|128)),b+=String.fromCharCode(h&63|128));}return b;}(a);return function(a){for(var b="",c=0;c<a.length*4;c++)b+="0123456789abcdef".charAt(a[c>>2]>>(3-c%4)*8+4&15)+"0123456789abcdef".charAt(a[c>>2]>>(3-c%4)*8&15);return b;}(function(a,e){var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Array(64),o,p,q,n,k,j,l,m,s,r,u,w;a[e>>5]|=128<<24-e%32;a[(e+64>>9<<4)+15]=e;for(s=0;s<a.length;s+=16){o=h[0];p=h[1];q=h[2];n=h[3];k=h[4];j=h[5];l=h[6];m=h[7];for(r=0;r<64;r++)f[r]=r<16?a[r+s]:b(b(b(c(f[r-2],17)^c(f[r-2],19)^f[r-2]>>>10,f[r-7]),c(f[r-15],7)^c(f[r-15],18)^f[r-15]>>>3),f[r-16]),u=b(b(b(b(m,c(k,6)^c(k,11)^c(k,25)),k&j^~k&l),g[r]),f[r]),w=b(c(o,2)^c(o,13)^c(o,22),o&p^o&q^p&q),m=l,l=j,j=k,k=b(n,u),n=q,q=p,p=o,o=b(u,w);h[0]=b(o,h[0]);h[1]=b(p,h[1]);h[2]=b(q,h[2]);h[3]=b(n,h[3]);h[4]=b(k,h[4]);h[5]=b(j,h[5]);h[6]=b(l,h[6]);h[7]=b(m,h[7]);}return h;}(function(a){for(var b=[],c=0;c<a.length*8;c+=8)b[c>>5]|=(a.charCodeAt(c/8)&255)<<24-c%32;return b;}(a),a.length*8));}var sha256={hex:function hex(a){return SHA256(a);}};function SHA1(a){function b(a,b){return a<<b|a>>>32-b;}function c(a){var b="",c,d;for(c=7;c>=0;c--)d=a>>>c*4&15,b+=d.toString(16);return b;}var d,e,g=Array(80),h=1732584193,f=4023233417,o=2562383102,p=271733878,q=3285377520,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128));}return b;}(a);n=a.length;var s=[];for(d=0;d<n-3;d+=4)e=a.charCodeAt(d)<<24|a.charCodeAt(d+1)<<16|a.charCodeAt(d+2)<<8|a.charCodeAt(d+3),s.push(e);switch(n%4){case 0:d=2147483648;break;case 1:d=a.charCodeAt(n-1)<<24|8388608;break;case 2:d=a.charCodeAt(n-2)<<24|a.charCodeAt(n-1)<<16|32768;break;case 3:d=a.charCodeAt(n-3)<<24|a.charCodeAt(n-2)<<16|a.charCodeAt(n-1)<<8|128;}for(s.push(d);s.length%16!=14;)s.push(0);s.push(n>>>29);s.push(n<<3&4294967295);for(a=0;a<s.length;a+=16){for(d=0;d<16;d++)g[d]=s[a+d];for(d=16;d<=79;d++)g[d]=b(g[d-3]^g[d-8]^g[d-14]^g[d-16],1);e=h;n=f;k=o;j=p;l=q;for(d=0;d<=19;d++)m=b(e,5)+(n&k|~n&j)+l+g[d]+1518500249&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=20;d<=39;d++)m=b(e,5)+(n^k^j)+l+g[d]+1859775393&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=40;d<=59;d++)m=b(e,5)+(n&k|n&j|k&j)+l+g[d]+2400959708&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=60;d<=79;d++)m=b(e,5)+(n^k^j)+l+g[d]+3395469782&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;h=h+e&4294967295;f=f+n&4294967295;o=o+k&4294967295;p=p+j&4294967295;q=q+l&4294967295;}m=c(h)+c(f)+c(o)+c(p)+c(q);return m.toLowerCase();}var sha1={hex:function hex(a){return SHA1(a);}},MD5=function MD5(a){function b(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);return c&d?g^2147483648^e^f:c|d?g&1073741824?g^3221225472^e^f:g^1073741824^e^f:g^e^f;}function c(a,c,d,e,f,g,h){a=b(a,b(b(c&d|~c&e,f),h));return b(a<<g|a>>>32-g,c);}function d(a,c,d,e,f,g,h){a=b(a,b(b(c&e|d&~e,f),h));return b(a<<g|a>>>32-g,c);}function e(a,c,d,e,f,g,h){a=b(a,b(b(c^d^e,f),h));return b(a<<g|a>>>32-g,c);}function g(a,c,d,e,f,g,h){a=b(a,b(b(d^(c|~e),f),h));return b(a<<g|a>>>32-g,c);}function h(a){var b="",c="",d;for(d=0;d<=3;d++)c=a>>>d*8&255,c="0"+c.toString(16),b+=c.substr(c.length-2,2);return b;}var f=[],o,p,q,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128));}return b;}(a),f=function(a){var b,c=a.length;b=c+8;for(var d=((b-b%64)/64+1)*16,e=Array(d-1),f=0,g=0;g<c;)b=(g-g%4)/4,f=g%4*8,e[b]|=a.charCodeAt(g)<<f,g++;e[(g-g%4)/4]|=128<<g%4*8;e[d-2]=c<<3;e[d-1]=c>>>29;return e;}(a);k=1732584193;j=4023233417;l=2562383102;m=271733878;for(a=0;a<f.length;a+=16)o=k,p=j,q=l,n=m,k=c(k,j,l,m,f[a+0],7,3614090360),m=c(m,k,j,l,f[a+1],12,3905402710),l=c(l,m,k,j,f[a+2],17,606105819),j=c(j,l,m,k,f[a+3],22,3250441966),k=c(k,j,l,m,f[a+4],7,4118548399),m=c(m,k,j,l,f[a+5],12,1200080426),l=c(l,m,k,j,f[a+6],17,2821735955),j=c(j,l,m,k,f[a+7],22,4249261313),k=c(k,j,l,m,f[a+8],7,1770035416),m=c(m,k,j,l,f[a+9],12,2336552879),l=c(l,m,k,j,f[a+10],17,4294925233),j=c(j,l,m,k,f[a+11],22,2304563134),k=c(k,j,l,m,f[a+12],7,1804603682),m=c(m,k,j,l,f[a+13],12,4254626195),l=c(l,m,k,j,f[a+14],17,2792965006),j=c(j,l,m,k,f[a+15],22,1236535329),k=d(k,j,l,m,f[a+1],5,4129170786),m=d(m,k,j,l,f[a+6],9,3225465664),l=d(l,m,k,j,f[a+11],14,643717713),j=d(j,l,m,k,f[a+0],20,3921069994),k=d(k,j,l,m,f[a+5],5,3593408605),m=d(m,k,j,l,f[a+10],9,38016083),l=d(l,m,k,j,f[a+15],14,3634488961),j=d(j,l,m,k,f[a+4],20,3889429448),k=d(k,j,l,m,f[a+9],5,568446438),m=d(m,k,j,l,f[a+14],9,3275163606),l=d(l,m,k,j,f[a+3],14,4107603335),j=d(j,l,m,k,f[a+8],20,1163531501),k=d(k,j,l,m,f[a+13],5,2850285829),m=d(m,k,j,l,f[a+2],9,4243563512),l=d(l,m,k,j,f[a+7],14,1735328473),j=d(j,l,m,k,f[a+12],20,2368359562),k=e(k,j,l,m,f[a+5],4,4294588738),m=e(m,k,j,l,f[a+8],11,2272392833),l=e(l,m,k,j,f[a+11],16,1839030562),j=e(j,l,m,k,f[a+14],23,4259657740),k=e(k,j,l,m,f[a+1],4,2763975236),m=e(m,k,j,l,f[a+4],11,1272893353),l=e(l,m,k,j,f[a+7],16,4139469664),j=e(j,l,m,k,f[a+10],23,3200236656),k=e(k,j,l,m,f[a+13],4,681279174),m=e(m,k,j,l,f[a+0],11,3936430074),l=e(l,m,k,j,f[a+3],16,3572445317),j=e(j,l,m,k,f[a+6],23,76029189),k=e(k,j,l,m,f[a+9],4,3654602809),m=e(m,k,j,l,f[a+12],11,3873151461),l=e(l,m,k,j,f[a+15],16,530742520),j=e(j,l,m,k,f[a+2],23,3299628645),k=g(k,j,l,m,f[a+0],6,4096336452),m=g(m,k,j,l,f[a+7],10,1126891415),l=g(l,m,k,j,f[a+14],15,2878612391),j=g(j,l,m,k,f[a+5],21,4237533241),k=g(k,j,l,m,f[a+12],6,1700485571),m=g(m,k,j,l,f[a+3],10,2399980690),l=g(l,m,k,j,f[a+10],15,4293915773),j=g(j,l,m,k,f[a+1],21,2240044497),k=g(k,j,l,m,f[a+8],6,1873313359),m=g(m,k,j,l,f[a+15],10,4264355552),l=g(l,m,k,j,f[a+6],15,2734768916),j=g(j,l,m,k,f[a+13],21,1309151649),k=g(k,j,l,m,f[a+4],6,4149444226),m=g(m,k,j,l,f[a+11],10,3174756917),l=g(l,m,k,j,f[a+2],15,718787259),j=g(j,l,m,k,f[a+9],21,3951481745),k=b(k,o),j=b(j,p),l=b(l,q),m=b(m,n);return (h(k)+h(j)+h(l)+h(m)).toLowerCase();};function parseBigInt(a,b){return new BigInteger(a,b);}function pkcs1pad2(a,b){if(b<a.length+11)throw "Message too long for RSA (n="+b+", l="+a.length+")";for(var c=[],d=a.length-1;d>=0&&b>0;){var e=a.charCodeAt(d--);e<128?c[--b]=e:e>127&&e<2048?(c[--b]=e&63|128,c[--b]=e>>6|192):(c[--b]=e&63|128,c[--b]=e>>6&63|128,c[--b]=e>>12|224);}c[--b]=0;d=new SecureRandom();for(e=[];b>2;){for(e[0]=0;e[0]==0;)d.nextBytes(e);c[--b]=e[0];}c[--b]=2;c[--b]=0;return new BigInteger(c);}function RSAKey(){this.n=null;this.e=0;this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null;}function RSASetPublic(a,b){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16)):alert("Invalid RSA public key");}function RSADoPublic(a){return a.modPowInt(this.e,this.n);}function RSAEncrypt(a){a=pkcs1pad2(a,this.n.bitLength()+7>>3);if(a==null)return null;a=this.doPublic(a);if(a==null)return null;a=a.toString(16);return (a.length&1)==0?a:"0"+a;}RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;function pkcs1unpad2(a,b){for(var c=a.toByteArray(),d=0;d<c.length&&c[d]==0;)++d;if(c.length-d!=b-1||c[d]!=2)return null;for(++d;c[d]!=0;)if(++d>=c.length)return null;for(var e="";++d<c.length;){var g=c[d]&255;g<128?e+=String.fromCharCode(g):g>191&&g<224?(e+=String.fromCharCode((g&31)<<6|c[d+1]&63),++d):(e+=String.fromCharCode((g&15)<<12|(c[d+1]&63)<<6|c[d+2]&63),d+=2);}return e;}function RSASetPrivate(a,b,c){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16)):alert("Invalid RSA private key");}function RSASetPrivateEx(a,b,c,d,e,g,h,f){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16),this.p=parseBigInt(d,16),this.q=parseBigInt(e,16),this.dmp1=parseBigInt(g,16),this.dmq1=parseBigInt(h,16),this.coeff=parseBigInt(f,16)):alert("Invalid RSA private key");}function RSAGenerate(a,b){var c=new SeededRandom(),d=a>>1;this.e=parseInt(b,16);for(var e=new BigInteger(b,16);;){for(;;)if(this.p=new BigInteger(a-d,1,c),this.p.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new BigInteger(d,1,c),this.q.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var g=this.p;this.p=this.q;this.q=g;}var g=this.p.subtract(BigInteger.ONE),h=this.q.subtract(BigInteger.ONE),f=g.multiply(h);if(f.gcd(e).compareTo(BigInteger.ONE)==0){this.n=this.p.multiply(this.q);this.d=e.modInverse(f);this.dmp1=this.d.mod(g);this.dmq1=this.d.mod(h);this.coeff=this.q.modInverse(this.p);break;}}}function RSADoPrivate(a){if(this.p==null||this.q==null)return a.modPow(this.d,this.n);for(var b=a.mod(this.p).modPow(this.dmp1,this.p),a=a.mod(this.q).modPow(this.dmq1,this.q);b.compareTo(a)<0;)b=b.add(this.p);return b.subtract(a).multiply(this.coeff).mod(this.p).multiply(this.q).add(a);}function RSADecrypt(a){a=this.doPrivate(parseBigInt(a,16));return a==null?null:pkcs1unpad2(a,this.n.bitLength()+7>>3);}RSAKey.prototype.doPrivate=RSADoPrivate;RSAKey.prototype.setPrivate=RSASetPrivate;RSAKey.prototype.setPrivateEx=RSASetPrivateEx;RSAKey.prototype.generate=RSAGenerate;RSAKey.prototype.decrypt=RSADecrypt;var _RSASIGN_DIHEAD=[];_RSASIGN_DIHEAD.sha1="3021300906052b0e03021a05000414";_RSASIGN_DIHEAD.sha256="3031300d060960864801650304020105000420";var _RSASIGN_HASHHEXFUNC=[];_RSASIGN_HASHHEXFUNC.sha1=sha1.hex;_RSASIGN_HASHHEXFUNC.sha256=sha256.hex;function _rsasign_getHexPaddedDigestInfoForString(a,b,c){b/=4;for(var a=(0, _RSASIGN_HASHHEXFUNC[c])(a),c="00"+_RSASIGN_DIHEAD[c]+a,a="",b=b-4-c.length,d=0;d<b;d+=2)a+="ff";return sPaddedMessageHex="0001"+a+c;}function _rsasign_signString(a,b){var c=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),b);return this.doPrivate(parseBigInt(c,16)).toString(16);}function _rsasign_signStringWithSHA1(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha1");return this.doPrivate(parseBigInt(a,16)).toString(16);}function _rsasign_signStringWithSHA256(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha256");return this.doPrivate(parseBigInt(a,16)).toString(16);}function _rsasign_getDecryptSignatureBI(a,b,c){var d=new RSAKey();d.setPublic(b,c);return d.doPublic(a);}function _rsasign_getHexDigestInfoFromSig(a,b,c){return _rsasign_getDecryptSignatureBI(a,b,c).toString(16).replace(/^1f+00/,"");}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(a){for(var b in _RSASIGN_DIHEAD){var c=_RSASIGN_DIHEAD[b],d=c.length;if(a.substring(0,d)==c)return [b,a.substring(d)];}return [];}function _rsasign_verifySignatureWithArgs(a,b,c,d){b=_rsasign_getHexDigestInfoFromSig(b,c,d);c=_rsasign_getAlgNameAndHashFromHexDisgestInfo(b);if(c.length==0)return !1;b=c[1];a=(0, _RSASIGN_HASHHEXFUNC[c[0]])(a);return b==a;}function _rsasign_verifyHexSignatureForMessage(a,b){var c=parseBigInt(a,16);return _rsasign_verifySignatureWithArgs(b,c,this.n.toString(16),this.e.toString(16));}function _rsasign_verifyString(a,b){var b=b.replace(/[ \n]+/g,""),c=this.doPublic(parseBigInt(b,16)).toString(16).replace(/^1f+00/,""),d=_rsasign_getAlgNameAndHashFromHexDisgestInfo(c);if(d.length==0)return !1;c=d[1];d=(0, _RSASIGN_HASHHEXFUNC[d[0]])(a);return c==d;}RSAKey.prototype.signString=_rsasign_signString;RSAKey.prototype.signStringWithSHA1=_rsasign_signStringWithSHA1;RSAKey.prototype.signStringWithSHA256=_rsasign_signStringWithSHA256;RSAKey.prototype.verifyString=_rsasign_verifyString;RSAKey.prototype.verifyHexSignatureForMessage=_rsasign_verifyHexSignatureForMessage;var aes=function(){var a={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ShiftRowTab:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11]};a.Init=function(){a.Sbox_Inv=Array(256);for(var b=0;b<256;b++)a.Sbox_Inv[a.Sbox[b]]=b;a.ShiftRowTab_Inv=Array(16);for(b=0;b<16;b++)a.ShiftRowTab_Inv[a.ShiftRowTab[b]]=b;a.xtime=Array(256);for(b=0;b<128;b++)a.xtime[b]=b<<1,a.xtime[128+b]=b<<1^27;};a.Done=function(){delete a.Sbox_Inv;delete a.ShiftRowTab_Inv;delete a.xtime;};a.ExpandKey=function(b){var c=b.length,d,e=1;switch(c){case 16:d=176;break;case 24:d=208;break;case 32:d=240;break;default:alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!");}for(var g=c;g<d;g+=4){var h=b.slice(g-4,g);if(g%c==0){if(h=[a.Sbox[h[1]]^e,a.Sbox[h[2]],a.Sbox[h[3]],a.Sbox[h[0]]],(e<<=1)>=256)e^=283;}else c>24&&g%c==16&&(h=[a.Sbox[h[0]],a.Sbox[h[1]],a.Sbox[h[2]],a.Sbox[h[3]]]);for(var f=0;f<4;f++)b[g+f]=b[g+f-c]^h[f];}};a.Encrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(0,16));for(var e=16;e<d-16;e+=16)a.SubBytes(b,a.Sbox),a.ShiftRows(b,a.ShiftRowTab),a.MixColumns(b),a.AddRoundKey(b,c.slice(e,e+16));a.SubBytes(b,a.Sbox);a.ShiftRows(b,a.ShiftRowTab);a.AddRoundKey(b,c.slice(e,d));};a.Decrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(d-16,d));a.ShiftRows(b,a.ShiftRowTab_Inv);a.SubBytes(b,a.Sbox_Inv);for(d-=32;d>=16;d-=16)a.AddRoundKey(b,c.slice(d,d+16)),a.MixColumns_Inv(b),a.ShiftRows(b,a.ShiftRowTab_Inv),a.SubBytes(b,a.Sbox_Inv);a.AddRoundKey(b,c.slice(0,16));};a.SubBytes=function(a,c){for(var d=0;d<16;d++)a[d]=c[a[d]];};a.AddRoundKey=function(a,c){for(var d=0;d<16;d++)a[d]^=c[d];};a.ShiftRows=function(a,c){for(var d=[].concat(a),e=0;e<16;e++)a[e]=d[c[e]];};a.MixColumns=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h;b[c+0]^=f^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=f^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d];}};a.MixColumns_Inv=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h,o=a.xtime[f],p=a.xtime[a.xtime[o^d^g]]^f;f^=a.xtime[a.xtime[o^e^h]];b[c+0]^=p^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=p^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d];}};return a;}(),cryptico=function(){var a={};aes.Init();a.b256to64=function(a){var c,d,e,g="",f=0,o=a.length;for(e=0;e<o;e++)d=a.charCodeAt(e),f==0?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2&63),c=(d&3)<<4):f==1?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>4&15),c=(d&15)<<2):f==2&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>6&3),g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63)),f+=1,f==3&&(f=0);f>0&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c),g+="=");f==1&&(g+="=");return g;};a.b64to256=function(a){var c,d,e="",g=0,h=0,f=a.length;for(d=0;d<f;d++)c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d)),c>=0&&(g&&(e+=String.fromCharCode(h|c>>6-g&255)),g=g+2&7,h=c<<g&255);return e;};a.b16to64=function(a){var c,d,e="";a.length%2==1&&(a="0"+a);for(c=0;c+3<=a.length;c+=3)d=parseInt(a.substring(c,c+3),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63);c+1==a.length?(d=parseInt(a.substring(c,c+1),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d<<2)):c+2==a.length&&(d=parseInt(a.substring(c,c+2),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4));for(;(e.length&3)>0;)e+="=";return e;};a.b64to16=function(a){var c="",d,e=0,g;for(d=0;d<a.length;++d){if(a.charAt(d)=="=")break;v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d));v<0||(e==0?(c+=int2char(v>>2),g=v&3,e=1):e==1?(c+=int2char(g<<2|v>>4),g=v&15,e=2):e==2?(c+=int2char(g),c+=int2char(v>>2),g=v&3,e=3):(c+=int2char(g<<2|v>>4),c+=int2char(v&15),e=0));}e==1&&(c+=int2char(g<<2));return c;};a.string2bytes=function(a){for(var c=[],d=0;d<a.length;d++)c.push(a.charCodeAt(d));return c;};a.bytes2string=function(a){for(var c="",d=0;d<a.length;d++)c+=String.fromCharCode(a[d]);return c;};a.blockXOR=function(a,c){for(var d=Array(16),e=0;e<16;e++)d[e]=a[e]^c[e];return d;};a.blockIV=function(){var a=new SecureRandom(),c=Array(16);a.nextBytes(c);return c;};a.pad16=function(a){var c=a.slice(0),d=(16-a.length%16)%16;for(i=a.length;i<a.length+d;i++)c.push(0);return c;};a.depad=function(a){for(a=a.slice(0);a[a.length-1]==0;)a=a.slice(0,a.length-1);return a;};a.encryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var e=a.string2bytes(b),e=a.pad16(e),g=a.blockIV(),h=0;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=g.slice(h*16,h*16+16),f=a.blockXOR(o,f);aes.Encrypt(f,d);g=g.concat(f);}d=a.bytes2string(g);return a.b256to64(d);};a.decryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var b=a.b64to256(b),e=a.string2bytes(b),g=[],h=1;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=e.slice((h-1)*16,(h-1)*16+16);aes.Decrypt(f,d);f=a.blockXOR(o,f);g=g.concat(f);}g=a.depad(g);return a.bytes2string(g);};a.wrap60=function(a){for(var c="",d=0;d<a.length;d++)d%60==0&&d!=0&&(c+="\n"),c+=a[d];return c;};a.generateAESKey=function(){var a=Array(16);new SecureRandom().nextBytes(a);return a;};a.generateRSAKey=function(a,c){Math.seedrandom(sha256.hex(a));var d=new RSAKey();d.generate(c,"10001");return d;};a.publicKeyString=function(b){return pubkey=b.n.toString(16);};a.publicKeyID=function(a){return MD5(a);};a.publicKeyFromString=function(b){var b=b.split("|")[0],c=new RSAKey();c.setPublic(b,"10001");return c;};a.encrypt=function(b,c,d){var e="";try{var h=a.publicKeyFromString(c);e+=h.encrypt(b)+"?";}catch(f){return {status:"Invalid public key"};}return {status:"success",cipher:e};};a.decrypt=function(b,c){var d=b.split("?"),e=c.decrypt(d[0]);return {status:"success",plaintext:e,signature:"unsigned"};};return a;}();module.exports=cryptico;/***/},/* 1 */ /***/function(module,exports,__webpack_require__){module.exports=__webpack_require__(2);/***/},/* 2 */ /***/function(module,__webpack_exports__,__webpack_require__){// ESM COMPAT FLAG
  __webpack_require__.r(__webpack_exports__);// EXPORTS
  __webpack_require__.d(__webpack_exports__,"StreamClient",function(){return(/* binding */StreamClient);});// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/rng.js
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
  // require the crypto API and do not support built-in fallback to lower quality random number
  // generators (like Math.random()).
  var getRandomValues;var rnds8=new Uint8Array(16);function rng(){// lazy load so that environments that need to polyfill have a chance to do so
  if(!getRandomValues){// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
  // find the complete implementation of crypto (msCrypto) on IE11.
  getRandomValues=typeof crypto!=='undefined'&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=='undefined'&&typeof msCrypto.getRandomValues==='function'&&msCrypto.getRandomValues.bind(msCrypto);if(!getRandomValues){throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');}}return getRandomValues(rnds8);}// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/regex.js
  /* harmony default export */var regex=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/validate.js
  function validate(uuid){return typeof uuid==='string'&&regex.test(uuid);}/* harmony default export */var esm_browser_validate=validate;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/stringify.js
  /**
  		         * Convert array of 16 byte values to UUID string format of the form:
  		         * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  		         */var byteToHex=[];for(var stringify_i=0;stringify_i<256;++stringify_i){byteToHex.push((stringify_i+0x100).toString(16).substr(1));}function stringify(arr){var offset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;// Note: Be careful editing this code!  It's been tuned for performance
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
  var uuid=(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+'-'+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+'-'+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+'-'+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+'-'+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();// Consistency check for valid UUID.  If this throws, it's likely due to one
  // of the following:
  // - One or more input array values don't map to a hex octet (leading to
  // "undefined" in the uuid)
  // - Invalid input values for the RFC `version` or `variant` fields
  if(!esm_browser_validate(uuid)){throw TypeError('Stringified UUID is invalid');}return uuid;}/* harmony default export */var esm_browser_stringify=stringify;// CONCATENATED MODULE: ./node_modules/uuid/dist/esm-browser/v4.js
  function v4(options,buf,offset){options=options||{};var rnds=options.random||(options.rng||rng)();// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
  rnds[6]=rnds[6]&0x0f|0x40;rnds[8]=rnds[8]&0x3f|0x80;// Copy bytes to buffer, if provided
  if(buf){offset=offset||0;for(var i=0;i<16;++i){buf[offset+i]=rnds[i];}return buf;}return esm_browser_stringify(rnds);}/* harmony default export */var esm_browser_v4=v4;// CONCATENATED MODULE: ./directDeviceCustom.js
  /**
  		         * @synopsis 定制设备取流
  		         *
  		         * @note [ADD][2017-07-28]新建 by fengzhongjian
  		         *
  		         */var DirectDeviceCustom=function(){var DeviceDirect=/*#__PURE__*/function(){function DeviceDirect(){_classCallCheck$1(this,DeviceDirect);}//to do
  //创建取流客户端对象
  _createClass$1(DeviceDirect,[{key:"createClientObject",value:function createClientObject(oWebsocket,szId,iCurChannel,iCurStream){return {socket:oWebsocket,id:szId,iCurChannel:iCurChannel,iCurStream:iCurStream,resolve:null,reject:null};}//零通道预览
  },{key:"zeroPlayCmd",value:function zeroPlayCmd(iCurChannel,iCurStream){var aCmd=[0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x13,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,iCurChannel+1,0x00,0x00,0x00,iCurStream,0x00,0x00,0x04,0x00];return new Uint8Array(aCmd);}//普通通道预览
  },{key:"playCmd",value:function playCmd(iCurChannel,iCurStream){var aCmd=[0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,iCurChannel,0x00,0x00,0x00,iCurStream,0x00,0x00,0x04,0x00];return new Uint8Array(aCmd);}//回放
  },{key:"playbackCmd",value:function playbackCmd(szStartTime,szStopTime,iCurChannel,iCurStream){var szStartDayMonthYear=szStartTime.split("T")[0];var szStartHourMinSec=szStartTime.split("T")[1];var szStartYear="0"+parseInt(szStartDayMonthYear.substring(0,4),10).toString(16);var iStartMonth=parseInt(szStartDayMonthYear.substring(4,6),10);var iStartDay=parseInt(szStartDayMonthYear.substring(6),10);var iStartHour=parseInt(szStartHourMinSec.substring(0,2),10);var iStartMin=parseInt(szStartHourMinSec.substring(2,4),10);var iStartSec=parseInt(szStartHourMinSec.substring(4,6),10);var szStopDayMonthYear=szStopTime.split("T")[0];var szStopHourMinSec=szStopTime.split("T")[1];var szStopYear="0"+parseInt(szStopDayMonthYear.substring(0,4),10).toString(16);var iStopMonth=parseInt(szStopDayMonthYear.substring(4,6),10);//let iStopDay = parseInt(szStopDayMonthYear.substring(6), 10);
  var iStopHour=parseInt(szStopHourMinSec.substring(0,2),10);var iStopMin=parseInt(szStopHourMinSec.substring(2,4),10);var iStopSec=parseInt(szStopHourMinSec.substring(4,6),10);var aCmd=[/*header*/0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*channel*/0x00,0x00,0x00,iCurChannel,/*start time*/0x00,0x00,parseInt(szStartYear.substring(0,2),16),parseInt(szStartYear.substring(2,4),16),0x00,0x00,0x00,iStartMonth,0x00,0x00,0x00,iStartDay,0x00,0x00,0x00,iStartHour,0x00,0x00,0x00,iStartMin,0x00,0x00,0x00,iStartSec,/*end time*/0x00,0x00,parseInt(szStopYear.substring(0,2),16),parseInt(szStopYear.substring(2,4),16),0x00,0x00,0x00,iStopMonth,0x00,0x00,0x00,iStartDay,0x00,0x00,0x00,iStopHour,0x00,0x00,0x00,iStopMin,0x00,0x00,0x00,iStopSec,/*是否抽帧*/0x00,/*是否下载*/0x00,/*录像卷类型 0普通卷，1存档卷*/0x00,/*存档卷号*/0x00,/*存档卷上的录像文件索引*/0x00,0x00,0x00,0x00,/*码流类型 0主码流，1子码流，2三码流*/iCurStream,/*保留字*/0x00,0x00,0x00];return new Uint8Array(aCmd);}//回放速率
  },{key:"playRateCmd",value:function playRateCmd(iRate){var szHex=(parseInt(iRate,10)>>>0).toString(16).toLocaleUpperCase().toString(16);for(var j=szHex.length;j<8;j++){//对字符串进行补0，筹齐8位
  szHex="0"+szHex;}var aRate=[0,0,0,0];//4字节16机制表示
  for(var _j=0,iLenRate=szHex.length;_j<iLenRate;_j=_j+2){aRate[Math.floor(_j/2)]=parseInt(szHex.substring(_j,_j+2),16);}var aCmd=[/*header*/0x00,0x00,0x00,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x2f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,aRate[0],aRate[1],aRate[2],aRate[3]];return new Uint8Array(aCmd);}//回放暂停
  },{key:"pauseCmd",value:function pauseCmd(){var aCmd=[/*header*/0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00];return new Uint8Array(aCmd);}//恢复命令
  },{key:"resumeCmd",value:function resumeCmd(){var aCmd=[/*header*/0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00];return new Uint8Array(aCmd);}}]);return DeviceDirect;}();return DeviceDirect;}();// CONCATENATED MODULE: ./directDevice.js
  /**
  		         * @synopsis 直连设备取流
  		         *
  		         * @note [ADD][2017-07-28]新建 by fengzhongjian
  		         *
  		         */var ERROR_STREAM_UNKNOWN=3001;//未知取流错误
  var ERROR_STREAM_LIMIT=3002;//资源上限
  var ERROR_BAD_AUTH=3003;//认证失败
  var DirectDevice=function(){var DeviceDirect=/*#__PURE__*/function(){function DeviceDirect(){_classCallCheck$1(this,DeviceDirect);}//to do
  //创建取流客户端对象
  _createClass$1(DeviceDirect,[{key:"createClientObject",value:function createClientObject(oWebsocket,szId,szPlayURL){return {socket:oWebsocket,id:szId,playURL:szPlayURL,resolve:null,reject:null};}//从sdp信息获取媒体头
  },{key:"getMediaFromSdp",value:function getMediaFromSdp(szSdp){var iMediaIndex=szSdp.indexOf("MEDIAINFO=")+10;var szMediaInfo=szSdp.slice(iMediaIndex,iMediaIndex+80);var aMediaInfo=[];for(var _i2=0,iLen=szMediaInfo.length/2;_i2<iLen;_i2++){aMediaInfo[_i2]=parseInt(szMediaInfo.slice(_i2*2,_i2*2+2),16);}return new Uint8Array(aMediaInfo);}//普通通道预览
  },{key:"playCmd",value:function playCmd(szPlayURL){var oCmd={sequence:0,cmd:'realplay',url:szPlayURL};return JSON.stringify(oCmd);}//回放
  },{key:"playbackCmd",value:function playbackCmd(szStartTime,szStopTime,szPlayURL){var oCmd={sequence:0,cmd:'playback',url:szPlayURL,startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd);}//回放速率
  },{key:"playRateCmd",value:function playRateCmd(iRate){var oCmd={sequence:0,cmd:"changespeed",speed:iRate};return JSON.stringify(oCmd);}//回放暂停
  },{key:"pauseCmd",value:function pauseCmd(){var oCmd={sequence:0,cmd:"pause"};return JSON.stringify(oCmd);}//恢复命令
  },{key:"resumeCmd",value:function resumeCmd(){var oCmd={sequence:0,cmd:"resume"};return JSON.stringify(oCmd);}//获取取流错误
  },{key:"getError",value:function getError(oError){var iErrorNum=ERROR_STREAM_UNKNOWN;if(oError){if(parseInt(oError.statusCode,10)===6&&oError.subStatusCode==="streamLimit"){iErrorNum=ERROR_STREAM_LIMIT;}else if(parseInt(oError.statusCode,10)===4&&oError.subStatusCode==="badAuthorization"){iErrorNum=ERROR_BAD_AUTH;}}return {iErrorNum:iErrorNum,oError:oError};}}]);return DeviceDirect;}();return DeviceDirect;}();// EXTERNAL MODULE: ./tool/cryptico.js
  var cryptico=__webpack_require__(0);var cryptico_default=/*#__PURE__*/__webpack_require__.n(cryptico);// CONCATENATED MODULE: ./tool/aes.js
  /*
  		        CryptoJS v3.1.2
  		        code.google.com/p/crypto-js
  		        (c) 2009-2013 by Jeff Mott. All rights reserved.
  		        code.google.com/p/crypto-js/wiki/License
  		        */var CryptoJS=CryptoJS||function(u,p){var d={},l=d.lib={},s=function s(){},t=l.Base={extend:function extend(a){s.prototype=this;var c=new s();a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments);});c.init.prototype=c;c.$super=this;return c;},create:function create(){var a=this.extend();a.init.apply(a,arguments);return a;},init:function init(){},mixIn:function mixIn(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString);},clone:function clone(){return this.init.prototype.extend(this);}},r=l.WordArray=t.extend({init:function init(a,c){a=this.words=a||[];this.sigBytes=c!=p?c:4*a.length;},toString:function toString(a){return (a||v).stringify(this);},concat:function concat(a){var c=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var k=0;k<a;k++)c[j+k>>>2]|=(e[k>>>2]>>>24-8*(k%4)&255)<<24-8*((j+k)%4);else if(65535<e.length)for(k=0;k<a;k+=4)c[j+k>>>2]=e[k>>>2];else c.push.apply(c,e);this.sigBytes+=a;return this;},clamp:function clamp(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<32-8*(c%4);a.length=u.ceil(c/4);},clone:function clone(){var a=t.clone.call(this);a.words=this.words.slice(0);return a;},random:function random(a){for(var c=[],e=0;e<a;e+=4)c.push(4294967296*u.random()|0);return new r.init(c,a);}}),w=d.enc={},v=w.Hex={stringify:function stringify(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++){var k=c[j>>>2]>>>24-8*(j%4)&255;e.push((k>>>4).toString(16));e.push((k&15).toString(16));}return e.join("");},parse:function parse(a){for(var c=a.length,e=[],j=0;j<c;j+=2)e[j>>>3]|=parseInt(a.substr(j,2),16)<<24-4*(j%8);return new r.init(e,c/2);}},b=w.Latin1={stringify:function stringify(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++)e.push(String.fromCharCode(c[j>>>2]>>>24-8*(j%4)&255));return e.join("");},parse:function parse(a){for(var c=a.length,e=[],j=0;j<c;j++)e[j>>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new r.init(e,c);}},x=w.Utf8={stringify:function stringify(a){try{return decodeURIComponent(escape(b.stringify(a)));}catch(c){throw Error("Malformed UTF-8 data");}},parse:function parse(a){return b.parse(unescape(encodeURIComponent(a)));}},q=l.BufferedBlockAlgorithm=t.extend({reset:function reset(){this._data=new r.init();this._nDataBytes=0;},_append:function _append(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes;},_process:function _process(a){var c=this._data,e=c.words,j=c.sigBytes,k=this.blockSize,b=j/(4*k),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*k;j=u.min(4*a,j);if(a){for(var q=0;q<a;q+=k)this._doProcessBlock(e,q);q=e.splice(0,a);c.sigBytes-=j;}return new r.init(q,j);},clone:function clone(){var a=t.clone.call(this);a._data=this._data.clone();return a;},_minBufferSize:0});l.Hasher=q.extend({cfg:t.extend(),init:function init(a){this.cfg=this.cfg.extend(a);this.reset();},reset:function reset(){q.reset.call(this);this._doReset();},update:function update(a){this._append(a);this._process();return this;},finalize:function finalize(a){a&&this._append(a);return this._doFinalize();},blockSize:16,_createHelper:function _createHelper(a){return function(b,e){return new a.init(e).finalize(b);};},_createHmacHelper:function _createHmacHelper(a){return function(b,e){return new n.HMAC.init(a,e).finalize(b);};}});var n=d.algo={};return d;}(Math);(function(){var u=CryptoJS,p=u.lib.WordArray;u.enc.Base64={stringify:function stringify(d){var l=d.words,p=d.sigBytes,t=this._map;d.clamp();d=[];for(var r=0;r<p;r+=3)for(var w=(l[r>>>2]>>>24-8*(r%4)&255)<<16|(l[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|l[r+2>>>2]>>>24-8*((r+2)%4)&255,v=0;4>v&&r+0.75*v<p;v++)d.push(t.charAt(w>>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("");},parse:function parse(d){var l=d.length,s=this._map,t=s.charAt(64);t&&(t=d.indexOf(t),-1!=t&&(l=t));for(var t=[],r=0,w=0;w<l;w++)if(w%4){var v=s.indexOf(d.charAt(w-1))<<2*(w%4),b=s.indexOf(d.charAt(w))>>>6-2*(w%4);t[r>>>2]|=(v|b)<<24-8*(r%4);r++;}return p.create(t,r);},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};})();(function(u){function p(b,n,a,c,e,j,k){b=b+(n&a|~n&c)+e+k;return (b<<j|b>>>32-j)+n;}function d(b,n,a,c,e,j,k){b=b+(n&c|a&~c)+e+k;return (b<<j|b>>>32-j)+n;}function l(b,n,a,c,e,j,k){b=b+(n^a^c)+e+k;return (b<<j|b>>>32-j)+n;}function s(b,n,a,c,e,j,k){b=b+(a^(n|~c))+e+k;return (b<<j|b>>>32-j)+n;}for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function _doReset(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878]);},_doProcessBlock:function _doProcessBlock(q,n){for(var a=0;16>a;a++){var c=n+a,e=q[c];q[c]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[n+14],x=q[n+15],f=a[0],m=a[1],g=a[2],h=a[3],f=p(f,m,g,h,c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]),f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),m=p(m,g,h,f,x,22,b[15]),f=d(f,m,g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f,m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),m=d(m,g,h,f,u,20,b[31]),f=l(f,m,g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),m=l(m,g,h,f,j,23,b[47]),f=s(f,m,g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m,E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0;a[1]=a[1]+m|0;a[2]=a[2]+g|0;a[3]=a[3]+h|0;},_doFinalize:function _doFinalize(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;n[c>>>5]|=128<<24-c%32;var e=u.floor(a/4294967296);n[(c+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;n[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(n.length+1);this._process();b=this._hash;n=b.words;for(a=0;4>a;a++)c=n[a],n[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b;},clone:function clone(){var b=v.clone.call(this);b._hash=this._hash.clone();return b;}});t.MD5=v._createHelper(r);t.HmacMD5=v._createHmacHelper(r);})(Math);(function(){var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,p=u.algo,s=p.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function init(d){this.cfg=this.cfg.extend(d);},compute:function compute(d,r){for(var p=this.cfg,s=p.hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length<q;){n&&s.update(n);var n=s.update(d).finalize(r);s.reset();for(var a=1;a<p;a++)n=s.finalize(n),s.reset();b.concat(n);}b.sigBytes=4*q;return b;}});u.EvpKDF=function(d,l,p){return s.create(p).compute(d,l);};})();CryptoJS.lib.Cipher||function(u){var p=CryptoJS,d=p.lib,l=d.Base,s=d.WordArray,t=d.BufferedBlockAlgorithm,r=p.enc.Base64,w=p.algo.EvpKDF,v=d.Cipher=t.extend({cfg:l.extend(),createEncryptor:function createEncryptor(e,a){return this.create(this._ENC_XFORM_MODE,e,a);},createDecryptor:function createDecryptor(e,a){return this.create(this._DEC_XFORM_MODE,e,a);},init:function init(e,a,b){this.cfg=this.cfg.extend(b);this._xformMode=e;this._key=a;this.reset();},reset:function reset(){t.reset.call(this);this._doReset();},process:function process(e){this._append(e);return this._process();},finalize:function finalize(e){e&&this._append(e);return this._doFinalize();},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function _createHelper(e){return {encrypt:function encrypt(b,k,d){return ("string"==typeof k?c:a).encrypt(e,b,k,d);},decrypt:function decrypt(b,k,d){return ("string"==typeof k?c:a).decrypt(e,b,k,d);}};}});d.StreamCipher=v.extend({_doFinalize:function _doFinalize(){return this._process(!0);},blockSize:1});var b=p.mode={},x=function x(e,a,b){var c=this._iv;c?this._iv=u:c=this._prevBlock;for(var d=0;d<b;d++)e[a+d]^=c[d];},q=(d.BlockCipherMode=l.extend({createEncryptor:function createEncryptor(e,a){return this.Encryptor.create(e,a);},createDecryptor:function createDecryptor(e,a){return this.Decryptor.create(e,a);},init:function init(e,a){this._cipher=e;this._iv=a;}})).extend();q.Encryptor=q.extend({processBlock:function processBlock(e,a){var b=this._cipher,c=b.blockSize;x.call(this,e,a,c);b.encryptBlock(e,a);this._prevBlock=e.slice(a,a+c);}});q.Decryptor=q.extend({processBlock:function processBlock(e,a){var b=this._cipher,c=b.blockSize,d=e.slice(a,a+c);b.decryptBlock(e,a);x.call(this,e,a,c);this._prevBlock=d;}});b=b.CBC=q;q=(p.pad={}).Pkcs7={pad:function pad(a,b){for(var c=4*b,c=c-a.sigBytes%c,d=c<<24|c<<16|c<<8|c,l=[],n=0;n<c;n+=4)l.push(d);c=s.create(l,c);a.concat(c);},unpad:function unpad(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255;}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function reset(){v.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,this,b&&b.words);},_doProcessBlock:function _doProcessBlock(a,b){this._mode.processBlock(a,b);},_doFinalize:function _doFinalize(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0);}else b=this._process(!0),a.unpad(b);return b;},blockSize:4});var n=d.CipherParams=l.extend({init:function init(a){this.mixIn(a);},toString:function toString(a){return (a||this.formatter).stringify(this);}}),b=(p.format={}).OpenSSL={stringify:function stringify(a){var b=a.ciphertext;a=a.salt;return (a?s.create([1398893684,1701076831]).concat(a).concat(b):b).toString(r);},parse:function parse(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16;}return n.create({ciphertext:a,salt:c});}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function encrypt(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;return n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format});},decrypt:function decrypt(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext);},_parse:function _parse(a,b){return "string"==typeof a?b.parse(a,this):a;}}),p=(p.kdf={}).OpenSSL={execute:function execute(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4*c);a.sigBytes=4*b;return n.create({key:a,iv:c,salt:d});}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function encrypt(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d,b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);return b;},decrypt:function decrypt(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;return a.decrypt.call(this,b,c,d.key,l);}});}();(function(){for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<<1:c<<1^283;for(var e=0,j=0,c=0;256>c;c++){var k=j^j<<1^j<<2^j<<3^j<<4,k=k>>>8^k&255^99;l[e]=k;s[k]=e;var z=a[e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8;r[e]=y<<16|y>>>16;w[e]=y<<8|y>>>24;v[e]=y;y=16843009*G^65537*F^257*z^16843008*e;b[k]=y<<24|y>>>8;x[k]=y<<16|y>>>16;q[k]=y<<8|y>>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1;}var H=[0,1,2,4,8,16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function _doReset(){for(var a=this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j<a;j++)if(j<d)e[j]=c[j];else {var k=e[j-1];j%d?6<d&&4==j%d&&(k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255]):(k=k<<8|k>>>24,k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255],k^=H[j/d|0]<<24);e[j]=e[j-d]^k;}c=this._invKeySchedule=[];for(d=0;d<a;d++)j=a-d,k=d%4?e[j]:e[j-4],c[d]=4>d||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>>8&255]]^n[l[k&255]];},encryptBlock:function encryptBlock(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l);},decryptBlock:function decryptBlock(a,c){var d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;},_doCryptBlock:function _doCryptBlock(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r<m;r++)var q=d[g>>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[g&255]^c[p++],t=d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[k&255]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[n&255])^c[p++];s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[g&255])^c[p++];t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[h&255])^c[p++];n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^c[p++];a[b]=q;a[b+1]=s;a[b+2]=t;a[b+3]=n;},keySize:8});u.AES=p._createHelper(d);})();/* harmony default export */var aes=CryptoJS;// CONCATENATED MODULE: ./liveMedia.js
  /**
  		         * @synopsis 流媒体取流
  		         *
  		         * @note [ADD][2017-07-28]新建 by fengzhongjian
  		         *
  		         */var LiveMedia=function(){var MediaLive=/*#__PURE__*/function(){function MediaLive(){_classCallCheck$1(this,MediaLive);}//to do
  //创建取流客户端对象
  _createClass$1(MediaLive,[{key:"createClientObject",value:function createClientObject(oWebsocket,szId,szPKD,szRand,oParams){var key=aes.AES.encrypt(new Date().getTime().toString(),aes.enc.Hex.parse("1234567891234567123456789123456712345678912345671234567891234567"),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse("12345678912345671234567891234567"),padding:aes.pad.Pkcs7}).ciphertext.toString();if(key.length<64){key=key+key;}var iv=aes.AES.encrypt(new Date().getTime().toString(),aes.enc.Hex.parse("12345678912345671234567891234567"),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse("12345678912345671234567891234567"),padding:aes.pad.Pkcs7}).ciphertext.toString();return {socket:oWebsocket,id:szId,PKD:szPKD,rand:szRand,playURL:oParams.playURL||"",auth:oParams.auth||"",token:oParams.token||"",key:key,iv:iv,resolve:null,reject:null};}//预览命令
  },{key:"playCmd",value:function playCmd(oWebsocket){var oCmd={sequence:0,cmd:'realplay',url:oWebsocket.playURL,key:cryptico_default.a.encrypt(oWebsocket.iv+":"+oWebsocket.key,oWebsocket.PKD).cipher.split("?")[0],authorization:aes.AES.encrypt(oWebsocket.rand+":"+oWebsocket.auth,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString(),token:aes.AES.encrypt(oWebsocket.token,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString()};return JSON.stringify(oCmd);}//回放
  },{key:"playbackCmd",value:function playbackCmd(oWebsocket,szStartTime,szStopTime){var oCmd={sequence:0,cmd:'playback',url:oWebsocket.playURL,key:cryptico_default.a.encrypt(oWebsocket.iv+":"+oWebsocket.key,oWebsocket.PKD).cipher.split("?")[0],authorization:aes.AES.encrypt(oWebsocket.rand+":"+oWebsocket.auth,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString(),token:aes.AES.encrypt(oWebsocket.token,aes.enc.Hex.parse(oWebsocket.key),{mode:aes.mode.CBC,iv:aes.enc.Hex.parse(oWebsocket.iv),padding:aes.pad.Pkcs7}).ciphertext.toString(),startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd);}//定位回放
  },{key:"seekCmd",value:function seekCmd(szStartTime,szStopTime){var oCmd={sequence:0,cmd:"seek",startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd);}}]);return MediaLive;}();return MediaLive;}();// CONCATENATED MODULE: ./localService.js
  /**
  		         * @synopsis 本地服务取流
  		         *
  		         * @note [ADD][2017-07-28]新建 by fengzhongjian
  		         *
  		         */var LocalService=function(){var LocalServer=/*#__PURE__*/function(){function LocalServer(){_classCallCheck$1(this,LocalServer);}//to do
  //创建取流客户端对象
  _createClass$1(LocalServer,[{key:"createClientObject",value:function createClientObject(oWebsocket,szId,szPlayURL,oParams){return {socket:oWebsocket,id:szId,playURL:szPlayURL,deviceSerial:oParams.deviceSerial||"",verificationCode:oParams.verificationCode||"",resolve:null,reject:null};}//普通通道预览
  },{key:"playCmd",value:function playCmd(oWebsocket){var oCmd={sequence:0,cmd:'realplay',deviceSerial:oWebsocket.deviceSerial,verificationCode:oWebsocket.verificationCode,url:oWebsocket.playURL};return JSON.stringify(oCmd);}//回放
  },{key:"playbackCmd",value:function playbackCmd(oWebsocket,szStartTime,szStopTime){var oCmd={sequence:0,cmd:'playback',deviceSerial:oWebsocket.deviceSerial,verificationCode:oWebsocket.verificationCode,url:oWebsocket.playURL,startTime:szStartTime,endTime:szStopTime};return JSON.stringify(oCmd);}}]);return LocalServer;}();return LocalServer;}();// CONCATENATED MODULE: ./streamClient.js
  //定制设备直连取流
  //设备直连取流
  //流媒体取流
  //本地服务取流
  /**
  		         * @synopsis 取流类
  		         *
  		         * @note [ADD][2017-01-03]新建 by fengzhongjian
  		         *
  		         */var StreamClient=function(){var WEBSOCKET=Symbol("WEBSOCKET");var GETINDEX=Symbol("GETINDEX");var PROTOCOLVERSION=Symbol("PROTOCOLVERSION");var CIPHERSUITES=Symbol("CIPHERSUITES");var oDirectDeviceCustom=new DirectDeviceCustom();//定制设备直连取流
  var oDirectDevice=new DirectDevice();//设备直连取流
  var oLiveMedia=new LiveMedia();//流媒体取流
  var oLocalService=new LocalService();//本地服务取流
  var WebsocketClient=/*#__PURE__*/function(){function WebsocketClient(){_classCallCheck$1(this,WebsocketClient);this[PROTOCOLVERSION]="0.1";//协议版本
  this[CIPHERSUITES]=0;//秘钥套件
  this[WEBSOCKET]=[];//websocket对象列表
  this.ERRORS={//错误码
  };//openstream后保存当前通道号和当前码流类型
  this[GETINDEX]=function(id){var iIndex=-1;for(var _i3=0,iLen=this[WEBSOCKET].length;_i3<iLen;_i3++){if(this[WEBSOCKET][_i3].id===id){iIndex=_i3;break;}}return iIndex;};}/**
  		             * @synopsis 开流, 此时设备的流还没有发出来
  		               * @param {string} szUrl 取流路径，如ws://hostname:port/channel
  		               * @param {object} oParams 取流需要涉及的相关参数
  		               * @param {function} cbMessage 消息回调函数
  		               * @param {function} cbClose 失败回调
  		               * @returns {objcet} 返回Promise对象
  		             */_createClass$1(WebsocketClient,[{key:"openStream",value:function openStream(szUrl,oParams,cbMessage,cbClose){var bIpv6=false;if(szUrl.indexOf("[")>-1){bIpv6=true;}var that=this;var aUrl=szUrl.split("://");//szUrl格式为ws://ip:port/channel/stream或wss://ip:port/channel/stream
  var szProtocol=aUrl[0];var szHostname="";var iPort=7681;var iCurChannel=1;var iCurStream=0;var bWebSocketVideoCtrlProxy=false;//判断是否是开发包代理模式
  if(bIpv6){szHostname=aUrl[1].split("]:")[0]+"]";iPort=Math.floor(aUrl[1].split("]:")[1].split("/")[0]);iCurChannel=Math.floor(aUrl[1].split("]:")[1].split("/")[1]/100);//通道号
  iCurStream=Math.floor(aUrl[1].split("]:")[1].split("/")[1]%100)-1;//码流类型
  }else {szHostname=aUrl[1].split(":")[0];iPort=Math.floor(aUrl[1].split(":")[1].split("/")[0]);iCurChannel=Math.floor(aUrl[1].split(":")[1].split("/")[1]/100);//通道号
  iCurStream=Math.floor(aUrl[1].split(":")[1].split("/")[1]%100)-1;//码流类型
  var szProxyFlag=aUrl[1].split(":")[1].split("/")[2];if(szProxyFlag!==""&&szProxyFlag==="webSocketVideoCtrlProxy"){bWebSocketVideoCtrlProxy=true;}}if(iCurChannel===0){//表示零通道
  iCurStream=0;}oParams=oParams||{};var szAuthType="&sessionID=";if(oParams.token&&!oParams.playURL){//流媒体的token和配套token属性名一样，需要区分
  szAuthType="&token=";}var szSessionID=oParams.sessionID||oParams.session||(oParams.playURL?"":oParams.token)||"";var oWebsocket=new window.WebSocket(szProtocol+"://"+szHostname+":"+iPort+(oParams.mode?"/"+oParams.mode:"")+(bWebSocketVideoCtrlProxy?"/webSocketVideoCtrlProxy":"")+"?version="+that[PROTOCOLVERSION]+"&cipherSuites="+that[CIPHERSUITES]+szAuthType+szSessionID+(oParams.proxy?"&proxy="+oParams.proxy:""));oWebsocket.binaryType="arraybuffer";var szId=esm_browser_v4();//取流uuid，由于区分每条取流连接
  var iDataIndex=-1;var promise=new Promise(function(resolve,reject){oWebsocket.onopen=function(){if(!oParams.playURL&&!oParams.sessionID&&!oParams.deviceSerial&&!oParams.token){//定制设备取流，open就表示成功，因为没有命令码返回
  that[WEBSOCKET].push(oDirectDeviceCustom.createClientObject(oWebsocket,szId,iCurChannel,iCurStream));resolve(szId);}/*let aTest = [73, 77, 75, 72, 1, 2, 0, 0, 4, 0, 0, 1, 16, 113, 1, 16, 64, 31, 0, 0, 0, 250, 0, 0, 129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
  		                  cbMessage({
  		                      bHead: true,
  		                      buf: aTest
  		                  });*/ //写死head，本地架websokcet服务时使用
  };oWebsocket.onmessage=function(e){if(typeof e.data==="string"){var oJSON=JSON.parse(e.data);var iWebsocketIndex=that[GETINDEX](szId);if(oJSON&&oJSON.version&&oJSON.cipherSuite){//建立websocket连接成功返回
  that[PROTOCOLVERSION]=oJSON.version;that[CIPHERSUITES]=parseInt(oJSON.cipherSuite,10);if(oJSON&&oJSON.PKD&&oJSON.rand){that[WEBSOCKET].push(oLiveMedia.createClientObject(oWebsocket,szId,oJSON.PKD,oJSON.rand,oParams));//流媒体
  }else {var szPlayURL="live://"+szHostname+":"+iPort+"/"+iCurChannel+"/"+iCurStream;if(that[CIPHERSUITES]===-1){that[WEBSOCKET].push(oLocalService.createClientObject(oWebsocket,szId,szPlayURL,oParams));//本地服务
  }else {that[WEBSOCKET].push(oDirectDevice.createClientObject(oWebsocket,szId,szPlayURL));//基线设备
  }}resolve(szId);return;}if(oJSON&&oJSON.sdp){var aSadpHeadBuf=oDirectDevice.getMediaFromSdp(oJSON.sdp);//获取媒体头
  cbMessage({bHead:true,buf:aSadpHeadBuf});}if(oJSON&&oJSON.cmd){if(oJSON.cmd==="end"){cbMessage({type:"exception",cmd:oJSON.cmd});//回放结束
  }}if(oJSON&&oJSON.statusString){if(oJSON.statusString.toLowerCase()==="ok"){if(that[WEBSOCKET][iWebsocketIndex].resolve){that[WEBSOCKET][iWebsocketIndex].resolve(oJSON);}}if(oJSON.statusString.toLowerCase()!=="ok"){var oError=oDirectDevice.getError(oJSON);if(iWebsocketIndex>-1){//建立连接即返回错误，此时iWebsocketIndex为-1
  if(that[WEBSOCKET][iWebsocketIndex].reject){that[WEBSOCKET][iWebsocketIndex].reject(oError);}}else {reject(oError);}}}if(oJSON&&oJSON.errorCode){//推流异常时返回异常信息
  cbMessage(oJSON);}}else {var dataObj={};var dataBuf=new Uint8Array(e.data);iDataIndex++;if(dataBuf.byteLength===64||dataBuf.byteLength===40){//媒体头包含在第一个64字节的数据包中
  var iMediaHeadIndex=-1;//回放和预览媒体头位置不一致，需要动态查询媒体头位置
  var iLen=dataBuf.byteLength;for(var _i4=0;_i4<iLen;_i4++){if(dataBuf[_i4]===73&&dataBuf[_i4+1]===77&&dataBuf[_i4+2]===75&&dataBuf[_i4+3]===72){iMediaHeadIndex=_i4;break;}}if(iMediaHeadIndex!==-1){var aHeadBuf=dataBuf.slice(iMediaHeadIndex,iMediaHeadIndex+40);dataObj={bHead:true,buf:aHeadBuf};}else {dataObj={bHead:false,buf:dataBuf};}cbMessage(dataObj);}else {if(iDataIndex>0){dataObj={bHead:false,buf:dataBuf};cbMessage(dataObj);}}dataBuf=null;dataObj=null;e=null;}};oWebsocket.onclose=function(){for(var _i5=0,iLen=that[WEBSOCKET].length;_i5<iLen;_i5++){if(that[WEBSOCKET][_i5].id===szId){that[WEBSOCKET][_i5].resolve();//关闭连接后触发该事件表示关闭成功
  that[WEBSOCKET].splice(_i5,1);setTimeout(function(){cbClose();},200);//延时触发停止成功回调，保证停止成功
  break;}}reject();//建立websocket连接时就触发onclose
  };});return promise;}/**
  		             * @synopsis 开始取流
  		             *
  		             * @param {string} id websocket id，在openStream的时候生成
  		               @param {string} szStartTime 开始时间
  		               @param {string} szStopTime 结束时间
  		             * @param {function} cbMessage 码流回调函数
  		             *
  		             * @returns {object} 返回Promise对象
  		             */},{key:"startPlay",value:function startPlay(id,szStartTime,szStopTime){var that=this;var iWebsocketIndex=this[GETINDEX](id);if(szStartTime&&szStopTime&&that[PROTOCOLVERSION]==="0.1"){szStartTime=szStartTime.replace(/-/g,"").replace(/:/g,"");szStopTime=szStopTime.replace(/-/g,"").replace(/:/g,"");}var promise=new Promise(function(resolve,reject){if(iWebsocketIndex>-1){that[WEBSOCKET][iWebsocketIndex].resolve=resolve;that[WEBSOCKET][iWebsocketIndex].reject=reject;var uIntCmd=null;if(!szStartTime||!szStopTime){//预览
  if(that[WEBSOCKET][iWebsocketIndex].iCurChannel===0&&that[PROTOCOLVERSION]==="0.1"){//零通道预览
  uIntCmd=oDirectDeviceCustom.zeroPlayCmd(that[WEBSOCKET][iWebsocketIndex].iCurChannel,that[WEBSOCKET][iWebsocketIndex].iCurStream);}else {//普通预览
  if(that[PROTOCOLVERSION]!=="0.1"){if(that[CIPHERSUITES]===0){uIntCmd=oLiveMedia.playCmd(that[WEBSOCKET][iWebsocketIndex]);//流媒体预览
  }else if(that[CIPHERSUITES]===1){uIntCmd=oDirectDevice.playCmd(that[WEBSOCKET][iWebsocketIndex].playURL);//基线普通预览
  }else if(that[CIPHERSUITES]===-1){uIntCmd=oLocalService.playCmd(that[WEBSOCKET][iWebsocketIndex]);//本地服务预览
  }}else {uIntCmd=oDirectDeviceCustom.playCmd(that[WEBSOCKET][iWebsocketIndex].iCurChannel,that[WEBSOCKET][iWebsocketIndex].iCurStream);//定制普通预览
  }}}else {//回放
  if(that[PROTOCOLVERSION]!=="0.1"){if(that[CIPHERSUITES]===0){uIntCmd=oLiveMedia.playbackCmd(that[WEBSOCKET][iWebsocketIndex],szStartTime,szStopTime);//流媒体回放
  }else if(that[CIPHERSUITES]===1){uIntCmd=oDirectDevice.playbackCmd(szStartTime,szStopTime,that[WEBSOCKET][iWebsocketIndex].playURL);//基线设备回放
  }else if(that[CIPHERSUITES]===-1){uIntCmd=oLocalService.playbackCmd(that[WEBSOCKET][iWebsocketIndex],szStartTime,szStopTime);//本地服务回放
  }}else {//定制设备回放
  uIntCmd=oDirectDeviceCustom.playbackCmd(szStartTime,szStopTime,that[WEBSOCKET][iWebsocketIndex].iCurChannel,that[WEBSOCKET][iWebsocketIndex].iCurStream);}}that[WEBSOCKET][iWebsocketIndex].socket.send(uIntCmd);if(that[PROTOCOLVERSION]==="0.1"){//定制协议没有返回码，发送后直接认为发送成功
  resolve();}}else {if(that[PROTOCOLVERSION]==="0.1"){//定制协议没有返回码，发送后直接认为发送成功
  reject();}}});return promise;}},{key:"singleFrame",value:function singleFrame(){}//do something
  /**
  		             * @synopsis 设置倍率
  		             *
  		             * @param {string} id websocket id在openStream的时候生成
  		               @param {number} iRate 播放倍率
  		             *
  		             * @returns {object} Promise
  		             */},{key:"setPlayRate",value:function setPlayRate(id,iRate){var that=this;var promise=new Promise(function(resolve,reject){for(var _i6=0,iLen=that[WEBSOCKET].length;_i6<iLen;_i6++){if(that[WEBSOCKET][_i6].id===id){if(that[PROTOCOLVERSION]==="0.1"){var uIntCmd=oDirectDeviceCustom.playRateCmd(iRate);//定制协议快慢放
  that[WEBSOCKET][_i6].socket.send(uIntCmd);resolve();//定制协议没有返回码，发送后直接认为发送成功
  break;}else {that[WEBSOCKET][_i6].resolve=resolve;that[WEBSOCKET][_i6].reject=reject;var szCmd=oDirectDevice.playRateCmd(iRate);//标准协议快慢放
  that[WEBSOCKET][_i6].socket.send(szCmd);}}}});return promise;}/**
  		             * @synopsis 定位回放
  		             *
  		             * @param {string} id websocket id在openStream的时候生成
  		               @param {string} szStartTime 开始时间
  		               @param {string} szStopTime 结束时间
  		             *
  		             * @returns {object} Promise
  		             */},{key:"seek",value:function seek(id,szStartTime,szStopTime){var that=this;var promise=new Promise(function(resolve,reject){for(var _i7=0,iLen=that[WEBSOCKET].length;_i7<iLen;_i7++){if(that[WEBSOCKET][_i7].id===id){that[WEBSOCKET][_i7].resolve=resolve;that[WEBSOCKET][_i7].reject=reject;var szCmd=oLiveMedia.seekCmd(szStartTime,szStopTime);that[WEBSOCKET][_i7].socket.send(szCmd);}}});return promise;}/**
  		             * @synopsis 暂停取流
  		             *
  		             * @param {string} id websocket id，在openStream的时候生成
  		             *
  		             * @returns {object} 返回Promise对象
  		             */},{key:"pause",value:function pause(id){var that=this;var promise=new Promise(function(resolve,reject){for(var _i8=0,iLen=that[WEBSOCKET].length;_i8<iLen;_i8++){if(that[WEBSOCKET][_i8].id===id){if(that[PROTOCOLVERSION]==="0.1"){var uIntCmd=oDirectDeviceCustom.pauseCmd();//定制协议暂停
  that[WEBSOCKET][_i8].socket.send(uIntCmd);resolve();//定制协议没有返回码，发送后直接认为发送成功
  break;}else {that[WEBSOCKET][_i8].resolve=resolve;that[WEBSOCKET][_i8].reject=reject;var szCmd=oDirectDevice.pauseCmd();//标准协议暂停
  that[WEBSOCKET][_i8].socket.send(szCmd);}}}});return promise;}/**
  		             * @synopsis 透传协议
  		             *
  		             * @param {string} id websocket id，在openStream的时候生成
  		             * @param {string} szCmd, 透传的命令码
  		             *
  		             * @returns {object} 返回Promise对象
  		             */},{key:"transmission",value:function transmission(id,szCmd){var that=this;var promise=new Promise(function(resolve,reject){for(var _i9=0,iLen=that[WEBSOCKET].length;_i9<iLen;_i9++){if(that[WEBSOCKET][_i9].id===id){that[WEBSOCKET][_i9].resolve=resolve;that[WEBSOCKET][_i9].reject=reject;that[WEBSOCKET][_i9].socket.send(szCmd);}}});return promise;}/**
  		             * @synopsis 恢复取流
  		             *
  		             * @param {string} id websocket id，在openStream的时候生成
  		             *
  		             * @returns {object} 返回Promise对象
  		             */},{key:"resume",value:function resume(id){var that=this;var promise=new Promise(function(resolve,reject){for(var _i10=0,iLen=that[WEBSOCKET].length;_i10<iLen;_i10++){if(that[WEBSOCKET][_i10].id===id){if(that[PROTOCOLVERSION]==="0.1"){var uIntCmd=oDirectDeviceCustom.resumeCmd();//定制协议恢复
  that[WEBSOCKET][_i10].socket.send(uIntCmd);resolve();//定制协议没有返回码，发送后直接认为发送成功
  break;}else {that[WEBSOCKET][_i10].resolve=resolve;that[WEBSOCKET][_i10].reject=reject;var szCmd=oDirectDevice.resumeCmd();//定制协议恢复
  that[WEBSOCKET][_i10].socket.send(szCmd);}}}});return promise;}/**
  		             * @synopsis 停止取流
  		             *
  		             * @param {string} id websocket id，在openStream的时候生成
  		             *
  		             * @returns {object} 返回Promise对象
  		             */},{key:"stop",value:function stop(id){var that=this;var promise=new Promise(function(resolve,reject){if(!id){reject();}else {var iIndex=-1;for(var _i11=0,iLen=that[WEBSOCKET].length;_i11<iLen;_i11++){if(that[WEBSOCKET][_i11].id===id){iIndex=_i11;that[WEBSOCKET][_i11].resolve=resolve;//onclose中处理，判断是否停止成功
  that[WEBSOCKET][_i11].socket.close(1000,"CLOSE");break;}}if(iIndex===-1){reject();}}});return promise;}/**
  		             * @synopsis 停止所有通道取流
  		             *
  		             * @returns {object} 返回Promise对象
  		             */},{key:"stopAll",value:function stopAll(){var that=this;var promise=new Promise(function(resolve,reject){for(var _i12=0,iLen=that[WEBSOCKET].length;_i12<iLen;_i12++){that[WEBSOCKET][_i12].socket.close(1000,"CLOSE");}console.log("停止所有流");resolve();});return promise;}}]);return WebsocketClient;}();return WebsocketClient;}();/***/}/******/]));});})(streamClient1_2_0_min);var streamClient1_2_0_minExports=streamClient1_2_0_min.exports;// Unique ID creation requires a high quality random # generator. In the browser we therefore
  // require the crypto API and do not support built-in fallback to lower quality random number
  // generators (like Math.random()).
  var getRandomValues;var rnds8=new Uint8Array(16);function rng(){// lazy load so that environments that need to polyfill have a chance to do so
  if(!getRandomValues){// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
  // find the complete implementation of crypto (msCrypto) on IE11.
  getRandomValues=typeof crypto!=='undefined'&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=='undefined'&&typeof msCrypto.getRandomValues==='function'&&msCrypto.getRandomValues.bind(msCrypto);if(!getRandomValues){throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');}}return getRandomValues(rnds8);}var REGEX=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function validate(uuid){return typeof uuid==='string'&&REGEX.test(uuid);}/**
  		 * Convert array of 16 byte values to UUID string format of the form:
  		 * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  		 */var byteToHex=[];for(var i$1=0;i$1<256;++i$1){byteToHex.push((i$1+0x100).toString(16).substr(1));}function stringify(arr){var offset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;// Note: Be careful editing this code!  It's been tuned for performance
  // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
  var uuid=(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+'-'+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+'-'+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+'-'+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+'-'+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase();// Consistency check for valid UUID.  If this throws, it's likely due to one
  // of the following:
  // - One or more input array values don't map to a hex octet (leading to
  // "undefined" in the uuid)
  // - Invalid input values for the RFC `version` or `variant` fields
  if(!validate(uuid)){throw TypeError('Stringified UUID is invalid');}return uuid;}function v4(options,buf,offset){options=options||{};var rnds=options.random||(options.rng||rng)();// Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
  rnds[6]=rnds[6]&0x0f|0x40;rnds[8]=rnds[8]&0x3f|0x80;// Copy bytes to buffer, if provided
  if(buf){offset=offset||0;for(var i=0;i<16;++i){buf[offset+i]=rnds[i];}return buf;}return stringify(rnds);}var Tool$1=/*#__PURE__*/function(){function Tool(){_classCallCheck$1(this,Tool);//to do
  this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";}_createClass$1(Tool,[{key:"$",value:function $(strExpr){var idExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;var classExpr=/^(?:\s*(<[\w\W]+>)[^>]*|.([\w-]*))$/;if(idExpr.test(strExpr)){var idMatch=idExpr.exec(strExpr);return document.getElementById(idMatch[2]);}else if(classExpr.test(strExpr)){var classMatch=classExpr.exec(strExpr);var allElement=document.getElementsByTagName("*");var ClassMatch=[];for(var i=0,l=allElement.length;i<l;i++){if(allElement[i].className.match(new RegExp("(\\s|^)"+classMatch[2]+"(\\s|$)"))){ClassMatch.push(allElement[i]);}}return ClassMatch;}}/**
  		   * @synopsis 时间日期格式化
  		   *
  		   * @param {objcet} oDate 时间
  		   * @param {string} fmt 格式 yyyy-MM-dd
  		   *
  		   * @returns {string} 格式化后的时间
  		   */},{key:"dateFormat",value:function dateFormat(oDate,fmt){var o={"M+":oDate.getMonth()+1,//月份
  "d+":oDate.getDate(),//日
  "h+":oDate.getHours(),//小时
  "m+":oDate.getMinutes(),//分
  "s+":oDate.getSeconds(),//秒
  "q+":Math.floor((oDate.getMonth()+3)/3),//季度
  "S":oDate.getMilliseconds()//毫秒
  };if(/(y+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(oDate.getFullYear()+"").substr(4-RegExp.$1.length));}for(var k in o){if(new RegExp("("+k+")").test(fmt)){fmt=fmt.replace(RegExp.$1,RegExp.$1.length===1?o[k]:("00"+o[k]).substr((""+o[k]).length));}}return fmt;}/**
  		   * @synopsis 下载文件
  		   *
  		   * @param {object} oData 数据 File对象或者Blob对象或者ArrayBuffer对象
  		   * @param {string} szName 下载文件名
  		   * @returns {none} 无返回
  		   */},{key:"downloadFile",value:function downloadFile(oData,szName){var oBlob=oData;if(!(oData instanceof Blob||oData instanceof File)){oBlob=new Blob([oData]);}var szFileUrl=window.URL.createObjectURL(oBlob);var oLink=window.document.createElement("a");oLink.href=szFileUrl;oLink.download=szName;var oClick=document.createEvent("MouseEvents");oClick.initEvent("click",true,true);oLink.dispatchEvent(oClick);}//创建xml DOM对象
  },{key:"createxmlDoc",value:function createxmlDoc(){var xmlDoc;var aVersions=["MSXML2.DOMDocument","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","Microsoft.XmlDom"];for(var i=0,len=aVersions.length;i<len;i++){try{xmlDoc=new ActiveXObject(aVersions[i]);break;}catch(e){xmlDoc=document.implementation.createDocument("","",null);break;}}xmlDoc.async="false";return xmlDoc;}//从xml字符串中解析xml
  },{key:"parseXmlFromStr",value:function parseXmlFromStr(szXml){if(null===szXml||''===szXml){return null;}var xmlDoc=this.createxmlDoc();if(navigator.appName==="Netscape"||navigator.appName==="Opera"){var oParser=new DOMParser();xmlDoc=oParser.parseFromString(szXml,"text/xml");}else {xmlDoc.loadXML(szXml);}return xmlDoc;}// public method for encoding
  },{key:"encode",value:function encode(input){var output="";var chr1;var chr2;var chr3;var enc1;var enc2;var enc3;var enc4;var i=0;input=this._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);}return output;}// public method for decoding
  },{key:"decode",value:function decode(input){var output="";var chr1;var chr2;var chr3;var enc1;var enc2;var enc3;var enc4;var i=0;input=input.replace(/[^A-Za-z0-9+/=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2);}if(enc4!==64){output=output+String.fromCharCode(chr3);}}output=this._utf8_decode(output);return output;}// private method for UTF-8 encoding
  },{key:"_utf8_encode",value:function _utf8_encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else if(c>127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128);}else {utftext+=String.fromCharCode(c>>12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128);}}return utftext;}// private method for UTF-8 decoding
  },{key:"_utf8_decode",value:function _utf8_decode(utftext){var string="";var i=0;var c=0;//var c1 = 0;
  var c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}else if(c>191&&c<224){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode((c&31)<<6|c2&63);i+=2;}else {c2=utftext.charCodeAt(i+1);var c3=utftext.charCodeAt(i+2);string+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63);i+=3;}}return string;}},{key:"isFirefox",value:function isFirefox(){var bRet=false;var szUserAgent=navigator.userAgent.toLowerCase();var szBrowserVersion="";var iBrowserVersion=-1;if(szUserAgent.match(/firefox\/([\d.]+)/)){szBrowserVersion=szUserAgent.match(/firefox\/([\d.]+)/)[1];iBrowserVersion=parseInt(szBrowserVersion.split(".")[0],10);if(iBrowserVersion>-1){bRet=true;}}return bRet;}},{key:"isSafari",value:function isSafari(){var bRet=false;var szUserAgent=navigator.userAgent.toLowerCase();var szBrowserVersion="";var iBrowserVersion=-1;if(szUserAgent.match(/version\/([\d.]+).safari./)){szBrowserVersion=szUserAgent.match(/version\/([\d.]+).safari./)[1];iBrowserVersion=parseInt(szBrowserVersion.split(".")[0],10);if(iBrowserVersion>-1){bRet=true;}}/*if (/safari/.test(szUserAgent) && !/chrome/.test(szUserAgent)) {
  		        bRet = true;
  		    }*/return bRet;}},{key:"isEdge",value:function isEdge(){return navigator.userAgent.toLowerCase().indexOf("edge")>-1;}},{key:"isIOS",value:function isIOS(){var u=navigator.userAgent;var bIOS=!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return bIOS;}}]);return Tool;}();var oTool$1=new Tool$1();var systemTransformWorkerString=function systemTransformWorkerString(){var staticPath=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'https://open.ys7.com/assets/ezuikit_v3.6';return "(function() {\n    const RECORDRTP = 0;  //\u5F55\u5236\u4E00\u4EFD\u672A\u7ECF\u8FC7\u8F6C\u5C01\u88C5\u7684\u7801\u6D41\u539F\u59CB\u6570\u636E\uFF0C\u7528\u4E8E\u5B9A\u4F4D\u95EE\u9898\n    self.Module = { memoryInitializerRequest: loadMemInitFile(), TOTAL_MEMORY: 128*1024*1024 };\n    importScripts = (function (globalEval) {\n        var xhr = new XMLHttpRequest;\n        return function importScripts() {\n          var\n            args = Array.prototype.slice.call(arguments)\n            , len = args.length\n            , i = 0\n            , meta\n            , data\n            , content\n            ;\n          for (; i < len; i++) {\n            if (args[i].substr(0, 5).toLowerCase() === \"data:\") {\n              data = args[i];\n              content = data.indexOf(\",\");\n              meta = data.substr(5, content).toLowerCase();\n              data = decodeURIComponent(data.substr(content + 1));\n              if (/;s*base64s*[;,]/.test(meta)) {\n                data = atob(data);\n              }\n              if (/;s*charset=[uU][tT][fF]-?8s*[;,]/.test(meta)) {\n                data = decodeURIComponent(escape(data));\n              }\n            } else {\n              xhr.open(\"GET\", args[i], false);\n              xhr.send(null);\n              data = xhr.responseText;\n            }\n            globalEval(data);\n          }\n        };\n      }(eval));\n    importScripts('".concat(staticPath,"/js/transform/SystemTransform.js');\n\n    Module.postRun.push(function() {\n        postMessage({type: \"loaded\"});\n    });\n\n    onmessage = function (e) {\n        var data = e.data;\n\n        if (\"create\" === data.type) {\n            var iHeadLen = data.len;\n            var pHead = Module._malloc(iHeadLen);\n\n            var aData = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);\n            aData.set(new Uint8Array(data.buf));\n\n            var iTransType = data.packType;//\u76EE\u6807\u683C\u5F0F RTP->PS\n            if (RECORDRTP) {\n                postMessage({type: \"created\"});\n                postMessage({type: \"outputData\", buf: data.buf, dType: 1}, [data.buf]);\n            } else {\n                var iRet = Module._ST_Create(pHead, iHeadLen, iTransType);\n                if (iRet != 0) {\n                    console.log(\"_ST_Create failed!\");\n                } else {\n                    Module._ST_Start();\n                    postMessage({type: \"created\"});\n                }\n            }\n\n        } else if (\"inputData\" === data.type) {\n            if (RECORDRTP) {\n                var aFileData = new Uint8Array(data.buf);  // \u62F7\u8D1D\u4E00\u4EFD\n                var iBufferLen = aFileData.length;\n                var szBufferLen = iBufferLen.toString(16);\n                if (szBufferLen.length === 1) {\n                    szBufferLen = \"000\" + szBufferLen;\n                } else if (szBufferLen.length === 2) {\n                    szBufferLen = \"00\" + szBufferLen;\n                } else if (szBufferLen.length === 3) {\n                    szBufferLen = \"0\" + szBufferLen;\n                }\n                var aData = [0, 0, parseInt(szBufferLen.substring(0, 2), 16), parseInt(szBufferLen.substring(2, 4), 16)];\n                for(var iIndex = 0, iDataLength = aFileData.length; iIndex < iDataLength; iIndex++) {\n                    aData[iIndex + 4] = aFileData[iIndex]\n                }\n                var dataUint8 = new Uint8Array(aData);\n                postMessage({type: \"outputData\", buf: dataUint8.buffer, dType: 2}, [dataUint8.buffer]);\n            } else {\n                var iDataLen = data.len;\n                var pData = Module._malloc(iDataLen);\n\n                var aData = Module.HEAPU8.subarray(pData, pData + iDataLen);\n                aData.set(new Uint8Array(data.buf));\n\n                var iRet = Module._ST_InputData(0, pData, iDataLen);\n                if (iRet != 0) {\n                    //console.log(\"_ST_InputData failed!\");// \u4E00\u5F00\u59CB\u4F1A\u6709\u4E00\u4E9B\u5931\u8D25\uFF0C\u4F46\u662F\u4E0D\u5F71\u54CD\u540E\u9762\u7684\u6587\u4EF6\u5B58\u50A8\n                }\n\n                Module._free(pData);\n            }\n        } else if (\"release\" === data.type) {\n            Module._ST_Stop();\n            Module._ST_Release();\n\n            close();\n        }\n    };\n\n    function loadMemInitFile() {\n        var req = new XMLHttpRequest();\n        req.open('GET', '").concat(staticPath,"/js/transform/SystemTransform.js.mem');\n        req.responseType = 'arraybuffer';\n        req.send();\n\n        return req;\n    }\n})();");};// import UUID from "uuid";
  // 常量定义
  //const STORAGE_OK = 0;
  //const STORAGE_FAILED = -1;
  var STORAGE_RECORD_PATH="Web/RecordFiles/";var STORAGE_CLIPS_PATH="Web/PlaybackFiles/";var STORAGE_TIMEOUT=1000;var TRANS_SYSHEAD=1;//系统头数据
  //const TRANS_STREAMDATA = 2;         //视频流数据（包括复合流和音视频分开的视频流数据）
  //const TRANS_AUDIOSTREAMDATA = 3;    //音频流数据
  //const TRANS_PRIVTSTREAMDATA = 4;    //私有数据类型
  //const TRANS_DECODEPARAM = 5;        //解码参数类型
  var ERROR_MAX_FILE_SIZE=3001;//文件大小超限
  // 兼容处理
  window.requestFileSystem=window.requestFileSystem||window.webkitRequestFileSystem;window.URL=window.URL||window.webkitURL;/**
  		 * @synopsis 文件系统类
  		 *
  		 * @note [ADD][2017-01-03]新建 by xufengyf3
  		 *
  		 */var FileSystem=/*#__PURE__*/function(){/**
  		   * @synopsis 构造函数
  		   *
  		   * @param {string} szUUID 存储对象uuid
  		   * @param {string} szFileName 文件名
  		   * @param {number} iStreamType 码流类型
  		   * @param {object} options 可选参数
  		   *
  		   * @returns {none} 无
  		   */function FileSystem(szUUID,szFileName,iStreamType,options){_classCallCheck$1(this,FileSystem);this.szUUID=szUUID;this.szFileName=szFileName;this.iStreamType=iStreamType;this.szPath="";this.bStart=false;this.aStreamList=[];this.options=options;}/**
  		   * @synopsis 初始化
  		   *
  		   * @returns {object} 返回Promise对象
  		   *
  		   */_createClass$1(FileSystem,[{key:"init",value:function init(){var that=this;if(0===this.iStreamType){// 录像
  this.szPath=STORAGE_RECORD_PATH;}else if(1===this.iStreamType){// 剪辑
  this.szPath=STORAGE_CLIPS_PATH;}this.szPath+=this.getDateDir();var aPath=that.szPath.split("/");var oPromise=new Promise(function(resolve/*, reject*/){// 创建目录
  window.requestFileSystem(window.TEMPORARY,that.options.iFileSize,function(fs){that.createDir(fs.root,aPath,function(){resolve();});},that.errorHandler);});return oPromise;}/**
  		   * @synopsis 获取日期
  		   *
  		   * @returns {string} 返回当前日期
  		   */},{key:"getDateDir",value:function getDateDir(){return oTool$1.dateFormat(new Date(),"yyyy-MM-dd");}/**
  		   * @synopsis 递归创建目录
  		   *
  		   * @param {string} rootDirEntry 根目录
  		   * @param {string} floders 子目录
  		   * @param {function} cbFunc 创建后回调函数
  		   *
  		   * @returns {none} 无
  		   */},{key:"createDir",value:function createDir(rootDirEntry,floders,cbFunc){var that=this;if(floders.length){rootDirEntry.getDirectory(floders[0],{create:true},function(dirEntry){that.createDir(dirEntry,floders.slice(1),cbFunc);},that.errorHandler);}else {// 创建完毕
  cbFunc();}}/**
  		   * @synopsis 错误处理
  		   *
  		   * @returns {none} 无
  		   */},{key:"errorHandler",value:function errorHandler(/*e*/){//to do
  //console.log('Error: ' + e.toString());
  }/**
  		   * @synopsis 写入文件头
  		   *
  		   * @param {Array} aData 文件头
  		   *
  		   * @returns {none} 无
  		   */},{key:"writeFileHeader",value:function writeFileHeader(aData){var that=this;window.requestFileSystem(window.TEMPORARY,that.options.iFileSize,function(fs){fs.root.getFile(that.szPath+"/"+that.szFileName,{create:true},function(fileEntry){fileEntry.createWriter(function(fileWriter){fileWriter.onwriteend=function(){//console.log('write completed.');
  that.bStart=true;that.writeFile(fileWriter);};fileWriter.onerror=function(){//to do
  //console.log('write failed: ' + e.toString());
  };//console.log("write: " + data.byteLength);
  //console.log(new Uint8Array(data));
  //console.log(fileWriter.length);
  fileWriter.seek(fileWriter.length);var oBlob=new Blob([aData]);fileWriter.write(oBlob);},that.errorHandler);},that.errorHandler);},that.errorHandler);}/**
  		   * @synopsis 写入文件队列
  		   *
  		   * @param {Array} aData 文件内容
  		   *
  		   * @returns {none} 无
  		   */},{key:"writeFileContent",value:function writeFileContent(aData){this.aStreamList.push(aData);}/**
  		   * @synopsis 写文件
  		   *
  		   * @param {object} fileWriter 文件对象
  		   *
  		   * @returns {none} 无
  		   */},{key:"writeFile",value:function writeFile(fileWriter){var that=this;if(this.bStart){if(this.aStreamList.length>0){var aData=this.aStreamList.shift();fileWriter.seek(fileWriter.length);// 判断文件大小
  if(fileWriter.length>=this.options.iFileSize){if(this.options.cbEventHandler){this.options.cbEventHandler(ERROR_MAX_FILE_SIZE,this.szUUID);}return;}var oBlob=new Blob([aData]);fileWriter.write(oBlob);}else {// 写的速度比数据来的快，延时递归
  setTimeout(function(){that.writeFile(fileWriter);},STORAGE_TIMEOUT);}}}/**
  		   * @synopsis 停止写文件 & 下载文件
  		   *
  		   *
  		   * @returns {object} 返回Promise对象
  		   */},{key:"stopWriteFile",value:function stopWriteFile(){var that=this;//console.log("stopWriteFile");
  this.bStart=false;this.aStreamList.length=0;var oPromise=new Promise(function(resolve/*, reject*/){window.requestFileSystem(window.TEMPORARY,that.options.iFileSize,function(fs){fs.root.getFile(that.szPath+"/"+that.szFileName,{create:false},function(fileEntry){fileEntry.file(function(file){resolve();oTool$1.downloadFile(file,file.name);});},that.errorHandler);},that.errorHandler);});return oPromise;}}]);return FileSystem;}();/**
  		 * @synopsis 存储类
  		 *
  		 * @note [ADD][2017-01-03]新建 by xufengyf3
  		 *
  		 */var Storage=/*#__PURE__*/function(){/**
  		   * @synopsis 构造函数
  		   * @param {string} szBasePath 基础路径
  		   * @param {string} szUUID 存储对象uuid
  		   * @param {string} szFileName 文件名
  		   * @param {Array} aHeadBuf 40字节媒体头
  		   * @param {number} iPackType 打包类型
  		   * @param {number} iStreamType 码流类型
  		   * @param {object} options 可选参数
  		   *
  		   * @returns {none} 无
  		   */function Storage(szBasePath,szUUID,szFileName,aHeadBuf,iPackType,iStreamType,options,staticPath){_classCallCheck$1(this,Storage);this.szBasePath=szBasePath;this.szUUID=szUUID;this.szFileName=szFileName;this.aHeadBuf=new Uint8Array(aHeadBuf);//拷贝一份
  this.iPackType=iPackType;this.iStreamType=iStreamType;this.oWorker=null;this.oFileSystem=null;this.options=options;this.bHead=true;this.staticPath=staticPath;}/**
  		   * @synopsis 初始化
  		   *
  		   * @returns {object} 返回Promise对象
  		   */_createClass$1(Storage,[{key:"init",value:function init(){var that=this;var oPromise=new Promise(function(resolve,reject){that.initFileSystem().then(function(){that.initWorker().then(function(){resolve(that.szUUID);},function(iError){reject(iError);});},function(iError){reject(iError);});});return oPromise;}/**
  		   * @synopsis 初始化虚拟文件系统
  		   *
  		   * @returns {object} 返回Promise对象
  		   */},{key:"initFileSystem",value:function initFileSystem(){var that=this;this.oFileSystem=new FileSystem(this.szUUID,this.szFileName,this.iStreamType,this.options);var oPromise=new Promise(function(resolve,reject){that.oFileSystem.init().then(function(){resolve();},function(iError){reject(iError);});});return oPromise;}/**
  		   * @synopsis 初始化转封装Worker
  		   *
  		   *
  		   * @returns {object} 返回Promise对象
  		   */},{key:"initWorker",value:function initWorker(){var that=this;var oPromise=new Promise(function(resolve/*, reject*/){var workBlob=new Blob([systemTransformWorkerString(that.staticPath)]);var url=URL.createObjectURL(workBlob);that.oWorker=new Worker(url);that.oWorker.onmessage=function(e){var data=e.data;var packType=that.iPackType;if(that.options.iPackage===1){packType=12;}if("loaded"===data.type){// 加载完毕后，初始化转封装库
  that.oWorker.postMessage({type:"create",buf:that.aHeadBuf.buffer,len:40,packType:packType},[that.aHeadBuf.buffer]);}else if("created"===data.type){//console.log("created");
  resolve();}else if("outputData"===data.type){//console.log(new Uint8Array(data.buf));
  //console.log("dType: " + data.dType);
  var aFileData=new Uint8Array(data.buf);// 拷贝一份
  if(that.options.iPackage===1){if(that.bHead){that.oFileSystem.writeFileHeader(aFileData);that.bHead=false;}else {that.oFileSystem.writeFileContent(aFileData);}}else {if(TRANS_SYSHEAD===data.dType){// 头数据
  that.oFileSystem.writeFileHeader(aFileData);}else {that.oFileSystem.writeFileContent(aFileData);}}}};});return oPromise;}/**
  		   * @synopsis 输入数据
  		   *
  		   * @param {Array} aData 数据
  		   *
  		   * @returns {none} 无
  		   */},{key:"inputData",value:function inputData(aData){if(this.oWorker){var aPostData=new Uint8Array(aData);// 拷贝一份
  this.oWorker.postMessage({type:"inputData",buf:aPostData.buffer,len:aPostData.length},[aPostData.buffer]);}}/**
  		   * @synopsis 停止录像
  		   *
  		   *
  		   * @returns {object} 返回Promise对象
  		   */},{key:"stopRecord",value:function stopRecord(){var that=this;var oPromise=new Promise(function(resolve,reject){if(that.oWorker){that.oWorker.postMessage({type:"release"});}else {reject();}if(that.oFileSystem){that.oFileSystem.stopWriteFile().then(function(){that.bHead=true;resolve();},function(){reject();});}else {reject();}});return oPromise;}}]);return Storage;}();/**
  		 * @synopsis 存储管理类
  		 *
  		 * @note [ADD][2017-01-03]新建 by xufengyf3
  		 *
  		 */var StorageManager=function(){var STORAGELIST=Symbol("STORAGELIST");var StorageManage=/*#__PURE__*/function(){/**
  		     * @synopsis 构造函数
  		     *
  		     * @param {string} szBasePath 库基础路径，相对于web根目录
  		     * @param {object} options 可选参数
  		     *
  		     * @returns {none} 无
  		     */function StorageManage(szBasePath,options,staticPath){_classCallCheck$1(this,StorageManage);this.szBasePath=szBasePath;this[STORAGELIST]={};this.options={iFileSize:1024*1024*1024// 默认1G
  };Object.assign(this.options,options);if(typeof options.staticPath==='string'){this.staticPath=options.staticPath;}}/**
  		     * @synopsis 开始录像
  		     *
  		     * @param {string} szFileName 文件名
  		     * @param {Array} aHeadBuf 40字节头
  		     * @param {number} iPackType 目标格式
  		     * @param {number} iStreamType 0:录像  1:剪辑
  		     * @param {object} options 可选参数
  		     *
  		     * @returns {object} 返回Promise对象
  		     */_createClass$1(StorageManage,[{key:"startRecord",value:function startRecord(szFileName,aHeadBuf,iPackType,iStreamType,options){var that=this;var szUUID=v4();var oOptions=Object.assign({},this.options,options);var oStorage=new Storage(this.szBasePath,szUUID,szFileName,aHeadBuf,iPackType,iStreamType,oOptions,this.staticPath);var oPromise=new Promise(function(resolve,reject){oStorage.init().then(function(szID){//console.log("startRecord:" + szID);
  that[STORAGELIST][szID]=oStorage;resolve(szID);},function(iError){reject(iError);});});return oPromise;}/**
  		     * @synopsis 输入数据
  		     *
  		     * @param {string} szUUID 实例标识
  		     * @param {Array} aData 数据
  		     *
  		     * @returns {none} 无
  		     */},{key:"inputData",value:function inputData(szUUID,aData){var oStorage=this[STORAGELIST][szUUID];if(oStorage){oStorage.inputData(aData);}}/**
  		     * @synopsis 停止录像
  		     *
  		     * @param {string} szUUID 实例标识
  		     *
  		     * @returns {object} 返回Promise对象
  		     */},{key:"stopRecord",value:function stopRecord(szUUID){var that=this;var oPromise=new Promise(function(resolve,reject){var oStorage=that[STORAGELIST][szUUID];if(oStorage){oStorage.stopRecord().then(function(){delete that[STORAGELIST][szUUID];resolve();},function(){reject();});}else {reject();}});return oPromise;}}]);return StorageManage;}();return StorageManage;}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _possibleConstructorReturn(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _toPrimitive(input,hint){if(_typeof(input)!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(_typeof(res)!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return (hint==="string"?String:Number)(input);}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return _typeof(key)==="symbol"?key:String(key);}var jquery={exports:{}};/*!
  		 * jQuery JavaScript Library v3.7.1
  		 * https://jquery.com/
  		 *
  		 * Copyright OpenJS Foundation and other contributors
  		 * Released under the MIT license
  		 * https://jquery.org/license
  		 *
  		 * Date: 2023-08-28T13:37Z
  		 */(function(module){(function(global,factory){{// For CommonJS and CommonJS-like environments where a proper `window`
  // is present, execute the factory and get jQuery.
  // For environments that do not have a `window` with a `document`
  // (such as Node.js), expose a factory as module.exports.
  // This accentuates the need for the creation of a real `window`.
  // e.g. var jQuery = require("jquery")(window);
  // See ticket trac-14549 for more info.
  module.exports=global.document?factory(global,true):function(w){if(!w.document){throw new Error("jQuery requires a window with a document");}return factory(w);};}// Pass this if window is not defined yet
  })(typeof window!=="undefined"?window:commonjsGlobal$1,function(window,noGlobal){var arr=[];var getProto=Object.getPrototypeOf;var _slice=arr.slice;var flat=arr.flat?function(array){return arr.flat.call(array);}:function(array){return arr.concat.apply([],array);};var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var fnToString=hasOwn.toString;var ObjectFunctionString=fnToString.call(Object);var support={};var isFunction=function isFunction(obj){// Support: Chrome <=57, Firefox <=52
  // In some browsers, typeof returns "function" for HTML <object> elements
  // (i.e., `typeof document.createElement( "object" ) === "function"`).
  // We don't want to classify *any* DOM node as a function.
  // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
  // Plus for old WebKit, typeof returns "function" for HTML collections
  // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
  return typeof obj==="function"&&typeof obj.nodeType!=="number"&&typeof obj.item!=="function";};var isWindow=function isWindow(obj){return obj!=null&&obj===obj.window;};var document=window.document;var preservedScriptAttributes={type:true,src:true,nonce:true,noModule:true};function DOMEval(code,node,doc){doc=doc||document;var i,val,script=doc.createElement("script");script.text=code;if(node){for(i in preservedScriptAttributes){// Support: Firefox 64+, Edge 18+
  // Some browsers don't support the "nonce" property on scripts.
  // On the other hand, just using `getAttribute` is not enough as
  // the `nonce` attribute is reset to an empty string whenever it
  // becomes browsing-context connected.
  // See https://github.com/whatwg/html/issues/2369
  // See https://html.spec.whatwg.org/#nonce-attributes
  // The `node.getAttribute` check was added for the sake of
  // `jQuery.globalEval` so that it can fake a nonce-containing node
  // via an object.
  val=node[i]||node.getAttribute&&node.getAttribute(i);if(val){script.setAttribute(i,val);}}}doc.head.appendChild(script).parentNode.removeChild(script);}function toType(obj){if(obj==null){return obj+"";}// Support: Android <=2.3 only (functionish RegExp)
  return _typeof(obj)==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":_typeof(obj);}/* global Symbol */ // Defining this global in .eslintrc.json would create a danger of using the global
  // unguarded in another place, it seems safer to define global only for this module
  var version="3.7.1",rhtmlSuffix=/HTML$/i,// Define a local copy of jQuery
  jQuery=function jQuery(selector,context){// The jQuery object is actually just the init constructor 'enhanced'
  // Need init if jQuery is called (just allow error to be thrown if not included)
  return new jQuery.fn.init(selector,context);};jQuery.fn=jQuery.prototype={// The current version of jQuery being used
  jquery:version,constructor:jQuery,// The default length of a jQuery object is 0
  length:0,toArray:function toArray(){return _slice.call(this);},// Get the Nth element in the matched element set OR
  // Get the whole matched element set as a clean array
  get:function get(num){// Return all the elements in a clean array
  if(num==null){return _slice.call(this);}// Return just the one element from the set
  return num<0?this[num+this.length]:this[num];},// Take an array of elements and push it onto the stack
  // (returning the new matched element set)
  pushStack:function pushStack(elems){// Build a new jQuery matched element set
  var ret=jQuery.merge(this.constructor(),elems);// Add the old object onto the stack (as a reference)
  ret.prevObject=this;// Return the newly-formed element set
  return ret;},// Execute a callback for every element in the matched set.
  each:function each(callback){return jQuery.each(this,callback);},map:function map(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},slice:function slice(){return this.pushStack(_slice.apply(this,arguments));},first:function first(){return this.eq(0);},last:function last(){return this.eq(-1);},even:function even(){return this.pushStack(jQuery.grep(this,function(_elem,i){return (i+1)%2;}));},odd:function odd(){return this.pushStack(jQuery.grep(this,function(_elem,i){return i%2;}));},eq:function eq(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j<len?[this[j]]:[]);},end:function end(){return this.prevObject||this.constructor();},// For internal use only.
  // Behaves like an Array's method, not like a jQuery method.
  push:push,sort:arr.sort,splice:arr.splice};jQuery.extend=jQuery.fn.extend=function(){var options,name,src,copy,copyIsArray,clone,target=arguments[0]||{},i=1,length=arguments.length,deep=false;// Handle a deep copy situation
  if(typeof target==="boolean"){deep=target;// Skip the boolean and the target
  target=arguments[i]||{};i++;}// Handle case when target is a string or something (possible in deep copy)
  if(_typeof(target)!=="object"&&!isFunction(target)){target={};}// Extend jQuery itself if only one argument is passed
  if(i===length){target=this;i--;}for(;i<length;i++){// Only deal with non-null/undefined values
  if((options=arguments[i])!=null){// Extend the base object
  for(name in options){copy=options[name];// Prevent Object.prototype pollution
  // Prevent never-ending loop
  if(name==="__proto__"||target===copy){continue;}// Recurse if we're merging plain objects or arrays
  if(deep&&copy&&(jQuery.isPlainObject(copy)||(copyIsArray=Array.isArray(copy)))){src=target[name];// Ensure proper type for the source value
  if(copyIsArray&&!Array.isArray(src)){clone=[];}else if(!copyIsArray&&!jQuery.isPlainObject(src)){clone={};}else {clone=src;}copyIsArray=false;// Never move original objects, clone them
  target[name]=jQuery.extend(deep,clone,copy);// Don't bring in undefined values
  }else if(copy!==undefined){target[name]=copy;}}}}// Return the modified object
  return target;};jQuery.extend({// Unique for each copy of jQuery on the page
  expando:"jQuery"+(version+Math.random()).replace(/\D/g,""),// Assume jQuery is ready without the ready module
  isReady:true,error:function error(msg){throw new Error(msg);},noop:function noop(){},isPlainObject:function isPlainObject(obj){var proto,Ctor;// Detect obvious negatives
  // Use toString instead of jQuery.type to catch host objects
  if(!obj||toString.call(obj)!=="[object Object]"){return false;}proto=getProto(obj);// Objects with no prototype (e.g., `Object.create( null )`) are plain
  if(!proto){return true;}// Objects with prototype are plain iff they were constructed by a global Object function
  Ctor=hasOwn.call(proto,"constructor")&&proto.constructor;return typeof Ctor==="function"&&fnToString.call(Ctor)===ObjectFunctionString;},isEmptyObject:function isEmptyObject(obj){var name;for(name in obj){return false;}return true;},// Evaluates a script in a provided context; falls back to the global one
  // if not specified.
  globalEval:function globalEval(code,options,doc){DOMEval(code,{nonce:options&&options.nonce},doc);},each:function each(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i<length;i++){if(callback.call(obj[i],i,obj[i])===false){break;}}}else {for(i in obj){if(callback.call(obj[i],i,obj[i])===false){break;}}}return obj;},// Retrieve the text value of an array of DOM nodes
  text:function text(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){// If no nodeType, this is expected to be an array
  while(node=elem[i++]){// Do not traverse comment nodes
  ret+=jQuery.text(node);}}if(nodeType===1||nodeType===11){return elem.textContent;}if(nodeType===9){return elem.documentElement.textContent;}if(nodeType===3||nodeType===4){return elem.nodeValue;}// Do not include comment or processing instruction nodes
  return ret;},// results is for internal usage only
  makeArray:function makeArray(arr,results){var ret=results||[];if(arr!=null){if(isArrayLike(Object(arr))){jQuery.merge(ret,typeof arr==="string"?[arr]:arr);}else {push.call(ret,arr);}}return ret;},inArray:function inArray(elem,arr,i){return arr==null?-1:indexOf.call(arr,elem,i);},isXMLDoc:function isXMLDoc(elem){var namespace=elem&&elem.namespaceURI,docElem=elem&&(elem.ownerDocument||elem).documentElement;// Assume HTML when documentElement doesn't yet exist, such as inside
  // document fragments.
  return !rhtmlSuffix.test(namespace||docElem&&docElem.nodeName||"HTML");},// Support: Android <=4.0 only, PhantomJS 1 only
  // push.apply(_, arraylike) throws on ancient WebKit
  merge:function merge(first,second){var len=+second.length,j=0,i=first.length;for(;j<len;j++){first[i++]=second[j];}first.length=i;return first;},grep:function grep(elems,callback,invert){var callbackInverse,matches=[],i=0,length=elems.length,callbackExpect=!invert;// Go through the array, only saving the items
  // that pass the validator function
  for(;i<length;i++){callbackInverse=!callback(elems[i],i);if(callbackInverse!==callbackExpect){matches.push(elems[i]);}}return matches;},// arg is for internal usage only
  map:function map(elems,callback,arg){var length,value,i=0,ret=[];// Go through the array, translating each of the items to their new values
  if(isArrayLike(elems)){length=elems.length;for(;i<length;i++){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}// Go through every key on the object,
  }else {for(i in elems){value=callback(elems[i],i,arg);if(value!=null){ret.push(value);}}}// Flatten any nested arrays
  return flat(ret);},// A global GUID counter for objects
  guid:1,// jQuery.support is not used in Core but other projects attach their
  // properties to it so it needs to exist.
  support:support});if(typeof Symbol==="function"){jQuery.fn[Symbol.iterator]=arr[Symbol.iterator];}// Populate the class2type map
  jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(_i,name){class2type["[object "+name+"]"]=name.toLowerCase();});function isArrayLike(obj){// Support: real iOS 8.2 only (not reproducible in simulator)
  // `in` check used to prevent JIT error (gh-2145)
  // hasOwn isn't used here due to false negatives
  // regarding Nodelist length in IE
  var length=!!obj&&"length"in obj&&obj.length,type=toType(obj);if(isFunction(obj)||isWindow(obj)){return false;}return type==="array"||length===0||typeof length==="number"&&length>0&&length-1 in obj;}function nodeName(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase();}var pop=arr.pop;var sort=arr.sort;var splice=arr.splice;var whitespace="[\\x20\\t\\r\\n\\f]";var rtrimCSS=new RegExp("^"+whitespace+"+|((?:^|[^\\\\])(?:\\\\.)*)"+whitespace+"+$","g");// Note: an element does not contain itself
  jQuery.contains=function(a,b){var bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(// Support: IE 9 - 11+
  // IE doesn't have `contains` on SVG.
  a.contains?a.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16));};// CSS string/identifier serialization
  // https://drafts.csswg.org/cssom/#common-serializing-idioms
  var rcssescape=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function fcssescape(ch,asCodePoint){if(asCodePoint){// U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER
  if(ch==="\0"){return "\uFFFD";}// Control characters and (dependent upon position) numbers get escaped as code points
  return ch.slice(0,-1)+"\\"+ch.charCodeAt(ch.length-1).toString(16)+" ";}// Other potentially-special ASCII characters get backslash-escaped
  return "\\"+ch;}jQuery.escapeSelector=function(sel){return (sel+"").replace(rcssescape,fcssescape);};var preferredDoc=document,pushNative=push;(function(){var i,Expr,outermostContext,sortInput,hasDuplicate,push=pushNative,// Local document vars
  document,documentElement,documentIsHTML,rbuggyQSA,matches,// Instance-specific data
  expando=jQuery.expando,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),nonnativeSelectorCache=createCache(),sortOrder=function sortOrder(a,b){if(a===b){hasDuplicate=true;}return 0;},booleans="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|"+"loop|multiple|open|readonly|required|scoped",// Regular expressions
  // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram
  identifier="(?:\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",// Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors
  attributes="\\["+whitespace+"*("+identifier+")(?:"+whitespace+// Operator (capture 2)
  "*([*^$|!~]?=)"+whitespace+// "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
  "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+identifier+"))|)"+whitespace+"*\\]",pseudos=":("+identifier+")(?:\\(("+// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
  // 1. quoted (capture 3; capture 4 or capture 5)
  "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+// 2. simple (capture 6)
  "((?:\\\\.|[^\\\\()[\\]]|"+attributes+")*)|"+// 3. anything else (capture 2)
  ".*"+")\\)|)",// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
  rwhitespace=new RegExp(whitespace+"+","g"),rcomma=new RegExp("^"+whitespace+"*,"+whitespace+"*"),rleadingCombinator=new RegExp("^"+whitespace+"*([>+~]|"+whitespace+")"+whitespace+"*"),rdescend=new RegExp(whitespace+"|>"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),// For use in libraries implementing .is()
  // We use this for POS matching in `select`
  needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,// Easily-parseable/retrievable ID or TAG or CLASS selectors
  rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,// CSS escapes
  // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters
  runescape=new RegExp("\\\\[\\da-fA-F]{1,6}"+whitespace+"?|\\\\([^\\r\\n\\f])","g"),funescape=function funescape(escape,nonHex){var high="0x"+escape.slice(1)-0x10000;if(nonHex){// Strip the backslash prefix from a non-hex escape sequence
  return nonHex;}// Replace a hexadecimal escape sequence with the encoded Unicode code point
  // Support: IE <=11+
  // For values outside the Basic Multilingual Plane (BMP), manually construct a
  // surrogate pair
  return high<0?String.fromCharCode(high+0x10000):String.fromCharCode(high>>10|0xD800,high&0x3FF|0xDC00);},// Used for iframes; see `setDocument`.
  // Support: IE 9 - 11+, Edge 12 - 18+
  // Removing the function wrapper causes a "Permission Denied"
  // error in IE/Edge.
  unloadHandler=function unloadHandler(){setDocument();},inDisabledFieldset=addCombinator(function(elem){return elem.disabled===true&&nodeName(elem,"fieldset");},{dir:"parentNode",next:"legend"});// Support: IE <=9 only
  // Accessing document.activeElement can throw unexpectedly
  // https://bugs.jquery.com/ticket/13393
  function safeActiveElement(){try{return document.activeElement;}catch(err){}}// Optimize for push.apply( _, NodeList )
  try{push.apply(arr=_slice.call(preferredDoc.childNodes),preferredDoc.childNodes);// Support: Android <=4.0
  // Detect silently failing push.apply
  // eslint-disable-next-line no-unused-expressions
  arr[preferredDoc.childNodes.length].nodeType;}catch(e){push={apply:function apply(target,els){pushNative.apply(target,_slice.call(els));},call:function call(target){pushNative.apply(target,_slice.call(arguments,1));}};}function find(selector,context,results,seed){var m,i,elem,nid,match,groups,newSelector,newContext=context&&context.ownerDocument,// nodeType defaults to 9, since context defaults to document
  nodeType=context?context.nodeType:9;results=results||[];// Return early from calls with invalid selector or context
  if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results;}// Try to shortcut find operations (as opposed to filters) in HTML documents
  if(!seed){setDocument(context);context=context||document;if(documentIsHTML){// If the selector is sufficiently simple, try using a "get*By*" DOM method
  // (excepting DocumentFragment context, where the methods don't exist)
  if(nodeType!==11&&(match=rquickExpr.exec(selector))){// ID selector
  if(m=match[1]){// Document context
  if(nodeType===9){if(elem=context.getElementById(m)){// Support: IE 9 only
  // getElementById can match elements by name instead of ID
  if(elem.id===m){push.call(results,elem);return results;}}else {return results;}// Element context
  }else {// Support: IE 9 only
  // getElementById can match elements by name instead of ID
  if(newContext&&(elem=newContext.getElementById(m))&&find.contains(context,elem)&&elem.id===m){push.call(results,elem);return results;}}// Type selector
  }else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results;// Class selector
  }else if((m=match[3])&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results;}}// Take advantage of querySelectorAll
  if(!nonnativeSelectorCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){newSelector=selector;newContext=context;// qSA considers elements outside a scoping root when evaluating child or
  // descendant combinators, which is not what we want.
  // In such cases, we work around the behavior by prefixing every selector in the
  // list with an ID selector referencing the scope context.
  // The technique has to be used as well when a leading combinator is used
  // as such selectors are not recognized by querySelectorAll.
  // Thanks to Andrew Dupont for this technique.
  if(nodeType===1&&(rdescend.test(selector)||rleadingCombinator.test(selector))){// Expand context for sibling selectors
  newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;// We can use :scope instead of the ID hack if the browser
  // supports it & if we're not changing the context.
  // Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when
  // strict-comparing two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  if(newContext!=context||!support.scope){// Capture the context ID, setting it first if necessary
  if(nid=context.getAttribute("id")){nid=jQuery.escapeSelector(nid);}else {context.setAttribute("id",nid=expando);}}// Prefix every selector in the list
  groups=tokenize(selector);i=groups.length;while(i--){groups[i]=(nid?"#"+nid:":scope")+" "+toSelector(groups[i]);}newSelector=groups.join(",");}try{push.apply(results,newContext.querySelectorAll(newSelector));return results;}catch(qsaError){nonnativeSelectorCache(selector,true);}finally{if(nid===expando){context.removeAttribute("id");}}}}}// All others
  return select(selector.replace(rtrimCSS,"$1"),context,results,seed);}/**
  		       * Create key-value caches of limited size
  		       * @returns {function(string, object)} Returns the Object data after storing it on itself with
  		       *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
  		       *	deleting the oldest entry
  		       */function createCache(){var keys=[];function cache(key,value){// Use (key + " ") to avoid collision with native prototype properties
  // (see https://github.com/jquery/sizzle/issues/157)
  if(keys.push(key+" ")>Expr.cacheLength){// Only keep the most recent entries
  delete cache[keys.shift()];}return cache[key+" "]=value;}return cache;}/**
  		       * Mark a function for special use by jQuery selector module
  		       * @param {Function} fn The function to mark
  		       */function markFunction(fn){fn[expando]=true;return fn;}/**
  		       * Support testing using an element
  		       * @param {Function} fn Passed the created element and returns a boolean result
  		       */function assert(fn){var el=document.createElement("fieldset");try{return !!fn(el);}catch(e){return false;}finally{// Remove from its parent by default
  if(el.parentNode){el.parentNode.removeChild(el);}// release memory in IE
  el=null;}}/**
  		       * Returns a function to use in pseudos for input types
  		       * @param {String} type
  		       */function createInputPseudo(type){return function(elem){return nodeName(elem,"input")&&elem.type===type;};}/**
  		       * Returns a function to use in pseudos for buttons
  		       * @param {String} type
  		       */function createButtonPseudo(type){return function(elem){return (nodeName(elem,"input")||nodeName(elem,"button"))&&elem.type===type;};}/**
  		       * Returns a function to use in pseudos for :enabled/:disabled
  		       * @param {Boolean} disabled true for :disabled; false for :enabled
  		       */function createDisabledPseudo(disabled){// Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable
  return function(elem){// Only certain elements can match :enabled or :disabled
  // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled
  // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled
  if("form"in elem){// Check for inherited disabledness on relevant non-disabled elements:
  // * listed form-associated elements in a disabled fieldset
  //   https://html.spec.whatwg.org/multipage/forms.html#category-listed
  //   https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled
  // * option elements in a disabled optgroup
  //   https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled
  // All such elements have a "form" property.
  if(elem.parentNode&&elem.disabled===false){// Option elements defer to a parent optgroup if present
  if("label"in elem){if("label"in elem.parentNode){return elem.parentNode.disabled===disabled;}else {return elem.disabled===disabled;}}// Support: IE 6 - 11+
  // Use the isDisabled shortcut property to check for disabled fieldset ancestors
  return elem.isDisabled===disabled||// Where there is no isDisabled, check manually
  elem.isDisabled!==!disabled&&inDisabledFieldset(elem)===disabled;}return elem.disabled===disabled;// Try to winnow out elements that can't be disabled before trusting the disabled property.
  // Some victims get caught in our net (label, legend, menu, track), but it shouldn't
  // even exist on them, let alone have a boolean value.
  }else if("label"in elem){return elem.disabled===disabled;}// Remaining elements are neither :enabled nor :disabled
  return false;};}/**
  		       * Returns a function to use in pseudos for positionals
  		       * @param {Function} fn
  		       */function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;// Match elements found at the specified indexes
  while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j]);}}});});}/**
  		       * Checks a node for validity as a jQuery selector context
  		       * @param {Element|Object=} context
  		       * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
  		       */function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context;}/**
  		       * Sets document-related variables once based on the current document
  		       * @param {Element|Object} [node] An element or document object to use to set the document
  		       * @returns {Object} Returns the current document
  		       */function setDocument(node){var subWindow,doc=node?node.ownerDocument||node:preferredDoc;// Return early if doc is invalid or already selected
  // Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  if(doc==document||doc.nodeType!==9||!doc.documentElement){return document;}// Update global variables
  document=doc;documentElement=document.documentElement;documentIsHTML=!jQuery.isXMLDoc(document);// Support: iOS 7 only, IE 9 - 11+
  // Older browsers didn't support unprefixed `matches`.
  matches=documentElement.matches||documentElement.webkitMatchesSelector||documentElement.msMatchesSelector;// Support: IE 9 - 11+, Edge 12 - 18+
  // Accessing iframe documents after unload throws "permission denied" errors
  // (see trac-13936).
  // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`,
  // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well.
  if(documentElement.msMatchesSelector&&// Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  preferredDoc!=document&&(subWindow=document.defaultView)&&subWindow.top!==subWindow){// Support: IE 9 - 11+, Edge 12 - 18+
  subWindow.addEventListener("unload",unloadHandler);}// Support: IE <10
  // Check if getElementById returns elements by name
  // The broken getElementById methods don't pick up programmatically-set names,
  // so use a roundabout getElementsByName test
  support.getById=assert(function(el){documentElement.appendChild(el).id=jQuery.expando;return !document.getElementsByName||!document.getElementsByName(jQuery.expando).length;});// Support: IE 9 only
  // Check to see if it's possible to do matchesSelector
  // on a disconnected node.
  support.disconnectedMatch=assert(function(el){return matches.call(el,"*");});// Support: IE 9 - 11+, Edge 12 - 18+
  // IE/Edge don't support the :scope pseudo-class.
  support.scope=assert(function(){return document.querySelectorAll(":scope");});// Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only
  // Make sure the `:has()` argument is parsed unforgivingly.
  // We include `*` in the test to detect buggy implementations that are
  // _selectively_ forgiving (specifically when the list includes at least
  // one valid selector).
  // Note that we treat complete lack of support for `:has()` as if it were
  // spec-compliant support, which is fine because use of `:has()` in such
  // environments will fail in the qSA path and fall back to jQuery traversal
  // anyway.
  support.cssHas=assert(function(){try{document.querySelector(":has(*,:jqfake)");return false;}catch(e){return true;}});// ID filter and find
  if(support.getById){Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId;};};Expr.find.ID=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var elem=context.getElementById(id);return elem?[elem]:[];}};}else {Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId;};};// Support: IE 6 - 7 only
  // getElementById is not reliable as a find shortcut
  Expr.find.ID=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var node,i,elems,elem=context.getElementById(id);if(elem){// Verify the id attribute
  node=elem.getAttributeNode("id");if(node&&node.value===id){return [elem];}// Fall back on getElementsByName
  elems=context.getElementsByName(id);i=0;while(elem=elems[i++]){node=elem.getAttributeNode("id");if(node&&node.value===id){return [elem];}}}return [];}};}// Tag
  Expr.find.TAG=function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag);// DocumentFragment nodes don't have gEBTN
  }else {return context.querySelectorAll(tag);}};// Class
  Expr.find.CLASS=function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className);}};/* QSA/matchesSelector
  		        ---------------------------------------------------------------------- */ // QSA and matchesSelector support
  rbuggyQSA=[];// Build QSA regex
  // Regex strategy adopted from Diego Perini
  assert(function(el){var input;documentElement.appendChild(el).innerHTML="<a id='"+expando+"' href='' disabled='disabled'></a>"+"<select id='"+expando+"-\r\\' disabled='disabled'>"+"<option selected=''></option></select>";// Support: iOS <=7 - 8 only
  // Boolean attributes and "value" are not treated correctly in some XML documents
  if(!el.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")");}// Support: iOS <=7 - 8 only
  if(!el.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=");}// Support: iOS 8 only
  // https://bugs.webkit.org/show_bug.cgi?id=136851
  // In-page `selector#id sibling-combinator selector` fails
  if(!el.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]");}// Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
  // In some of the document kinds, these selectors wouldn't work natively.
  // This is probably OK but for backwards compatibility we want to maintain
  // handling them through jQuery traversal in jQuery 3.x.
  if(!el.querySelectorAll(":checked").length){rbuggyQSA.push(":checked");}// Support: Windows 8 Native Apps
  // The type and name attributes are restricted during .innerHTML assignment
  input=document.createElement("input");input.setAttribute("type","hidden");el.appendChild(input).setAttribute("name","D");// Support: IE 9 - 11+
  // IE's :disabled selector does not pick up the children of disabled fieldsets
  // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+
  // In some of the document kinds, these selectors wouldn't work natively.
  // This is probably OK but for backwards compatibility we want to maintain
  // handling them through jQuery traversal in jQuery 3.x.
  documentElement.appendChild(el).disabled=true;if(el.querySelectorAll(":disabled").length!==2){rbuggyQSA.push(":enabled",":disabled");}// Support: IE 11+, Edge 15 - 18+
  // IE 11/Edge don't find elements on a `[name='']` query in some cases.
  // Adding a temporary attribute to the document before the selection works
  // around the issue.
  // Interestingly, IE 10 & older don't seem to have the issue.
  input=document.createElement("input");input.setAttribute("name","");el.appendChild(input);if(!el.querySelectorAll("[name='']").length){rbuggyQSA.push("\\["+whitespace+"*name"+whitespace+"*="+whitespace+"*(?:''|\"\")");}});if(!support.cssHas){// Support: Chrome 105 - 110+, Safari 15.4 - 16.3+
  // Our regular `try-catch` mechanism fails to detect natively-unsupported
  // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`)
  // in browsers that parse the `:has()` argument as a forgiving selector list.
  // https://drafts.csswg.org/selectors/#relational now requires the argument
  // to be parsed unforgivingly, but browsers have not yet fully adjusted.
  rbuggyQSA.push(":has");}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));/* Sorting
  		        ---------------------------------------------------------------------- */ // Document order sorting
  sortOrder=function sortOrder(a,b){// Flag for duplicate removal
  if(a===b){hasDuplicate=true;return 0;}// Sort on method existence if only one input has compareDocumentPosition
  var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare;}// Calculate position if both inputs belong to the same document
  // Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  compare=(a.ownerDocument||a)==(b.ownerDocument||b)?a.compareDocumentPosition(b):// Otherwise we know they are disconnected
  1;// Disconnected nodes
  if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){// Choose the first element that is related to our preferred document
  // Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  if(a===document||a.ownerDocument==preferredDoc&&find.contains(preferredDoc,a)){return -1;}// Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  if(b===document||b.ownerDocument==preferredDoc&&find.contains(preferredDoc,b)){return 1;}// Maintain original order
  return sortInput?indexOf.call(sortInput,a)-indexOf.call(sortInput,b):0;}return compare&4?-1:1;};return document;}find.matches=function(expr,elements){return find(expr,null,null,elements);};find.matchesSelector=function(elem,expr){setDocument(elem);if(documentIsHTML&&!nonnativeSelectorCache[expr+" "]&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);// IE 9's matchesSelector returns false on disconnected nodes
  if(ret||support.disconnectedMatch||// As well, disconnected nodes are said to be in a document
  // fragment in IE 9
  elem.document&&elem.document.nodeType!==11){return ret;}}catch(e){nonnativeSelectorCache(expr,true);}}return find(expr,document,null,[elem]).length>0;};find.contains=function(context,elem){// Set document vars if needed
  // Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  if((context.ownerDocument||context)!=document){setDocument(context);}return jQuery.contains(context,elem);};find.attr=function(elem,name){// Set document vars if needed
  // Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  if((elem.ownerDocument||elem)!=document){setDocument(elem);}var fn=Expr.attrHandle[name.toLowerCase()],// Don't get fooled by Object.prototype properties (see trac-13807)
  val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;if(val!==undefined){return val;}return elem.getAttribute(name);};find.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg);};/**
  		       * Document sorting and removing duplicates
  		       * @param {ArrayLike} results
  		       */jQuery.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;// Unless we *know* we can detect duplicates, assume their presence
  //
  // Support: Android <=4.0+
  // Testing for detecting duplicates is unpredictable so instead assume we can't
  // depend on duplicate detection in all browsers without a stable sort.
  hasDuplicate=!support.sortStable;sortInput=!support.sortStable&&_slice.call(results,0);sort.call(results,sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i);}}while(j--){splice.call(results,duplicates[j],1);}}// Clear input after sorting to release objects
  // See https://github.com/jquery/sizzle/pull/225
  sortInput=null;return results;};jQuery.fn.uniqueSort=function(){return this.pushStack(jQuery.uniqueSort(_slice.apply(this)));};Expr=jQuery.expr={// Can be adjusted by the user
  cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function ATTR(match){match[1]=match[1].replace(runescape,funescape);// Move the given value to match[3] whether quoted or unquoted
  match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" ";}return match.slice(0,4);},CHILD:function CHILD(match){/* matches from matchExpr["CHILD"]
  		            	1 type (only|nth|...)
  		            	2 what (child|of-type)
  		            	3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
  		            	4 xn-component of xn+y argument ([+-]?\d*n|)
  		            	5 sign of xn-component
  		            	6 x of xn-component
  		            	7 sign of y-component
  		            	8 y of y-component
  		            */match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){// nth-* requires argument
  if(!match[3]){find.error(match[0]);}// numeric x and y parameters for Expr.filter.CHILD
  // remember that false/true cast respectively to 0/1
  match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd");// other types prohibit arguments
  }else if(match[3]){find.error(match[0]);}return match;},PSEUDO:function PSEUDO(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr.CHILD.test(match[0])){return null;}// Accept quoted arguments as-is
  if(match[3]){match[2]=match[4]||match[5]||"";// Strip excess characters from unquoted arguments
  }else if(unquoted&&rpseudo.test(unquoted)&&(// Get excess from tokenize (recursively)
  excess=tokenize(unquoted,true))&&(// advance to the next closing parenthesis
  excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){// excess is a negative index
  match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess);}// Return only captures needed by the pseudo filter method (type and argument)
  return match.slice(0,3);}},filter:{TAG:function TAG(nodeNameSelector){var expectedNodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true;}:function(elem){return nodeName(elem,expectedNodeName);};},CLASS:function CLASS(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"");});},ATTR:function ATTR(name,operator,check){return function(elem){var result=find.attr(elem,name);if(result==null){return operator==="!=";}if(!operator){return true;}result+="";if(operator==="="){return result===check;}if(operator==="!="){return result!==check;}if(operator==="^="){return check&&result.indexOf(check)===0;}if(operator==="*="){return check&&result.indexOf(check)>-1;}if(operator==="$="){return check&&result.slice(-check.length)===check;}if(operator==="~="){return (" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1;}if(operator==="|="){return result===check||result.slice(0,check.length+1)===check+"-";}return false;};},CHILD:function CHILD(type,what,_argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?// Shortcut for :nth-*(n)
  function(elem){return !!elem.parentNode;}:function(elem,_context,xml){var cache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){// :(first|last|only)-(child|of-type)
  if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?nodeName(node,name):node.nodeType===1){return false;}}// Reverse direction for :only-* (if we haven't yet done so)
  start=dir=type==="only"&&!start&&"nextSibling";}return true;}start=[forward?parent.firstChild:parent.lastChild];// non-xml :nth-child(...) stores cache data on `parent`
  if(forward&&useCache){// Seek `elem` from a previously-cached index
  outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(// Fallback to seeking `elem` from the start
  diff=nodeIndex=0)||start.pop()){// When found, cache indexes on `parent` and break
  if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break;}}}else {// Use previously-cached element index if available
  if(useCache){outerCache=elem[expando]||(elem[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex;}// xml :nth-child(...)
  // or :nth-last-child(...) or :nth(-last)?-of-type(...)
  if(diff===false){// Use the same loop as above to seek `elem` from the start
  while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?nodeName(node,name):node.nodeType===1)&&++diff){// Cache the index of each encountered element
  if(useCache){outerCache=node[expando]||(node[expando]={});outerCache[type]=[dirruns,diff];}if(node===elem){break;}}}}}// Incorporate the offset, then check against cycle size
  diff-=last;return diff===first||diff%first===0&&diff/first>=0;}};},PSEUDO:function PSEUDO(pseudo,argument){// pseudo-class names are case-insensitive
  // https://www.w3.org/TR/selectors/#pseudo-classes
  // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
  // Remember that setFilters inherits from pseudos
  var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||find.error("unsupported pseudo: "+pseudo);// The user may use createPseudo to indicate that
  // arguments are needed to create the filter function
  // just as jQuery does
  if(fn[expando]){return fn(argument);}// But maintain support for old signatures
  if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf.call(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i]);}}):function(elem){return fn(elem,0,args);};}return fn;}},pseudos:{// Potentially complex pseudos
  not:markFunction(function(selector){// Trim the selector passed to compile
  // to avoid treating leading and trailing
  // spaces as combinators
  var input=[],results=[],matcher=compile(selector.replace(rtrimCSS,"$1"));return matcher[expando]?markFunction(function(seed,matches,_context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;// Match elements unmatched by `matcher`
  while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem);}}}):function(elem,_context,xml){input[0]=elem;matcher(input,null,xml,results);// Don't keep the element
  // (see https://github.com/jquery/sizzle/issues/299)
  input[0]=null;return !results.pop();};}),has:markFunction(function(selector){return function(elem){return find(selector,elem).length>0;};}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return (elem.textContent||jQuery.text(elem)).indexOf(text)>-1;};}),// "Whether an element is represented by a :lang() selector
  // is based solely on the element's language value
  // being equal to the identifier C,
  // or beginning with the identifier C immediately followed by "-".
  // The matching of C against the element's language value is performed case-insensitively.
  // The identifier C does not have to be a valid language name."
  // https://www.w3.org/TR/selectors/#lang-pseudo
  lang:markFunction(function(lang){// lang value must be a valid identifier
  if(!ridentifier.test(lang||"")){find.error("unsupported lang: "+lang);}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0;}}while((elem=elem.parentNode)&&elem.nodeType===1);return false;};}),// Miscellaneous
  target:function target(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id;},root:function root(elem){return elem===documentElement;},focus:function focus(elem){return elem===safeActiveElement()&&document.hasFocus()&&!!(elem.type||elem.href||~elem.tabIndex);},// Boolean properties
  enabled:createDisabledPseudo(false),disabled:createDisabledPseudo(true),checked:function checked(elem){// In CSS3, :checked should return both checked and selected elements
  // https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
  return nodeName(elem,"input")&&!!elem.checked||nodeName(elem,"option")&&!!elem.selected;},selected:function selected(elem){// Support: IE <=11+
  // Accessing the selectedIndex property
  // forces the browser to treat the default option as
  // selected when in an optgroup.
  if(elem.parentNode){// eslint-disable-next-line no-unused-expressions
  elem.parentNode.selectedIndex;}return elem.selected===true;},// Contents
  empty:function empty(elem){// https://www.w3.org/TR/selectors/#empty-pseudo
  // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
  //   but not by others (comment: 8; processing instruction: 7; etc.)
  // nodeType < 6 works because attributes (2) do not appear as children
  for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false;}}return true;},parent:function parent(elem){return !Expr.pseudos.empty(elem);},// Element/input types
  header:function header(elem){return rheader.test(elem.nodeName);},input:function input(elem){return rinputs.test(elem.nodeName);},button:function button(elem){return nodeName(elem,"input")&&elem.type==="button"||nodeName(elem,"button");},text:function text(elem){var attr;return nodeName(elem,"input")&&elem.type==="text"&&(// Support: IE <10 only
  // New HTML5 attribute values (e.g., "search") appear
  // with elem.type === "text"
  (attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text");},// Position-in-collection
  first:createPositionalPseudo(function(){return [0];}),last:createPositionalPseudo(function(_matchIndexes,length){return [length-1];}),eq:createPositionalPseudo(function(_matchIndexes,length,argument){return [argument<0?argument+length:argument];}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i<length;i+=2){matchIndexes.push(i);}return matchIndexes;}),odd:createPositionalPseudo(function(matchIndexes,length){var i=1;for(;i<length;i+=2){matchIndexes.push(i);}return matchIndexes;}),lt:createPositionalPseudo(function(matchIndexes,length,argument){var i;if(argument<0){i=argument+length;}else if(argument>length){i=length;}else {i=argument;}for(;--i>=0;){matchIndexes.push(i);}return matchIndexes;}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i<length;){matchIndexes.push(i);}return matchIndexes;})}};Expr.pseudos.nth=Expr.pseudos.eq;// Add button/input type pseudos
  for(i in {radio:true,checkbox:true,file:true,password:true,image:true}){Expr.pseudos[i]=createInputPseudo(i);}for(i in {submit:true,reset:true}){Expr.pseudos[i]=createButtonPseudo(i);}// Easy API for creating new setFilters
  function setFilters(){}setFilters.prototype=Expr.filters=Expr.pseudos;Expr.setFilters=new setFilters();function tokenize(selector,parseOnly){var matched,match,tokens,type,soFar,groups,preFilters,cached=tokenCache[selector+" "];if(cached){return parseOnly?0:cached.slice(0);}soFar=selector;groups=[];preFilters=Expr.preFilter;while(soFar){// Comma and first run
  if(!matched||(match=rcomma.exec(soFar))){if(match){// Don't consume trailing commas as valid
  soFar=soFar.slice(match[0].length)||soFar;}groups.push(tokens=[]);}matched=false;// Combinators
  if(match=rleadingCombinator.exec(soFar)){matched=match.shift();tokens.push({value:matched,// Cast descendant combinators to space
  type:match[0].replace(rtrimCSS," ")});soFar=soFar.slice(matched.length);}// Filters
  for(type in Expr.filter){if((match=matchExpr[type].exec(soFar))&&(!preFilters[type]||(match=preFilters[type](match)))){matched=match.shift();tokens.push({value:matched,type:type,matches:match});soFar=soFar.slice(matched.length);}}if(!matched){break;}}// Return the length of the invalid excess
  // if we're just parsing
  // Otherwise, throw an error or return tokens
  if(parseOnly){return soFar.length;}return soFar?find.error(selector):// Cache the tokens
  tokenCache(selector,groups).slice(0);}function toSelector(tokens){var i=0,len=tokens.length,selector="";for(;i<len;i++){selector+=tokens[i].value;}return selector;}function addCombinator(matcher,combinator,base){var dir=combinator.dir,skip=combinator.next,key=skip||dir,checkNonElements=base&&key==="parentNode",doneName=done++;return combinator.first?// Check against closest ancestor/preceding element
  function(elem,context,xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){return matcher(elem,context,xml);}}return false;}:// Check against all ancestor/preceding elements
  function(elem,context,xml){var oldCache,outerCache,newCache=[dirruns,doneName];// We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
  if(xml){while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){if(matcher(elem,context,xml)){return true;}}}}else {while(elem=elem[dir]){if(elem.nodeType===1||checkNonElements){outerCache=elem[expando]||(elem[expando]={});if(skip&&nodeName(elem,skip)){elem=elem[dir]||elem;}else if((oldCache=outerCache[key])&&oldCache[0]===dirruns&&oldCache[1]===doneName){// Assign to newCache so results back-propagate to previous elements
  return newCache[2]=oldCache[2];}else {// Reuse newcache so results back-propagate to previous elements
  outerCache[key]=newCache;// A match means we're done; a fail means we have to keep checking
  if(newCache[2]=matcher(elem,context,xml)){return true;}}}}}return false;};}function elementMatcher(matchers){return matchers.length>1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false;}}return true;}:matchers[0];}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i<len;i++){find(selector,contexts[i],results);}return results;}function condense(unmatched,map,filter,context,xml){var elem,newUnmatched=[],i=0,len=unmatched.length,mapped=map!=null;for(;i<len;i++){if(elem=unmatched[i]){if(!filter||filter(elem,context,xml)){newUnmatched.push(elem);if(mapped){map.push(i);}}}}return newUnmatched;}function setMatcher(preFilter,selector,matcher,postFilter,postFinder,postSelector){if(postFilter&&!postFilter[expando]){postFilter=setMatcher(postFilter);}if(postFinder&&!postFinder[expando]){postFinder=setMatcher(postFinder,postSelector);}return markFunction(function(seed,results,context,xml){var temp,i,elem,matcherOut,preMap=[],postMap=[],preexisting=results.length,// Get initial elements from seed or context
  elems=seed||multipleContexts(selector||"*",context.nodeType?[context]:context,[]),// Prefilter to get matcher input, preserving a map for seed-results synchronization
  matcherIn=preFilter&&(seed||!selector)?condense(elems,preMap,preFilter,context,xml):elems;if(matcher){// If we have a postFinder, or filtered seed, or non-seed postFilter
  // or preexisting results,
  matcherOut=postFinder||(seed?preFilter:preexisting||postFilter)?// ...intermediate processing is necessary
  []:// ...otherwise use results directly
  results;// Find primary matches
  matcher(matcherIn,matcherOut,context,xml);}else {matcherOut=matcherIn;}// Apply postFilter
  if(postFilter){temp=condense(matcherOut,postMap);postFilter(temp,[],context,xml);// Un-match failing elements by moving them back to matcherIn
  i=temp.length;while(i--){if(elem=temp[i]){matcherOut[postMap[i]]=!(matcherIn[postMap[i]]=elem);}}}if(seed){if(postFinder||preFilter){if(postFinder){// Get the final matcherOut by condensing this intermediate into postFinder contexts
  temp=[];i=matcherOut.length;while(i--){if(elem=matcherOut[i]){// Restore matcherIn since elem is not yet a final match
  temp.push(matcherIn[i]=elem);}}postFinder(null,matcherOut=[],temp,xml);}// Move matched elements from seed to results to keep them synchronized
  i=matcherOut.length;while(i--){if((elem=matcherOut[i])&&(temp=postFinder?indexOf.call(seed,elem):preMap[i])>-1){seed[temp]=!(results[temp]=elem);}}}// Add elements to results, through postFinder if defined
  }else {matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml);}else {push.apply(results,matcherOut);}}});}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,// The foundational matcher ensures that elements are reachable from top-level context(s)
  matchContext=addCombinator(function(elem){return elem===checkContext;},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1;},implicitRelative,true),matchers=[function(elem,context,xml){// Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  var ret=!leadingRelative&&(xml||context!=outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));// Avoid hanging onto element
  // (see https://github.com/jquery/sizzle/issues/299)
  checkContext=null;return ret;}];for(;i<len;i++){if(matcher=Expr.relative[tokens[i].type]){matchers=[addCombinator(elementMatcher(matchers),matcher)];}else {matcher=Expr.filter[tokens[i].type].apply(null,tokens[i].matches);// Return special upon seeing a positional matcher
  if(matcher[expando]){// Find the next relative operator (if any) for proper handling
  j=++i;for(;j<len;j++){if(Expr.relative[tokens[j].type]){break;}}return setMatcher(i>1&&elementMatcher(matchers),i>1&&toSelector(// If the preceding token was a descendant combinator, insert an implicit any-element `*`
  tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrimCSS,"$1"),matcher,i<j&&matcherFromTokens(tokens.slice(i,j)),j<len&&matcherFromTokens(tokens=tokens.slice(j)),j<len&&toSelector(tokens));}matchers.push(matcher);}}return elementMatcher(matchers);}function matcherFromGroupMatchers(elementMatchers,setMatchers){var bySet=setMatchers.length>0,byElement=elementMatchers.length>0,superMatcher=function superMatcher(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,// We must always have either seed elements or outermost context
  elems=seed||byElement&&Expr.find.TAG("*",outermost),// Use integer dirruns iff this is the outermost matcher
  dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||0.1,len=elems.length;if(outermost){// Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  outermostContext=context==document||context||outermost;}// Add elements passing elementMatchers directly to results
  // Support: iOS <=7 - 9 only
  // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching
  // elements by id. (see trac-14142)
  for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;// Support: IE 11+, Edge 17 - 18+
  // IE/Edge sometimes throw a "Permission denied" error when strict-comparing
  // two documents; shallow comparisons work.
  // eslint-disable-next-line eqeqeq
  if(!context&&elem.ownerDocument!=document){setDocument(elem);xml=!documentIsHTML;}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document,xml)){push.call(results,elem);break;}}if(outermost){dirruns=dirrunsUnique;}}// Track unmatched elements for set filters
  if(bySet){// They will have gone through all possible matchers
  if(elem=!matcher&&elem){matchedCount--;}// Lengthen the array for every element, matched or not
  if(seed){unmatched.push(elem);}}}// `i` is now the count of elements visited above, and adding it to `matchedCount`
  // makes the latter nonnegative.
  matchedCount+=i;// Apply set filters to unmatched elements
  // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
  // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
  // no element matchers and no seed.
  // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
  // case, which will result in a "00" `matchedCount` that differs from `i` but is also
  // numerically zero.
  if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml);}if(seed){// Reintegrate element matches to eliminate the need for sorting
  if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results);}}}// Discard index placeholder values to get only actual matches
  setMatched=condense(setMatched);}// Add matches to results
  push.apply(results,setMatched);// Seedless set matches succeeding multiple successful matchers stipulate sorting
  if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){jQuery.uniqueSort(results);}}// Override manipulation of globals by nested matchers
  if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup;}return unmatched;};return bySet?markFunction(superMatcher):superMatcher;}function compile(selector,match/* Internal Use Only */){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){// Generate a function of recursive functions that can be used to check each element
  if(!match){match=tokenize(selector);}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached);}else {elementMatchers.push(cached);}}// Cache the compiled function
  cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));// Save selector and tokenization
  cached.selector=selector;}return cached;}/**
  		       * A low-level selection function that works with jQuery's compiled
  		       *  selector functions
  		       * @param {String|Function} selector A selector or a pre-compiled
  		       *  selector function built with jQuery selector compile
  		       * @param {Element} context
  		       * @param {Array} [results]
  		       * @param {Array} [seed] A set of elements to match against
  		       */function select(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];// Try to minimize operations if there is only one selector in the list and no seed
  // (the latter of which guarantees us context)
  if(match.length===1){// Reduce context if the leading compound selector is an ID
  tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results;// Precompiled matchers will still verify ancestry, so step up a level
  }else if(compiled){context=context.parentNode;}selector=selector.slice(tokens.shift().value.length);}// Fetch a seed set for right-to-left matching
  i=matchExpr.needsContext.test(selector)?0:tokens.length;while(i--){token=tokens[i];// Abort if we hit a combinator
  if(Expr.relative[type=token.type]){break;}if(find=Expr.find[type]){// Search, expanding context for leading sibling combinators
  if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){// If seed is empty or no tokens remain, we can return early
  tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results;}break;}}}}// Compile and execute a filtering function if one is not provided
  // Provide `match` to avoid retokenization if we modified the selector above
  (compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results;}// One-time assignments
  // Support: Android <=4.0 - 4.1+
  // Sort stability
  support.sortStable=expando.split("").sort(sortOrder).join("")===expando;// Initialize against the default document
  setDocument();// Support: Android <=4.0 - 4.1+
  // Detached nodes confoundingly follow *each other*
  support.sortDetached=assert(function(el){// Should return 1, but returns 4 (following)
  return el.compareDocumentPosition(document.createElement("fieldset"))&1;});jQuery.find=find;// Deprecated
  jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=jQuery.uniqueSort;// These have always been private, but they used to be documented as part of
  // Sizzle so let's maintain them for now for backwards compatibility purposes.
  find.compile=compile;find.select=select;find.setDocument=setDocument;find.tokenize=tokenize;find.escape=jQuery.escapeSelector;find.getText=jQuery.text;find.isXML=jQuery.isXMLDoc;find.selectors=jQuery.expr;find.support=jQuery.support;find.uniqueSort=jQuery.uniqueSort;/* eslint-enable */})();var dir=function dir(elem,_dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[_dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break;}matched.push(elem);}}return matched;};var _siblings=function siblings(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n);}}return matched;};var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;// Implement the identical functionality for filter and not
  function winnow(elements,qualifier,not){if(isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return !!qualifier.call(elem,i,elem)!==not;});}// Single element
  if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not;});}// Arraylike of elements (jQuery, arguments, Array)
  if(typeof qualifier!=="string"){return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not;});}// Filtered directly for both simple and complex selectors
  return jQuery.filter(qualifier,elements,not);}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")";}if(elems.length===1&&elem.nodeType===1){return jQuery.find.matchesSelector(elem,expr)?[elem]:[];}return jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1;}));};jQuery.fn.extend({find:function find(selector){var i,ret,len=this.length,self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i<len;i++){if(jQuery.contains(self[i],this)){return true;}}}));}ret=this.pushStack([]);for(i=0;i<len;i++){jQuery.find(selector,self[i],ret);}return len>1?jQuery.uniqueSort(ret):ret;},filter:function filter(selector){return this.pushStack(winnow(this,selector||[],false));},not:function not(selector){return this.pushStack(winnow(this,selector||[],true));},is:function is(selector){return !!winnow(this,// If this is a positional/relative selector, check membership in the returned set
  // so $("p:first").is("p:last") won't return true for a doc with two "p".
  typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length;}});// Initialize a jQuery object
  // A central reference to the root jQuery(document)
  var rootjQuery,// A simple way to check for HTML strings
  // Prioritize #id over <tag> to avoid XSS via location.hash (trac-9521)
  // Strict HTML recognition (trac-11290: must start with <)
  // Shortcut simple #id case for speed
  rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;// HANDLE: $(""), $(null), $(undefined), $(false)
  if(!selector){return this;}// Method init() accepts an alternate rootjQuery
  // so migrate can support jQuery.sub (gh-2101)
  root=root||rootjQuery;// Handle HTML strings
  if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){// Assume that strings that start and end with <> are HTML and skip the regex check
  match=[null,selector,null];}else {match=rquickExpr.exec(selector);}// Match html or make sure no context is specified for #id
  if(match&&(match[1]||!context)){// HANDLE: $(html) -> $(array)
  if(match[1]){context=context instanceof jQuery?context[0]:context;// Option to run scripts is true for back-compat
  // Intentionally let the error be thrown if parseHTML is not present
  jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));// HANDLE: $(html, props)
  if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){// Properties of context are called as methods if possible
  if(isFunction(this[match])){this[match](context[match]);// ...and otherwise set as attributes
  }else {this.attr(match,context[match]);}}}return this;// HANDLE: $(#id)
  }else {elem=document.getElementById(match[2]);if(elem){// Inject the element directly into the jQuery object
  this[0]=elem;this.length=1;}return this;}// HANDLE: $(expr, $(...))
  }else if(!context||context.jquery){return (context||root).find(selector);// HANDLE: $(expr, context)
  // (which is just equivalent to: $(context).find(expr)
  }else {return this.constructor(context).find(selector);}// HANDLE: $(DOMElement)
  }else if(selector.nodeType){this[0]=selector;this.length=1;return this;// HANDLE: $(function)
  // Shortcut for document ready
  }else if(isFunction(selector)){return root.ready!==undefined?root.ready(selector):// Execute immediately if ready is not present
  selector(jQuery);}return jQuery.makeArray(selector,this);};// Give the init function the jQuery prototype for later instantiation
  init.prototype=jQuery.fn;// Initialize central reference
  rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,// Methods guaranteed to produce a unique set when starting from a unique set
  guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function has(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i<l;i++){if(jQuery.contains(this,targets[i])){return true;}}});},closest:function closest(selectors,context){var cur,i=0,l=this.length,matched=[],targets=typeof selectors!=="string"&&jQuery(selectors);// Positional selectors never match, since there's no _selection_ context
  if(!rneedsContext.test(selectors)){for(;i<l;i++){for(cur=this[i];cur&&cur!==context;cur=cur.parentNode){// Always skip document fragments
  if(cur.nodeType<11&&(targets?targets.index(cur)>-1:// Don't pass non-elements to jQuery#find
  cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break;}}}}return this.pushStack(matched.length>1?jQuery.uniqueSort(matched):matched);},// Determine the position of an element within the set
  index:function index(elem){// No argument, return index in parent
  if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1;}// Index in selector
  if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0]);}// Locate the position of the desired element
  return indexOf.call(this,// If it receives a jQuery object, the first element is used
  elem.jquery?elem[0]:elem);},add:function add(selector,context){return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(),jQuery(selector,context))));},addBack:function addBack(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector));}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur;}jQuery.each({parent:function parent(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null;},parents:function parents(elem){return dir(elem,"parentNode");},parentsUntil:function parentsUntil(elem,_i,until){return dir(elem,"parentNode",until);},next:function next(elem){return sibling(elem,"nextSibling");},prev:function prev(elem){return sibling(elem,"previousSibling");},nextAll:function nextAll(elem){return dir(elem,"nextSibling");},prevAll:function prevAll(elem){return dir(elem,"previousSibling");},nextUntil:function nextUntil(elem,_i,until){return dir(elem,"nextSibling",until);},prevUntil:function prevUntil(elem,_i,until){return dir(elem,"previousSibling",until);},siblings:function siblings(elem){return _siblings((elem.parentNode||{}).firstChild,elem);},children:function children(elem){return _siblings(elem.firstChild);},contents:function contents(elem){if(elem.contentDocument!=null&&// Support: IE 11+
  // <object> elements with no `data` attribute has an object
  // `contentDocument` with a `null` prototype.
  getProto(elem.contentDocument)){return elem.contentDocument;}// Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only
  // Treat the template element as a regular one in browsers that
  // don't support it.
  if(nodeName(elem,"template")){elem=elem.content||elem;}return jQuery.merge([],elem.childNodes);}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until;}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched);}if(this.length>1){// Remove duplicates
  if(!guaranteedUnique[name]){jQuery.uniqueSort(matched);}// Reverse order for parents* and prev-derivatives
  if(rparentsprev.test(name)){matched.reverse();}}return this.pushStack(matched);};});var rnothtmlwhite=/[^\x20\t\r\n\f]+/g;// Convert String-formatted options into Object-formatted ones
  function createOptions(options){var object={};jQuery.each(options.match(rnothtmlwhite)||[],function(_,flag){object[flag]=true;});return object;}/*
  		     * Create a callback list using the following parameters:
  		     *
  		     *	options: an optional list of space-separated options that will change how
  		     *			the callback list behaves or a more traditional option object
  		     *
  		     * By default a callback list will act like an event callback list and can be
  		     * "fired" multiple times.
  		     *
  		     * Possible options:
  		     *
  		     *	once:			will ensure the callback list can only be fired once (like a Deferred)
  		     *
  		     *	memory:			will keep track of previous values and will call any callback added
  		     *					after the list has been fired right away with the latest "memorized"
  		     *					values (like a Deferred)
  		     *
  		     *	unique:			will ensure a callback can only be added once (no duplicate in the list)
  		     *
  		     *	stopOnFalse:	interrupt callings when a callback returns false
  		     *
  		     */jQuery.Callbacks=function(options){// Convert options from String-formatted to Object-formatted if needed
  // (we check in cache first)
  options=typeof options==="string"?createOptions(options):jQuery.extend({},options);var// Flag to know if list is currently firing
  firing,// Last fire value for non-forgettable lists
  memory,// Flag to know if list was already fired
  _fired,// Flag to prevent firing
  _locked,// Actual callback list
  list=[],// Queue of execution data for repeatable lists
  queue=[],// Index of currently firing callback (modified by add/remove as needed)
  firingIndex=-1,// Fire callbacks
  fire=function fire(){// Enforce single-firing
  _locked=_locked||options.once;// Execute callbacks for all pending executions,
  // respecting firingIndex overrides and runtime changes
  _fired=firing=true;for(;queue.length;firingIndex=-1){memory=queue.shift();while(++firingIndex<list.length){// Run callback and check for early termination
  if(list[firingIndex].apply(memory[0],memory[1])===false&&options.stopOnFalse){// Jump to end and forget the data so .add doesn't re-fire
  firingIndex=list.length;memory=false;}}}// Forget the data if we're done with it
  if(!options.memory){memory=false;}firing=false;// Clean up if we're done firing for good
  if(_locked){// Keep an empty list if we have data for future add calls
  if(memory){list=[];// Otherwise, this object is spent
  }else {list="";}}},// Actual Callbacks object
  self={// Add a callback or a collection of callbacks to the list
  add:function add(){if(list){// If we have memory from a past run, we should fire after adding
  if(memory&&!firing){firingIndex=list.length-1;queue.push(memory);}(function add(args){jQuery.each(args,function(_,arg){if(isFunction(arg)){if(!options.unique||!self.has(arg)){list.push(arg);}}else if(arg&&arg.length&&toType(arg)!=="string"){// Inspect recursively
  add(arg);}});})(arguments);if(memory&&!firing){fire();}}return this;},// Remove a callback from the list
  remove:function remove(){jQuery.each(arguments,function(_,arg){var index;while((index=jQuery.inArray(arg,list,index))>-1){list.splice(index,1);// Handle firing indexes
  if(index<=firingIndex){firingIndex--;}}});return this;},// Check if a given callback is in the list.
  // If no argument is given, return whether or not list has callbacks attached.
  has:function has(fn){return fn?jQuery.inArray(fn,list)>-1:list.length>0;},// Remove all callbacks from the list
  empty:function empty(){if(list){list=[];}return this;},// Disable .fire and .add
  // Abort any current/pending executions
  // Clear all callbacks and values
  disable:function disable(){_locked=queue=[];list=memory="";return this;},disabled:function disabled(){return !list;},// Disable .fire
  // Also disable .add unless we have memory (since it would have no effect)
  // Abort any pending executions
  lock:function lock(){_locked=queue=[];if(!memory&&!firing){list=memory="";}return this;},locked:function locked(){return !!_locked;},// Call all callbacks with the given context and arguments
  fireWith:function fireWith(context,args){if(!_locked){args=args||[];args=[context,args.slice?args.slice():args];queue.push(args);if(!firing){fire();}}return this;},// Call all the callbacks with the given arguments
  fire:function fire(){self.fireWith(this,arguments);return this;},// To know if the callbacks have already been called at least once
  fired:function fired(){return !!_fired;}};return self;};function Identity(v){return v;}function Thrower(ex){throw ex;}function adoptValue(value,resolve,reject,noValue){var method;try{// Check for promise aspect first to privilege synchronous behavior
  if(value&&isFunction(method=value.promise)){method.call(value).done(resolve).fail(reject);// Other thenables
  }else if(value&&isFunction(method=value.then)){method.call(value,resolve,reject);// Other non-thenables
  }else {// Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer:
  // * false: [ value ].slice( 0 ) => resolve( value )
  // * true: [ value ].slice( 1 ) => resolve()
  resolve.apply(undefined,[value].slice(noValue));}// For Promises/A+, convert exceptions into rejections
  // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in
  // Deferred#then to conditionally suppress rejection.
  }catch(value){// Support: Android 4.0 only
  // Strict mode functions invoked without .call/.apply get global-object context
  reject.apply(undefined,[value]);}}jQuery.extend({Deferred:function Deferred(func){var tuples=[// action, add listener, callbacks,
  // ... .then handlers, argument index, [final state]
  ["notify","progress",jQuery.Callbacks("memory"),jQuery.Callbacks("memory"),2],["resolve","done",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),0,"resolved"],["reject","fail",jQuery.Callbacks("once memory"),jQuery.Callbacks("once memory"),1,"rejected"]],_state="pending",_promise={state:function state(){return _state;},always:function always(){deferred.done(arguments).fail(arguments);return this;},"catch":function _catch(fn){return _promise.then(null,fn);},// Keep pipe for back-compat
  pipe:function pipe(/* fnDone, fnFail, fnProgress */){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(_i,tuple){// Map tuples (progress, done, fail) to arguments (done, fail, progress)
  var fn=isFunction(fns[tuple[4]])&&fns[tuple[4]];// deferred.progress(function() { bind to newDefer or newDefer.notify })
  // deferred.done(function() { bind to newDefer or newDefer.resolve })
  // deferred.fail(function() { bind to newDefer or newDefer.reject })
  deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&isFunction(returned.promise)){returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);}else {newDefer[tuple[0]+"With"](this,fn?[returned]:arguments);}});});fns=null;}).promise();},then:function then(onFulfilled,onRejected,onProgress){var maxDepth=0;function resolve(depth,deferred,handler,special){return function(){var that=this,args=arguments,mightThrow=function mightThrow(){var returned,then;// Support: Promises/A+ section 2.3.3.3.3
  // https://promisesaplus.com/#point-59
  // Ignore double-resolution attempts
  if(depth<maxDepth){return;}returned=handler.apply(that,args);// Support: Promises/A+ section 2.3.1
  // https://promisesaplus.com/#point-48
  if(returned===deferred.promise()){throw new TypeError("Thenable self-resolution");}// Support: Promises/A+ sections 2.3.3.1, 3.5
  // https://promisesaplus.com/#point-54
  // https://promisesaplus.com/#point-75
  // Retrieve `then` only once
  then=returned&&(// Support: Promises/A+ section 2.3.4
  // https://promisesaplus.com/#point-64
  // Only check objects and functions for thenability
  _typeof(returned)==="object"||typeof returned==="function")&&returned.then;// Handle a returned thenable
  if(isFunction(then)){// Special processors (notify) just wait for resolution
  if(special){then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special));// Normal processors (resolve) also hook into progress
  }else {// ...and disregard older resolution values
  maxDepth++;then.call(returned,resolve(maxDepth,deferred,Identity,special),resolve(maxDepth,deferred,Thrower,special),resolve(maxDepth,deferred,Identity,deferred.notifyWith));}// Handle all other returned values
  }else {// Only substitute handlers pass on context
  // and multiple values (non-spec behavior)
  if(handler!==Identity){that=undefined;args=[returned];}// Process the value(s)
  // Default process is resolve
  (special||deferred.resolveWith)(that,args);}},// Only normal processors (resolve) catch and reject exceptions
  process=special?mightThrow:function(){try{mightThrow();}catch(e){if(jQuery.Deferred.exceptionHook){jQuery.Deferred.exceptionHook(e,process.error);}// Support: Promises/A+ section 2.3.3.3.4.1
  // https://promisesaplus.com/#point-61
  // Ignore post-resolution exceptions
  if(depth+1>=maxDepth){// Only substitute handlers pass on context
  // and multiple values (non-spec behavior)
  if(handler!==Thrower){that=undefined;args=[e];}deferred.rejectWith(that,args);}}};// Support: Promises/A+ section 2.3.3.3.1
  // https://promisesaplus.com/#point-57
  // Re-resolve promises immediately to dodge false rejection from
  // subsequent errors
  if(depth){process();}else {// Call an optional hook to record the error, in case of exception
  // since it's otherwise lost when execution goes async
  if(jQuery.Deferred.getErrorHook){process.error=jQuery.Deferred.getErrorHook();// The deprecated alias of the above. While the name suggests
  // returning the stack, not an error instance, jQuery just passes
  // it directly to `console.warn` so both will work; an instance
  // just better cooperates with source maps.
  }else if(jQuery.Deferred.getStackHook){process.error=jQuery.Deferred.getStackHook();}window.setTimeout(process);}};}return jQuery.Deferred(function(newDefer){// progress_handlers.add( ... )
  tuples[0][3].add(resolve(0,newDefer,isFunction(onProgress)?onProgress:Identity,newDefer.notifyWith));// fulfilled_handlers.add( ... )
  tuples[1][3].add(resolve(0,newDefer,isFunction(onFulfilled)?onFulfilled:Identity));// rejected_handlers.add( ... )
  tuples[2][3].add(resolve(0,newDefer,isFunction(onRejected)?onRejected:Thrower));}).promise();},// Get a promise for this deferred
  // If obj is provided, the promise aspect is added to the object
  promise:function promise(obj){return obj!=null?jQuery.extend(obj,_promise):_promise;}},deferred={};// Add list-specific methods
  jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[5];// promise.progress = list.add
  // promise.done = list.add
  // promise.fail = list.add
  _promise[tuple[1]]=list.add;// Handle state
  if(stateString){list.add(function(){// state = "resolved" (i.e., fulfilled)
  // state = "rejected"
  _state=stateString;},// rejected_callbacks.disable
  // fulfilled_callbacks.disable
  tuples[3-i][2].disable,// rejected_handlers.disable
  // fulfilled_handlers.disable
  tuples[3-i][3].disable,// progress_callbacks.lock
  tuples[0][2].lock,// progress_handlers.lock
  tuples[0][3].lock);}// progress_handlers.fire
  // fulfilled_handlers.fire
  // rejected_handlers.fire
  list.add(tuple[3].fire);// deferred.notify = function() { deferred.notifyWith(...) }
  // deferred.resolve = function() { deferred.resolveWith(...) }
  // deferred.reject = function() { deferred.rejectWith(...) }
  deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?undefined:this,arguments);return this;};// deferred.notifyWith = list.fireWith
  // deferred.resolveWith = list.fireWith
  // deferred.rejectWith = list.fireWith
  deferred[tuple[0]+"With"]=list.fireWith;});// Make the deferred a promise
  _promise.promise(deferred);// Call given func if any
  if(func){func.call(deferred,deferred);}// All done!
  return deferred;},// Deferred helper
  when:function when(singleValue){var// count of uncompleted subordinates
  remaining=arguments.length,// count of unprocessed arguments
  i=remaining,// subordinate fulfillment data
  resolveContexts=Array(i),resolveValues=_slice.call(arguments),// the primary Deferred
  primary=jQuery.Deferred(),// subordinate callback factory
  updateFunc=function updateFunc(i){return function(value){resolveContexts[i]=this;resolveValues[i]=arguments.length>1?_slice.call(arguments):value;if(! --remaining){primary.resolveWith(resolveContexts,resolveValues);}};};// Single- and empty arguments are adopted like Promise.resolve
  if(remaining<=1){adoptValue(singleValue,primary.done(updateFunc(i)).resolve,primary.reject,!remaining);// Use .then() to unwrap secondary thenables (cf. gh-3000)
  if(primary.state()==="pending"||isFunction(resolveValues[i]&&resolveValues[i].then)){return primary.then();}}// Multiple arguments are aggregated like Promise.all array elements
  while(i--){adoptValue(resolveValues[i],updateFunc(i),primary.reject);}return primary.promise();}});// These usually indicate a programmer mistake during development,
  // warn about them ASAP rather than swallowing them by default.
  var rerrorNames=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error
  // captured before the async barrier to get the original error cause
  // which may otherwise be hidden.
  jQuery.Deferred.exceptionHook=function(error,asyncError){// Support: IE 8 - 9 only
  // Console exists when dev tools are open, which can happen at any time
  if(window.console&&window.console.warn&&error&&rerrorNames.test(error.name)){window.console.warn("jQuery.Deferred exception: "+error.message,error.stack,asyncError);}};jQuery.readyException=function(error){window.setTimeout(function(){throw error;});};// The deferred used on DOM ready
  var readyList=jQuery.Deferred();jQuery.fn.ready=function(fn){readyList.then(fn)// Wrap jQuery.readyException in a function so that the lookup
  // happens at the time of error handling instead of callback
  // registration.
  ["catch"](function(error){jQuery.readyException(error);});return this;};jQuery.extend({// Is the DOM ready to be used? Set to true once it occurs.
  isReady:false,// A counter to track how many items to wait for before
  // the ready event fires. See trac-6781
  readyWait:1,// Handle when the DOM is ready
  ready:function ready(wait){// Abort if there are pending holds or we're already ready
  if(wait===true?--jQuery.readyWait:jQuery.isReady){return;}// Remember that the DOM is ready
  jQuery.isReady=true;// If a normal DOM Ready event fired, decrement, and wait if need be
  if(wait!==true&&--jQuery.readyWait>0){return;}// If there are functions bound, to execute
  readyList.resolveWith(document,[jQuery]);}});jQuery.ready.then=readyList.then;// The ready event handler and self cleanup method
  function completed(){document.removeEventListener("DOMContentLoaded",completed);window.removeEventListener("load",completed);jQuery.ready();}// Catch cases where $(document).ready() is called
  // after the browser event has already occurred.
  // Support: IE <=9 - 10 only
  // Older IE sometimes signals "interactive" too soon
  if(document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll){// Handle it asynchronously to allow scripts the opportunity to delay ready
  window.setTimeout(jQuery.ready);}else {// Use the handy event callback
  document.addEventListener("DOMContentLoaded",completed);// A fallback to window.onload, that will always work
  window.addEventListener("load",completed);}// Multifunctional method to get and set values of a collection
  // The value/s can optionally be executed if it's a function
  var access=function access(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;// Sets many values
  if(toType(key)==="object"){chainable=true;for(i in key){access(elems,fn,i,key[i],true,emptyGet,raw);}// Sets one value
  }else if(value!==undefined){chainable=true;if(!isFunction(value)){raw=true;}if(bulk){// Bulk operations run against the entire set
  if(raw){fn.call(elems,value);fn=null;// ...except when executing function values
  }else {bulk=fn;fn=function fn(elem,_key,value){return bulk.call(jQuery(elem),value);};}}if(fn){for(;i<len;i++){fn(elems[i],key,raw?value:value.call(elems[i],i,fn(elems[i],key)));}}}if(chainable){return elems;}// Gets
  if(bulk){return fn.call(elems);}return len?fn(elems[0],key):emptyGet;};// Matches dashed string for camelizing
  var rmsPrefix=/^-ms-/,rdashAlpha=/-([a-z])/g;// Used by camelCase as callback to replace()
  function fcamelCase(_all,letter){return letter.toUpperCase();}// Convert dashed to camelCase; used by the css and data modules
  // Support: IE <=9 - 11, Edge 12 - 15
  // Microsoft forgot to hump their vendor prefix (trac-9572)
  function camelCase(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase);}var acceptData=function acceptData(owner){// Accepts only:
  //  - Node
  //    - Node.ELEMENT_NODE
  //    - Node.DOCUMENT_NODE
  //  - Object
  //    - Any
  return owner.nodeType===1||owner.nodeType===9||!+owner.nodeType;};function Data(){this.expando=jQuery.expando+Data.uid++;}Data.uid=1;Data.prototype={cache:function cache(owner){// Check if the owner object already has a cache
  var value=owner[this.expando];// If not, create one
  if(!value){value={};// We can accept data for non-element nodes in modern browsers,
  // but we should not, see trac-8335.
  // Always return an empty object.
  if(acceptData(owner)){// If it is a node unlikely to be stringify-ed or looped over
  // use plain assignment
  if(owner.nodeType){owner[this.expando]=value;// Otherwise secure it in a non-enumerable property
  // configurable must be true to allow the property to be
  // deleted when data is removed
  }else {Object.defineProperty(owner,this.expando,{value:value,configurable:true});}}}return value;},set:function set(owner,data,value){var prop,cache=this.cache(owner);// Handle: [ owner, key, value ] args
  // Always use camelCase key (gh-2257)
  if(typeof data==="string"){cache[camelCase(data)]=value;// Handle: [ owner, { properties } ] args
  }else {// Copy the properties one-by-one to the cache object
  for(prop in data){cache[camelCase(prop)]=data[prop];}}return cache;},get:function get(owner,key){return key===undefined?this.cache(owner):// Always use camelCase key (gh-2257)
  owner[this.expando]&&owner[this.expando][camelCase(key)];},access:function access(owner,key,value){// In cases where either:
  //
  //   1. No key was specified
  //   2. A string key was specified, but no value provided
  //
  // Take the "read" path and allow the get method to determine
  // which value to return, respectively either:
  //
  //   1. The entire cache object
  //   2. The data stored at the key
  //
  if(key===undefined||key&&typeof key==="string"&&value===undefined){return this.get(owner,key);}// When the key is not a string, or both a key and value
  // are specified, set or extend (existing objects) with either:
  //
  //   1. An object of properties
  //   2. A key and value
  //
  this.set(owner,key,value);// Since the "set" path can have two possible entry points
  // return the expected data based on which path was taken[*]
  return value!==undefined?value:key;},remove:function remove(owner,key){var i,cache=owner[this.expando];if(cache===undefined){return;}if(key!==undefined){// Support array or space separated string of keys
  if(Array.isArray(key)){// If key is an array of keys...
  // We always set camelCase keys, so remove that.
  key=key.map(camelCase);}else {key=camelCase(key);// If a key with the spaces exists, use it.
  // Otherwise, create an array by matching non-whitespace
  key=key in cache?[key]:key.match(rnothtmlwhite)||[];}i=key.length;while(i--){delete cache[key[i]];}}// Remove the expando if there's no more data
  if(key===undefined||jQuery.isEmptyObject(cache)){// Support: Chrome <=35 - 45
  // Webkit & Blink performance suffers when deleting properties
  // from DOM nodes, so set to undefined instead
  // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted)
  if(owner.nodeType){owner[this.expando]=undefined;}else {delete owner[this.expando];}}},hasData:function hasData(owner){var cache=owner[this.expando];return cache!==undefined&&!jQuery.isEmptyObject(cache);}};var dataPriv=new Data();var dataUser=new Data();//	Implementation Summary
  //
  //	1. Enforce API surface and semantic compatibility with 1.9.x branch
  //	2. Improve the module's maintainability by reducing the storage
  //		paths to a single mechanism.
  //	3. Use the same single mechanism to support "private" and "user" data.
  //	4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
  //	5. Avoid exposing implementation details on user objects (eg. expando properties)
  //	6. Provide a clear path for implementation upgrade to WeakMap in 2014
  var rbrace=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,rmultiDash=/[A-Z]/g;function getData(data){if(data==="true"){return true;}if(data==="false"){return false;}if(data==="null"){return null;}// Only convert to a number if it doesn't change the string
  if(data===+data+""){return +data;}if(rbrace.test(data)){return JSON.parse(data);}return data;}function dataAttr(elem,key,data){var name;// If nothing was found internally, try to fetch any
  // data from the HTML5 data-* attribute
  if(data===undefined&&elem.nodeType===1){name="data-"+key.replace(rmultiDash,"-$&").toLowerCase();data=elem.getAttribute(name);if(typeof data==="string"){try{data=getData(data);}catch(e){}// Make sure we set the data so it isn't changed later
  dataUser.set(elem,key,data);}else {data=undefined;}}return data;}jQuery.extend({hasData:function hasData(elem){return dataUser.hasData(elem)||dataPriv.hasData(elem);},data:function data(elem,name,_data){return dataUser.access(elem,name,_data);},removeData:function removeData(elem,name){dataUser.remove(elem,name);},// TODO: Now that all calls to _data and _removeData have been replaced
  // with direct calls to dataPriv methods, these can be deprecated.
  _data:function _data(elem,name,data){return dataPriv.access(elem,name,data);},_removeData:function _removeData(elem,name){dataPriv.remove(elem,name);}});jQuery.fn.extend({data:function data(key,value){var i,name,data,elem=this[0],attrs=elem&&elem.attributes;// Gets all values
  if(key===undefined){if(this.length){data=dataUser.get(elem);if(elem.nodeType===1&&!dataPriv.get(elem,"hasDataAttrs")){i=attrs.length;while(i--){// Support: IE 11 only
  // The attrs elements can be null (trac-14894)
  if(attrs[i]){name=attrs[i].name;if(name.indexOf("data-")===0){name=camelCase(name.slice(5));dataAttr(elem,name,data[name]);}}}dataPriv.set(elem,"hasDataAttrs",true);}}return data;}// Sets multiple values
  if(_typeof(key)==="object"){return this.each(function(){dataUser.set(this,key);});}return access(this,function(value){var data;// The calling jQuery object (element matches) is not empty
  // (and therefore has an element appears at this[ 0 ]) and the
  // `value` parameter was not undefined. An empty jQuery object
  // will result in `undefined` for elem = this[ 0 ] which will
  // throw an exception if an attempt to read a data cache is made.
  if(elem&&value===undefined){// Attempt to get data from the cache
  // The key will always be camelCased in Data
  data=dataUser.get(elem,key);if(data!==undefined){return data;}// Attempt to "discover" the data in
  // HTML5 custom data-* attrs
  data=dataAttr(elem,key);if(data!==undefined){return data;}// We tried really hard, but the data doesn't exist.
  return;}// Set the data...
  this.each(function(){// We always store the camelCased key
  dataUser.set(this,key,value);});},null,value,arguments.length>1,null,true);},removeData:function removeData(key){return this.each(function(){dataUser.remove(this,key);});}});jQuery.extend({queue:function queue(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=dataPriv.get(elem,type);// Speed up dequeue by getting out quickly if this is just a lookup
  if(data){if(!queue||Array.isArray(data)){queue=dataPriv.access(elem,type,jQuery.makeArray(data));}else {queue.push(data);}}return queue||[];}},dequeue:function dequeue(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function next(){jQuery.dequeue(elem,type);};// If the fx queue is dequeued, always remove the progress sentinel
  if(fn==="inprogress"){fn=queue.shift();startLength--;}if(fn){// Add a progress sentinel to prevent the fx queue from being
  // automatically dequeued
  if(type==="fx"){queue.unshift("inprogress");}// Clear up the last queue stop function
  delete hooks.stop;fn.call(elem,next,hooks);}if(!startLength&&hooks){hooks.empty.fire();}},// Not public - generate a queueHooks object, or return the current one
  _queueHooks:function _queueHooks(elem,type){var key=type+"queueHooks";return dataPriv.get(elem,key)||dataPriv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){dataPriv.remove(elem,[type+"queue",key]);})});}});jQuery.fn.extend({queue:function queue(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--;}if(arguments.length<setter){return jQuery.queue(this[0],type);}return data===undefined?this:this.each(function(){var queue=jQuery.queue(this,type,data);// Ensure a hooks for this queue
  jQuery._queueHooks(this,type);if(type==="fx"&&queue[0]!=="inprogress"){jQuery.dequeue(this,type);}});},dequeue:function dequeue(type){return this.each(function(){jQuery.dequeue(this,type);});},clearQueue:function clearQueue(type){return this.queue(type||"fx",[]);},// Get a promise resolved when queues of a certain type
  // are emptied (fx is the type by default)
  promise:function promise(type,obj){var tmp,count=1,defer=jQuery.Deferred(),elements=this,i=this.length,resolve=function resolve(){if(! --count){defer.resolveWith(elements,[elements]);}};if(typeof type!=="string"){obj=type;type=undefined;}type=type||"fx";while(i--){tmp=dataPriv.get(elements[i],type+"queueHooks");if(tmp&&tmp.empty){count++;tmp.empty.add(resolve);}}resolve();return defer.promise(obj);}});var pnum=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var rcssNum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i");var cssExpand=["Top","Right","Bottom","Left"];var documentElement=document.documentElement;var isAttached=function isAttached(elem){return jQuery.contains(elem.ownerDocument,elem);},composed={composed:true};// Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only
  // Check attachment across shadow DOM boundaries when possible (gh-3504)
  // Support: iOS 10.0-10.2 only
  // Early iOS 10 versions support `attachShadow` but not `getRootNode`,
  // leading to errors. We need to check for `getRootNode`.
  if(documentElement.getRootNode){isAttached=function isAttached(elem){return jQuery.contains(elem.ownerDocument,elem)||elem.getRootNode(composed)===elem.ownerDocument;};}var isHiddenWithinTree=function isHiddenWithinTree(elem,el){// isHiddenWithinTree might be called from jQuery#filter function;
  // in that case, element will be second argument
  elem=el||elem;// Inline style trumps all
  return elem.style.display==="none"||elem.style.display===""&&// Otherwise, check computed style
  // Support: Firefox <=43 - 45
  // Disconnected elements can have computed display: none, so first confirm that elem is
  // in the document.
  isAttached(elem)&&jQuery.css(elem,"display")==="none";};function adjustCSS(elem,prop,valueParts,tween){var adjusted,scale,maxIterations=20,currentValue=tween?function(){return tween.cur();}:function(){return jQuery.css(elem,prop,"");},initial=currentValue(),unit=valueParts&&valueParts[3]||(jQuery.cssNumber[prop]?"":"px"),// Starting value computation is required for potential unit mismatches
  initialInUnit=elem.nodeType&&(jQuery.cssNumber[prop]||unit!=="px"&&+initial)&&rcssNum.exec(jQuery.css(elem,prop));if(initialInUnit&&initialInUnit[3]!==unit){// Support: Firefox <=54
  // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144)
  initial=initial/2;// Trust units reported by jQuery.css
  unit=unit||initialInUnit[3];// Iteratively approximate from a nonzero starting point
  initialInUnit=+initial||1;while(maxIterations--){// Evaluate and update our best guess (doubling guesses that zero out).
  // Finish if the scale equals or crosses 1 (making the old*new product non-positive).
  jQuery.style(elem,prop,initialInUnit+unit);if((1-scale)*(1-(scale=currentValue()/initial||0.5))<=0){maxIterations=0;}initialInUnit=initialInUnit/scale;}initialInUnit=initialInUnit*2;jQuery.style(elem,prop,initialInUnit+unit);// Make sure we update the tween properties later on
  valueParts=valueParts||[];}if(valueParts){initialInUnit=+initialInUnit||+initial||0;// Apply relative offset (+=/-=) if specified
  adjusted=valueParts[1]?initialInUnit+(valueParts[1]+1)*valueParts[2]:+valueParts[2];if(tween){tween.unit=unit;tween.start=initialInUnit;tween.end=adjusted;}}return adjusted;}var defaultDisplayMap={};function getDefaultDisplay(elem){var temp,doc=elem.ownerDocument,nodeName=elem.nodeName,display=defaultDisplayMap[nodeName];if(display){return display;}temp=doc.body.appendChild(doc.createElement(nodeName));display=jQuery.css(temp,"display");temp.parentNode.removeChild(temp);if(display==="none"){display="block";}defaultDisplayMap[nodeName]=display;return display;}function showHide(elements,show){var display,elem,values=[],index=0,length=elements.length;// Determine new display value for elements that need to change
  for(;index<length;index++){elem=elements[index];if(!elem.style){continue;}display=elem.style.display;if(show){// Since we force visibility upon cascade-hidden elements, an immediate (and slow)
  // check is required in this first loop unless we have a nonempty display value (either
  // inline or about-to-be-restored)
  if(display==="none"){values[index]=dataPriv.get(elem,"display")||null;if(!values[index]){elem.style.display="";}}if(elem.style.display===""&&isHiddenWithinTree(elem)){values[index]=getDefaultDisplay(elem);}}else {if(display!=="none"){values[index]="none";// Remember what we're overwriting
  dataPriv.set(elem,"display",display);}}}// Set the display of the elements in a second loop to avoid constant reflow
  for(index=0;index<length;index++){if(values[index]!=null){elements[index].style.display=values[index];}}return elements;}jQuery.fn.extend({show:function show(){return showHide(this,true);},hide:function hide(){return showHide(this);},toggle:function toggle(state){if(typeof state==="boolean"){return state?this.show():this.hide();}return this.each(function(){if(isHiddenWithinTree(this)){jQuery(this).show();}else {jQuery(this).hide();}});}});var rcheckableType=/^(?:checkbox|radio)$/i;var rtagName=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;var rscriptType=/^$|^module$|\/(?:java|ecma)script/i;(function(){var fragment=document.createDocumentFragment(),div=fragment.appendChild(document.createElement("div")),input=document.createElement("input");// Support: Android 4.0 - 4.3 only
  // Check state lost if the name is set (trac-11217)
  // Support: Windows Web Apps (WWA)
  // `name` and `type` must use .setAttribute for WWA (trac-14901)
  input.setAttribute("type","radio");input.setAttribute("checked","checked");input.setAttribute("name","t");div.appendChild(input);// Support: Android <=4.1 only
  // Older WebKit doesn't clone checked state correctly in fragments
  support.checkClone=div.cloneNode(true).cloneNode(true).lastChild.checked;// Support: IE <=11 only
  // Make sure textarea (and checkbox) defaultValue is properly cloned
  div.innerHTML="<textarea>x</textarea>";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue;// Support: IE <=9 only
  // IE <=9 replaces <option> tags with their contents when inserted outside of
  // the select element.
  div.innerHTML="<option></option>";support.option=!!div.lastChild;})();// We have to close these tags to support XHTML (trac-13200)
  var wrapMap={// XHTML parsers do not magically insert elements in the
  // same way that tag soup parsers do. So we cannot shorten
  // this by omitting <tbody> or other required elements.
  thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;// Support: IE <=9 only
  if(!support.option){wrapMap.optgroup=wrapMap.option=[1,"<select multiple='multiple'>","</select>"];}function getAll(context,tag){// Support: IE <=9 - 11 only
  // Use typeof to avoid zero-argument method invocation on host objects (trac-15151)
  var ret;if(typeof context.getElementsByTagName!=="undefined"){ret=context.getElementsByTagName(tag||"*");}else if(typeof context.querySelectorAll!=="undefined"){ret=context.querySelectorAll(tag||"*");}else {ret=[];}if(tag===undefined||tag&&nodeName(context,tag)){return jQuery.merge([context],ret);}return ret;}// Mark scripts as having already been evaluated
  function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i<l;i++){dataPriv.set(elems[i],"globalEval",!refElements||dataPriv.get(refElements[i],"globalEval"));}}var rhtml=/<|&#?\w+;/;function buildFragment(elems,context,scripts,selection,ignored){var elem,tmp,tag,wrap,attached,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i<l;i++){elem=elems[i];if(elem||elem===0){// Add nodes directly
  if(toType(elem)==="object"){// Support: Android <=4.0 only, PhantomJS 1 only
  // push.apply(_, arraylike) throws on ancient WebKit
  jQuery.merge(nodes,elem.nodeType?[elem]:elem);// Convert non-html into a text node
  }else if(!rhtml.test(elem)){nodes.push(context.createTextNode(elem));// Convert html into DOM nodes
  }else {tmp=tmp||fragment.appendChild(context.createElement("div"));// Deserialize a standard representation
  tag=(rtagName.exec(elem)||["",""])[1].toLowerCase();wrap=wrapMap[tag]||wrapMap._default;tmp.innerHTML=wrap[1]+jQuery.htmlPrefilter(elem)+wrap[2];// Descend through wrappers to the right content
  j=wrap[0];while(j--){tmp=tmp.lastChild;}// Support: Android <=4.0 only, PhantomJS 1 only
  // push.apply(_, arraylike) throws on ancient WebKit
  jQuery.merge(nodes,tmp.childNodes);// Remember the top-level container
  tmp=fragment.firstChild;// Ensure the created nodes are orphaned (trac-12392)
  tmp.textContent="";}}}// Remove wrapper from fragment
  fragment.textContent="";i=0;while(elem=nodes[i++]){// Skip elements already in the context collection (trac-4087)
  if(selection&&jQuery.inArray(elem,selection)>-1){if(ignored){ignored.push(elem);}continue;}attached=isAttached(elem);// Append to fragment
  tmp=getAll(fragment.appendChild(elem),"script");// Preserve script evaluation history
  if(attached){setGlobalEval(tmp);}// Capture executables
  if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem);}}}}return fragment;}var rtypenamespace=/^([^.]*)(?:\.(.+)|)/;function returnTrue(){return true;}function returnFalse(){return false;}function _on(elem,types,selector,data,fn,one){var origFn,type;// Types can be a map of types/handlers
  if(_typeof(types)==="object"){// ( types-Object, selector, data )
  if(typeof selector!=="string"){// ( types-Object, data )
  data=data||selector;selector=undefined;}for(type in types){_on(elem,type,selector,data,types[type],one);}return elem;}if(data==null&&fn==null){// ( types, fn )
  fn=selector;data=selector=undefined;}else if(fn==null){if(typeof selector==="string"){// ( types, selector, fn )
  fn=data;data=undefined;}else {// ( types, data, fn )
  fn=data;data=selector;selector=undefined;}}if(fn===false){fn=returnFalse;}else if(!fn){return elem;}if(one===1){origFn=fn;fn=function fn(event){// Can use an empty set, since event contains the info
  jQuery().off(event);return origFn.apply(this,arguments);};// Use same guid so caller can remove using origFn
  fn.guid=origFn.guid||(origFn.guid=jQuery.guid++);}return elem.each(function(){jQuery.event.add(this,types,fn,data,selector);});}/*
  		     * Helper functions for managing events -- not part of the public interface.
  		     * Props to Dean Edwards' addEvent library for many of the ideas.
  		     */jQuery.event={global:{},add:function add(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.get(elem);// Only attach events to objects that accept data
  if(!acceptData(elem)){return;}// Caller can pass in an object of custom data in lieu of the handler
  if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector;}// Ensure that invalid selectors throw exceptions at attach time
  // Evaluate against documentElement in case elem is a non-element node (e.g., document)
  if(selector){jQuery.find.matchesSelector(documentElement,selector);}// Make sure that the handler has a unique ID, used to find/remove it later
  if(!handler.guid){handler.guid=jQuery.guid++;}// Init the element's event structure and main handler, if this is the first
  if(!(events=elemData.events)){events=elemData.events=Object.create(null);}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){// Discard the second event of a jQuery.event.trigger() and
  // when an event is called after a page has unloaded
  return typeof jQuery!=="undefined"&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined;};}// Handle multiple events separated by a space
  types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();// There *must* be a type, no attaching namespace-only handlers
  if(!type){continue;}// If event changes its type, use the special event handlers for the changed type
  special=jQuery.event.special[type]||{};// If selector defined, determine special event api type, otherwise given type
  type=(selector?special.delegateType:special.bindType)||type;// Update special based on newly reset type
  special=jQuery.event.special[type]||{};// handleObj is passed to all event handlers
  handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);// Init the event handler queue if we're the first
  if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;// Only use addEventListener if the special events handler returns false
  if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle);}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid;}}// Add to the element's handler list, delegates in front
  if(selector){handlers.splice(handlers.delegateCount++,0,handleObj);}else {handlers.push(handleObj);}// Keep track of which events have ever been used, for event optimization
  jQuery.event.global[type]=true;}},// Detach an event or set of events from an element
  remove:function remove(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=dataPriv.hasData(elem)&&dataPriv.get(elem);if(!elemData||!(events=elemData.events)){return;}// Once for each type.namespace in types; type may be omitted
  types=(types||"").match(rnothtmlwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();// Unbind all events (on this namespace, if provided) for the element
  if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true);}continue;}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");// Remove matching events
  origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--;}if(special.remove){special.remove.call(elem,handleObj);}}}// Remove generic event handler if we removed something and no more handlers exist
  // (avoids potential for endless recursion during removal of special event handlers)
  if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle);}delete events[type];}}// Remove data and the expando if it's no longer used
  if(jQuery.isEmptyObject(events)){dataPriv.remove(elem,"handle events");}},dispatch:function dispatch(nativeEvent){var i,j,ret,matched,handleObj,handlerQueue,args=new Array(arguments.length),// Make a writable jQuery.Event from the native event object
  event=jQuery.event.fix(nativeEvent),handlers=(dataPriv.get(this,"events")||Object.create(null))[event.type]||[],special=jQuery.event.special[event.type]||{};// Use the fix-ed jQuery.Event rather than the (read-only) native event
  args[0]=event;for(i=1;i<arguments.length;i++){args[i]=arguments[i];}event.delegateTarget=this;// Call the preDispatch hook for the mapped type, and let it bail if desired
  if(special.preDispatch&&special.preDispatch.call(this,event)===false){return;}// Determine handlers
  handlerQueue=jQuery.event.handlers.call(this,event,handlers);// Run delegates first; they may want to stop propagation beneath us
  i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){// If the event is namespaced, then each handler is only invoked if it is
  // specially universal or its namespaces are a superset of the event's.
  if(!event.rnamespace||handleObj.namespace===false||event.rnamespace.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation();}}}}}// Call the postDispatch hook for the mapped type
  if(special.postDispatch){special.postDispatch.call(this,event);}return event.result;},handlers:function handlers(event,_handlers){var i,handleObj,sel,matchedHandlers,matchedSelectors,handlerQueue=[],delegateCount=_handlers.delegateCount,cur=event.target;// Find delegate handlers
  if(delegateCount&&// Support: IE <=9
  // Black-hole SVG <use> instance trees (trac-13180)
  cur.nodeType&&// Support: Firefox <=42
  // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
  // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
  // Support: IE 11 only
  // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
  !(event.type==="click"&&event.button>=1)){for(;cur!==this;cur=cur.parentNode||this){// Don't check non-elements (trac-13208)
  // Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764)
  if(cur.nodeType===1&&!(event.type==="click"&&cur.disabled===true)){matchedHandlers=[];matchedSelectors={};for(i=0;i<delegateCount;i++){handleObj=_handlers[i];// Don't conflict with Object.prototype properties (trac-13203)
  sel=handleObj.selector+" ";if(matchedSelectors[sel]===undefined){matchedSelectors[sel]=handleObj.needsContext?jQuery(sel,this).index(cur)>-1:jQuery.find(sel,this,null,[cur]).length;}if(matchedSelectors[sel]){matchedHandlers.push(handleObj);}}if(matchedHandlers.length){handlerQueue.push({elem:cur,handlers:matchedHandlers});}}}}// Add the remaining (directly-bound) handlers
  cur=this;if(delegateCount<_handlers.length){handlerQueue.push({elem:cur,handlers:_handlers.slice(delegateCount)});}return handlerQueue;},addProp:function addProp(name,hook){Object.defineProperty(jQuery.Event.prototype,name,{enumerable:true,configurable:true,get:isFunction(hook)?function(){if(this.originalEvent){return hook(this.originalEvent);}}:function(){if(this.originalEvent){return this.originalEvent[name];}},set:function set(value){Object.defineProperty(this,name,{enumerable:true,configurable:true,writable:true,value:value});}});},fix:function fix(originalEvent){return originalEvent[jQuery.expando]?originalEvent:new jQuery.Event(originalEvent);},special:{load:{// Prevent triggered image.load events from bubbling to window.load
  noBubble:true},click:{// Utilize native event to ensure correct state for checkable inputs
  setup:function setup(data){// For mutual compressibility with _default, replace `this` access with a local var.
  // `|| data` is dead code meant only to preserve the variable through minification.
  var el=this||data;// Claim the first handler
  if(rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")){// dataPriv.set( el, "click", ... )
  leverageNative(el,"click",true);}// Return false to allow normal processing in the caller
  return false;},trigger:function trigger(data){// For mutual compressibility with _default, replace `this` access with a local var.
  // `|| data` is dead code meant only to preserve the variable through minification.
  var el=this||data;// Force setup before triggering a click
  if(rcheckableType.test(el.type)&&el.click&&nodeName(el,"input")){leverageNative(el,"click");}// Return non-false to allow normal event-path propagation
  return true;},// For cross-browser consistency, suppress native .click() on links
  // Also prevent it if we're currently inside a leveraged native-event stack
  _default:function _default(event){var target=event.target;return rcheckableType.test(target.type)&&target.click&&nodeName(target,"input")&&dataPriv.get(target,"click")||nodeName(target,"a");}},beforeunload:{postDispatch:function postDispatch(event){// Support: Firefox 20+
  // Firefox doesn't alert if the returnValue field is not set.
  if(event.result!==undefined&&event.originalEvent){event.originalEvent.returnValue=event.result;}}}}};// Ensure the presence of an event listener that handles manually-triggered
  // synthetic events by interrupting progress until reinvoked in response to
  // *native* events that it fires directly, ensuring that state changes have
  // already occurred before other listeners are invoked.
  function leverageNative(el,type,isSetup){// Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add
  if(!isSetup){if(dataPriv.get(el,type)===undefined){jQuery.event.add(el,type,returnTrue);}return;}// Register the controller as a special universal handler for all event namespaces
  dataPriv.set(el,type,false);jQuery.event.add(el,type,{namespace:false,handler:function handler(event){var result,saved=dataPriv.get(this,type);if(event.isTrigger&1&&this[type]){// Interrupt processing of the outer synthetic .trigger()ed event
  if(!saved){// Store arguments for use when handling the inner native event
  // There will always be at least one argument (an event object), so this array
  // will not be confused with a leftover capture object.
  saved=_slice.call(arguments);dataPriv.set(this,type,saved);// Trigger the native event and capture its result
  this[type]();result=dataPriv.get(this,type);dataPriv.set(this,type,false);if(saved!==result){// Cancel the outer synthetic event
  event.stopImmediatePropagation();event.preventDefault();return result;}// If this is an inner synthetic event for an event with a bubbling surrogate
  // (focus or blur), assume that the surrogate already propagated from triggering
  // the native event and prevent that from happening again here.
  // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the
  // bubbling surrogate propagates *after* the non-bubbling base), but that seems
  // less bad than duplication.
  }else if((jQuery.event.special[type]||{}).delegateType){event.stopPropagation();}// If this is a native event triggered above, everything is now in order
  // Fire an inner synthetic event with the original arguments
  }else if(saved){// ...and capture the result
  dataPriv.set(this,type,jQuery.event.trigger(saved[0],saved.slice(1),this));// Abort handling of the native event by all jQuery handlers while allowing
  // native handlers on the same element to run. On target, this is achieved
  // by stopping immediate propagation just on the jQuery event. However,
  // the native event is re-wrapped by a jQuery one on each level of the
  // propagation so the only way to stop it for jQuery is to stop it for
  // everyone via native `stopPropagation()`. This is not a problem for
  // focus/blur which don't bubble, but it does also stop click on checkboxes
  // and radios. We accept this limitation.
  event.stopPropagation();event.isImmediatePropagationStopped=returnTrue;}}});}jQuery.removeEvent=function(elem,type,handle){// This "if" is needed for plain objects
  if(elem.removeEventListener){elem.removeEventListener(type,handle);}};jQuery.Event=function(src,props){// Allow instantiation without the 'new' keyword
  if(!(this instanceof jQuery.Event)){return new jQuery.Event(src,props);}// Event object
  if(src&&src.type){this.originalEvent=src;this.type=src.type;// Events bubbling up the document may have been marked as prevented
  // by a handler lower down the tree; reflect the correct value.
  this.isDefaultPrevented=src.defaultPrevented||src.defaultPrevented===undefined&&// Support: Android <=2.3 only
  src.returnValue===false?returnTrue:returnFalse;// Create target properties
  // Support: Safari <=6 - 7 only
  // Target should not be a text node (trac-504, trac-13143)
  this.target=src.target&&src.target.nodeType===3?src.target.parentNode:src.target;this.currentTarget=src.currentTarget;this.relatedTarget=src.relatedTarget;// Event type
  }else {this.type=src;}// Put explicitly provided properties onto the event object
  if(props){jQuery.extend(this,props);}// Create a timestamp if incoming event doesn't have one
  this.timeStamp=src&&src.timeStamp||Date.now();// Mark it as fixed
  this[jQuery.expando]=true;};// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
  // https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
  jQuery.Event.prototype={constructor:jQuery.Event,isDefaultPrevented:returnFalse,isPropagationStopped:returnFalse,isImmediatePropagationStopped:returnFalse,isSimulated:false,preventDefault:function preventDefault(){var e=this.originalEvent;this.isDefaultPrevented=returnTrue;if(e&&!this.isSimulated){e.preventDefault();}},stopPropagation:function stopPropagation(){var e=this.originalEvent;this.isPropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopPropagation();}},stopImmediatePropagation:function stopImmediatePropagation(){var e=this.originalEvent;this.isImmediatePropagationStopped=returnTrue;if(e&&!this.isSimulated){e.stopImmediatePropagation();}this.stopPropagation();}};// Includes all common event props including KeyEvent and MouseEvent specific props
  jQuery.each({altKey:true,bubbles:true,cancelable:true,changedTouches:true,ctrlKey:true,detail:true,eventPhase:true,metaKey:true,pageX:true,pageY:true,shiftKey:true,view:true,"char":true,code:true,charCode:true,key:true,keyCode:true,button:true,buttons:true,clientX:true,clientY:true,offsetX:true,offsetY:true,pointerId:true,pointerType:true,screenX:true,screenY:true,targetTouches:true,toElement:true,touches:true,which:true},jQuery.event.addProp);jQuery.each({focus:"focusin",blur:"focusout"},function(type,delegateType){function focusMappedHandler(nativeEvent){if(document.documentMode){// Support: IE 11+
  // Attach a single focusin/focusout handler on the document while someone wants
  // focus/blur. This is because the former are synchronous in IE while the latter
  // are async. In other browsers, all those handlers are invoked synchronously.
  // `handle` from private data would already wrap the event, but we need
  // to change the `type` here.
  var handle=dataPriv.get(this,"handle"),event=jQuery.event.fix(nativeEvent);event.type=nativeEvent.type==="focusin"?"focus":"blur";event.isSimulated=true;// First, handle focusin/focusout
  handle(nativeEvent);// ...then, handle focus/blur
  //
  // focus/blur don't bubble while focusin/focusout do; simulate the former by only
  // invoking the handler at the lower level.
  if(event.target===event.currentTarget){// The setup part calls `leverageNative`, which, in turn, calls
  // `jQuery.event.add`, so event handle will already have been set
  // by this point.
  handle(event);}}else {// For non-IE browsers, attach a single capturing handler on the document
  // while someone wants focusin/focusout.
  jQuery.event.simulate(delegateType,nativeEvent.target,jQuery.event.fix(nativeEvent));}}jQuery.event.special[type]={// Utilize native event if possible so blur/focus sequence is correct
  setup:function setup(){var attaches;// Claim the first handler
  // dataPriv.set( this, "focus", ... )
  // dataPriv.set( this, "blur", ... )
  leverageNative(this,type,true);if(document.documentMode){// Support: IE 9 - 11+
  // We use the same native handler for focusin & focus (and focusout & blur)
  // so we need to coordinate setup & teardown parts between those events.
  // Use `delegateType` as the key as `type` is already used by `leverageNative`.
  attaches=dataPriv.get(this,delegateType);if(!attaches){this.addEventListener(delegateType,focusMappedHandler);}dataPriv.set(this,delegateType,(attaches||0)+1);}else {// Return false to allow normal processing in the caller
  return false;}},trigger:function trigger(){// Force setup before trigger
  leverageNative(this,type);// Return non-false to allow normal event-path propagation
  return true;},teardown:function teardown(){var attaches;if(document.documentMode){attaches=dataPriv.get(this,delegateType)-1;if(!attaches){this.removeEventListener(delegateType,focusMappedHandler);dataPriv.remove(this,delegateType);}else {dataPriv.set(this,delegateType,attaches);}}else {// Return false to indicate standard teardown should be applied
  return false;}},// Suppress native focus or blur if we're currently inside
  // a leveraged native-event stack
  _default:function _default(event){return dataPriv.get(event.target,type);},delegateType:delegateType};// Support: Firefox <=44
  // Firefox doesn't have focus(in | out) events
  // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787
  //
  // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1
  // focus(in | out) events fire after focus & blur events,
  // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order
  // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857
  //
  // Support: IE 9 - 11+
  // To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch,
  // attach a single handler for both events in IE.
  jQuery.event.special[delegateType]={setup:function setup(){// Handle: regular nodes (via `this.ownerDocument`), window
  // (via `this.document`) & document (via `this`).
  var doc=this.ownerDocument||this.document||this,dataHolder=document.documentMode?this:doc,attaches=dataPriv.get(dataHolder,delegateType);// Support: IE 9 - 11+
  // We use the same native handler for focusin & focus (and focusout & blur)
  // so we need to coordinate setup & teardown parts between those events.
  // Use `delegateType` as the key as `type` is already used by `leverageNative`.
  if(!attaches){if(document.documentMode){this.addEventListener(delegateType,focusMappedHandler);}else {doc.addEventListener(type,focusMappedHandler,true);}}dataPriv.set(dataHolder,delegateType,(attaches||0)+1);},teardown:function teardown(){var doc=this.ownerDocument||this.document||this,dataHolder=document.documentMode?this:doc,attaches=dataPriv.get(dataHolder,delegateType)-1;if(!attaches){if(document.documentMode){this.removeEventListener(delegateType,focusMappedHandler);}else {doc.removeEventListener(type,focusMappedHandler,true);}dataPriv.remove(dataHolder,delegateType);}else {dataPriv.set(dataHolder,delegateType,attaches);}}};});// Create mouseenter/leave events using mouseover/out and event-time checks
  // so that event delegation works in jQuery.
  // Do the same for pointerenter/pointerleave and pointerover/pointerout
  //
  // Support: Safari 7 only
  // Safari sends mouseenter too often; see:
  // https://bugs.chromium.org/p/chromium/issues/detail?id=470258
  // for the description of the bug (it existed in older Chrome versions as well).
  jQuery.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(orig,fix){jQuery.event.special[orig]={delegateType:fix,bindType:fix,handle:function handle(event){var ret,target=this,related=event.relatedTarget,handleObj=event.handleObj;// For mouseenter/leave call the handler if related is outside the target.
  // NB: No relatedTarget if the mouse left/entered the browser window
  if(!related||related!==target&&!jQuery.contains(target,related)){event.type=handleObj.origType;ret=handleObj.handler.apply(this,arguments);event.type=fix;}return ret;}};});jQuery.fn.extend({on:function on(types,selector,data,fn){return _on(this,types,selector,data,fn);},one:function one(types,selector,data,fn){return _on(this,types,selector,data,fn,1);},off:function off(types,selector,fn){var handleObj,type;if(types&&types.preventDefault&&types.handleObj){// ( event )  dispatched jQuery.Event
  handleObj=types.handleObj;jQuery(types.delegateTarget).off(handleObj.namespace?handleObj.origType+"."+handleObj.namespace:handleObj.origType,handleObj.selector,handleObj.handler);return this;}if(_typeof(types)==="object"){// ( types-object [, selector] )
  for(type in types){this.off(type,selector,types[type]);}return this;}if(selector===false||typeof selector==="function"){// ( types [, fn] )
  fn=selector;selector=undefined;}if(fn===false){fn=returnFalse;}return this.each(function(){jQuery.event.remove(this,types,fn,selector);});}});var// Support: IE <=10 - 11, Edge 12 - 13 only
  // In IE/Edge using regex groups here causes severe slowdowns.
  // See https://connect.microsoft.com/IE/feedback/details/1736512/
  rnoInnerhtml=/<script|<style|<link/i,// checked="checked" or checked
  rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rcleanScript=/^\s*<!\[CDATA\[|\]\]>\s*$/g;// Prefer a tbody over its parent table for containing new rows
  function manipulationTarget(elem,content){if(nodeName(elem,"table")&&nodeName(content.nodeType!==11?content:content.firstChild,"tr")){return jQuery(elem).children("tbody")[0]||elem;}return elem;}// Replace/restore the type attribute of script elements for safe DOM manipulation
  function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem;}function restoreScript(elem){if((elem.type||"").slice(0,5)==="true/"){elem.type=elem.type.slice(5);}else {elem.removeAttribute("type");}return elem;}function cloneCopyEvent(src,dest){var i,l,type,pdataOld,udataOld,udataCur,events;if(dest.nodeType!==1){return;}// 1. Copy private data: events, handlers, etc.
  if(dataPriv.hasData(src)){pdataOld=dataPriv.get(src);events=pdataOld.events;if(events){dataPriv.remove(dest,"handle events");for(type in events){for(i=0,l=events[type].length;i<l;i++){jQuery.event.add(dest,type,events[type][i]);}}}}// 2. Copy user data
  if(dataUser.hasData(src)){udataOld=dataUser.access(src);udataCur=jQuery.extend({},udataOld);dataUser.set(dest,udataCur);}}// Fix IE bugs, see support tests
  function fixInput(src,dest){var nodeName=dest.nodeName.toLowerCase();// Fails to persist the checked state of a cloned checkbox or radio button.
  if(nodeName==="input"&&rcheckableType.test(src.type)){dest.checked=src.checked;// Fails to return the selected option to the default selected state when cloning options
  }else if(nodeName==="input"||nodeName==="textarea"){dest.defaultValue=src.defaultValue;}}function domManip(collection,args,callback,ignored){// Flatten any nested arrays
  args=flat(args);var fragment,first,scripts,hasScripts,node,doc,i=0,l=collection.length,iNoClone=l-1,value=args[0],valueIsFunction=isFunction(value);// We can't cloneNode fragments that contain checked, in WebKit
  if(valueIsFunction||l>1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value)){return collection.each(function(index){var self=collection.eq(index);if(valueIsFunction){args[0]=value.call(this,index,self.html());}domManip(self,args,callback,ignored);});}if(l){fragment=buildFragment(args,collection[0].ownerDocument,false,collection,ignored);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first;}// Require either new content or an interest in ignored elements to invoke the callback
  if(first||ignored){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;// Use the original fragment for the last item
  // instead of the first because it can end up
  // being emptied incorrectly in certain situations (trac-8070).
  for(;i<l;i++){node=fragment;if(i!==iNoClone){node=jQuery.clone(node,true,true);// Keep references to cloned scripts for later restoration
  if(hasScripts){// Support: Android <=4.0 only, PhantomJS 1 only
  // push.apply(_, arraylike) throws on ancient WebKit
  jQuery.merge(scripts,getAll(node,"script"));}}callback.call(collection[i],node,i);}if(hasScripts){doc=scripts[scripts.length-1].ownerDocument;// Re-enable scripts
  jQuery.map(scripts,restoreScript);// Evaluate executable scripts on first document insertion
  for(i=0;i<hasScripts;i++){node=scripts[i];if(rscriptType.test(node.type||"")&&!dataPriv.access(node,"globalEval")&&jQuery.contains(doc,node)){if(node.src&&(node.type||"").toLowerCase()!=="module"){// Optional AJAX dependency, but won't run scripts if not present
  if(jQuery._evalUrl&&!node.noModule){jQuery._evalUrl(node.src,{nonce:node.nonce||node.getAttribute("nonce")},doc);}}else {// Unwrap a CDATA section containing script contents. This shouldn't be
  // needed as in XML documents they're already not visible when
  // inspecting element contents and in HTML documents they have no
  // meaning but we're preserving that logic for backwards compatibility.
  // This will be removed completely in 4.0. See gh-4904.
  DOMEval(node.textContent.replace(rcleanScript,""),node,doc);}}}}}}return collection;}function _remove(elem,selector,keepData){var node,nodes=selector?jQuery.filter(selector,elem):elem,i=0;for(;(node=nodes[i])!=null;i++){if(!keepData&&node.nodeType===1){jQuery.cleanData(getAll(node));}if(node.parentNode){if(keepData&&isAttached(node)){setGlobalEval(getAll(node,"script"));}node.parentNode.removeChild(node);}}return elem;}jQuery.extend({htmlPrefilter:function htmlPrefilter(html){return html;},clone:function clone(elem,dataAndEvents,deepDataAndEvents){var i,l,srcElements,destElements,clone=elem.cloneNode(true),inPage=isAttached(elem);// Fix IE cloning issues
  if(!support.noCloneChecked&&(elem.nodeType===1||elem.nodeType===11)&&!jQuery.isXMLDoc(elem)){// We eschew jQuery#find here for performance reasons:
  // https://jsperf.com/getall-vs-sizzle/2
  destElements=getAll(clone);srcElements=getAll(elem);for(i=0,l=srcElements.length;i<l;i++){fixInput(srcElements[i],destElements[i]);}}// Copy the events from the original to the clone
  if(dataAndEvents){if(deepDataAndEvents){srcElements=srcElements||getAll(elem);destElements=destElements||getAll(clone);for(i=0,l=srcElements.length;i<l;i++){cloneCopyEvent(srcElements[i],destElements[i]);}}else {cloneCopyEvent(elem,clone);}}// Preserve script evaluation history
  destElements=getAll(clone,"script");if(destElements.length>0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"));}// Return the cloned set
  return clone;},cleanData:function cleanData(elems){var data,elem,type,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(acceptData(elem)){if(data=elem[dataPriv.expando]){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type);// This is a shortcut to avoid jQuery.event.remove's overhead
  }else {jQuery.removeEvent(elem,type,data.handle);}}}// Support: Chrome <=35 - 45+
  // Assign undefined instead of using delete, see Data#remove
  elem[dataPriv.expando]=undefined;}if(elem[dataUser.expando]){// Support: Chrome <=35 - 45+
  // Assign undefined instead of using delete, see Data#remove
  elem[dataUser.expando]=undefined;}}}}});jQuery.fn.extend({detach:function detach(selector){return _remove(this,selector,true);},remove:function remove(selector){return _remove(this,selector);},text:function text(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value;}});},null,value,arguments.length);},append:function append(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem);}});},prepend:function prepend(){return domManip(this,arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild);}});},before:function before(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this);}});},after:function after(){return domManip(this,arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling);}});},empty:function empty(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){// Prevent memory leaks
  jQuery.cleanData(getAll(elem,false));// Remove any remaining nodes
  elem.textContent="";}}return this;},clone:function clone(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents);});},html:function html(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML;}// See if we can take a shortcut and just use innerHTML
  if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=jQuery.htmlPrefilter(value);try{for(;i<l;i++){elem=this[i]||{};// Remove element nodes and prevent memory leaks
  if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.innerHTML=value;}}elem=0;// If using innerHTML throws an exception, use the fallback method
  }catch(e){}}if(elem){this.empty().append(value);}},null,value,arguments.length);},replaceWith:function replaceWith(){var ignored=[];// Make the changes, replacing each non-ignored context element with the new content
  return domManip(this,arguments,function(elem){var parent=this.parentNode;if(jQuery.inArray(this,ignored)<0){jQuery.cleanData(getAll(this));if(parent){parent.replaceChild(elem,this);}}// Force callback invocation
  },ignored);}});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(name,original){jQuery.fn[name]=function(selector){var elems,ret=[],insert=jQuery(selector),last=insert.length-1,i=0;for(;i<=last;i++){elems=i===last?this:this.clone(true);jQuery(insert[i])[original](elems);// Support: Android <=4.0 only, PhantomJS 1 only
  // .get() because push.apply(_, arraylike) throws on ancient WebKit
  push.apply(ret,elems.get());}return this.pushStack(ret);};});var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var rcustomProp=/^--/;var getStyles=function getStyles(elem){// Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150)
  // IE throws on elements created in popups
  // FF meanwhile throws on frame elements through "defaultView.getComputedStyle"
  var view=elem.ownerDocument.defaultView;if(!view||!view.opener){view=window;}return view.getComputedStyle(elem);};var swap=function swap(elem,options,callback){var ret,name,old={};// Remember the old values, and insert the new ones
  for(name in options){old[name]=elem.style[name];elem.style[name]=options[name];}ret=callback.call(elem);// Revert the old values
  for(name in options){elem.style[name]=old[name];}return ret;};var rboxStyle=new RegExp(cssExpand.join("|"),"i");(function(){// Executing both pixelPosition & boxSizingReliable tests require only one layout
  // so they're executed at the same time to save the second computation.
  function computeStyleTests(){// This is a singleton, we need to execute it only once
  if(!div){return;}container.style.cssText="position:absolute;left:-11111px;width:60px;"+"margin-top:1px;padding:0;border:0";div.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;"+"margin:auto;border:1px;padding:1px;"+"width:60%;top:1%";documentElement.appendChild(container).appendChild(div);var divStyle=window.getComputedStyle(div);pixelPositionVal=divStyle.top!=="1%";// Support: Android 4.0 - 4.3 only, Firefox <=3 - 44
  reliableMarginLeftVal=roundPixelMeasures(divStyle.marginLeft)===12;// Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3
  // Some styles come back with percentage values, even though they shouldn't
  div.style.right="60%";pixelBoxStylesVal=roundPixelMeasures(divStyle.right)===36;// Support: IE 9 - 11 only
  // Detect misreporting of content dimensions for box-sizing:border-box elements
  boxSizingReliableVal=roundPixelMeasures(divStyle.width)===36;// Support: IE 9 only
  // Detect overflow:scroll screwiness (gh-3699)
  // Support: Chrome <=64
  // Don't get tricked when zoom affects offsetWidth (gh-4029)
  div.style.position="absolute";scrollboxSizeVal=roundPixelMeasures(div.offsetWidth/3)===12;documentElement.removeChild(container);// Nullify the div so it wouldn't be stored in the memory and
  // it will also be a sign that checks already performed
  div=null;}function roundPixelMeasures(measure){return Math.round(parseFloat(measure));}var pixelPositionVal,boxSizingReliableVal,scrollboxSizeVal,pixelBoxStylesVal,reliableTrDimensionsVal,reliableMarginLeftVal,container=document.createElement("div"),div=document.createElement("div");// Finish early in limited (non-browser) environments
  if(!div.style){return;}// Support: IE <=9 - 11 only
  // Style of cloned element affects source element cloned (trac-8908)
  div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";jQuery.extend(support,{boxSizingReliable:function boxSizingReliable(){computeStyleTests();return boxSizingReliableVal;},pixelBoxStyles:function pixelBoxStyles(){computeStyleTests();return pixelBoxStylesVal;},pixelPosition:function pixelPosition(){computeStyleTests();return pixelPositionVal;},reliableMarginLeft:function reliableMarginLeft(){computeStyleTests();return reliableMarginLeftVal;},scrollboxSize:function scrollboxSize(){computeStyleTests();return scrollboxSizeVal;},// Support: IE 9 - 11+, Edge 15 - 18+
  // IE/Edge misreport `getComputedStyle` of table rows with width/height
  // set in CSS while `offset*` properties report correct values.
  // Behavior in IE 9 is more subtle than in newer versions & it passes
  // some versions of this test; make sure not to make it pass there!
  //
  // Support: Firefox 70+
  // Only Firefox includes border widths
  // in computed dimensions. (gh-4529)
  reliableTrDimensions:function reliableTrDimensions(){var table,tr,trChild,trStyle;if(reliableTrDimensionsVal==null){table=document.createElement("table");tr=document.createElement("tr");trChild=document.createElement("div");table.style.cssText="position:absolute;left:-11111px;border-collapse:separate";tr.style.cssText="box-sizing:content-box;border:1px solid";// Support: Chrome 86+
  // Height set through cssText does not get applied.
  // Computed height then comes back as 0.
  tr.style.height="1px";trChild.style.height="9px";// Support: Android 8 Chrome 86+
  // In our bodyBackground.html iframe,
  // display for all div elements is set to "inline",
  // which causes a problem only in Android 8 Chrome 86.
  // Ensuring the div is `display: block`
  // gets around this issue.
  trChild.style.display="block";documentElement.appendChild(table).appendChild(tr).appendChild(trChild);trStyle=window.getComputedStyle(tr);reliableTrDimensionsVal=parseInt(trStyle.height,10)+parseInt(trStyle.borderTopWidth,10)+parseInt(trStyle.borderBottomWidth,10)===tr.offsetHeight;documentElement.removeChild(table);}return reliableTrDimensionsVal;}});})();function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,isCustomProp=rcustomProp.test(name),// Support: Firefox 51+
  // Retrieving style before computed somehow
  // fixes an issue with getting wrong values
  // on detached elements
  style=elem.style;computed=computed||getStyles(elem);// getPropertyValue is needed for:
  //   .css('filter') (IE 9 only, trac-12537)
  //   .css('--customProperty) (gh-3144)
  if(computed){// Support: IE <=9 - 11+
  // IE only supports `"float"` in `getPropertyValue`; in computed styles
  // it's only available as `"cssFloat"`. We no longer modify properties
  // sent to `.css()` apart from camelCasing, so we need to check both.
  // Normally, this would create difference in behavior: if
  // `getPropertyValue` returns an empty string, the value returned
  // by `.css()` would be `undefined`. This is usually the case for
  // disconnected elements. However, in IE even disconnected elements
  // with no styles return `"none"` for `getPropertyValue( "float" )`
  ret=computed.getPropertyValue(name)||computed[name];if(isCustomProp&&ret){// Support: Firefox 105+, Chrome <=105+
  // Spec requires trimming whitespace for custom properties (gh-4926).
  // Firefox only trims leading whitespace. Chrome just collapses
  // both leading & trailing whitespace to a single space.
  //
  // Fall back to `undefined` if empty string returned.
  // This collapses a missing definition with property defined
  // and set to an empty string but there's no standard API
  // allowing us to differentiate them without a performance penalty
  // and returning `undefined` aligns with older jQuery.
  //
  // rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED
  // as whitespace while CSS does not, but this is not a problem
  // because CSS preprocessing replaces them with U+000A LINE FEED
  // (which *is* CSS whitespace)
  // https://www.w3.org/TR/css-syntax-3/#input-preprocessing
  ret=ret.replace(rtrimCSS,"$1")||undefined;}if(ret===""&&!isAttached(elem)){ret=jQuery.style(elem,name);}// A tribute to the "awesome hack by Dean Edwards"
  // Android Browser returns percentage for some values,
  // but width seems to be reliably pixels.
  // This is against the CSSOM draft spec:
  // https://drafts.csswg.org/cssom/#resolved-values
  if(!support.pixelBoxStyles()&&rnumnonpx.test(ret)&&rboxStyle.test(name)){// Remember the original values
  width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;// Put in the new values to get a computed value out
  style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;// Revert the changed values
  style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth;}}return ret!==undefined?// Support: IE <=9 - 11 only
  // IE returns zIndex value as an integer.
  ret+"":ret;}function addGetHookIf(conditionFn,hookFn){// Define the hook, we'll check on the first run if it's really needed.
  return {get:function get(){if(conditionFn()){// Hook not needed (or it's not possible to use it due
  // to missing dependency), remove it.
  delete this.get;return;}// Hook needed; redefine it so that the support test is not executed again.
  return (this.get=hookFn).apply(this,arguments);}};}var cssPrefixes=["Webkit","Moz","ms"],emptyStyle=document.createElement("div").style,vendorProps={};// Return a vendor-prefixed property or undefined
  function vendorPropName(name){// Check for vendor prefixed names
  var capName=name[0].toUpperCase()+name.slice(1),i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in emptyStyle){return name;}}}// Return a potentially-mapped jQuery.cssProps or vendor prefixed property
  function finalPropName(name){var _final=jQuery.cssProps[name]||vendorProps[name];if(_final){return _final;}if(name in emptyStyle){return name;}return vendorProps[name]=vendorPropName(name)||name;}var// Swappable if display is none or starts with table
  // except "table", "table-cell", or "table-caption"
  // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
  rdisplayswap=/^(none|table(?!-c[ea]).+)/,cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"};function setPositiveNumber(_elem,value,subtract){// Any relative (+/-) values have already been
  // normalized at this point
  var matches=rcssNum.exec(value);return matches?// Guard against undefined "subtract", e.g., when used as in cssHooks
  Math.max(0,matches[2]-(subtract||0))+(matches[3]||"px"):value;}function boxModelAdjustment(elem,dimension,box,isBorderBox,styles,computedVal){var i=dimension==="width"?1:0,extra=0,delta=0,marginDelta=0;// Adjustment may not be necessary
  if(box===(isBorderBox?"border":"content")){return 0;}for(;i<4;i+=2){// Both box models exclude margin
  // Count margin delta separately to only add it after scroll gutter adjustment.
  // This is needed to make negative margins work with `outerHeight( true )` (gh-3982).
  if(box==="margin"){marginDelta+=jQuery.css(elem,box+cssExpand[i],true,styles);}// If we get here with a content-box, we're seeking "padding" or "border" or "margin"
  if(!isBorderBox){// Add padding
  delta+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);// For "border" or "margin", add border
  if(box!=="padding"){delta+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);// But still keep track of it otherwise
  }else {extra+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}// If we get here with a border-box (content + padding + border), we're seeking "content" or
  // "padding" or "margin"
  }else {// For "content", subtract padding
  if(box==="content"){delta-=jQuery.css(elem,"padding"+cssExpand[i],true,styles);}// For "content" or "padding", subtract border
  if(box!=="margin"){delta-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles);}}}// Account for positive content-box scroll gutter when requested by providing computedVal
  if(!isBorderBox&&computedVal>=0){// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
  // Assuming integer scroll gutter, subtract the rest and round down
  delta+=Math.max(0,Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-computedVal-delta-extra-0.5// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
  // Use an explicit zero to avoid NaN (gh-3964)
  ))||0;}return delta+marginDelta;}function getWidthOrHeight(elem,dimension,extra){// Start with computed style
  var styles=getStyles(elem),// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322).
  // Fake content-box until we know it's needed to know the true value.
  boxSizingNeeded=!support.boxSizingReliable()||extra,isBorderBox=boxSizingNeeded&&jQuery.css(elem,"boxSizing",false,styles)==="border-box",valueIsBorderBox=isBorderBox,val=curCSS(elem,dimension,styles),offsetProp="offset"+dimension[0].toUpperCase()+dimension.slice(1);// Support: Firefox <=54
  // Return a confounding non-pixel value or feign ignorance, as appropriate.
  if(rnumnonpx.test(val)){if(!extra){return val;}val="auto";}// Support: IE 9 - 11 only
  // Use offsetWidth/offsetHeight for when box sizing is unreliable.
  // In those cases, the computed value can be trusted to be border-box.
  if((!support.boxSizingReliable()&&isBorderBox||// Support: IE 10 - 11+, Edge 15 - 18+
  // IE/Edge misreport `getComputedStyle` of table rows with width/height
  // set in CSS while `offset*` properties report correct values.
  // Interestingly, in some cases IE 9 doesn't suffer from this issue.
  !support.reliableTrDimensions()&&nodeName(elem,"tr")||// Fall back to offsetWidth/offsetHeight when value is "auto"
  // This happens for inline elements with no explicit setting (gh-3571)
  val==="auto"||// Support: Android <=4.1 - 4.3 only
  // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
  !parseFloat(val)&&jQuery.css(elem,"display",false,styles)==="inline")&&// Make sure the element is visible & connected
  elem.getClientRects().length){isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";// Where available, offsetWidth/offsetHeight approximate border box dimensions.
  // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the
  // retrieved value as a content box dimension.
  valueIsBorderBox=offsetProp in elem;if(valueIsBorderBox){val=elem[offsetProp];}}// Normalize "" and auto
  val=parseFloat(val)||0;// Adjust for the element's box model
  return val+boxModelAdjustment(elem,dimension,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles,// Provide the current computed size to request scroll gutter calculation (gh-3589)
  val)+"px";}jQuery.extend({// Add in style property hooks for overriding the default
  // behavior of getting and setting a style property
  cssHooks:{opacity:{get:function get(elem,computed){if(computed){// We should always get a number back from opacity
  var ret=curCSS(elem,"opacity");return ret===""?"1":ret;}}}},// Don't automatically add "px" to these possibly-unitless properties
  cssNumber:{animationIterationCount:true,aspectRatio:true,borderImageSlice:true,columnCount:true,flexGrow:true,flexShrink:true,fontWeight:true,gridArea:true,gridColumn:true,gridColumnEnd:true,gridColumnStart:true,gridRow:true,gridRowEnd:true,gridRowStart:true,lineHeight:true,opacity:true,order:true,orphans:true,scale:true,widows:true,zIndex:true,zoom:true,// SVG-related
  fillOpacity:true,floodOpacity:true,stopOpacity:true,strokeMiterlimit:true,strokeOpacity:true},// Add in properties whose names you wish to fix before
  // setting or getting the value
  cssProps:{},// Get and set the style property on a DOM Node
  style:function style(elem,name,value,extra){// Don't set styles on text and comment nodes
  if(!elem||elem.nodeType===3||elem.nodeType===8||!elem.style){return;}// Make sure that we're working with the right name
  var ret,type,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name),style=elem.style;// Make sure that we're working with the right name. We don't
  // want to query the value if it is a CSS custom property
  // since they are user-defined.
  if(!isCustomProp){name=finalPropName(origName);}// Gets hook for the prefixed version, then unprefixed version
  hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];// Check if we're setting a value
  if(value!==undefined){type=_typeof(value);// Convert "+=" or "-=" to relative numbers (trac-7345)
  if(type==="string"&&(ret=rcssNum.exec(value))&&ret[1]){value=adjustCSS(elem,name,ret);// Fixes bug trac-9237
  type="number";}// Make sure that null and NaN values aren't set (trac-7116)
  if(value==null||value!==value){return;}// If a number was passed in, add the unit (except for certain CSS properties)
  // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append
  // "px" to a few hardcoded values.
  if(type==="number"&&!isCustomProp){value+=ret&&ret[3]||(jQuery.cssNumber[origName]?"":"px");}// background-* props affect original clone's values
  if(!support.clearCloneStyle&&value===""&&name.indexOf("background")===0){style[name]="inherit";}// If a hook was provided, use that value, otherwise just set the specified value
  if(!hooks||!("set"in hooks)||(value=hooks.set(elem,value,extra))!==undefined){if(isCustomProp){style.setProperty(name,value);}else {style[name]=value;}}}else {// If a hook was provided get the non-computed value from there
  if(hooks&&"get"in hooks&&(ret=hooks.get(elem,false,extra))!==undefined){return ret;}// Otherwise just get the value from the style object
  return style[name];}},css:function css(elem,name,extra,styles){var val,num,hooks,origName=camelCase(name),isCustomProp=rcustomProp.test(name);// Make sure that we're working with the right name. We don't
  // want to modify the value if it is a CSS custom property
  // since they are user-defined.
  if(!isCustomProp){name=finalPropName(origName);}// Try prefixed name followed by the unprefixed name
  hooks=jQuery.cssHooks[name]||jQuery.cssHooks[origName];// If a hook was provided get the computed value from there
  if(hooks&&"get"in hooks){val=hooks.get(elem,true,extra);}// Otherwise, if a way to get the computed value exists, use that
  if(val===undefined){val=curCSS(elem,name,styles);}// Convert "normal" to computed value
  if(val==="normal"&&name in cssNormalTransform){val=cssNormalTransform[name];}// Make numeric if forced or a qualifier was provided and val looks numeric
  if(extra===""||extra){num=parseFloat(val);return extra===true||isFinite(num)?num||0:val;}return val;}});jQuery.each(["height","width"],function(_i,dimension){jQuery.cssHooks[dimension]={get:function get(elem,computed,extra){if(computed){// Certain elements can have dimension info if we invisibly show them
  // but it must have a current display style that would benefit
  return rdisplayswap.test(jQuery.css(elem,"display"))&&(// Support: Safari 8+
  // Table columns in Safari have non-zero offsetWidth & zero
  // getBoundingClientRect().width unless display is changed.
  // Support: IE <=11 only
  // Running getBoundingClientRect on a disconnected node
  // in IE throws an error.
  !elem.getClientRects().length||!elem.getBoundingClientRect().width)?swap(elem,cssShow,function(){return getWidthOrHeight(elem,dimension,extra);}):getWidthOrHeight(elem,dimension,extra);}},set:function set(elem,value,extra){var matches,styles=getStyles(elem),// Only read styles.position if the test has a chance to fail
  // to avoid forcing a reflow.
  scrollboxSizeBuggy=!support.scrollboxSize()&&styles.position==="absolute",// To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991)
  boxSizingNeeded=scrollboxSizeBuggy||extra,isBorderBox=boxSizingNeeded&&jQuery.css(elem,"boxSizing",false,styles)==="border-box",subtract=extra?boxModelAdjustment(elem,dimension,extra,isBorderBox,styles):0;// Account for unreliable border-box dimensions by comparing offset* to computed and
  // faking a content-box to get border and padding (gh-3699)
  if(isBorderBox&&scrollboxSizeBuggy){subtract-=Math.ceil(elem["offset"+dimension[0].toUpperCase()+dimension.slice(1)]-parseFloat(styles[dimension])-boxModelAdjustment(elem,dimension,"border",false,styles)-0.5);}// Convert to pixels if value adjustment is needed
  if(subtract&&(matches=rcssNum.exec(value))&&(matches[3]||"px")!=="px"){elem.style[dimension]=value;value=jQuery.css(elem,dimension);}return setPositiveNumber(elem,value,subtract);}};});jQuery.cssHooks.marginLeft=addGetHookIf(support.reliableMarginLeft,function(elem,computed){if(computed){return (parseFloat(curCSS(elem,"marginLeft"))||elem.getBoundingClientRect().left-swap(elem,{marginLeft:0},function(){return elem.getBoundingClientRect().left;}))+"px";}});// These hooks are used by animate to expand properties
  jQuery.each({margin:"",padding:"",border:"Width"},function(prefix,suffix){jQuery.cssHooks[prefix+suffix]={expand:function expand(value){var i=0,expanded={},// Assumes a single number if not a string
  parts=typeof value==="string"?value.split(" "):[value];for(;i<4;i++){expanded[prefix+cssExpand[i]+suffix]=parts[i]||parts[i-2]||parts[0];}return expanded;}};if(prefix!=="margin"){jQuery.cssHooks[prefix+suffix].set=setPositiveNumber;}});jQuery.fn.extend({css:function css(name,value){return access(this,function(elem,name,value){var styles,len,map={},i=0;if(Array.isArray(name)){styles=getStyles(elem);len=name.length;for(;i<len;i++){map[name[i]]=jQuery.css(elem,name[i],false,styles);}return map;}return value!==undefined?jQuery.style(elem,name,value):jQuery.css(elem,name);},name,value,arguments.length>1);}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing);}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function init(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||jQuery.easing._default;this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px");},cur:function cur(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this);},run:function run(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration);}else {this.pos=eased=percent;}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this);}if(hooks&&hooks.set){hooks.set(this);}else {Tween.propHooks._default.set(this);}return this;}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function get(tween){var result;// Use a property on the element directly when it is not a DOM element,
  // or when there is no matching style property that exists.
  if(tween.elem.nodeType!==1||tween.elem[tween.prop]!=null&&tween.elem.style[tween.prop]==null){return tween.elem[tween.prop];}// Passing an empty string as a 3rd parameter to .css will automatically
  // attempt a parseFloat and fallback to a string if the parse fails.
  // Simple values such as "10px" are parsed to Float;
  // complex values such as "rotate(1rad)" are returned as-is.
  result=jQuery.css(tween.elem,tween.prop,"");// Empty strings, null, undefined and "auto" are converted to 0.
  return !result||result==="auto"?0:result;},set:function set(tween){// Use step hook for back compat.
  // Use cssHook if its there.
  // Use .style if available and use plain properties where available.
  if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween);}else if(tween.elem.nodeType===1&&(jQuery.cssHooks[tween.prop]||tween.elem.style[finalPropName(tween.prop)]!=null)){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit);}else {tween.elem[tween.prop]=tween.now;}}}};// Support: IE <=9 only
  // Panic based approach to setting things on disconnected nodes
  Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function set(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now;}}};jQuery.easing={linear:function linear(p){return p;},swing:function swing(p){return 0.5-Math.cos(p*Math.PI)/2;},_default:"swing"};jQuery.fx=Tween.prototype.init;// Back compat <1.8 extension point
  jQuery.fx.step={};var fxNow,inProgress,rfxtypes=/^(?:toggle|show|hide)$/,rrun=/queueHooks$/;function schedule(){if(inProgress){if(document.hidden===false&&window.requestAnimationFrame){window.requestAnimationFrame(schedule);}else {window.setTimeout(schedule,jQuery.fx.interval);}jQuery.fx.tick();}}// Animations created synchronously will run synchronously
  function createFxNow(){window.setTimeout(function(){fxNow=undefined;});return fxNow=Date.now();}// Generate parameters to create a standard animation
  function genFx(type,includeWidth){var which,i=0,attrs={height:type};// If we include width, step value is 1 to do all cssExpand values,
  // otherwise step value is 2 to skip over Left and Right
  includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type;}if(includeWidth){attrs.opacity=attrs.width=type;}return attrs;}function createTween(value,prop,animation){var tween,collection=(Animation.tweeners[prop]||[]).concat(Animation.tweeners["*"]),index=0,length=collection.length;for(;index<length;index++){if(tween=collection[index].call(animation,prop,value)){// We're done with this property
  return tween;}}}function defaultPrefilter(elem,props,opts){var prop,value,toggle,hooks,oldfire,propTween,restoreDisplay,display,isBox="width"in props||"height"in props,anim=this,orig={},style=elem.style,hidden=elem.nodeType&&isHiddenWithinTree(elem),dataShow=dataPriv.get(elem,"fxshow");// Queue-skipping animations hijack the fx hooks
  if(!opts.queue){hooks=jQuery._queueHooks(elem,"fx");if(hooks.unqueued==null){hooks.unqueued=0;oldfire=hooks.empty.fire;hooks.empty.fire=function(){if(!hooks.unqueued){oldfire();}};}hooks.unqueued++;anim.always(function(){// Ensure the complete handler is called before this completes
  anim.always(function(){hooks.unqueued--;if(!jQuery.queue(elem,"fx").length){hooks.empty.fire();}});});}// Detect show/hide animations
  for(prop in props){value=props[prop];if(rfxtypes.test(value)){delete props[prop];toggle=toggle||value==="toggle";if(value===(hidden?"hide":"show")){// Pretend to be hidden if this is a "show" and
  // there is still data from a stopped show/hide
  if(value==="show"&&dataShow&&dataShow[prop]!==undefined){hidden=true;// Ignore all other no-op show/hide data
  }else {continue;}}orig[prop]=dataShow&&dataShow[prop]||jQuery.style(elem,prop);}}// Bail out if this is a no-op like .hide().hide()
  propTween=!jQuery.isEmptyObject(props);if(!propTween&&jQuery.isEmptyObject(orig)){return;}// Restrict "overflow" and "display" styles during box animations
  if(isBox&&elem.nodeType===1){// Support: IE <=9 - 11, Edge 12 - 15
  // Record all 3 overflow attributes because IE does not infer the shorthand
  // from identically-valued overflowX and overflowY and Edge just mirrors
  // the overflowX value there.
  opts.overflow=[style.overflow,style.overflowX,style.overflowY];// Identify a display type, preferring old show/hide data over the CSS cascade
  restoreDisplay=dataShow&&dataShow.display;if(restoreDisplay==null){restoreDisplay=dataPriv.get(elem,"display");}display=jQuery.css(elem,"display");if(display==="none"){if(restoreDisplay){display=restoreDisplay;}else {// Get nonempty value(s) by temporarily forcing visibility
  showHide([elem],true);restoreDisplay=elem.style.display||restoreDisplay;display=jQuery.css(elem,"display");showHide([elem]);}}// Animate inline elements as inline-block
  if(display==="inline"||display==="inline-block"&&restoreDisplay!=null){if(jQuery.css(elem,"float")==="none"){// Restore the original display value at the end of pure show/hide animations
  if(!propTween){anim.done(function(){style.display=restoreDisplay;});if(restoreDisplay==null){display=style.display;restoreDisplay=display==="none"?"":display;}}style.display="inline-block";}}}if(opts.overflow){style.overflow="hidden";anim.always(function(){style.overflow=opts.overflow[0];style.overflowX=opts.overflow[1];style.overflowY=opts.overflow[2];});}// Implement show/hide animations
  propTween=false;for(prop in orig){// General show/hide setup for this element animation
  if(!propTween){if(dataShow){if("hidden"in dataShow){hidden=dataShow.hidden;}}else {dataShow=dataPriv.access(elem,"fxshow",{display:restoreDisplay});}// Store hidden/visible for toggle so `.stop().toggle()` "reverses"
  if(toggle){dataShow.hidden=!hidden;}// Show elements before animating them
  if(hidden){showHide([elem],true);}/* eslint-disable no-loop-func */anim.done(function(){/* eslint-enable no-loop-func */ // The final step of a "hide" animation is actually hiding the element
  if(!hidden){showHide([elem]);}dataPriv.remove(elem,"fxshow");for(prop in orig){jQuery.style(elem,prop,orig[prop]);}});}// Per-property setup
  propTween=createTween(hidden?dataShow[prop]:0,prop,anim);if(!(prop in dataShow)){dataShow[prop]=propTween.start;if(hidden){propTween.end=propTween.start;propTween.start=0;}}}}function propFilter(props,specialEasing){var index,name,easing,value,hooks;// camelCase, specialEasing and expand cssHook pass
  for(index in props){name=camelCase(index);easing=specialEasing[name];value=props[index];if(Array.isArray(value)){easing=value[1];value=props[index]=value[0];}if(index!==name){props[name]=value;delete props[index];}hooks=jQuery.cssHooks[name];if(hooks&&"expand"in hooks){value=hooks.expand(value);delete props[name];// Not quite $.extend, this won't overwrite existing keys.
  // Reusing 'index' because we have the correct "name"
  for(index in value){if(!(index in props)){props[index]=value[index];specialEasing[index]=easing;}}}else {specialEasing[name]=easing;}}}function Animation(elem,properties,options){var result,stopped,index=0,length=Animation.prefilters.length,deferred=jQuery.Deferred().always(function(){// Don't match elem in the :animated selector
  delete tick.elem;}),tick=function tick(){if(stopped){return false;}var currentTime=fxNow||createFxNow(),remaining=Math.max(0,animation.startTime+animation.duration-currentTime),// Support: Android 2.3 only
  // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497)
  temp=remaining/animation.duration||0,percent=1-temp,index=0,length=animation.tweens.length;for(;index<length;index++){animation.tweens[index].run(percent);}deferred.notifyWith(elem,[animation,percent,remaining]);// If there's more to do, yield
  if(percent<1&&length){return remaining;}// If this was an empty animation, synthesize a final progress notification
  if(!length){deferred.notifyWith(elem,[animation,1,0]);}// Resolve the animation and report its conclusion
  deferred.resolveWith(elem,[animation]);return false;},animation=deferred.promise({elem:elem,props:jQuery.extend({},properties),opts:jQuery.extend(true,{specialEasing:{},easing:jQuery.easing._default},options),originalProperties:properties,originalOptions:options,startTime:fxNow||createFxNow(),duration:options.duration,tweens:[],createTween:function createTween(prop,end){var tween=jQuery.Tween(elem,animation.opts,prop,end,animation.opts.specialEasing[prop]||animation.opts.easing);animation.tweens.push(tween);return tween;},stop:function stop(gotoEnd){var index=0,// If we are going to the end, we want to run all the tweens
  // otherwise we skip this part
  length=gotoEnd?animation.tweens.length:0;if(stopped){return this;}stopped=true;for(;index<length;index++){animation.tweens[index].run(1);}// Resolve when we played the last frame; otherwise, reject
  if(gotoEnd){deferred.notifyWith(elem,[animation,1,0]);deferred.resolveWith(elem,[animation,gotoEnd]);}else {deferred.rejectWith(elem,[animation,gotoEnd]);}return this;}}),props=animation.props;propFilter(props,animation.opts.specialEasing);for(;index<length;index++){result=Animation.prefilters[index].call(animation,elem,props,animation.opts);if(result){if(isFunction(result.stop)){jQuery._queueHooks(animation.elem,animation.opts.queue).stop=result.stop.bind(result);}return result;}}jQuery.map(props,createTween,animation);if(isFunction(animation.opts.start)){animation.opts.start.call(elem,animation);}// Attach callbacks from options
  animation.progress(animation.opts.progress).done(animation.opts.done,animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);jQuery.fx.timer(jQuery.extend(tick,{elem:elem,anim:animation,queue:animation.opts.queue}));return animation;}jQuery.Animation=jQuery.extend(Animation,{tweeners:{"*":[function(prop,value){var tween=this.createTween(prop,value);adjustCSS(tween.elem,prop,rcssNum.exec(value),tween);return tween;}]},tweener:function tweener(props,callback){if(isFunction(props)){callback=props;props=["*"];}else {props=props.match(rnothtmlwhite);}var prop,index=0,length=props.length;for(;index<length;index++){prop=props[index];Animation.tweeners[prop]=Animation.tweeners[prop]||[];Animation.tweeners[prop].unshift(callback);}},prefilters:[defaultPrefilter],prefilter:function prefilter(callback,prepend){if(prepend){Animation.prefilters.unshift(callback);}else {Animation.prefilters.push(callback);}}});jQuery.speed=function(speed,easing,fn){var opt=speed&&_typeof(speed)==="object"?jQuery.extend({},speed):{complete:fn||!fn&&easing||isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&!isFunction(easing)&&easing};// Go to the end state if fx are off
  if(jQuery.fx.off){opt.duration=0;}else {if(typeof opt.duration!=="number"){if(opt.duration in jQuery.fx.speeds){opt.duration=jQuery.fx.speeds[opt.duration];}else {opt.duration=jQuery.fx.speeds._default;}}}// Normalize opt.queue - true/undefined/null -> "fx"
  if(opt.queue==null||opt.queue===true){opt.queue="fx";}// Queueing
  opt.old=opt.complete;opt.complete=function(){if(isFunction(opt.old)){opt.old.call(this);}if(opt.queue){jQuery.dequeue(this,opt.queue);}};return opt;};jQuery.fn.extend({fadeTo:function fadeTo(speed,to,easing,callback){// Show any hidden elements after setting opacity to 0
  return this.filter(isHiddenWithinTree).css("opacity",0).show()// Animate to the value specified
  .end().animate({opacity:to},speed,easing,callback);},animate:function animate(prop,speed,easing,callback){var empty=jQuery.isEmptyObject(prop),optall=jQuery.speed(speed,easing,callback),doAnimation=function doAnimation(){// Operate on a copy of prop so per-property easing won't be lost
  var anim=Animation(this,jQuery.extend({},prop),optall);// Empty animations, or finishing resolves immediately
  if(empty||dataPriv.get(this,"finish")){anim.stop(true);}};doAnimation.finish=doAnimation;return empty||optall.queue===false?this.each(doAnimation):this.queue(optall.queue,doAnimation);},stop:function stop(type,clearQueue,gotoEnd){var stopQueue=function stopQueue(hooks){var stop=hooks.stop;delete hooks.stop;stop(gotoEnd);};if(typeof type!=="string"){gotoEnd=clearQueue;clearQueue=type;type=undefined;}if(clearQueue){this.queue(type||"fx",[]);}return this.each(function(){var dequeue=true,index=type!=null&&type+"queueHooks",timers=jQuery.timers,data=dataPriv.get(this);if(index){if(data[index]&&data[index].stop){stopQueue(data[index]);}}else {for(index in data){if(data[index]&&data[index].stop&&rrun.test(index)){stopQueue(data[index]);}}}for(index=timers.length;index--;){if(timers[index].elem===this&&(type==null||timers[index].queue===type)){timers[index].anim.stop(gotoEnd);dequeue=false;timers.splice(index,1);}}// Start the next in the queue if the last step wasn't forced.
  // Timers currently will call their complete callbacks, which
  // will dequeue but only if they were gotoEnd.
  if(dequeue||!gotoEnd){jQuery.dequeue(this,type);}});},finish:function finish(type){if(type!==false){type=type||"fx";}return this.each(function(){var index,data=dataPriv.get(this),queue=data[type+"queue"],hooks=data[type+"queueHooks"],timers=jQuery.timers,length=queue?queue.length:0;// Enable finishing flag on private data
  data.finish=true;// Empty the queue first
  jQuery.queue(this,type,[]);if(hooks&&hooks.stop){hooks.stop.call(this,true);}// Look for any active animations, and finish them
  for(index=timers.length;index--;){if(timers[index].elem===this&&timers[index].queue===type){timers[index].anim.stop(true);timers.splice(index,1);}}// Look for any animations in the old queue and finish them
  for(index=0;index<length;index++){if(queue[index]&&queue[index].finish){queue[index].finish.call(this);}}// Turn off finishing flag
  delete data.finish;});}});jQuery.each(["toggle","show","hide"],function(_i,name){var cssFn=jQuery.fn[name];jQuery.fn[name]=function(speed,easing,callback){return speed==null||typeof speed==="boolean"?cssFn.apply(this,arguments):this.animate(genFx(name,true),speed,easing,callback);};});// Generate shortcuts for custom animations
  jQuery.each({slideDown:genFx("show"),slideUp:genFx("hide"),slideToggle:genFx("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(name,props){jQuery.fn[name]=function(speed,easing,callback){return this.animate(props,speed,easing,callback);};});jQuery.timers=[];jQuery.fx.tick=function(){var timer,i=0,timers=jQuery.timers;fxNow=Date.now();for(;i<timers.length;i++){timer=timers[i];// Run the timer and safely remove it when done (allowing for external removal)
  if(!timer()&&timers[i]===timer){timers.splice(i--,1);}}if(!timers.length){jQuery.fx.stop();}fxNow=undefined;};jQuery.fx.timer=function(timer){jQuery.timers.push(timer);jQuery.fx.start();};jQuery.fx.interval=13;jQuery.fx.start=function(){if(inProgress){return;}inProgress=true;schedule();};jQuery.fx.stop=function(){inProgress=null;};jQuery.fx.speeds={slow:600,fast:200,// Default speed
  _default:400};// Based off of the plugin by Clint Helfers, with permission.
  jQuery.fn.delay=function(time,type){time=jQuery.fx?jQuery.fx.speeds[time]||time:time;type=type||"fx";return this.queue(type,function(next,hooks){var timeout=window.setTimeout(next,time);hooks.stop=function(){window.clearTimeout(timeout);};});};(function(){var input=document.createElement("input"),select=document.createElement("select"),opt=select.appendChild(document.createElement("option"));input.type="checkbox";// Support: Android <=4.3 only
  // Default value for a checkbox should be "on"
  support.checkOn=input.value!=="";// Support: IE <=11 only
  // Must access selectedIndex to make default options select
  support.optSelected=opt.selected;// Support: IE <=11 only
  // An input loses its value after becoming a radio
  input=document.createElement("input");input.value="t";input.type="radio";support.radioValue=input.value==="t";})();var boolHook,attrHandle=jQuery.expr.attrHandle;jQuery.fn.extend({attr:function attr(name,value){return access(this,jQuery.attr,name,value,arguments.length>1);},removeAttr:function removeAttr(name){return this.each(function(){jQuery.removeAttr(this,name);});}});jQuery.extend({attr:function attr(elem,name,value){var ret,hooks,nType=elem.nodeType;// Don't get/set attributes on text, comment and attribute nodes
  if(nType===3||nType===8||nType===2){return;}// Fallback to prop when attributes are not supported
  if(typeof elem.getAttribute==="undefined"){return jQuery.prop(elem,name,value);}// Attribute hooks are determined by the lowercase version
  // Grab necessary hook if one is defined
  if(nType!==1||!jQuery.isXMLDoc(elem)){hooks=jQuery.attrHooks[name.toLowerCase()]||(jQuery.expr.match.bool.test(name)?boolHook:undefined);}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name);return;}if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}elem.setAttribute(name,value+"");return value;}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}ret=jQuery.find.attr(elem,name);// Non-existent attributes return null, we normalize to undefined
  return ret==null?undefined:ret;},attrHooks:{type:{set:function set(elem,value){if(!support.radioValue&&value==="radio"&&nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val;}return value;}}}},removeAttr:function removeAttr(elem,value){var name,i=0,// Attribute names can contain non-HTML whitespace characters
  // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
  attrNames=value&&value.match(rnothtmlwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){elem.removeAttribute(name);}}}});// Hooks for boolean attributes
  boolHook={set:function set(elem,value,name){if(value===false){// Remove boolean attributes when set to false
  jQuery.removeAttr(elem,name);}else {elem.setAttribute(name,name);}return name;}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(_i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle,lowercaseName=name.toLowerCase();if(!isXML){// Avoid an infinite loop by temporarily removing this function from the getter
  handle=attrHandle[lowercaseName];attrHandle[lowercaseName]=ret;ret=getter(elem,name,isXML)!=null?lowercaseName:null;attrHandle[lowercaseName]=handle;}return ret;};});var rfocusable=/^(?:input|select|textarea|button)$/i,rclickable=/^(?:a|area)$/i;jQuery.fn.extend({prop:function prop(name,value){return access(this,jQuery.prop,name,value,arguments.length>1);},removeProp:function removeProp(name){return this.each(function(){delete this[jQuery.propFix[name]||name];});}});jQuery.extend({prop:function prop(elem,name,value){var ret,hooks,nType=elem.nodeType;// Don't get/set properties on text, comment and attribute nodes
  if(nType===3||nType===8||nType===2){return;}if(nType!==1||!jQuery.isXMLDoc(elem)){// Fix name and attach hooks
  name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name];}if(value!==undefined){if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret;}return elem[name]=value;}if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret;}return elem[name];},propHooks:{tabIndex:{get:function get(elem){// Support: IE <=9 - 11 only
  // elem.tabIndex doesn't always return the
  // correct value when it hasn't been explicitly set
  // Use proper attribute retrieval (trac-12072)
  var tabindex=jQuery.find.attr(elem,"tabindex");if(tabindex){return parseInt(tabindex,10);}if(rfocusable.test(elem.nodeName)||rclickable.test(elem.nodeName)&&elem.href){return 0;}return -1;}}},propFix:{"for":"htmlFor","class":"className"}});// Support: IE <=11 only
  // Accessing the selectedIndex property
  // forces the browser to respect setting selected
  // on the option
  // The getter ensures a default option is selected
  // when in an optgroup
  // eslint rule "no-unused-expressions" is disabled for this code
  // since it considers such accessions noop
  if(!support.optSelected){jQuery.propHooks.selected={get:function get(elem){/* eslint no-unused-expressions: "off" */var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex;}return null;},set:function set(elem){/* eslint no-unused-expressions: "off" */var parent=elem.parentNode;if(parent){parent.selectedIndex;if(parent.parentNode){parent.parentNode.selectedIndex;}}}};}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this;});// Strip and collapse whitespace according to HTML spec
  // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace
  function stripAndCollapse(value){var tokens=value.match(rnothtmlwhite)||[];return tokens.join(" ");}function getClass(elem){return elem.getAttribute&&elem.getAttribute("class")||"";}function classesToArray(value){if(Array.isArray(value)){return value;}if(typeof value==="string"){return value.match(rnothtmlwhite)||[];}return [];}jQuery.fn.extend({addClass:function addClass(value){var classNames,cur,curValue,className,i,finalValue;if(isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,getClass(this)));});}classNames=classesToArray(value);if(classNames.length){return this.each(function(){curValue=getClass(this);cur=this.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){for(i=0;i<classNames.length;i++){className=classNames[i];if(cur.indexOf(" "+className+" ")<0){cur+=className+" ";}}// Only assign if different to avoid unneeded rendering.
  finalValue=stripAndCollapse(cur);if(curValue!==finalValue){this.setAttribute("class",finalValue);}}});}return this;},removeClass:function removeClass(value){var classNames,cur,curValue,className,i,finalValue;if(isFunction(value)){return this.each(function(j){jQuery(this).removeClass(value.call(this,j,getClass(this)));});}if(!arguments.length){return this.attr("class","");}classNames=classesToArray(value);if(classNames.length){return this.each(function(){curValue=getClass(this);// This expression is here for better compressibility (see addClass)
  cur=this.nodeType===1&&" "+stripAndCollapse(curValue)+" ";if(cur){for(i=0;i<classNames.length;i++){className=classNames[i];// Remove *all* instances
  while(cur.indexOf(" "+className+" ")>-1){cur=cur.replace(" "+className+" "," ");}}// Only assign if different to avoid unneeded rendering.
  finalValue=stripAndCollapse(cur);if(curValue!==finalValue){this.setAttribute("class",finalValue);}}});}return this;},toggleClass:function toggleClass(value,stateVal){var classNames,className,i,self,type=_typeof(value),isValidValue=type==="string"||Array.isArray(value);if(isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,getClass(this),stateVal),stateVal);});}if(typeof stateVal==="boolean"&&isValidValue){return stateVal?this.addClass(value):this.removeClass(value);}classNames=classesToArray(value);return this.each(function(){if(isValidValue){// Toggle individual class names
  self=jQuery(this);for(i=0;i<classNames.length;i++){className=classNames[i];// Check each className given, space separated list
  if(self.hasClass(className)){self.removeClass(className);}else {self.addClass(className);}}// Toggle whole class name
  }else if(value===undefined||type==="boolean"){className=getClass(this);if(className){// Store className if set
  dataPriv.set(this,"__className__",className);}// If the element has a class name or if we're passed `false`,
  // then remove the whole classname (if there was one, the above saved it).
  // Otherwise bring back whatever was previously saved (if anything),
  // falling back to the empty string if nothing was stored.
  if(this.setAttribute){this.setAttribute("class",className||value===false?"":dataPriv.get(this,"__className__")||"");}}});},hasClass:function hasClass(selector){var className,elem,i=0;className=" "+selector+" ";while(elem=this[i++]){if(elem.nodeType===1&&(" "+stripAndCollapse(getClass(elem))+" ").indexOf(className)>-1){return true;}}return false;}});var rreturn=/\r/g;jQuery.fn.extend({val:function val(value){var hooks,ret,valueIsFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret;}ret=elem.value;// Handle most common string cases
  if(typeof ret==="string"){return ret.replace(rreturn,"");}// Handle cases where value is null/undef or number
  return ret==null?"":ret;}return;}valueIsFunction=isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return;}if(valueIsFunction){val=value.call(this,i,jQuery(this).val());}else {val=value;}// Treat null/undefined as ""; convert numbers to string
  if(val==null){val="";}else if(typeof val==="number"){val+="";}else if(Array.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+"";});}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];// If set returns undefined, fall back to normal setting
  if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val;}});}});jQuery.extend({valHooks:{option:{get:function get(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:// Support: IE <=10 - 11 only
  // option.text throws exceptions (trac-14686, trac-14858)
  // Strip and collapse whitespace
  // https://html.spec.whatwg.org/#strip-and-collapse-whitespace
  stripAndCollapse(jQuery.text(elem));}},select:{get:function get(elem){var value,option,i,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one",values=one?null:[],max=one?index+1:options.length;if(index<0){i=max;}else {i=one?index:0;}// Loop through all the selected options
  for(;i<max;i++){option=options[i];// Support: IE <=9 only
  // IE8-9 doesn't update selected after form reset (trac-2551)
  if((option.selected||i===index)&&// Don't return options that are disabled or in a disabled optgroup
  !option.disabled&&(!option.parentNode.disabled||!nodeName(option.parentNode,"optgroup"))){// Get the specific value for the option
  value=jQuery(option).val();// We don't need an array for one selects
  if(one){return value;}// Multi-Selects return an array
  values.push(value);}}return values;},set:function set(elem,value){var optionSet,option,options=elem.options,values=jQuery.makeArray(value),i=options.length;while(i--){option=options[i];/* eslint-disable no-cond-assign */if(option.selected=jQuery.inArray(jQuery.valHooks.option.get(option),values)>-1){optionSet=true;}/* eslint-enable no-cond-assign */}// Force browsers to behave consistently when non-matching value is set
  if(!optionSet){elem.selectedIndex=-1;}return values;}}}});// Radios and checkboxes getter/setter
  jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function set(elem,value){if(Array.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>-1;}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value;};}});// Return jQuery for attributes-only inclusion
  var location=window.location;var nonce={guid:Date.now()};var rquery=/\?/;// Cross-browser xml parsing
  jQuery.parseXML=function(data){var xml,parserErrorElem;if(!data||typeof data!=="string"){return null;}// Support: IE 9 - 11 only
  // IE throws on parseFromString with invalid input.
  try{xml=new window.DOMParser().parseFromString(data,"text/xml");}catch(e){}parserErrorElem=xml&&xml.getElementsByTagName("parsererror")[0];if(!xml||parserErrorElem){jQuery.error("Invalid XML: "+(parserErrorElem?jQuery.map(parserErrorElem.childNodes,function(el){return el.textContent;}).join("\n"):data));}return xml;};var rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,stopPropagationCallback=function stopPropagationCallback(e){e.stopPropagation();};jQuery.extend(jQuery.event,{trigger:function trigger(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,lastElement,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=lastElement=tmp=elem=elem||document;// Don't do events on text and comment nodes
  if(elem.nodeType===3||elem.nodeType===8){return;}// focus/blur morphs to focusin/out; ensure we're not firing them right now
  if(rfocusMorph.test(type+jQuery.event.triggered)){return;}if(type.indexOf(".")>-1){// Namespaced trigger; create a regexp to match event type in handle()
  namespaces=type.split(".");type=namespaces.shift();namespaces.sort();}ontype=type.indexOf(":")<0&&"on"+type;// Caller can pass in a jQuery.Event object, Object, or just an event type string
  event=event[jQuery.expando]?event:new jQuery.Event(type,_typeof(event)==="object"&&event);// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
  event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.rnamespace=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;// Clean up the event in case it is being reused
  event.result=undefined;if(!event.target){event.target=elem;}// Clone any incoming data and prepend the event, creating the handler arg list
  data=data==null?[event]:jQuery.makeArray(data,[event]);// Allow special events to draw outside the lines
  special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return;}// Determine event propagation path in advance, per W3C events spec (trac-9951)
  // Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724)
  if(!onlyHandlers&&!special.noBubble&&!isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode;}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur;}// Only add window if we got to document (e.g., not plain obj or detached DOM)
  if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window);}}// Fire handlers on the event path
  i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){lastElement=cur;event.type=i>1?bubbleType:special.bindType||type;// jQuery handler
  handle=(dataPriv.get(cur,"events")||Object.create(null))[event.type]&&dataPriv.get(cur,"handle");if(handle){handle.apply(cur,data);}// Native handler
  handle=ontype&&cur[ontype];if(handle&&handle.apply&&acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault();}}}event.type=type;// If nobody prevented the default action, do it now
  if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&acceptData(elem)){// Call a native DOM method on the target with the same name as the event.
  // Don't do default actions on window, that's where global variables be (trac-6170)
  if(ontype&&isFunction(elem[type])&&!isWindow(elem)){// Don't re-trigger an onFOO event when we call its FOO() method
  tmp=elem[ontype];if(tmp){elem[ontype]=null;}// Prevent re-triggering of the same event, since we already bubbled it above
  jQuery.event.triggered=type;if(event.isPropagationStopped()){lastElement.addEventListener(type,stopPropagationCallback);}elem[type]();if(event.isPropagationStopped()){lastElement.removeEventListener(type,stopPropagationCallback);}jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp;}}}}return event.result;},// Piggyback on a donor event to simulate a different one
  // Used only for `focus(in | out)` events
  simulate:function simulate(type,elem,event){var e=jQuery.extend(new jQuery.Event(),event,{type:type,isSimulated:true});jQuery.event.trigger(e,null,elem);}});jQuery.fn.extend({trigger:function trigger(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},triggerHandler:function triggerHandler(type,data){var elem=this[0];if(elem){return jQuery.event.trigger(type,data,elem,true);}}});var rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(Array.isArray(obj)){// Serialize array item.
  jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){// Treat each array item as a scalar.
  add(prefix,v);}else {// Item is non-scalar (array or object), encode its numeric index.
  buildParams(prefix+"["+(_typeof(v)==="object"&&v!=null?i:"")+"]",v,traditional,add);}});}else if(!traditional&&toType(obj)==="object"){// Serialize object item.
  for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add);}}else {// Serialize scalar item.
  add(prefix,obj);}}// Serialize an array of form elements or a set of
  // key/values into a query string
  jQuery.param=function(a,traditional){var prefix,s=[],add=function add(key,valueOrFunction){// If value is a function, invoke it and use its return value
  var value=isFunction(valueOrFunction)?valueOrFunction():valueOrFunction;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value==null?"":value);};if(a==null){return "";}// If an array was passed in, assume that it is an array of form elements.
  if(Array.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){// Serialize the form elements
  jQuery.each(a,function(){add(this.name,this.value);});}else {// If traditional, encode the "old" way (the way 1.3.2 or older
  // did it), otherwise encode params recursively.
  for(prefix in a){buildParams(prefix,a[prefix],traditional,add);}}// Return the resulting serialization
  return s.join("&");};jQuery.fn.extend({serialize:function serialize(){return jQuery.param(this.serializeArray());},serializeArray:function serializeArray(){return this.map(function(){// Can add propHook for "elements" to filter or add form elements
  var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this;}).filter(function(){var type=this.type;// Use .is( ":disabled" ) so that fieldset[disabled] works
  return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type));}).map(function(_i,elem){var val=jQuery(this).val();if(val==null){return null;}if(Array.isArray(val)){return jQuery.map(val,function(val){return {name:elem.name,value:val.replace(rCRLF,"\r\n")};});}return {name:elem.name,value:val.replace(rCRLF,"\r\n")};}).get();}});var r20=/%20/g,rhash=/#.*$/,rantiCache=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,// trac-7653, trac-8125, trac-8152: local protocol detection
  rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,/* Prefilters
  		       * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
  		       * 2) These are called:
  		       *    - BEFORE asking for a transport
  		       *    - AFTER param serialization (s.data is a string if s.processData is true)
  		       * 3) key is the dataType
  		       * 4) the catchall symbol "*" can be used
  		       * 5) execution will start with transport dataType and THEN continue down to "*" if needed
  		       */prefilters={},/* Transports bindings
  		       * 1) key is the dataType
  		       * 2) the catchall symbol "*" can be used
  		       * 3) selection will start with transport dataType and THEN go to "*" if needed
  		       */transports={},// Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression
  allTypes="*/".concat("*"),// Anchor tag for parsing the document origin
  originAnchor=document.createElement("a");originAnchor.href=location.href;// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
  function addToPrefiltersOrTransports(structure){// dataTypeExpression is optional and defaults to "*"
  return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*";}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnothtmlwhite)||[];if(isFunction(func)){// For each dataType in the dataTypeExpression
  while(dataType=dataTypes[i++]){// Prepend if requested
  if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func);// Otherwise append
  }else {(structure[dataType]=structure[dataType]||[]).push(func);}}}};}// Base inspection function for prefilters and transports
  function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false;}else if(seekingTransport){return !(selected=dataTypeOrTransport);}});return selected;}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*");}// A special extend for ajax options
  // that takes "flat" options (not to be deep extended)
  // Fixes trac-9887
  function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key];}}if(deep){jQuery.extend(true,target,deep);}return target;}/* Handles responses to an ajax request:
  		     * - finds the right dataType (mediates between content-type and expected dataType)
  		     * - returns the corresponding response
  		     */function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;// Remove auto dataType and get content-type in the process
  while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type");}}// Check if we're dealing with a known content-type
  if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break;}}}// Check to see if we have a response for the expected dataType
  if(dataTypes[0]in responses){finalDataType=dataTypes[0];}else {// Try convertible dataTypes
  for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break;}if(!firstDataType){firstDataType=type;}}// Or just use first one
  finalDataType=finalDataType||firstDataType;}// If we found a dataType
  // We add the dataType to the list if needed
  // and return the corresponding response
  if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType);}return responses[finalDataType];}}/* Chain conversions given the request and the original response
  		     * Also sets the responseXXX fields on the jqXHR instance
  		     */function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},// Work with a copy of dataTypes in case we need to modify it for conversion
  dataTypes=s.dataTypes.slice();// Create converters map with lowercased keys
  if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv];}}current=dataTypes.shift();// Convert to each sequential dataType
  while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response;}// Apply the dataFilter if provided
  if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType);}prev=current;current=dataTypes.shift();if(current){// There's only work to do if current dataType is non-auto
  if(current==="*"){current=prev;// Convert response if prev dataType is non-auto and differs from current
  }else if(prev!=="*"&&prev!==current){// Seek a direct converter
  conv=converters[prev+" "+current]||converters["* "+current];// If none found, seek a pair
  if(!conv){for(conv2 in converters){// If conv2 outputs current
  tmp=conv2.split(" ");if(tmp[1]===current){// If prev can be converted to accepted input
  conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){// Condense equivalence converters
  if(conv===true){conv=converters[conv2];// Otherwise, insert the intermediate dataType
  }else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1]);}break;}}}}// Apply converter (if not an equivalence)
  if(conv!==true){// Unless errors are allowed to bubble, catch and return them
  if(conv&&s["throws"]){response=conv(response);}else {try{response=conv(response);}catch(e){return {state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current};}}}}}}return {state:"success",data:response};}jQuery.extend({// Counter for holding the number of active queries
  active:0,// Last-Modified header cache for next request
  lastModified:{},etag:{},ajaxSettings:{url:location.href,type:"GET",isLocal:rlocalProtocol.test(location.protocol),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",/*
  		        timeout: 0,
  		        data: null,
  		        dataType: null,
  		        username: null,
  		        password: null,
  		        cache: null,
  		        throws: false,
  		        traditional: false,
  		        headers: {},
  		        */accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},// Data converters
  // Keys separate source (or catchall "*") and destination types with a single space
  converters:{// Convert anything to text
  "* text":String,// Text to html (true = no transformation)
  "text html":true,// Evaluate text as a json expression
  "text json":JSON.parse,// Parse text as xml
  "text xml":jQuery.parseXML},// For options that shouldn't be deep extended:
  // you can add your own custom options here if
  // and when you create one that shouldn't be
  // deep extended (see ajaxExtend)
  flatOptions:{url:true,context:true}},// Creates a full fledged settings object into target
  // with both ajaxSettings and settings fields.
  // If target is omitted, writes into ajaxSettings.
  ajaxSetup:function ajaxSetup(target,settings){return settings?// Building a settings object
  ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):// Extending ajaxSettings
  ajaxExtend(jQuery.ajaxSettings,target);},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),// Main method
  ajax:function ajax(url,options){// If url is an object, simulate pre-1.5 signature
  if(_typeof(url)==="object"){options=url;url=undefined;}// Force options to be an object
  options=options||{};var transport,// URL without anti-cache param
  cacheURL,// Response headers
  responseHeadersString,responseHeaders,// timeout handle
  timeoutTimer,// Url cleanup var
  urlAnchor,// Request state (becomes false upon send and true upon completion)
  completed,// To know if global events are to be dispatched
  fireGlobals,// Loop variable
  i,// uncached part of the url
  uncached,// Create the final options object
  s=jQuery.ajaxSetup({},options),// Callbacks context
  callbackContext=s.context||s,// Context for global events is callbackContext if it is a DOM node or jQuery collection
  globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,// Deferreds
  deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),// Status-dependent callbacks
  _statusCode=s.statusCode||{},// Headers (they are sent all at once)
  requestHeaders={},requestHeadersNames={},// Default abort message
  strAbort="canceled",// Fake xhr
  jqXHR={readyState:0,// Builds headers hashtable if needed
  getResponseHeader:function getResponseHeader(key){var match;if(completed){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()+" "]=(responseHeaders[match[1].toLowerCase()+" "]||[]).concat(match[2]);}}match=responseHeaders[key.toLowerCase()+" "];}return match==null?null:match.join(", ");},// Raw string
  getAllResponseHeaders:function getAllResponseHeaders(){return completed?responseHeadersString:null;},// Caches the header
  setRequestHeader:function setRequestHeader(name,value){if(completed==null){name=requestHeadersNames[name.toLowerCase()]=requestHeadersNames[name.toLowerCase()]||name;requestHeaders[name]=value;}return this;},// Overrides response content-type header
  overrideMimeType:function overrideMimeType(type){if(completed==null){s.mimeType=type;}return this;},// Status-dependent callbacks
  statusCode:function statusCode(map){var code;if(map){if(completed){// Execute the appropriate callbacks
  jqXHR.always(map[jqXHR.status]);}else {// Lazy-add the new callbacks in a way that preserves old ones
  for(code in map){_statusCode[code]=[_statusCode[code],map[code]];}}}return this;},// Cancel the request
  abort:function abort(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText);}done(0,finalText);return this;}};// Attach deferreds
  deferred.promise(jqXHR);// Add protocol if not provided (prefilters might expect it)
  // Handle falsy url in the settings object (trac-10093: consistency with old signature)
  // We also use the url parameter if available
  s.url=((url||s.url||location.href)+"").replace(rprotocol,location.protocol+"//");// Alias method option to type as per ticket trac-12004
  s.type=options.method||options.type||s.method||s.type;// Extract dataTypes list
  s.dataTypes=(s.dataType||"*").toLowerCase().match(rnothtmlwhite)||[""];// A cross-domain request is in order when the origin doesn't match the current origin.
  if(s.crossDomain==null){urlAnchor=document.createElement("a");// Support: IE <=8 - 11, Edge 12 - 15
  // IE throws exception on accessing the href property if url is malformed,
  // e.g. http://example.com:80x/
  try{urlAnchor.href=s.url;// Support: IE <=8 - 11 only
  // Anchor's host property isn't correctly set when s.url is relative
  urlAnchor.href=urlAnchor.href;s.crossDomain=originAnchor.protocol+"//"+originAnchor.host!==urlAnchor.protocol+"//"+urlAnchor.host;}catch(e){// If there is an error parsing the URL, assume it is crossDomain,
  // it can be rejected by the transport if it is invalid
  s.crossDomain=true;}}// Convert data if not already a string
  if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional);}// Apply prefilters
  inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);// If request was aborted inside a prefilter, stop there
  if(completed){return jqXHR;}// We can fire global events as of now if asked to
  // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118)
  fireGlobals=jQuery.event&&s.global;// Watch for a new set of requests
  if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart");}// Uppercase the type
  s.type=s.type.toUpperCase();// Determine if request has content
  s.hasContent=!rnoContent.test(s.type);// Save the URL in case we're toying with the If-Modified-Since
  // and/or If-None-Match header later on
  // Remove hash to simplify url manipulation
  cacheURL=s.url.replace(rhash,"");// More options handling for requests with no content
  if(!s.hasContent){// Remember the hash so we can put it back
  uncached=s.url.slice(cacheURL.length);// If data is available and should be processed, append data to url
  if(s.data&&(s.processData||typeof s.data==="string")){cacheURL+=(rquery.test(cacheURL)?"&":"?")+s.data;// trac-9682: remove data so that it's not used in an eventual retry
  delete s.data;}// Add or update anti-cache param if needed
  if(s.cache===false){cacheURL=cacheURL.replace(rantiCache,"$1");uncached=(rquery.test(cacheURL)?"&":"?")+"_="+nonce.guid++ +uncached;}// Put hash and anti-cache on the URL that will be requested (gh-1732)
  s.url=cacheURL+uncached;// Change '%20' to '+' if this is encoded form body content (gh-2658)
  }else if(s.data&&s.processData&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0){s.data=s.data.replace(r20,"+");}// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL]);}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL]);}}// Set the correct header, if data is being sent
  if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType);}// Set the Accepts header for the server, depending on the dataType
  jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);// Check for headers option
  for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i]);}// Allow custom headers/mimetypes and early abort
  if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||completed)){// Abort if not done already and return
  return jqXHR.abort();}// Aborting is no longer a cancellation
  strAbort="abort";// Install callbacks on deferreds
  completeDeferred.add(s.complete);jqXHR.done(s.success);jqXHR.fail(s.error);// Get transport
  transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);// If no transport, we auto-abort
  if(!transport){done(-1,"No Transport");}else {jqXHR.readyState=1;// Send global event
  if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s]);}// If request was aborted inside ajaxSend, stop there
  if(completed){return jqXHR;}// Timeout
  if(s.async&&s.timeout>0){timeoutTimer=window.setTimeout(function(){jqXHR.abort("timeout");},s.timeout);}try{completed=false;transport.send(requestHeaders,done);}catch(e){// Rethrow post-completion exceptions
  if(completed){throw e;}// Propagate others as results
  done(-1,e);}}// Callback for when everything is done
  function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;// Ignore repeat invocations
  if(completed){return;}completed=true;// Clear timeout if it exists
  if(timeoutTimer){window.clearTimeout(timeoutTimer);}// Dereference transport for early garbage collection
  // (no matter how long the jqXHR object will be used)
  transport=undefined;// Cache response headers
  responseHeadersString=headers||"";// Set readyState
  jqXHR.readyState=status>0?4:0;// Determine if successful
  isSuccess=status>=200&&status<300||status===304;// Get response data
  if(responses){response=ajaxHandleResponses(s,jqXHR,responses);}// Use a noop converter for missing script but not if jsonp
  if(!isSuccess&&jQuery.inArray("script",s.dataTypes)>-1&&jQuery.inArray("json",s.dataTypes)<0){s.converters["text script"]=function(){};}// Convert no matter what (that way responseXXX fields are always set)
  response=ajaxConvert(s,response,jqXHR,isSuccess);// If successful, handle type chaining
  if(isSuccess){// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
  if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified;}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified;}}// if no content
  if(status===204||s.type==="HEAD"){statusText="nocontent";// if not modified
  }else if(status===304){statusText="notmodified";// If we have data, let's convert it
  }else {statusText=response.state;success=response.data;error=response.error;isSuccess=!error;}}else {// Extract error from statusText and normalize for non-aborts
  error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0;}}}// Set data for the fake xhr object
  jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";// Success/Error
  if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR]);}else {deferred.rejectWith(callbackContext,[jqXHR,statusText,error]);}// Status-dependent callbacks
  jqXHR.statusCode(_statusCode);_statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error]);}// Complete
  completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);// Handle the global AJAX counter
  if(! --jQuery.active){jQuery.event.trigger("ajaxStop");}}}return jqXHR;},getJSON:function getJSON(url,data,callback){return jQuery.get(url,data,callback,"json");},getScript:function getScript(url,callback){return jQuery.get(url,undefined,callback,"script");}});jQuery.each(["get","post"],function(_i,method){jQuery[method]=function(url,data,callback,type){// Shift arguments if data argument was omitted
  if(isFunction(data)){type=type||callback;callback=data;data=undefined;}// The url can be an options object (which then must have .url)
  return jQuery.ajax(jQuery.extend({url:url,type:method,dataType:type,data:data,success:callback},jQuery.isPlainObject(url)&&url));};});jQuery.ajaxPrefilter(function(s){var i;for(i in s.headers){if(i.toLowerCase()==="content-type"){s.contentType=s.headers[i]||"";}}});jQuery._evalUrl=function(url,options,doc){return jQuery.ajax({url:url,// Make this explicit, since user can override this through ajaxSetup (trac-11264)
  type:"GET",dataType:"script",cache:true,async:false,global:false,// Only evaluate the response if it is successful (gh-4126)
  // dataFilter is not invoked for failure responses, so using it instead
  // of the default converter is kludgy but it works.
  converters:{"text script":function textScript(){}},dataFilter:function dataFilter(response){jQuery.globalEval(response,options,doc);}});};jQuery.fn.extend({wrapAll:function wrapAll(html){var wrap;if(this[0]){if(isFunction(html)){html=html.call(this[0]);}// The elements to wrap the target around
  wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0]);}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild;}return elem;}).append(this);}return this;},wrapInner:function wrapInner(html){if(isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i));});}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html);}else {self.append(html);}});},wrap:function wrap(html){var htmlIsFunction=isFunction(html);return this.each(function(i){jQuery(this).wrapAll(htmlIsFunction?html.call(this,i):html);});},unwrap:function unwrap(selector){this.parent(selector).not("body").each(function(){jQuery(this).replaceWith(this.childNodes);});return this;}});jQuery.expr.pseudos.hidden=function(elem){return !jQuery.expr.pseudos.visible(elem);};jQuery.expr.pseudos.visible=function(elem){return !!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};jQuery.ajaxSettings.xhr=function(){try{return new window.XMLHttpRequest();}catch(e){}};var xhrSuccessStatus={// File protocol always yields status code 0, assume 200
  0:200,// Support: IE <=9 only
  // trac-1450: sometimes IE returns 1223 when it should be 204
  1223:204},xhrSupported=jQuery.ajaxSettings.xhr();support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var _callback,errorCallback;// Cross domain only allowed if supported through XMLHttpRequest
  if(support.cors||xhrSupported&&!options.crossDomain){return {send:function send(headers,complete){var i,xhr=options.xhr();xhr.open(options.type,options.url,options.async,options.username,options.password);// Apply custom fields if provided
  if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i];}}// Override mime type if needed
  if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType);}// X-Requested-With header
  // For cross-domain requests, seeing as conditions for a preflight are
  // akin to a jigsaw puzzle, we simply never set it to be sure.
  // (it can always be set on a per-request basis or even using ajaxSetup)
  // For same-domain requests, won't change header if already provided.
  if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest";}// Set headers
  for(i in headers){xhr.setRequestHeader(i,headers[i]);}// Callback
  _callback=function callback(type){return function(){if(_callback){_callback=errorCallback=xhr.onload=xhr.onerror=xhr.onabort=xhr.ontimeout=xhr.onreadystatechange=null;if(type==="abort"){xhr.abort();}else if(type==="error"){// Support: IE <=9 only
  // On a manual native abort, IE9 throws
  // errors on any property access that is not readyState
  if(typeof xhr.status!=="number"){complete(0,"error");}else {complete(// File: protocol always yields status 0; see trac-8605, trac-14207
  xhr.status,xhr.statusText);}}else {complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,// Support: IE <=9 only
  // IE9 has no XHR2 but throws on binary (trac-11426)
  // For XHR2 non-text, let the caller handle it (gh-2498)
  (xhr.responseType||"text")!=="text"||typeof xhr.responseText!=="string"?{binary:xhr.response}:{text:xhr.responseText},xhr.getAllResponseHeaders());}}};};// Listen to events
  xhr.onload=_callback();errorCallback=xhr.onerror=xhr.ontimeout=_callback("error");// Support: IE 9 only
  // Use onreadystatechange to replace onabort
  // to handle uncaught aborts
  if(xhr.onabort!==undefined){xhr.onabort=errorCallback;}else {xhr.onreadystatechange=function(){// Check readyState before timeout as it changes
  if(xhr.readyState===4){// Allow onerror to be called first,
  // but that will not handle a native abort
  // Also, save errorCallback to a variable
  // as xhr.onerror cannot be accessed
  window.setTimeout(function(){if(_callback){errorCallback();}});}};}// Create the abort callback
  _callback=_callback("abort");try{// Do send the request (this may raise an exception)
  xhr.send(options.hasContent&&options.data||null);}catch(e){// trac-14683: Only rethrow if this hasn't been notified as an error yet
  if(_callback){throw e;}}},abort:function abort(){if(_callback){_callback();}}};}});// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
  jQuery.ajaxPrefilter(function(s){if(s.crossDomain){s.contents.script=false;}});// Install script dataType
  jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, "+"application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function textScript(text){jQuery.globalEval(text);return text;}}});// Handle cache's special case and crossDomain
  jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false;}if(s.crossDomain){s.type="GET";}});// Bind script tag hack transport
  jQuery.ajaxTransport("script",function(s){// This transport only deals with cross domain or forced-by-attrs requests
  if(s.crossDomain||s.scriptAttrs){var script,_callback2;return {send:function send(_,complete){script=jQuery("<script>").attr(s.scriptAttrs||{}).prop({charset:s.scriptCharset,src:s.url}).on("load error",_callback2=function callback(evt){script.remove();_callback2=null;if(evt){complete(evt.type==="error"?404:200,evt.type);}});// Use native DOM manipulation to avoid our domManip AJAX trickery
  document.head.appendChild(script[0]);},abort:function abort(){if(_callback2){_callback2();}}};}});var oldCallbacks=[],rjsonp=/(=)\?(?=&|$)|\?\?/;// Default jsonp settings
  jQuery.ajaxSetup({jsonp:"callback",jsonpCallback:function jsonpCallback(){var callback=oldCallbacks.pop()||jQuery.expando+"_"+nonce.guid++;this[callback]=true;return callback;}});// Detect, normalize options and install callbacks for jsonp requests
  jQuery.ajaxPrefilter("json jsonp",function(s,originalSettings,jqXHR){var callbackName,overwritten,responseContainer,jsonProp=s.jsonp!==false&&(rjsonp.test(s.url)?"url":typeof s.data==="string"&&(s.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&rjsonp.test(s.data)&&"data");// Handle iff the expected data type is "jsonp" or we have a parameter to set
  if(jsonProp||s.dataTypes[0]==="jsonp"){// Get callback name, remembering preexisting value associated with it
  callbackName=s.jsonpCallback=isFunction(s.jsonpCallback)?s.jsonpCallback():s.jsonpCallback;// Insert callback into url or form data
  if(jsonProp){s[jsonProp]=s[jsonProp].replace(rjsonp,"$1"+callbackName);}else if(s.jsonp!==false){s.url+=(rquery.test(s.url)?"&":"?")+s.jsonp+"="+callbackName;}// Use data converter to retrieve json after script execution
  s.converters["script json"]=function(){if(!responseContainer){jQuery.error(callbackName+" was not called");}return responseContainer[0];};// Force json dataType
  s.dataTypes[0]="json";// Install callback
  overwritten=window[callbackName];window[callbackName]=function(){responseContainer=arguments;};// Clean-up function (fires after converters)
  jqXHR.always(function(){// If previous value didn't exist - remove it
  if(overwritten===undefined){jQuery(window).removeProp(callbackName);// Otherwise restore preexisting value
  }else {window[callbackName]=overwritten;}// Save back as free
  if(s[callbackName]){// Make sure that re-using the options doesn't screw things around
  s.jsonpCallback=originalSettings.jsonpCallback;// Save the callback name for future use
  oldCallbacks.push(callbackName);}// Call if it was a function and we have a response
  if(responseContainer&&isFunction(overwritten)){overwritten(responseContainer[0]);}responseContainer=overwritten=undefined;});// Delegate to script
  return "script";}});// Support: Safari 8 only
  // In Safari 8 documents created via document.implementation.createHTMLDocument
  // collapse sibling forms: the second one becomes a child of the first one.
  // Because of that, this security measure has to be disabled in Safari 8.
  // https://bugs.webkit.org/show_bug.cgi?id=137337
  support.createHTMLDocument=function(){var body=document.implementation.createHTMLDocument("").body;body.innerHTML="<form></form><form></form>";return body.childNodes.length===2;}();// Argument "data" should be string of html
  // context (optional): If specified, the fragment will be created in this context,
  // defaults to document
  // keepScripts (optional): If true, will include scripts passed in the html string
  jQuery.parseHTML=function(data,context,keepScripts){if(typeof data!=="string"){return [];}if(typeof context==="boolean"){keepScripts=context;context=false;}var base,parsed,scripts;if(!context){// Stop scripts or inline event handlers from being executed immediately
  // by using document.implementation
  if(support.createHTMLDocument){context=document.implementation.createHTMLDocument("");// Set the base href for the created document
  // so any parsed elements with URLs
  // are based on the document's URL (gh-2965)
  base=context.createElement("base");base.href=document.location.href;context.head.appendChild(base);}else {context=document;}}parsed=rsingleTag.exec(data);scripts=!keepScripts&&[];// Single tag
  if(parsed){return [context.createElement(parsed[1])];}parsed=buildFragment([data],context,scripts);if(scripts&&scripts.length){jQuery(scripts).remove();}return jQuery.merge([],parsed.childNodes);};/**
  		     * Load a url into a page
  		     */jQuery.fn.load=function(url,params,callback){var selector,type,response,self=this,off=url.indexOf(" ");if(off>-1){selector=stripAndCollapse(url.slice(off));url=url.slice(0,off);}// If it's a function
  if(isFunction(params)){// We assume that it's the callback
  callback=params;params=undefined;// Otherwise, build a param string
  }else if(params&&_typeof(params)==="object"){type="POST";}// If we have elements to modify, make the request
  if(self.length>0){jQuery.ajax({url:url,// If "type" variable is undefined, then "GET" method will be used.
  // Make value of this field explicit since
  // user can override it through ajaxSetup method
  type:type||"GET",dataType:"html",data:params}).done(function(responseText){// Save response for use in complete callback
  response=arguments;self.html(selector?// If a selector was specified, locate the right elements in a dummy div
  // Exclude scripts to avoid IE 'Permission Denied' errors
  jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector):// Otherwise use the full result
  responseText);// If the request succeeds, this function gets "data", "status", "jqXHR"
  // but they are ignored because response was set above.
  // If it fails, this function gets "jqXHR", "status", "error"
  }).always(callback&&function(jqXHR,status){self.each(function(){callback.apply(this,response||[jqXHR.responseText,status,jqXHR]);});});}return this;};jQuery.expr.pseudos.animated=function(elem){return jQuery.grep(jQuery.timers,function(fn){return elem===fn.elem;}).length;};jQuery.offset={setOffset:function setOffset(elem,options,i){var curPosition,curLeft,curCSSTop,curTop,curOffset,curCSSLeft,calculatePosition,position=jQuery.css(elem,"position"),curElem=jQuery(elem),props={};// Set position first, in-case top/left are set even on static elem
  if(position==="static"){elem.style.position="relative";}curOffset=curElem.offset();curCSSTop=jQuery.css(elem,"top");curCSSLeft=jQuery.css(elem,"left");calculatePosition=(position==="absolute"||position==="fixed")&&(curCSSTop+curCSSLeft).indexOf("auto")>-1;// Need to be able to calculate position if either
  // top or left is auto and position is either absolute or fixed
  if(calculatePosition){curPosition=curElem.position();curTop=curPosition.top;curLeft=curPosition.left;}else {curTop=parseFloat(curCSSTop)||0;curLeft=parseFloat(curCSSLeft)||0;}if(isFunction(options)){// Use jQuery.extend here to allow modification of coordinates argument (gh-1848)
  options=options.call(elem,i,jQuery.extend({},curOffset));}if(options.top!=null){props.top=options.top-curOffset.top+curTop;}if(options.left!=null){props.left=options.left-curOffset.left+curLeft;}if("using"in options){options.using.call(elem,props);}else {curElem.css(props);}}};jQuery.fn.extend({// offset() relates an element's border box to the document origin
  offset:function offset(options){// Preserve chaining for setter
  if(arguments.length){return options===undefined?this:this.each(function(i){jQuery.offset.setOffset(this,options,i);});}var rect,win,elem=this[0];if(!elem){return;}// Return zeros for disconnected and hidden (display: none) elements (gh-2310)
  // Support: IE <=11 only
  // Running getBoundingClientRect on a
  // disconnected node in IE throws an error
  if(!elem.getClientRects().length){return {top:0,left:0};}// Get document-relative position by adding viewport scroll to viewport-relative gBCR
  rect=elem.getBoundingClientRect();win=elem.ownerDocument.defaultView;return {top:rect.top+win.pageYOffset,left:rect.left+win.pageXOffset};},// position() relates an element's margin box to its offset parent's padding box
  // This corresponds to the behavior of CSS absolute positioning
  position:function position(){if(!this[0]){return;}var offsetParent,offset,doc,elem=this[0],parentOffset={top:0,left:0};// position:fixed elements are offset from the viewport, which itself always has zero offset
  if(jQuery.css(elem,"position")==="fixed"){// Assume position:fixed implies availability of getBoundingClientRect
  offset=elem.getBoundingClientRect();}else {offset=this.offset();// Account for the *real* offset parent, which can be the document or its root element
  // when a statically positioned element is identified
  doc=elem.ownerDocument;offsetParent=elem.offsetParent||doc.documentElement;while(offsetParent&&(offsetParent===doc.body||offsetParent===doc.documentElement)&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.parentNode;}if(offsetParent&&offsetParent!==elem&&offsetParent.nodeType===1){// Incorporate borders into its offset, since they are outside its content origin
  parentOffset=jQuery(offsetParent).offset();parentOffset.top+=jQuery.css(offsetParent,"borderTopWidth",true);parentOffset.left+=jQuery.css(offsetParent,"borderLeftWidth",true);}}// Subtract parent offsets and element margins
  return {top:offset.top-parentOffset.top-jQuery.css(elem,"marginTop",true),left:offset.left-parentOffset.left-jQuery.css(elem,"marginLeft",true)};},// This method will return documentElement in the following cases:
  // 1) For the element inside the iframe without offsetParent, this method will return
  //    documentElement of the parent window
  // 2) For the hidden or detached element
  // 3) For body or html element, i.e. in case of the html node - it will return itself
  //
  // but those exceptions were never presented as a real life use-cases
  // and might be considered as more preferable results.
  //
  // This logic, however, is not guaranteed and can change at any point in the future
  offsetParent:function offsetParent(){return this.map(function(){var offsetParent=this.offsetParent;while(offsetParent&&jQuery.css(offsetParent,"position")==="static"){offsetParent=offsetParent.offsetParent;}return offsetParent||documentElement;});}});// Create scrollLeft and scrollTop methods
  jQuery.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(method,prop){var top="pageYOffset"===prop;jQuery.fn[method]=function(val){return access(this,function(elem,method,val){// Coalesce documents and windows
  var win;if(isWindow(elem)){win=elem;}else if(elem.nodeType===9){win=elem.defaultView;}if(val===undefined){return win?win[prop]:elem[method];}if(win){win.scrollTo(!top?val:win.pageXOffset,top?val:win.pageYOffset);}else {elem[method]=val;}},method,val,arguments.length);};});// Support: Safari <=7 - 9.1, Chrome <=37 - 49
  // Add the top/left cssHooks using jQuery.fn.position
  // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
  // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347
  // getComputedStyle returns percent when specified for top/left/bottom/right;
  // rather than make the css module depend on the offset module, just check for it here
  jQuery.each(["top","left"],function(_i,prop){jQuery.cssHooks[prop]=addGetHookIf(support.pixelPosition,function(elem,computed){if(computed){computed=curCSS(elem,prop);// If curCSS returns percentage, fallback to offset
  return rnumnonpx.test(computed)?jQuery(elem).position()[prop]+"px":computed;}});});// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
  jQuery.each({Height:"height",Width:"width"},function(name,type){jQuery.each({padding:"inner"+name,content:type,"":"outer"+name},function(defaultExtra,funcName){// Margin is only for outerHeight, outerWidth
  jQuery.fn[funcName]=function(margin,value){var chainable=arguments.length&&(defaultExtra||typeof margin!=="boolean"),extra=defaultExtra||(margin===true||value===true?"margin":"border");return access(this,function(elem,type,value){var doc;if(isWindow(elem)){// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
  return funcName.indexOf("outer")===0?elem["inner"+name]:elem.document.documentElement["client"+name];}// Get document width or height
  if(elem.nodeType===9){doc=elem.documentElement;// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],
  // whichever is greatest
  return Math.max(elem.body["scroll"+name],doc["scroll"+name],elem.body["offset"+name],doc["offset"+name],doc["client"+name]);}return value===undefined?// Get width or height on the element, requesting but not forcing parseFloat
  jQuery.css(elem,type,extra):// Set width or height on the element
  jQuery.style(elem,type,value,extra);},type,chainable?margin:undefined,chainable);};});});jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(_i,type){jQuery.fn[type]=function(fn){return this.on(type,fn);};});jQuery.fn.extend({bind:function bind(types,data,fn){return this.on(types,null,data,fn);},unbind:function unbind(types,fn){return this.off(types,null,fn);},delegate:function delegate(selector,types,data,fn){return this.on(types,selector,data,fn);},undelegate:function undelegate(selector,types,fn){// ( namespace ) or ( selector, types [, fn] )
  return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn);},hover:function hover(fnOver,fnOut){return this.on("mouseenter",fnOver).on("mouseleave",fnOut||fnOver);}});jQuery.each(("blur focus focusin focusout resize scroll click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup contextmenu").split(" "),function(_i,name){// Handle event binding
  jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name);};});// Support: Android <=4.0 only
  // Make sure we trim BOM and NBSP
  // Require that the "whitespace run" starts from a non-whitespace
  // to avoid O(N^2) behavior when the engine would try matching "\s+$" at each space position.
  var rtrim=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;// Bind a function to a context, optionally partially applying any
  // arguments.
  // jQuery.proxy is deprecated to promote standards (specifically Function#bind)
  // However, it is not slated for removal any time soon
  jQuery.proxy=function(fn,context){var tmp,args,proxy;if(typeof context==="string"){tmp=fn[context];context=fn;fn=tmp;}// Quick check to determine if target is callable, in the spec
  // this throws a TypeError, but we will just return undefined.
  if(!isFunction(fn)){return undefined;}// Simulated bind
  args=_slice.call(arguments,2);proxy=function proxy(){return fn.apply(context||this,args.concat(_slice.call(arguments)));};// Set the guid of unique handler to the same of original handler, so it can be removed
  proxy.guid=fn.guid=fn.guid||jQuery.guid++;return proxy;};jQuery.holdReady=function(hold){if(hold){jQuery.readyWait++;}else {jQuery.ready(true);}};jQuery.isArray=Array.isArray;jQuery.parseJSON=JSON.parse;jQuery.nodeName=nodeName;jQuery.isFunction=isFunction;jQuery.isWindow=isWindow;jQuery.camelCase=camelCase;jQuery.type=toType;jQuery.now=Date.now;jQuery.isNumeric=function(obj){// As of jQuery 3.0, isNumeric is limited to
  // strings and numbers (primitives or objects)
  // that can be coerced to finite numbers (gh-2662)
  var type=jQuery.type(obj);return (type==="number"||type==="string")&&// parseFloat NaNs numeric-cast false positives ("")
  // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
  // subtraction forces infinities to NaN
  !isNaN(obj-parseFloat(obj));};jQuery.trim=function(text){return text==null?"":(text+"").replace(rtrim,"$1");};var// Map over jQuery in case of overwrite
  _jQuery=window.jQuery,// Map over the $ in case of overwrite
  _$=window.$;jQuery.noConflict=function(deep){if(window.$===jQuery){window.$=_$;}if(deep&&window.jQuery===jQuery){window.jQuery=_jQuery;}return jQuery;};// Expose jQuery and $ identifiers, even in AMD
  // (trac-7102#comment:10, https://github.com/jquery/jquery/pull/557)
  // and CommonJS for browser emulators (trac-13566)
  if(typeof noGlobal==="undefined"){window.jQuery=window.$=jQuery;}return jQuery;});})(jquery);var jqueryExports=jquery.exports;var $=/*@__PURE__*/getDefaultExportFromCjs(jqueryExports);var ESCanvas=function(){var self=null;//self指向ESCanvas类
  //ESCanvas类私有成员变量
  var CANVAS=Symbol("CANVAS");//画布
  var CONTEXT=Symbol("CONTEXT");//绘图上下文
  var SHAPES=Symbol("SHAPES");//图形数组
  var DRAWSTATUS=Symbol("DRAWSTATUS");//是否开启绘图
  var SHAPETYPE=Symbol("SHAPETYPE");//图形类型
  var MAXSHAPENUMSUPPORT=Symbol("MAXSHAPENUMSUPPORT");//支持最大的图形个数
  var SHAPESTYLE=Symbol("SHAPESTYLE");//图形样式
  var POLYGONDRAWING=Symbol("POLYGONDRAWING");//正在绘制多边形
  var CURRENTSHAPEINFO=Symbol("CURRENTSHAPEINFO");//当前图形id
  var DRAWSHAPEMULTIONETIME=Symbol("DRAWSHAPEMULTIONETIME");//一次是否可绘制多个图形
  var EVENTCALLBACK=Symbol("EVENTCALLBACK");//画布重绘
  function redraw(){self[CONTEXT].clearRect(0,0,self.m_iCanvasWidth,self.m_iCanvasHeight);for(var i=0,len=self[SHAPES].length;i<len;i++){//遍历图形列表，绘制所有图形
  self[SHAPES][i].draw();}}//添加图形到列表
  function addShape(oShape){var iLen=self[SHAPES].length;if(iLen<self[MAXSHAPENUMSUPPORT]){self[SHAPES].push(oShape);}}//事件初始化
  function initEvent(){var bPainting=false;var inCanvas={};//鼠标是否还在画布中
  var iMouseDownX=0;//mousedown事件点击时的X坐标
  var iMouseDownY=0;//mousedown事件点击时的Y坐标
  var iTouchDownX=0;var iTouchDownY=0;var iTouchUpX=0;var iTouchUpY=0;var szStatus="draw";//draw, drag, stretch
  var oShape=null;//是否被选中，返回被选中图像索引值
  function getChooseBoxIndex(){var iIndex=-1;for(var i=0,iLen=self[SHAPES].length;i<iLen;i++){if(self[SHAPES][i].m_bChoosed){iIndex=i;break;}}return iIndex;}//禁止右键菜单
  self[CANVAS][0].oncontextmenu=function(){return false;};//禁止双击选中
  self[CANVAS][0].onselectstart=function(){return false;};//鼠标点击事件
  self[CANVAS].unbind();self[CANVAS].bind("mousedown",function(e){if(e.button===2){//鼠标右键闭合图形
  if(self[POLYGONDRAWING]&&oShape){//多边形并未闭合
  if(oShape.m_aPoint.length>=oShape.m_iMinClosed){oShape.m_bClosed=true;self[POLYGONDRAWING]=false;oShape.setPointInfo(oShape.m_aPoint);addShape(oShape);redraw();bPainting=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId);}}}else if(e.button===0){//鼠标左键
  if(bPainting){//优化鼠标移出画布的异常情况
  if(Math.abs(e.offsetX-iMouseDownX)>2&&Math.abs(e.offsetY-iMouseDownY)>2){addShape(oShape);if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}}if(self[EVENTCALLBACK]){var oRECT={startPos:[],endPos:[]};oRECT.startPos=[iMouseDownX,iMouseDownY];oRECT.endPos=[e.offsetX,e.offsetY];self[EVENTCALLBACK]&&self[EVENTCALLBACK](oRECT);self.clearAllShape();}oShape=null;bPainting=false;return;}iMouseDownX=e.offsetX;iMouseDownY=e.offsetY;szStatus="draw";if(!self[POLYGONDRAWING]){//不在绘制多边形
  //目前是否已经选中某个图形
  var iBoxIndex=getChooseBoxIndex();if(iBoxIndex!==-1){//判断是否在圆点内
  if(self[SHAPES][iBoxIndex].inArc(e.offsetX,e.offsetY,5)){szStatus="stretch";}}//未选中圆点，则判断是否选中某个图形
  if(szStatus!=="stretch"){//判断鼠标是否在图形内
  for(var i=0,iLen=self[SHAPES].length;i<iLen;i++){if(self[SHAPES][i].inShape(e.offsetX,e.offsetY)&&self[SHAPES][i].m_iEditType!==2){self[SHAPES][i].m_bChoosed=true;self[SHAPES][i].getMouseDownPoints(e.offsetX,e.offsetY);szStatus="drag";window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][i].m_szType,"onChoose",self[SHAPES][i].m_szId);}else {self[SHAPES][i].m_bChoosed=false;}}}if(szStatus==="drag"){self[CANVAS][0].style.cursor="move";}else {self[CANVAS][0].style.cursor="default";}// 重绘模式为自动重绘, 鼠标左键down没有触发drag和stretch时, 就进行重绘
  if("draw"===szStatus&&1===self[SHAPES].length&&1===self[SHAPES][0].m_iRedrawMode){// 删除原来保存的多边形, 否则会加两个id一样的
  self.deleteRepeatPolyonById(self[SHAPES][0].m_szId);self[DRAWSTATUS]=true;}if(self[DRAWSTATUS]&&!self[DRAWSHAPEMULTIONETIME]){szStatus="draw";}}if(szStatus==="draw"){if(self[DRAWSTATUS]){if(self[MAXSHAPENUMSUPPORT]<=self[SHAPES].length&&self[SHAPETYPE]!=="Grid"&&self[SHAPETYPE]!=="Point"){return;}if(self[SHAPETYPE]==="Rect"){oShape=new Rect();oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||"";}else if(self[SHAPETYPE]==="Grid"){if(self[SHAPES].length===0){oShape=new MotionGrid();addShape(oShape);}}else if(self[SHAPETYPE]==="Polygon"){if(!self[POLYGONDRAWING]){self[POLYGONDRAWING]=true;oShape=new Polygon();oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||"";oShape.m_iMinClosed=self[CURRENTSHAPEINFO].iMinClosed||3;oShape.m_iMaxPointNum=self[CURRENTSHAPEINFO].iMaxPointNum||11;oShape.m_iPolygonType=self[CURRENTSHAPEINFO].iPolygonType;oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.m_szFillColor=self[CURRENTSHAPEINFO].szFillColor;oShape.m_iTranslucent=self[CURRENTSHAPEINFO].iTranslucent;oShape.m_iRedrawMode=self[CURRENTSHAPEINFO].iRedrawMode;}if(oShape.m_iPolygonType===1){oShape.addPoint(iMouseDownX,iMouseDownY);if(oShape.m_aPoint.length===oShape.m_iMaxPointNum){oShape.m_bClosed=true;self[POLYGONDRAWING]=false;addShape(oShape);redraw();bPainting=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId);}}}else if(self[SHAPETYPE]==="Point"){self.clearShapeByType("Point");oShape=new Point();oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.setPointInfo([[iMouseDownX,iMouseDownY]]);addShape(oShape);redraw();}}}bPainting=true;}});//鼠标移入事件
  self[CANVAS].bind("mouseenter",function(e){// console.log('mouseenter：', e);
  inCanvas={isIn:true,offsetX:e.offsetX,offsetY:e.offsetY};if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Rect"){oShape.move([[iMouseDownX,iMouseDownY],[e.offsetX,e.offsetY]]);}else if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].move(iMouseDownX,iMouseDownY,e.offsetX,e.offsetY);}}}});//鼠标移出事件
  self[CANVAS].bind("mouseleave",function(e){// console.log('mouseleave：', e);
  inCanvas={isIn:false,offsetX:e.offsetX,offsetY:e.offsetY};});//鼠标移动事件
  self[CANVAS].bind("mousemove",function(e){if(!self[POLYGONDRAWING]){var iBoxIndex=getChooseBoxIndex();if(iBoxIndex>-1){//drag, stretch
  if(bPainting){if(szStatus==="drag"){self[SHAPES][iBoxIndex].drag(e.offsetX,e.offsetY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onDrag",self[SHAPES][iBoxIndex].m_szId);}else if(szStatus==="stretch"){self[SHAPES][iBoxIndex].stretch(e.offsetX,e.offsetY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onStretch",self[SHAPES][iBoxIndex].m_szId);}}}else {if(self[DRAWSTATUS]){if(bPainting){if(inCanvas.isIn){// console.log('mousemove：', e);
  if(self[SHAPETYPE]==="Rect"){oShape.move([[iMouseDownX,iMouseDownY],[e.offsetX,e.offsetY]]);}else if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].move(iMouseDownX,iMouseDownY,e.offsetX,e.offsetY);}}}}}}else {if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0){oShape.m_bClosed=true;}redraw();oShape.move(e.offsetX,e.offsetY,iMouseDownX,iMouseDownY);}}}});//鼠标释放事件
  self[CANVAS].bind("mouseup",function(e){// console.log('mouseup：', e);
  self[CANVAS][0].style.cursor="default";if(oShape!==null&&typeof oShape!=='undefined'&&szStatus==="draw"){if(self[SHAPETYPE]==="Rect"){if(Math.abs(e.offsetX-iMouseDownX)>2&&Math.abs(e.offsetY-iMouseDownY)>2){//绘制宽高同时大于2px，则绘制该图形
  addShape(oShape);if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}}if(self[EVENTCALLBACK]){//事件回调处理
  var oRECT={startPos:[],endPos:[]};// if (e.offsetX > iMouseDownX && e.offsetY > iMouseDownY) {
  //     oRECT.startPos = oShape.m_aPoint[0] || [e.offsetX, e.offsetY];
  //     oRECT.endPos = oShape.m_aPoint[2] || [e.offsetX, e.offsetY];
  // } else {
  //     oRECT.startPos = oShape.m_aPoint[2] || [e.offsetX, e.offsetY];
  //     oRECT.endPos = oShape.m_aPoint[0] || [e.offsetX, e.offsetY];
  // }
  oRECT.startPos=[iMouseDownX,iMouseDownY];oRECT.endPos=[e.offsetX,e.offsetY];self[EVENTCALLBACK]&&self[EVENTCALLBACK](oRECT);self.clearAllShape();}oShape=null;}else if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0&&self[POLYGONDRAWING]){if(Math.abs(e.offsetX-iMouseDownX)>2&&Math.abs(e.offsetY-iMouseDownY)>2){//绘制宽高同时大于2px，则绘制该图形
  addShape(oShape);self[POLYGONDRAWING]=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId);}}}if(!self[POLYGONDRAWING]){bPainting=false;}else {bPainting=true;}if(!self[POLYGONDRAWING]){redraw();}});//鼠标双击事件
  self[CANVAS].bind("dblclick",function(){if(self[DRAWSTATUS]){if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].m_szGridMap="fffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffcfffffc";redraw();}}});// //鼠标移出事件
  // self[CANVAS].bind("mouseout", function (/*e*/) {
  //     self[CANVAS][0].style.cursor = "default";
  //     if (!self[POLYGONDRAWING]) {
  //         bPainting = false;
  //     } else {
  //         bPainting = true;
  //     }
  //     /*if (self[EVENTCALLBACK]) {  //事件回调处理
  //         let oRECT = {
  //             startPos: [],
  //             endPos: []
  //         };
  //         if (iMouseDownX > 0 && iMouseDownY > 0) {
  //             oRECT.startPos = [iMouseDownX, iMouseDownY];
  //             oRECT.endPos = [e.offsetX, e.offsetY];
  //             self[EVENTCALLBACK] && self[EVENTCALLBACK](oRECT);
  //             self.clearAllShape();
  //         }
  //     }*/
  // });
  self[CANVAS].bind("touchstart",function(e){var viewRect=e.target.getBoundingClientRect();console.log('开始触摸：',e,viewRect);if(e.touches&&e.touches[0]){iTouchDownX=parseInt(e.touches[0].clientX-viewRect.x)>0?parseInt(e.touches[0].clientX-viewRect.x):0;iTouchDownY=parseInt(e.touches[0].clientY-viewRect.y)>0?parseInt(e.touches[0].clientY-viewRect.y):0;szStatus="draw";if(self[DRAWSTATUS]){if(self[MAXSHAPENUMSUPPORT]<=self[SHAPES].length&&self[SHAPETYPE]!=="Grid"&&self[SHAPETYPE]!=="Point"){return;}if(self[SHAPETYPE]==="Rect"){oShape=new Rect();oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||"";}else if(self[SHAPETYPE]==="Grid"){if(self[SHAPES].length===0){oShape=new MotionGrid();addShape(oShape);}}else if(self[SHAPETYPE]==="Polygon"){if(!self[POLYGONDRAWING]){self[POLYGONDRAWING]=true;oShape=new Polygon();oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szTips=self[CURRENTSHAPEINFO].szTips||"";oShape.m_iMinClosed=self[CURRENTSHAPEINFO].iMinClosed||3;oShape.m_iMaxPointNum=self[CURRENTSHAPEINFO].iMaxPointNum||11;oShape.m_iPolygonType=self[CURRENTSHAPEINFO].iPolygonType;oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.m_szFillColor=self[CURRENTSHAPEINFO].szFillColor;oShape.m_iTranslucent=self[CURRENTSHAPEINFO].iTranslucent;oShape.m_iRedrawMode=self[CURRENTSHAPEINFO].iRedrawMode;}if(oShape.m_iPolygonType===1){oShape.addPoint(iTouchDownX,iTouchDownY);if(oShape.m_aPoint.length===oShape.m_iMaxPointNum){oShape.m_bClosed=true;self[POLYGONDRAWING]=false;addShape(oShape);redraw();bPainting=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId);}}}else if(self[SHAPETYPE]==="Point"){self.clearShapeByType("Point");oShape=new Point();oShape.m_szId=self[CURRENTSHAPEINFO].szId||"";oShape.m_szDrawColor=self[CURRENTSHAPEINFO].szDrawColor;oShape.setPointInfo([[iTouchDownX,iTouchDownY]]);addShape(oShape);redraw();}}bPainting=true;}});self[CANVAS].bind("touchmove",function(e){var viewRect=e.target.getBoundingClientRect();if(e.touches&&e.touches[0]){iTouchUpX=parseInt(e.touches[0].clientX-viewRect.x)>0?parseInt(e.touches[0].clientX-viewRect.x):0;iTouchUpY=parseInt(e.touches[0].clientY-viewRect.y)>0?parseInt(e.touches[0].clientY-viewRect.y):0;if(!self[POLYGONDRAWING]){var iBoxIndex=getChooseBoxIndex();if(iBoxIndex>-1){//drag, stretch
  if(bPainting){if(szStatus==="drag"){self[SHAPES][iBoxIndex].drag(iTouchUpX,iTouchUpY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onDrag",self[SHAPES][iBoxIndex].m_szId);}else if(szStatus==="stretch"){self[SHAPES][iBoxIndex].stretch(iTouchUpX,iTouchUpY);window.onDrawShapeEvent&&window.onDrawShapeEvent(self[SHAPES][iBoxIndex].m_szType,"onStretch",self[SHAPES][iBoxIndex].m_szId);}}}else {if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Rect"){oShape.move([[iTouchDownX*2,iTouchDownY*2],[iTouchUpX*2,iTouchUpY*2]]);}else if(self[SHAPETYPE]==="Grid"){self[SHAPES][0].move(iTouchDownX,iTouchDownY,iTouchUpX,iTouchUpY);}}}}}else {if(self[DRAWSTATUS]){if(bPainting){if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0){oShape.m_bClosed=true;}redraw();oShape.move(e.touches[0].offsetX,e.touches[0].offsetY,iTouchDownX,iTouchDownY);}}}}});self[CANVAS].bind("touchend",function(e){//当起始点与结束点不为同一个时执行绘制
  // console.log('起始点坐标：', iTouchDownX, iTouchDownY);
  // console.log('结束点坐标：', iTouchUpX, iTouchUpY);
  if(!(iTouchDownX==iTouchUpX&&iTouchDownY==iTouchUpY)){self[CANVAS][0].style.cursor="default";if(oShape!==null&&typeof oShape!=='undefined'&&szStatus==="draw"){if(self[SHAPETYPE]==="Rect"){if(Math.abs(iTouchUpX-iTouchDownX)>2&&Math.abs(iTouchUpY-iTouchDownY)>2){//绘制宽高同时大于2px，则绘制该图形
  addShape(oShape);if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}}if(self[EVENTCALLBACK]&&Math.abs(iTouchUpX-iTouchDownX)>15&&Math.abs(iTouchUpY-iTouchDownY)>15){//事件回调处理
  var oRECT={startPos:[],endPos:[]};oRECT.startPos=[iTouchDownX,iTouchDownY];oRECT.endPos=[iTouchUpX,iTouchUpY];self[EVENTCALLBACK]&&self[EVENTCALLBACK](oRECT);}self.clearAllShape();oShape=null;}else if(self[SHAPETYPE]==="Polygon"&&oShape.m_iPolygonType===0&&self[POLYGONDRAWING]){if(Math.abs(iTouchUpX-iTouchDownX)>2&&Math.abs(iTouchUpY-iTouchDownY)>2){//绘制宽高同时大于2px，则绘制该图形
  addShape(oShape);self[POLYGONDRAWING]=false;if(!self[DRAWSHAPEMULTIONETIME]){self[DRAWSTATUS]=false;}window.onDrawShapeEvent&&window.onDrawShapeEvent(oShape.m_szType,"onDrawEnd",oShape.m_szId);}}}if(!self[POLYGONDRAWING]){bPainting=false;}else {bPainting=true;}if(!self[POLYGONDRAWING]){redraw();}}});}//图形基类
  var Shape=/*#__PURE__*/function(){//图形基类构造函数
  function Shape(){_classCallCheck(this,Shape);this.m_szId="";//图形id
  this.m_aPoint=[];//图形所有点的坐标
  this.m_bChoosed=false;//图形是否被选中
  this.m_szDrawColor=self[SHAPESTYLE].szDrawColor;//图形中线的颜色
  this.m_szFillColor=self[SHAPESTYLE].szFillColor;//图形填充颜色
  this.m_iTranslucent=self[SHAPESTYLE].iTranslucent;//图形填充颜色透明度
  this.m_iIndexChoosePoint=-1;//判断鼠标点击选中图形上点的索引
  this.m_iDriftStartX=0;//drag起始X坐标
  this.m_iDriftStartY=0;//drag起始Y坐标
  this.m_oEdgePoints={top:{x:0,y:0},left:{x:0,y:0},right:{x:0,y:0},bottom:{x:0,y:0}};//多边形中用于判断边界
  this.m_szTips="";//图形内部显示文字信息
  this.m_iEditType=0;//图形是否可编辑, 0-可编辑, 1-只可移动，2-不可编辑
  /*多边形和线用的属性*/this.m_iMinClosed=3;//至少几个坐标点可闭合图像
  this.m_iMaxPointNum=11;//图形支持的最大坐标点数
  this.m_bClosed=false;//图形目前是否闭合
  this.m_iRedrawMode=0;// 多边形和矩形的重绘方式, 0为不支持重绘, 1为绘制完成后, 鼠标左键按下自动重绘
  }//绘制图形
  _createClass(Shape,[{key:"draw",value:function draw(){//do something
  }//平移图形
  },{key:"drag",value:function drag(iPointX,iPointY){if(this.m_iEditType!==2){var iLength=this.m_aPoint.length;var i=0;for(i=0;i<iLength;i++){if(this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX>self.m_iCanvasWidth||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY>self.m_iCanvasHeight||this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX<0||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY<0){this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;return;}}for(i=0;i<iLength;i++){this.m_aPoint[i][0]=this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX;this.m_aPoint[i][1]=this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY;}this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;this.setPointInfo(this.m_aPoint);redraw();}}//拉伸图形
  },{key:"stretch",value:function stretch(iPointX,iPointY){if(this.m_iEditType===0){if(this.m_iIndexChoosePoint!==-1){this.m_aPoint[this.m_iIndexChoosePoint][0]=iPointX;this.m_aPoint[this.m_iIndexChoosePoint][1]=iPointY;}this.setPointInfo(this.m_aPoint);redraw();}}//判断是否在图形内
  },{key:"inShape",value:function inShape(iPointX,iPointY){var bRet=false;var iLen=this.m_aPoint.length;for(var i=0,j=iLen-1;i<iLen;j=i++){if(this.m_aPoint[i][1]>iPointY!==this.m_aPoint[j][1]>iPointY&&iPointX<(this.m_aPoint[j][0]-this.m_aPoint[i][0])*(iPointY-this.m_aPoint[i][1])/(this.m_aPoint[j][1]-this.m_aPoint[i][1])+this.m_aPoint[i][0]){bRet=!bRet;}}return bRet;}//判断是否在图形边界圆点内
  },{key:"inArc",value:function inArc(iPointX,iPointY,iRadius){var bRet=false;for(var i=0,iLen=this.m_aPoint.length;i<iLen;i++){var iDistance=Math.sqrt((iPointX-this.m_aPoint[i][0])*(iPointX-this.m_aPoint[i][0])+(iPointY-this.m_aPoint[i][1])*(iPointY-this.m_aPoint[i][1]));if(iDistance<iRadius){bRet=true;this.m_iIndexChoosePoint=i;break;}}return bRet;}//鼠标点击选择图形时调用获取坐标偏差
  },{key:"getMouseDownPoints",value:function getMouseDownPoints(iMouseDownX,iMouseDownY){this.m_iDriftStartX=iMouseDownX;this.m_iDriftStartY=iMouseDownY;}//获取坐标信息
  },{key:"getPointInfo",value:function getPointInfo(){return this.m_aPoint;}//设置坐标信息
  },{key:"setPointInfo",value:function setPointInfo(aPoint){if(aPoint!==null&&typeof aPoint!=='undefined'&&aPoint.length>0){this.m_aPoint=aPoint;this.setEdgePoints(aPoint);}}//添加坐标
  },{key:"addPoint",value:function addPoint(iMouseDownX,iMouseDownY){if(this.m_aPoint.length<this.m_iMaxPointNum){this.m_aPoint.push([iMouseDownX,iMouseDownY]);}if(this.m_aPoint.length===this.m_iMaxPointNum){this.setPointInfo(this.m_aPoint);}}//计算边缘坐标
  },{key:"setEdgePoints",value:function setEdgePoints(aPoint){for(var i=0,iLen=aPoint.length;i<iLen;i++){if(i===0){this.m_oEdgePoints.top.x=aPoint[i][0];this.m_oEdgePoints.top.y=aPoint[i][1];this.m_oEdgePoints.left.x=aPoint[i][0];this.m_oEdgePoints.left.y=aPoint[i][1];this.m_oEdgePoints.right.x=aPoint[i][0];this.m_oEdgePoints.right.y=aPoint[i][1];this.m_oEdgePoints.bottom.x=aPoint[i][0];this.m_oEdgePoints.bottom.y=aPoint[i][1];}else {if(aPoint[i][1]<this.m_oEdgePoints.top.y){this.m_oEdgePoints.top.x=aPoint[i][0];this.m_oEdgePoints.top.y=aPoint[i][1];}if(aPoint[i][0]>this.m_oEdgePoints.right.x){this.m_oEdgePoints.right.x=aPoint[i][0];this.m_oEdgePoints.right.y=aPoint[i][1];}if(aPoint[i][1]>this.m_oEdgePoints.bottom.y){this.m_oEdgePoints.bottom.x=aPoint[i][0];this.m_oEdgePoints.bottom.y=aPoint[i][1];}if(aPoint[i][0]<this.m_oEdgePoints.left.x){this.m_oEdgePoints.left.x=aPoint[i][0];this.m_oEdgePoints.left.y=aPoint[i][1];}}}}}]);return Shape;}();//矩形类
  var Rect=/*#__PURE__*/function(_Shape){_inherits(Rect,_Shape);var _super=_createSuper(Rect);function Rect(){var _this;_classCallCheck(this,Rect);_this=_super.call(this);_this.m_szType="Rect";return _this;}_createClass(Rect,[{key:"setPointInfo",value:function setPointInfo(aPoint){if(aPoint!==null&&typeof aPoint!=='undefined'){var iStartX=aPoint[0][0];var iStartY=aPoint[0][1];var iEndX=aPoint[0][0];var iEndY=aPoint[0][1];for(var i=0,iLen=aPoint.length;i<iLen;i++){if(iStartX>aPoint[i][0]){iStartX=aPoint[i][0];}if(iStartY>aPoint[i][1]){iStartY=aPoint[i][1];}if(iEndX<aPoint[i][0]){iEndX=aPoint[i][0];}if(iEndY<aPoint[i][1]){iEndY=aPoint[i][1];}}this.m_aPoint=[[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]];}}//绘制矩形
  },{key:"draw",value:function draw(){self[CONTEXT].fillStyle=this.m_szFillColor;self[CONTEXT].strokeStyle=this.m_szDrawColor;var iStartX=this.m_aPoint[0][0];var iStartY=this.m_aPoint[0][1];var iWidth=this.m_aPoint[2][0]-iStartX;var iHeight=this.m_aPoint[2][1]-iStartY;self[CONTEXT].globalAlpha=this.m_iTranslucent;self[CONTEXT].fillRect(iStartX,iStartY,iWidth,iHeight);self[CONTEXT].globalAlpha=1;self[CONTEXT].fillText(this.m_szTips,(iStartX+this.m_aPoint[2][0])/2,(iStartY+this.m_aPoint[2][1])/2);if(this.m_bChoosed){var iHalfWidth=Math.round(iWidth/2);var iHalfHeight=Math.round(iHeight/2);if(this.m_iEditType===0){var aPointX=[iStartX,iStartX+iHalfWidth,iStartX+iWidth,iStartX,iStartX+iWidth,iStartX,iStartX+iHalfWidth,iStartX+iWidth];var aPointY=[iStartY,iStartY,iStartY,iStartY+iHalfHeight,iStartY+iHalfHeight,iStartY+iHeight,iStartY+iHeight,iStartY+iHeight];for(var i=0;i<8;i++){self[CONTEXT].beginPath();self[CONTEXT].arc(aPointX[i],aPointY[i],3,0,360,false);self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].closePath();self[CONTEXT].fill();}}}self[CONTEXT].strokeRect(iStartX,iStartY,iWidth,iHeight);}//拉伸矩形
  },{key:"stretch",value:function stretch(iPointX,iPointY){if(this.m_iEditType===0){if(this.m_iIndexChoosePoint===0){if(iPointX<this.m_aPoint[2][0]&&iPointY<this.m_aPoint[2][1]){this.m_aPoint[0][0]=iPointX;this.m_aPoint[0][1]=iPointY;this.m_aPoint[3][0]=iPointX;this.m_aPoint[1][1]=iPointY;}}else if(this.m_iIndexChoosePoint===1){if(iPointY<this.m_aPoint[2][1]){this.m_aPoint[0][1]=iPointY;this.m_aPoint[1][1]=iPointY;}}else if(this.m_iIndexChoosePoint===2){if(iPointX>this.m_aPoint[3][0]&&iPointY<this.m_aPoint[3][1]){this.m_aPoint[1][0]=iPointX;this.m_aPoint[1][1]=iPointY;this.m_aPoint[2][0]=iPointX;this.m_aPoint[0][1]=iPointY;}}else if(this.m_iIndexChoosePoint===3){if(iPointX<this.m_aPoint[2][0]){this.m_aPoint[0][0]=iPointX;this.m_aPoint[3][0]=iPointX;}}else if(this.m_iIndexChoosePoint===4){if(iPointX>this.m_aPoint[0][0]){this.m_aPoint[1][0]=iPointX;this.m_aPoint[2][0]=iPointX;}}else if(this.m_iIndexChoosePoint===5){if(iPointX<this.m_aPoint[1][0]&&iPointY>this.m_aPoint[1][1]){this.m_aPoint[3][0]=iPointX;this.m_aPoint[3][1]=iPointY;this.m_aPoint[0][0]=iPointX;this.m_aPoint[2][1]=iPointY;}}else if(this.m_iIndexChoosePoint===6){if(iPointY>this.m_aPoint[1][1]){this.m_aPoint[2][1]=iPointY;this.m_aPoint[3][1]=iPointY;}}else if(this.m_iIndexChoosePoint===7){if(iPointX>this.m_aPoint[0][0]&&iPointY>this.m_aPoint[0][1]){this.m_aPoint[2][0]=iPointX;this.m_aPoint[2][1]=iPointY;this.m_aPoint[1][0]=iPointX;this.m_aPoint[3][1]=iPointY;}}redraw();}}//点击后移动鼠标绘制矩形
  },{key:"move",value:function move(aPoint){redraw();this.m_bChoosed=true;var iStartX=aPoint[0][0];var iStartY=aPoint[0][1];var iEndX=aPoint[1][0];var iEndY=aPoint[1][1];this.setPointInfo([[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]]);this.draw();}//判断是否在图形边界圆点内
  },{key:"inArc",value:function inArc(iPointX,iPointY,iRadius){var iStartX=this.m_aPoint[0][0];var iStartY=this.m_aPoint[0][1];var iWidth=this.m_aPoint[2][0]-iStartX;var iHeight=this.m_aPoint[2][1]-iStartY;var iHalfWidth=Math.round(iWidth/2);var iHalfHeight=Math.round(iHeight/2);var aPointX=[iStartX,iStartX+iHalfWidth,iStartX+iWidth,iStartX,iStartX+iWidth,iStartX,iStartX+iHalfWidth,iStartX+iWidth];var aPointY=[iStartY,iStartY,iStartY,iStartY+iHalfHeight,iStartY+iHalfHeight,iStartY+iHeight,iStartY+iHeight,iStartY+iHeight];//let aCursors = ["nw-resize", "n-resize", "ne-resize", "w-resize", "e-resize", "sw-resize", "s-resize", "se-resize"];
  for(var i=0;i<8;i++){var iDistance=Math.sqrt((iPointX-aPointX[i])*(iPointX-aPointX[i])+(iPointY-aPointY[i])*(iPointY-aPointY[i]));if(iDistance<iRadius){this.m_iIndexChoosePoint=i;return true;}}return false;}}]);return Rect;}(Shape);//OSD类
  var RectOSD=/*#__PURE__*/function(_Shape2){_inherits(RectOSD,_Shape2);var _super2=_createSuper(RectOSD);function RectOSD(szText,szEnabled){var _this2;_classCallCheck(this,RectOSD);_this2=_super2.call(this);_this2.m_szType="RectOSD";_this2.m_szOSDType="overlay-date";//OSD类型, overlay-date: 日期, overlay-ch: 通道名, overlay-text: 字符叠加
  _this2.m_szText=szText||"";_this2.m_szEnabled=szEnabled||"";_this2.m_szDateStyle="";_this2.m_szClockType="";_this2.m_szDisplayWeek="";_this2.m_szId="";_this2.m_szAlignment="0";// 对齐方式. 0-自定义, 1-左对齐 2-右对齐
  return _this2;}_createClass(RectOSD,[{key:"draw",value:function draw(){if(this.m_szEnabled==="true"){var iStartX=this.m_aPoint[0][0];var iStartY=this.m_aPoint[0][1];var iWidth=this.m_aPoint[2][0]-iStartX;var iHeight=this.m_aPoint[2][1]-iStartY;self[CONTEXT].beginPath();self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;self[CONTEXT].rect(iStartX,iStartY,iWidth,iHeight);self[CONTEXT].font="15px serif";self[CONTEXT].strokeText(this.m_szText,iStartX,iStartY+15);self[CONTEXT].stroke();}}},{key:"drag",value:function drag(iPointX,iPointY){var iLength=this.m_aPoint.length;var i=0;if("0"===this.m_szAlignment){// 自定义
  for(i=0;i<iLength;i++){if(this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY>self.m_iCanvasHeight||this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX<0||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY<0){this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;return;}}for(i=0;i<iLength;i++){this.m_aPoint[i][0]=this.m_aPoint[i][0]+iPointX-this.m_iDriftStartX;this.m_aPoint[i][1]=this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY;}}else if("1"===this.m_szAlignment||"2"===this.m_szAlignment){// 左/右对齐
  for(i=0;i<iLength;i++){if(this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY>self.m_iCanvasHeight||this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY<0){this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;return;}}for(i=0;i<iLength;i++){// this.m_aPoint[i][0] = this.m_aPoint[i][0] + iPointX - this.m_iDriftStartX;
  this.m_aPoint[i][1]=this.m_aPoint[i][1]+iPointY-this.m_iDriftStartY;}}this.m_iDriftStartX=iPointX;this.m_iDriftStartY=iPointY;this.setEdgePoints(this.m_aPoint);redraw();}//重写基类的stretch, OSD不支持拉伸
  },{key:"stretch",value:function stretch(){//do something
  }}]);return RectOSD;}(Shape);//移动侦测方格类
  var MotionGrid=/*#__PURE__*/function(_Shape3){_inherits(MotionGrid,_Shape3);var _super3=_createSuper(MotionGrid);function MotionGrid(){var _this3;_classCallCheck(this,MotionGrid);_this3=_super3.call(this);_this3.m_szType="Grid";_this3.m_iGridColNum=22;_this3.m_iGridRowNum=18;_this3.m_szGridMap="";_this3.m_aAddGridMap=[];return _this3;}_createClass(MotionGrid,[{key:"draw",value:function draw(){var iWidth=self.m_iCanvasWidth/this.m_iGridColNum;var iHeight=self.m_iCanvasHeight/this.m_iGridRowNum;var szResultGridMap="";for(var i=0;i<this.m_iGridRowNum;i++){var szGridRowMap=this.m_szGridMap.substring(i*6,i*6+6);var aBinaryMap=parseInt("f"+szGridRowMap,16).toString(2).split("").slice(4);var szResultGridMapRow="";for(var j=0;j<this.m_iGridColNum;j++){var szResultGridMapRowCol="";if(aBinaryMap[j]==="1"){self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;self[CONTEXT].strokeRect(iWidth*j,iHeight*i,iWidth,iHeight);szResultGridMapRowCol="1";}else {szResultGridMapRowCol="0";}if(this.m_aAddGridMap.length){if(this.m_aAddGridMap[i][j]===1){self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].strokeRect(iWidth*j,iHeight*i,iWidth,iHeight);szResultGridMapRowCol="1";}}szResultGridMapRow+=szResultGridMapRowCol;}szResultGridMap+=parseInt("1111"+szResultGridMapRow+"00",2).toString(16).substring(1);}this.m_szGridMap=szResultGridMap;}},{key:"move",value:function move(iMouseDownX,iMouseDownY,iMouseMoveX,iMouseMoveY){//szGridMap
  var iWidth=self.m_iCanvasWidth/this.m_iGridColNum;var iHeight=self.m_iCanvasHeight/this.m_iGridRowNum;var iStartX=Math.floor(iMouseDownX/iWidth);var iStartY=Math.floor(iMouseDownY/iHeight);var iRectColNum=Math.floor(Math.abs(iMouseMoveX-iMouseDownX)/iWidth);var iRectRowNum=Math.floor(Math.abs(iMouseMoveY-iMouseDownY)/iHeight);var iCoefficientX=1;//横坐标系数, 1: 起始坐标小于结束坐标, -1: 起始坐标小于结束坐标
  var iCoefficientY=1;//纵坐标系数
  if(iMouseMoveX-iMouseDownX>0){iCoefficientX=1;}else {iCoefficientX=-1;}if(iMouseMoveY-iMouseDownY>0){iCoefficientY=1;}else {iCoefficientY=-1;}var aAddGridMap=[];for(var i=0;i<this.m_iGridRowNum;i++){aAddGridMap[i]=[];for(var j=0;j<this.m_iGridColNum;j++){if(iCoefficientX===1){if(iCoefficientY===1){if(i>=iStartY&&i<=iStartY+iRectRowNum&&j>=iStartX&&j<=iStartX+iRectColNum){aAddGridMap[i][j]=1;}else {aAddGridMap[i][j]=0;}}else {if(i<=iStartY&&i>=iStartY-iRectRowNum&&j>=iStartX&&j<=iStartX+iRectColNum){aAddGridMap[i][j]=1;}else {aAddGridMap[i][j]=0;}}}else {if(iCoefficientY===1){if(i>=iStartY&&i<=iStartY+iRectRowNum&&j<=iStartX&&j>=iStartX-iRectColNum){aAddGridMap[i][j]=1;}else {aAddGridMap[i][j]=0;}}else {if(i<=iStartY&&i>=iStartY-iRectRowNum&&j<=iStartX&&j>=iStartX-iRectColNum){aAddGridMap[i][j]=1;}else {aAddGridMap[i][j]=0;}}}}}this.m_aAddGridMap=aAddGridMap;this.draw();}}]);return MotionGrid;}(Shape);//线类
  var Line=/*#__PURE__*/function(_Shape4){_inherits(Line,_Shape4);var _super4=_createSuper(Line);function Line(){var _this4;_classCallCheck(this,Line);_this4=_super4.call(this);_this4.m_szType="Line";_this4.m_iLineType=0;//普通线-0, 头上带箭头的线-1, 折线-2, 越界侦测线-3, 分离式过线统计线 -4
  _this4.m_iDirection=0;_this4.m_iArrowType=0;//客流量统计的箭头方向
  _this4.m_aCrossArrowPoint=[];//过线统计箭头坐标
  return _this4;}_createClass(Line,[{key:"draw",value:function draw(){if(this.m_iLineType===0){this.drawNormalLine();}else if(this.m_iLineType===1){this.drawArrowLine();}else if(this.m_iLineType===3){this.drawCrossLine();}else if(this.m_iLineType===4){this.drawLineCount();}}},{key:"drawNormalLine",value:function drawNormalLine(){self[CONTEXT].globalAlpha=1;if(this.m_aPoint.length>0){//连线
  self[CONTEXT].beginPath();self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].lineWidth=2;self[CONTEXT].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(var i=1,iLen=this.m_aPoint.length;i<iLen;i++){self[CONTEXT].lineTo(this.m_aPoint[i][0],this.m_aPoint[i][1]);}self[CONTEXT].stroke();//画点
  if(this.m_bChoosed){for(var _i=0,_iLen=this.m_aPoint.length;_i<_iLen;_i++){self[CONTEXT].beginPath();self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].arc(this.m_aPoint[_i][0],this.m_aPoint[_i][1],3,0,Math.PI*2,true);self[CONTEXT].closePath();self[CONTEXT].fill();}}if(this.m_szTips!==""){self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].fillText(this.m_szTips,this.m_aPoint[0][0]+10,this.m_aPoint[0][1]+4);}}}//绘制箭头线
  },{key:"drawArrowLine",value:function drawArrowLine(iType,fromX,fromY,toX,toY,theta,headlen,width){theta=typeof theta!=='undefined'?theta:30;//三角斜边一直线夹角
  headlen=typeof headlen!=='undefined'?headlen:10;//三角斜边长度
  width=typeof width!=='undefined'?width:1;var angle=Math.atan2(fromY-toY,fromX-toX)*180/Math.PI;var angle1=(angle+theta)*Math.PI/180;var angle2=(angle-theta)*Math.PI/180;var topX=headlen*Math.cos(angle1);var topY=headlen*Math.sin(angle1);var botX=headlen*Math.cos(angle2);var botY=headlen*Math.sin(angle2);self[CONTEXT].save();self[CONTEXT].beginPath();var arrowX=fromX-topX;var arrowY=fromY-topY;self[CONTEXT].moveTo(arrowX,arrowY);self[CONTEXT].lineTo(fromX,fromY);arrowX=fromX-botX;arrowY=fromY-botY;self[CONTEXT].lineTo(arrowX,arrowY);self[CONTEXT].moveTo(fromX,fromY);self[CONTEXT].lineTo(toX,toY);// Reverse length on the other side
  if(iType===1){arrowX=toX+topX;arrowY=toY+topY;self[CONTEXT].moveTo(arrowX,arrowY);self[CONTEXT].lineTo(toX,toY);arrowX=toX+botX;arrowY=toY+botY;self[CONTEXT].lineTo(arrowX,arrowY);}self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].lineWidth=width;self[CONTEXT].stroke();self[CONTEXT].restore();}},{key:"drawCrossLine",value:function drawCrossLine(){this.drawNormalLine();var iMiddleX=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2;var iMiddleY=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2;var angle=Math.atan2(iMiddleY-this.m_aPoint[0][1],iMiddleX-this.m_aPoint[0][0])*180/Math.PI;var angle1=(angle+90)*Math.PI/180;var angle2=(angle-90)*Math.PI/180;var topX=25*Math.cos(angle1);var topY=25*Math.sin(angle1);var botX=25*Math.cos(angle2);var botY=25*Math.sin(angle2);var arrowX=0;var arrowY=0;arrowX=iMiddleX-topX;arrowY=iMiddleY-topY;var iTextPositionA=0;var iTextPositionB=0;if(this.m_iDirection===0){iTextPositionA=-10;iTextPositionB=-15;}else if(this.m_iDirection===1){iTextPositionA=10;iTextPositionB=10;}else {iTextPositionA=10;iTextPositionB=-15;}if(this.m_iDirection!==0){this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY);}self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].font="8px";self[CONTEXT].strokeText("A",arrowX+iTextPositionA,arrowY+4);arrowX=iMiddleX-botX;arrowY=iMiddleY-botY;if(this.m_iDirection!==1){this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY);}self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].font="8px";self[CONTEXT].strokeText("B",arrowX+iTextPositionB,arrowY+4);}},{key:"drawLineCount",value:function drawLineCount(){this.drawNormalLine();var iMiddleX=(this.m_aPoint[0][0]+this.m_aPoint[1][0])/2;var iMiddleY=(this.m_aPoint[0][1]+this.m_aPoint[1][1])/2;var angle=Math.atan2(iMiddleY-this.m_aPoint[0][1],iMiddleX-this.m_aPoint[0][0])*180/Math.PI;var angle1=(angle+90)*Math.PI/180;var angle2=(angle-90)*Math.PI/180;var topX=25*Math.cos(angle1);var topY=25*Math.sin(angle1);var botX=25*Math.cos(angle2);var botY=25*Math.sin(angle2);var arrowX=0;var arrowY=0;arrowX=iMiddleX-topX;arrowY=iMiddleY-topY;if(this.m_iArrowType===1){arrowX=iMiddleX-botX;arrowY=iMiddleY-botY;this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY);}else if(this.m_iArrowType===0){this.drawArrowLine(0,arrowX,arrowY,iMiddleX,iMiddleY);}this.m_aCrossArrowPoint=[[iMiddleX,iMiddleY],[arrowX,arrowY]];}//线的选中判断
  },{key:"inShape",value:function inShape(iPointX,iPointY){var bRet=false;for(var i=0,iLen=this.m_aPoint.length-1;i<iLen;i++){var iLineLen=Math.sqrt((this.m_aPoint[i+1][0]-this.m_aPoint[i][0])*(this.m_aPoint[i+1][0]-this.m_aPoint[i][0])+(this.m_aPoint[i+1][1]-this.m_aPoint[i][1])*(this.m_aPoint[i+1][1]-this.m_aPoint[i][1]));var iLineLen1=Math.sqrt((iPointX-this.m_aPoint[i][0])*(iPointX-this.m_aPoint[i][0])+(iPointY-this.m_aPoint[i][1])*(iPointY-this.m_aPoint[i][1]));var iLineLen2=Math.sqrt((iPointX-this.m_aPoint[i+1][0])*(iPointX-this.m_aPoint[i+1][0])+(iPointY-this.m_aPoint[i+1][1])*(iPointY-this.m_aPoint[i+1][1]));if(iLineLen1+iLineLen2-iLineLen<1){bRet=true;}}return bRet;}}]);return Line;}(Shape);//多边形类
  var Polygon=/*#__PURE__*/function(_Shape5){_inherits(Polygon,_Shape5);var _super5=_createSuper(Polygon);function Polygon(){var _this5;_classCallCheck(this,Polygon);_this5=_super5.call(this);_this5.m_szType="Polygon";_this5.m_iPolygonType=1;//0-矩形， 1-多边形
  return _this5;}_createClass(Polygon,[{key:"setPointInfo",value:function setPointInfo(aPoint){if(aPoint!==null&&typeof aPoint!=='undefined'){if(this.m_iPolygonType===0){var iStartX=aPoint[0][0];var iStartY=aPoint[0][1];var iEndX=aPoint[0][0];var iEndY=aPoint[0][1];for(var i=0,iLen=aPoint.length;i<iLen;i++){if(iStartX>aPoint[i][0]){iStartX=aPoint[i][0];}if(iStartY>aPoint[i][1]){iStartY=aPoint[i][1];}if(iEndX<aPoint[i][0]){iEndX=aPoint[i][0];}if(iEndY<aPoint[i][1]){iEndY=aPoint[i][1];}}this.m_aPoint=[[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]];}else if(this.m_iPolygonType===1){this.m_aPoint=aPoint;}else {this.m_aPoint=aPoint;}this.setEdgePoints(aPoint);}}},{key:"draw",value:function draw(){if(this.m_aPoint.length>0){self[CONTEXT].fillStyle=this.m_szFillColor;self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;var i=0;var iLen=0;if(this.m_bChoosed){for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){self[CONTEXT].beginPath();self[CONTEXT].arc(this.m_aPoint[i][0],this.m_aPoint[i][1],3,0,360,false);self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].closePath();self[CONTEXT].fill();}}self[CONTEXT].beginPath();self[CONTEXT].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){if(i!==0){self[CONTEXT].lineTo(this.m_aPoint[i][0],this.m_aPoint[i][1]);}}self[CONTEXT].stroke();if(this.m_bClosed){self[CONTEXT].fillText(this.m_szTips,(this.m_oEdgePoints.left.x+this.m_oEdgePoints.right.x)/2,(this.m_oEdgePoints.top.y+this.m_oEdgePoints.bottom.y)/2);self[CONTEXT].closePath();self[CONTEXT].stroke();//填充区域颜色,设置透明度
  self[CONTEXT].globalAlpha=this.m_iTranslucent;self[CONTEXT].fill();}}}},{key:"move",value:function move(iMouseMoveX,iMouseMoveY,iMouseDownX,iMouseDownY){if(this.m_iPolygonType===1){if(this.m_aPoint.length<this.m_iMaxPointNum&&this.m_aPoint.length>0){self[CONTEXT].fillStyle=this.m_szFillColor;self[CONTEXT].strokeStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;var i=0;var iLen=0;for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){self[CONTEXT].beginPath();self[CONTEXT].arc(this.m_aPoint[i][0],this.m_aPoint[i][1],3,0,360,false);self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].closePath();self[CONTEXT].fill();}self[CONTEXT].beginPath();self[CONTEXT].moveTo(this.m_aPoint[0][0],this.m_aPoint[0][1]);for(i=0,iLen=this.m_aPoint.length;i<iLen;i++){if(i!==0){self[CONTEXT].lineTo(this.m_aPoint[i][0],this.m_aPoint[i][1]);}}self[CONTEXT].lineTo(iMouseMoveX,iMouseMoveY);self[CONTEXT].closePath();self[CONTEXT].stroke();}}else if(this.m_iPolygonType===0){this.m_bChoosed=true;var iStartX=iMouseDownX;var iStartY=iMouseDownY;var iEndX=iMouseMoveX;var iEndY=iMouseMoveY;this.setPointInfo([[iStartX,iStartY],[iEndX,iStartY],[iEndX,iEndY],[iStartX,iEndY]]);this.draw();}}},{key:"stretch",value:function stretch(iPointX,iPointY){if(this.m_iEditType===0){if(this.m_iPolygonType===1){if(this.m_iIndexChoosePoint!==-1){this.m_aPoint[this.m_iIndexChoosePoint][0]=iPointX;this.m_aPoint[this.m_iIndexChoosePoint][1]=iPointY;}}else {if(this.m_iIndexChoosePoint===0){if(iPointX<this.m_aPoint[2][0]&&iPointY<this.m_aPoint[2][1]){this.m_aPoint[0][0]=iPointX;this.m_aPoint[0][1]=iPointY;this.m_aPoint[3][0]=iPointX;this.m_aPoint[1][1]=iPointY;}}else if(this.m_iIndexChoosePoint===1){if(iPointX>this.m_aPoint[3][0]&&iPointY<this.m_aPoint[3][1]){this.m_aPoint[1][0]=iPointX;this.m_aPoint[1][1]=iPointY;this.m_aPoint[2][0]=iPointX;this.m_aPoint[0][1]=iPointY;}}else if(this.m_iIndexChoosePoint===2){if(iPointX>this.m_aPoint[0][0]&&iPointY>this.m_aPoint[0][1]){this.m_aPoint[2][0]=iPointX;this.m_aPoint[2][1]=iPointY;this.m_aPoint[1][0]=iPointX;this.m_aPoint[3][1]=iPointY;}}else if(this.m_iIndexChoosePoint===3){if(iPointX<this.m_aPoint[1][0]&&iPointY>this.m_aPoint[1][1]){this.m_aPoint[3][0]=iPointX;this.m_aPoint[3][1]=iPointY;this.m_aPoint[0][0]=iPointX;this.m_aPoint[2][1]=iPointY;}}}this.setPointInfo(this.m_aPoint);redraw();}}}]);return Polygon;}(Shape);//Point类
  var Point=/*#__PURE__*/function(_Shape6){_inherits(Point,_Shape6);var _super6=_createSuper(Point);function Point(){var _this6;_classCallCheck(this,Point);_this6=_super6.call(this);_this6.m_szType="Point";_this6.m_szId="";return _this6;}_createClass(Point,[{key:"draw",value:function draw(){self[CONTEXT].beginPath();self[CONTEXT].fillStyle=this.m_szDrawColor;self[CONTEXT].globalAlpha=1;self[CONTEXT].arc(this.m_aPoint[0][0],this.m_aPoint[0][1],10,0,Math.PI*2,true);self[CONTEXT].closePath();self[CONTEXT].fill();}},{key:"drag",value:function drag(/*iPointX, iPointY*/){//do something
  }//重写基类的stretch, Point不支持拉伸
  },{key:"stretch",value:function stretch(){//do something
  }}]);return Point;}(Shape);//绘图库类
  var DrawCanvas=/*#__PURE__*/function(){function DrawCanvas(szCanvasId){_classCallCheck(this,DrawCanvas);self=this;this[CANVAS]=$("#"+szCanvasId);//获取画布对象
  this[CONTEXT]=this[CANVAS][0].getContext("2d");//获取画布上下文
  this[SHAPES]=[];//画布上的图形列表
  this[DRAWSTATUS]=false;//是否开启手动绘制
  this[SHAPETYPE]="Rect";//图形类型
  this[MAXSHAPENUMSUPPORT]=10;this[DRAWSHAPEMULTIONETIME]=true;//一次是否可绘制多个
  this[CURRENTSHAPEINFO]={};//当前图形信息，用于绘制当前图形
  this[EVENTCALLBACK]=null;this[SHAPESTYLE]={szDrawColor:"#ff0000",szFillColor:"#343434",iTranslucent:0.7};this[POLYGONDRAWING]=false;//是否正在绘制多边形
  this.m_iCanvasWidth=this[CANVAS].width();//画布宽
  this.m_iCanvasHeight=this[CANVAS].height();//画布高
  this.m_iHorizontalResolution=0;//视频分辨率
  this.m_iVerticalResolution=0;//视频分辨率
  this.m_szDisplayMode="";//视频显示模式
  this.m_szVideoFormat="";//视频制式
  initEvent();//事件初始化
  this[SHAPES].length=0;//图形列表清空
  }_createClass(DrawCanvas,[{key:"setDrawMutiShapeOneTime",value:function setDrawMutiShapeOneTime(bDrawMuti){this[DRAWSHAPEMULTIONETIME]=bDrawMuti;}//设置最大绘制图形个数
  },{key:"setMaxShapeSupport",value:function setMaxShapeSupport(iMax){this[MAXSHAPENUMSUPPORT]=iMax;}},{key:"getMaxShapeSupport",value:function getMaxShapeSupport(){return this[MAXSHAPENUMSUPPORT];}//是否开启绘制
  },{key:"setDrawStatus",value:function setDrawStatus(bDrawStatus,cbCallback){this[DRAWSTATUS]=bDrawStatus;if(cbCallback&&bDrawStatus){this[EVENTCALLBACK]=cbCallback;}if(!bDrawStatus){this[EVENTCALLBACK]=null;}}//设置绘图类型
  },{key:"setShapeType",value:function setShapeType(szType){this[SHAPETYPE]=szType;redraw();/*if (szType === "Grid" || szType === "RectOSD") {  //栅格式移动侦测区域绘制不可和其他图形一起绘制
  		            this[SHAPES].length = 0;
  		            redraw();
  		        }*/}},{key:"setCurrentShapeInfo",value:function setCurrentShapeInfo(oShapeInfo){this[CURRENTSHAPEINFO]=oShapeInfo||{szId:"",szTips:"",iMinClosed:3,iMaxPointNum:11,iPolygonType:1,iRedrawMode:0};}},{key:"getShapeType",value:function getShapeType(){return this[SHAPETYPE];}//获取所有图形信息
  },{key:"getAllShapesInfo",value:function getAllShapesInfo(){var aShape=[];for(var i=0,iLen=this[SHAPES].length;i<iLen;i++){if(this[SHAPES][i].m_szType==="Grid"){aShape.push({szType:this[SHAPES][i].m_szType,szGridMap:this[SHAPES][i].m_szGridMap,iGridColNum:this[SHAPES][i].m_iGridColNum,iGridRowNum:this[SHAPES][i].m_iGridRowNum});}else if(this[SHAPES][i].m_szType==="RectOSD"){aShape.push({szType:this[SHAPES][i].m_szType,szText:this[SHAPES][i].m_szText,szEnabled:this[SHAPES][i].m_szEnabled,szOSDType:this[SHAPES][i].m_szOSDType,iPositionX:this[SHAPES][i].m_aPoint[0][0],iPositionY:this[SHAPES][i].m_aPoint[0][1],szDateStyle:this[SHAPES][i].m_szDateStyle,szClockType:this[SHAPES][i].m_szClockType,szDisplayWeek:this[SHAPES][i].m_szDisplayWeek,szId:this[SHAPES][i].m_szId,szAlignment:this[SHAPES][i].m_szAlignment});}else {aShape.push({szType:this[SHAPES][i].m_szType,aPoint:this[SHAPES][i].m_aPoint,szId:this[SHAPES][i].m_szId,bChoosed:this[SHAPES][i].m_bChoosed});}}return aShape;}},{key:"deleteRepeatPolyonById",value:function deleteRepeatPolyonById(id){var aShapes=this.getAllShapesInfo();var iShapesLen=aShapes.length;if(iShapesLen>0){for(var i=0;i<iShapesLen;i++){if(aShapes[i].szType==="Polygon"){if(aShapes[i].szId===id){this.deleteShape(i);// break;
  }}}}}//根据类型获取图形信息
  },{key:"getShapesInfoByType",value:function getShapesInfoByType(szType){var aShape=[];for(var i=0,iLen=this[SHAPES].length;i<iLen;i++){if(this[SHAPES][i].m_szType===szType){if(this[SHAPES][i].m_szType==="Grid"){aShape.push({szType:this[SHAPES][i].m_szType,szGridMap:this[SHAPES][i].m_szGridMap,iGridColNum:this[SHAPES][i].m_iGridColNum,iGridRowNum:this[SHAPES][i].m_iGridRowNum});}else if(this[SHAPES][i].m_szType==="RectOSD"){aShape.push({szType:this[SHAPES][i].m_szType,szText:this[SHAPES][i].m_szText,szEnabled:this[SHAPES][i].m_szEnabled,szOSDType:this[SHAPES][i].m_szOSDType,iPositionX:this[SHAPES][i].m_aPoint[0][0],iPositionY:this[SHAPES][i].m_aPoint[0][1],szDateStyle:this[SHAPES][i].m_szDateStyle,szClockType:this[SHAPES][i].m_szClockType,szDisplayWeek:this[SHAPES][i].m_szDisplayWeek,szId:this[SHAPES][i].m_szId,szAlignment:this[SHAPES][i].m_szAlignment});}else if(szType==="Polygon"){aShape.push({szType:this[SHAPES][i].m_szType,szId:this[SHAPES][i].m_szId,iPolygonType:this[SHAPES][i].m_iPolygonType,iMinClosed:this[SHAPES][i].m_iMinClosed,iMaxPointNum:this[SHAPES][i].m_iMaxPointNum,iEditType:this[SHAPES][i].m_iEditType,aPoint:this[SHAPES][i].m_aPoint,bClosed:this[SHAPES][i].m_bClosed,szTips:this[SHAPES][i].m_szTips,szDrawColor:this[SHAPES][i].m_szDrawColor,szFillColor:this[SHAPES][i].m_szFillColor,iTranslucent:this[SHAPES][i].m_iTranslucent});}else if(szType==="Line"){aShape.push({szType:this[SHAPES][i].m_szType,szId:this[SHAPES][i].m_szId,aPoint:this[SHAPES][i].m_aPoint,szTips:this[SHAPES][i].m_szTips,iLineType:this[SHAPES][i].m_iLineType,iDirection:this[SHAPES][i].m_iDirection,iArrowType:this[SHAPES][i].m_iArrowType,szDrawColor:this[SHAPES][i].m_szDrawColor,aCrossArrowPoint:this[SHAPES][i].m_aCrossArrowPoint});}else if(szType==="Rect"){aShape.push({szType:this[SHAPES][i].m_szType,iEditType:this[SHAPES][i].m_iEditType,aPoint:this[SHAPES][i].m_aPoint,szTips:this[SHAPES][i].m_szTips,szDrawColor:this[SHAPES][i].m_szDrawColor,szFillColor:this[SHAPES][i].m_szFillColor,iTranslucent:this[SHAPES][i].m_iTranslucent});}else {aShape.push({szType:this[SHAPES][i].m_szType,aPoint:this[SHAPES][i].m_aPoint});}}}return aShape;}//根据类型获取图形信息
  },{key:"setShapesInfoByType",value:function setShapesInfoByType(szType,aShapesInfo){if(!aShapesInfo){aShapesInfo=[];}var oShape=null;if(szType==="Rect"||szType==="Polygon"||szType==="Line"||szType==="Point"){for(var i=0,iLen=aShapesInfo.length;i<iLen;i++){if(szType==="Rect"){oShape=new Rect();oShape.m_iEditType=aShapesInfo[i].iEditType;oShape.m_szTips=aShapesInfo[i].szTips||"";oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.m_szFillColor=aShapesInfo[i].szFillColor;oShape.m_iTranslucent=aShapesInfo[i].iTranslucent;oShape.m_iRedrawMode=aShapesInfo[i].iRedrawMode;}else if(szType==="Polygon"){oShape=new Polygon();if(aShapesInfo[i].iPolygonType===0){oShape.m_bClosed=true;}else {oShape.m_bClosed=aShapesInfo[i].bClosed;}oShape.m_szTips=aShapesInfo[i].szTips||"";oShape.m_szId=aShapesInfo[i].szId||"";oShape.m_iPolygonType=aShapesInfo[i].iPolygonType;oShape.m_iMinClosed=aShapesInfo[i].iMinClosed||3;oShape.m_iMaxPointNum=aShapesInfo[i].iMaxPointNum||11;oShape.m_iEditType=aShapesInfo[i].iEditType;oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.m_szFillColor=aShapesInfo[i].szFillColor;oShape.m_iTranslucent=aShapesInfo[i].iTranslucent;oShape.m_iRedrawMode=aShapesInfo[i].iRedrawMode;}else if(szType==="Line"){oShape=new Line();oShape.m_iLineType=aShapesInfo[i].iLineType;oShape.m_szTips=aShapesInfo[i].szTips||"";oShape.m_szId=aShapesInfo[i].szId;oShape.m_iDirection=aShapesInfo[i].iDirection;oShape.m_iArrowType=aShapesInfo[i].iArrowType;oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.setPointInfo(aShapesInfo[i].aPoint);}else if(szType==="Point"){oShape=new Point();oShape.m_szId=aShapesInfo[i].szId;oShape.m_szDrawColor=aShapesInfo[i].szDrawColor;oShape.setPointInfo(aShapesInfo[i].aPoint);}oShape.setPointInfo(aShapesInfo[i].aPoint);if(i===0){oShape.m_bChoosed=true;//默认选中第一个图形
  }addShape(oShape);}}else if(szType==="Grid"){oShape=new MotionGrid();oShape.m_szGridMap=aShapesInfo[0].szGridMap||"";oShape.m_iGridColNum=aShapesInfo[0].iGridColNum||22;oShape.m_iGridRowNum=aShapesInfo[0].iGridRowNum||18;addShape(oShape);}redraw();}//添加单条OSD
  },{key:"addOSDShape",value:function addOSDShape(szText,szEnabled,iStartX,iStartY,oExtend){if(!iStartX&&!iStartY){iStartX=0;iStartY=0;}if(!oExtend){oExtend={};}var oRectOSD=new RectOSD(szText,szEnabled);var iWidth=szText.replace(/[^x00-xff]/g,"rr").length*10;//中文算两个字符
  oRectOSD.m_szOSDType=oExtend.szOSDType||"";oRectOSD.m_szDateStyle=oExtend.szDateStyle||"";oRectOSD.m_szClockType=oExtend.szClockType||"";oRectOSD.m_szDisplayWeek=oExtend.szDisplayWeek||"";oRectOSD.m_szId=oExtend.szId||"";oRectOSD.m_szAlignment=""+oExtend.szAlignment||"0";if("0"===oRectOSD.m_szAlignment){// 自定义
  oRectOSD.m_aPoint=[[iStartX,iStartY],[iWidth+iStartX,iStartY],[iWidth+iStartX,iStartY+20],[iStartX,iStartY+20]];}else if("1"===oRectOSD.m_szAlignment){// 左对齐
  oRectOSD.m_aPoint=[[0,iStartY],[iWidth,iStartY],[iWidth,iStartY+20],[0,iStartY+20]];}else if("2"===oRectOSD.m_szAlignment){// 右对齐
  oRectOSD.m_aPoint=[[this.m_iCanvasWidth-iWidth,iStartY],[this.m_iCanvasWidth,iStartY],[this.m_iCanvasWidth,iStartY+20],[this.m_iCanvasWidth-iWidth,iStartY+20]];}else {// 默认还是自定义
  oRectOSD.m_aPoint=[[iStartX,iStartY],[iWidth+iStartX,iStartY],[iWidth+iStartX,iStartY+20],[iStartX,iStartY+20]];}addShape(oRectOSD);redraw();}},{key:"selectShapeById",value:function selectShapeById(szShapeType,szId){for(var i=0,iLen=self[SHAPES].length;i<iLen;i++){if(szShapeType===self[SHAPES][i].m_szType){if(szId===self[SHAPES][i].m_szId){self[SHAPES][i].m_bChoosed=true;}else {self[SHAPES][i].m_bChoosed=false;}}}redraw();}//设置画布宽高
  },{key:"setCanvasSize",value:function setCanvasSize(iWidth,iHeight){if(iWidth>0&&iHeight>0){this.m_iCanvasWidth=iWidth;this.m_iCanvasHeight=iHeight;redraw();}}//设置图形样式
  },{key:"setDrawStyle",value:function setDrawStyle(szBorderColor,szFillColor,iTranslucent){this[SHAPESTYLE]={szDrawColor:szBorderColor,szFillColor:szFillColor,iTranslucent:iTranslucent};}//清除所有图形
  },{key:"clearAllShape",value:function clearAllShape(){this[SHAPES].length=0;self[POLYGONDRAWING]=false;redraw();}//根据类型清除图形
  },{key:"clearShapeByType",value:function clearShapeByType(szType){var iLen=this[SHAPES].length;for(var i=iLen;i>0;i--){if(this[SHAPES][i-1].m_szType===szType){if(szType==="Grid"){this[SHAPES][i-1].m_szGridMap="";this[SHAPES][i-1].m_aAddGridMap=[];}else {this[SHAPES].splice(i-1,1);}}}if("Polygon"===szType){self[POLYGONDRAWING]=false;}redraw();}//删除单个图形
  },{key:"deleteShape",value:function deleteShape(iShapeIndex){if(this[SHAPES].length>iShapeIndex){this[SHAPES].splice(iShapeIndex,1);}redraw();}},{key:"updateCanvas",value:function updateCanvas(szCanvasId){this[CANVAS]=$("#"+szCanvasId);//获取画布对象
  this[CONTEXT]=this[CANVAS][0].getContext("2d");//获取画布上下文
  this.m_iCanvasWidth=this[CANVAS].width();//画布宽
  this.m_iCanvasHeight=this[CANVAS].height();//画布高
  initEvent();//事件初始化
  }},{key:"resizeCanvas",value:function resizeCanvas(){this.m_iCanvasWidth=this[CANVAS].width();//画布宽
  this.m_iCanvasHeight=this[CANVAS].height();//画布高
  }},{key:"canvasRedraw",value:function canvasRedraw(){redraw();}}]);return DrawCanvas;}();return DrawCanvas;}();var wasmplayer_min={exports:{}};(function(module,exports){!function(_0x3caac5,_0x39c867){module['exports']=_0x39c867();}(self,function(){return function(){var _0xc667f9={0x1dd:function _(_0xb9c2e3){_0xb9c2e3['exports']=function(_0x5ce565,_0x32c61f,_0x2b5257,_0x208aaa){var _0x4b6487=self||window;try{try{var _0xa76d4a;try{_0xa76d4a=new _0x4b6487['Blob']([_0x5ce565]);}catch(_0x56f4d2){(_0xa76d4a=new(_0x4b6487['BlobBuilder']||_0x4b6487['WebKitBlobBuilder']||_0x4b6487['MozBlobBuilder']||_0x4b6487['MSBlobBuilder'])())['append'](_0x5ce565),_0xa76d4a=_0xa76d4a['getBlob']();}var _0x334cbb=_0x4b6487['URL']||_0x4b6487['webkitURL'],_0xd129f6=_0x334cbb['createObjectURL'](_0xa76d4a),_0x260737=new _0x4b6487[_0x32c61f](_0xd129f6,_0x2b5257);return _0x334cbb['revokeObjectURL'](_0xd129f6),_0x260737;}catch(_0x5131e4){return new _0x4b6487[_0x32c61f]('data:application/javascript,'['concat'](encodeURIComponent(_0x5ce565)),_0x2b5257);}}catch(_0x52b4e8){if(!_0x208aaa)throw Error('Inline\x20worker\x20is\x20not\x20supported');return new _0x4b6487[_0x32c61f](_0x208aaa,_0x2b5257);}};},0x206:function _(_0x35a510,_0x380cfb,_0x31942c){var _0x4dc297=_0x31942c(0x1b3)['default'];function _0x4ed43a(){_0x35a510['exports']=_0x4ed43a=function _0x4ed43a(){return _0x4c1324;},_0x35a510['exports']['__esModule']=!0x0,_0x35a510['exports']['default']=_0x35a510['exports'];var _0x4c1324={},_0x3c13cd=Object['prototype'],_0x4f028a=_0x3c13cd['hasOwnProperty'],_0x1c457a='function'==typeof Symbol?Symbol:{},_0x4f1a58=_0x1c457a['iterator']||'@@iterator',_0x322813=_0x1c457a['asyncIterator']||'@@asyncIterator',_0x1ac498=_0x1c457a['toStringTag']||'@@toStringTag';function _0x291303(_0x3b1391,_0x868ebe,_0x567987){return Object['defineProperty'](_0x3b1391,_0x868ebe,{'value':_0x567987,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}),_0x3b1391[_0x868ebe];}try{_0x291303({},'');}catch(_0x3ca707){_0x291303=function _0x291303(_0x2a8a04,_0xec2946,_0x565057){return _0x2a8a04[_0xec2946]=_0x565057;};}function _0xc0d4fa(_0x428bd2,_0x4cdea2,_0x284214,_0x260e88){var _0x1651ec=_0x4cdea2&&_0x4cdea2['prototype']instanceof _0x3e5f41?_0x4cdea2:_0x3e5f41,_0x4ec011=Object['create'](_0x1651ec['prototype']),_0x4234d8=new _0x14c20c(_0x260e88||[]);return _0x4ec011['_invoke']=function(_0x2aa2c3,_0x25542e,_0xccfcdc){var _0x414685='suspendedStart';return function(_0xfa10fa,_0x257cb2){if('executing'===_0x414685)throw new Error('Generator\x20is\x20already\x20running');if('completed'===_0x414685){if('throw'===_0xfa10fa)throw _0x257cb2;return _0x9db3e4();}for(_0xccfcdc['method']=_0xfa10fa,_0xccfcdc['arg']=_0x257cb2;;){var _0x1cee69=_0xccfcdc['delegate'];if(_0x1cee69){var _0x503d1f=_0x2c1e65(_0x1cee69,_0xccfcdc);if(_0x503d1f){if(_0x503d1f===_0xfb83db)continue;return _0x503d1f;}}if('next'===_0xccfcdc['method'])_0xccfcdc['sent']=_0xccfcdc['_sent']=_0xccfcdc['arg'];else {if('throw'===_0xccfcdc['method']){if('suspendedStart'===_0x414685)throw _0x414685='completed',_0xccfcdc['arg'];_0xccfcdc['dispatchException'](_0xccfcdc['arg']);}else 'return'===_0xccfcdc['method']&&_0xccfcdc['abrupt']('return',_0xccfcdc['arg']);}_0x414685='executing';var _0x4b422b=_0x38d287(_0x2aa2c3,_0x25542e,_0xccfcdc);if('normal'===_0x4b422b['type']){if(_0x414685=_0xccfcdc['done']?'completed':'suspendedYield',_0x4b422b['arg']===_0xfb83db)continue;return {'value':_0x4b422b['arg'],'done':_0xccfcdc['done']};}'throw'===_0x4b422b['type']&&(_0x414685='completed',_0xccfcdc['method']='throw',_0xccfcdc['arg']=_0x4b422b['arg']);}};}(_0x428bd2,_0x284214,_0x4234d8),_0x4ec011;}function _0x38d287(_0x5f1e86,_0x13859e,_0x416e27){try{return {'type':'normal','arg':_0x5f1e86['call'](_0x13859e,_0x416e27)};}catch(_0x1b29d2){return {'type':'throw','arg':_0x1b29d2};}}_0x4c1324['wrap']=_0xc0d4fa;var _0xfb83db={};function _0x3e5f41(){}function _0x5bcdaa(){}function _0x1cd6d9(){}var _0x274382={};_0x291303(_0x274382,_0x4f1a58,function(){return this;});var _0x206400=Object['getPrototypeOf'],_0xdf6723=_0x206400&&_0x206400(_0x206400(_0x123b0e([])));_0xdf6723&&_0xdf6723!==_0x3c13cd&&_0x4f028a['call'](_0xdf6723,_0x4f1a58)&&(_0x274382=_0xdf6723);var _0x53de8d=_0x1cd6d9['prototype']=_0x3e5f41['prototype']=Object['create'](_0x274382);function _0x10dd03(_0x550ed1){['next','throw','return']['forEach'](function(_0x2bb2b1){_0x291303(_0x550ed1,_0x2bb2b1,function(_0x147877){return this['_invoke'](_0x2bb2b1,_0x147877);});});}function _0x17bc0d(_0x2906a2,_0x183187){function _0x213d25(_0x5b8498,_0x3ff74e,_0x4034b8,_0x5a6a88){var _0x4048ad=_0x38d287(_0x2906a2[_0x5b8498],_0x2906a2,_0x3ff74e);if('throw'!==_0x4048ad['type']){var _0x5d4468=_0x4048ad['arg'],_0x2e4cf9=_0x5d4468['value'];return _0x2e4cf9&&'object'==_0x4dc297(_0x2e4cf9)&&_0x4f028a['call'](_0x2e4cf9,'__await')?_0x183187['resolve'](_0x2e4cf9['__await'])['then'](function(_0x1ef2ce){_0x213d25('next',_0x1ef2ce,_0x4034b8,_0x5a6a88);},function(_0x3e92bd){_0x213d25('throw',_0x3e92bd,_0x4034b8,_0x5a6a88);}):_0x183187['resolve'](_0x2e4cf9)['then'](function(_0x378dee){_0x5d4468['value']=_0x378dee,_0x4034b8(_0x5d4468);},function(_0x35536b){return _0x213d25('throw',_0x35536b,_0x4034b8,_0x5a6a88);});}_0x5a6a88(_0x4048ad['arg']);}var _0x33b0d7;this['_invoke']=function(_0x419720,_0x28828e){function _0x21e925(){return new _0x183187(function(_0x364cda,_0x45d0de){_0x213d25(_0x419720,_0x28828e,_0x364cda,_0x45d0de);});}return _0x33b0d7=_0x33b0d7?_0x33b0d7['then'](_0x21e925,_0x21e925):_0x21e925();};}function _0x2c1e65(_0x504136,_0x487ae5){var _0x4b3f45=_0x504136['iterator'][_0x487ae5['method']];if(void 0x0===_0x4b3f45){if(_0x487ae5['delegate']=null,'throw'===_0x487ae5['method']){if(_0x504136['iterator']['return']&&(_0x487ae5['method']='return',_0x487ae5['arg']=void 0x0,_0x2c1e65(_0x504136,_0x487ae5),'throw'===_0x487ae5['method']))return _0xfb83db;_0x487ae5['method']='throw',_0x487ae5['arg']=new TypeError('The\x20iterator\x20does\x20not\x20provide\x20a\x20\x27throw\x27\x20method');}return _0xfb83db;}var _0x414172=_0x38d287(_0x4b3f45,_0x504136['iterator'],_0x487ae5['arg']);if('throw'===_0x414172['type'])return _0x487ae5['method']='throw',_0x487ae5['arg']=_0x414172['arg'],_0x487ae5['delegate']=null,_0xfb83db;var _0x99136b=_0x414172['arg'];return _0x99136b?_0x99136b['done']?(_0x487ae5[_0x504136['resultName']]=_0x99136b['value'],_0x487ae5['next']=_0x504136['nextLoc'],'return'!==_0x487ae5['method']&&(_0x487ae5['method']='next',_0x487ae5['arg']=void 0x0),_0x487ae5['delegate']=null,_0xfb83db):_0x99136b:(_0x487ae5['method']='throw',_0x487ae5['arg']=new TypeError('iterator\x20result\x20is\x20not\x20an\x20object'),_0x487ae5['delegate']=null,_0xfb83db);}function _0x3c5e0f(_0x535f31){var _0x12cb41={'tryLoc':_0x535f31[0x0]};0x1 in _0x535f31&&(_0x12cb41['catchLoc']=_0x535f31[0x1]),0x2 in _0x535f31&&(_0x12cb41['finallyLoc']=_0x535f31[0x2],_0x12cb41['afterLoc']=_0x535f31[0x3]),this['tryEntries']['push'](_0x12cb41);}function _0x3e9be8(_0x403559){var _0x4a90a5=_0x403559['completion']||{};_0x4a90a5['type']='normal',delete _0x4a90a5['arg'],_0x403559['completion']=_0x4a90a5;}function _0x14c20c(_0x5982ba){this['tryEntries']=[{'tryLoc':'root'}],_0x5982ba['forEach'](_0x3c5e0f,this),this['reset'](!0x0);}function _0x123b0e(_0x123e18){if(_0x123e18){var _0x570ee8=_0x123e18[_0x4f1a58];if(_0x570ee8)return _0x570ee8['call'](_0x123e18);if('function'==typeof _0x123e18['next'])return _0x123e18;if(!isNaN(_0x123e18['length'])){var _0x11dc54=-0x1,_0x70ab9d=function _0x251d14(){for(;++_0x11dc54<_0x123e18['length'];)if(_0x4f028a['call'](_0x123e18,_0x11dc54))return _0x251d14['value']=_0x123e18[_0x11dc54],_0x251d14['done']=!0x1,_0x251d14;return _0x251d14['value']=void 0x0,_0x251d14['done']=!0x0,_0x251d14;};return _0x70ab9d['next']=_0x70ab9d;}}return {'next':_0x9db3e4};}function _0x9db3e4(){return {'value':void 0x0,'done':!0x0};}return _0x5bcdaa['prototype']=_0x1cd6d9,_0x291303(_0x53de8d,'constructor',_0x1cd6d9),_0x291303(_0x1cd6d9,'constructor',_0x5bcdaa),_0x5bcdaa['displayName']=_0x291303(_0x1cd6d9,_0x1ac498,'GeneratorFunction'),_0x4c1324['isGeneratorFunction']=function(_0x5c761b){var _0x2df0ac='function'==typeof _0x5c761b&&_0x5c761b['constructor'];return !!_0x2df0ac&&(_0x2df0ac===_0x5bcdaa||'GeneratorFunction'===(_0x2df0ac['displayName']||_0x2df0ac['name']));},_0x4c1324['mark']=function(_0x4eabf5){return Object['setPrototypeOf']?Object['setPrototypeOf'](_0x4eabf5,_0x1cd6d9):(_0x4eabf5['__proto__']=_0x1cd6d9,_0x291303(_0x4eabf5,_0x1ac498,'GeneratorFunction')),_0x4eabf5['prototype']=Object['create'](_0x53de8d),_0x4eabf5;},_0x4c1324['awrap']=function(_0x4bf547){return {'__await':_0x4bf547};},_0x10dd03(_0x17bc0d['prototype']),_0x291303(_0x17bc0d['prototype'],_0x322813,function(){return this;}),_0x4c1324['AsyncIterator']=_0x17bc0d,_0x4c1324['async']=function(_0x309e72,_0x2c52d0,_0x20ce8f,_0x1f3f34,_0x101e2f){void 0x0===_0x101e2f&&(_0x101e2f=Promise);var _0x3cddc7=new _0x17bc0d(_0xc0d4fa(_0x309e72,_0x2c52d0,_0x20ce8f,_0x1f3f34),_0x101e2f);return _0x4c1324['isGeneratorFunction'](_0x2c52d0)?_0x3cddc7:_0x3cddc7['next']()['then'](function(_0x4062c7){return _0x4062c7['done']?_0x4062c7['value']:_0x3cddc7['next']();});},_0x10dd03(_0x53de8d),_0x291303(_0x53de8d,_0x1ac498,'Generator'),_0x291303(_0x53de8d,_0x4f1a58,function(){return this;}),_0x291303(_0x53de8d,'toString',function(){return '[object\x20Generator]';}),_0x4c1324['keys']=function(_0x1e76be){var _0x41993f=[];for(var _0x2e2aed in _0x1e76be)_0x41993f['push'](_0x2e2aed);return _0x41993f['reverse'](),function _0x221d94(){for(;_0x41993f['length'];){var _0x1c4699=_0x41993f['pop']();if(_0x1c4699 in _0x1e76be)return _0x221d94['value']=_0x1c4699,_0x221d94['done']=!0x1,_0x221d94;}return _0x221d94['done']=!0x0,_0x221d94;};},_0x4c1324['values']=_0x123b0e,_0x14c20c['prototype']={'constructor':_0x14c20c,'reset':function reset(_0x1099df){if(this['prev']=0x0,this['next']=0x0,this['sent']=this['_sent']=void 0x0,this['done']=!0x1,this['delegate']=null,this['method']='next',this['arg']=void 0x0,this['tryEntries']['forEach'](_0x3e9be8),!_0x1099df){for(var _0x43fd22 in this)'t'===_0x43fd22['charAt'](0x0)&&_0x4f028a['call'](this,_0x43fd22)&&!isNaN(+_0x43fd22['slice'](0x1))&&(this[_0x43fd22]=void 0x0);}},'stop':function stop(){this['done']=!0x0;var _0x53bcef=this['tryEntries'][0x0]['completion'];if('throw'===_0x53bcef['type'])throw _0x53bcef['arg'];return this['rval'];},'dispatchException':function dispatchException(_0x2107e3){if(this['done'])throw _0x2107e3;var _0x40b4c0=this;function _0x245d3a(_0x19cdf2,_0x3d4930){return _0x4efddb['type']='throw',_0x4efddb['arg']=_0x2107e3,_0x40b4c0['next']=_0x19cdf2,_0x3d4930&&(_0x40b4c0['method']='next',_0x40b4c0['arg']=void 0x0),!!_0x3d4930;}for(var _0x3fa71c=this['tryEntries']['length']-0x1;_0x3fa71c>=0x0;--_0x3fa71c){var _0x5928f6=this['tryEntries'][_0x3fa71c],_0x4efddb=_0x5928f6['completion'];if('root'===_0x5928f6['tryLoc'])return _0x245d3a('end');if(_0x5928f6['tryLoc']<=this['prev']){var _0x4197e0=_0x4f028a['call'](_0x5928f6,'catchLoc'),_0x866491=_0x4f028a['call'](_0x5928f6,'finallyLoc');if(_0x4197e0&&_0x866491){if(this['prev']<_0x5928f6['catchLoc'])return _0x245d3a(_0x5928f6['catchLoc'],!0x0);if(this['prev']<_0x5928f6['finallyLoc'])return _0x245d3a(_0x5928f6['finallyLoc']);}else {if(_0x4197e0){if(this['prev']<_0x5928f6['catchLoc'])return _0x245d3a(_0x5928f6['catchLoc'],!0x0);}else {if(!_0x866491)throw new Error('try\x20statement\x20without\x20catch\x20or\x20finally');if(this['prev']<_0x5928f6['finallyLoc'])return _0x245d3a(_0x5928f6['finallyLoc']);}}}}},'abrupt':function abrupt(_0x3c2953,_0x191811){for(var _0x2a146d=this['tryEntries']['length']-0x1;_0x2a146d>=0x0;--_0x2a146d){var _0x473e5a=this['tryEntries'][_0x2a146d];if(_0x473e5a['tryLoc']<=this['prev']&&_0x4f028a['call'](_0x473e5a,'finallyLoc')&&this['prev']<_0x473e5a['finallyLoc']){var _0x5f0380=_0x473e5a;break;}}_0x5f0380&&('break'===_0x3c2953||'continue'===_0x3c2953)&&_0x5f0380['tryLoc']<=_0x191811&&_0x191811<=_0x5f0380['finallyLoc']&&(_0x5f0380=null);var _0x4a3e61=_0x5f0380?_0x5f0380['completion']:{};return _0x4a3e61['type']=_0x3c2953,_0x4a3e61['arg']=_0x191811,_0x5f0380?(this['method']='next',this['next']=_0x5f0380['finallyLoc'],_0xfb83db):this['complete'](_0x4a3e61);},'complete':function complete(_0x4c034f,_0x432431){if('throw'===_0x4c034f['type'])throw _0x4c034f['arg'];return 'break'===_0x4c034f['type']||'continue'===_0x4c034f['type']?this['next']=_0x4c034f['arg']:'return'===_0x4c034f['type']?(this['rval']=this['arg']=_0x4c034f['arg'],this['method']='return',this['next']='end'):'normal'===_0x4c034f['type']&&_0x432431&&(this['next']=_0x432431),_0xfb83db;},'finish':function finish(_0x286e3c){for(var _0x15540b=this['tryEntries']['length']-0x1;_0x15540b>=0x0;--_0x15540b){var _0x28ce2e=this['tryEntries'][_0x15540b];if(_0x28ce2e['finallyLoc']===_0x286e3c)return this['complete'](_0x28ce2e['completion'],_0x28ce2e['afterLoc']),_0x3e9be8(_0x28ce2e),_0xfb83db;}},'catch':function _catch(_0xeeee77){for(var _0x33eb64=this['tryEntries']['length']-0x1;_0x33eb64>=0x0;--_0x33eb64){var _0x34209d=this['tryEntries'][_0x33eb64];if(_0x34209d['tryLoc']===_0xeeee77){var _0x538ccd=_0x34209d['completion'];if('throw'===_0x538ccd['type']){var _0x59cc6e=_0x538ccd['arg'];_0x3e9be8(_0x34209d);}return _0x59cc6e;}}throw new Error('illegal\x20catch\x20attempt');},'delegateYield':function delegateYield(_0x2335a9,_0x37ae5f,_0x52486c){return this['delegate']={'iterator':_0x123b0e(_0x2335a9),'resultName':_0x37ae5f,'nextLoc':_0x52486c},'next'===this['method']&&(this['arg']=void 0x0),_0xfb83db;}},_0x4c1324;}_0x35a510['exports']=_0x4ed43a,_0x35a510['exports']['__esModule']=!0x0,_0x35a510['exports']['default']=_0x35a510['exports'];},0x1b3:function _(_0x7ad8f8){function _0xda0c98(_0x20238b){return _0x7ad8f8['exports']=_0xda0c98='function'==typeof Symbol&&'symbol'==_typeof(Symbol['iterator'])?function(_0x515c89){return _typeof(_0x515c89);}:function(_0x58812d){return _0x58812d&&'function'==typeof Symbol&&_0x58812d['constructor']===Symbol&&_0x58812d!==Symbol['prototype']?'symbol':_typeof(_0x58812d);},_0x7ad8f8['exports']['__esModule']=!0x0,_0x7ad8f8['exports']['default']=_0x7ad8f8['exports'],_0xda0c98(_0x20238b);}_0x7ad8f8['exports']=_0xda0c98,_0x7ad8f8['exports']['__esModule']=!0x0,_0x7ad8f8['exports']['default']=_0x7ad8f8['exports'];},0x75:function _(_0x1851ea,_0x3df0ae,_0x54b540){var _0x1aea65=_0x54b540(0x206)();_0x1851ea['exports']=_0x1aea65;try{regeneratorRuntime=_0x1aea65;}catch(_0x122a3f){'object'==(typeof globalThis==="undefined"?"undefined":_typeof(globalThis))?globalThis['regeneratorRuntime']=_0x1aea65:Function('r','regeneratorRuntime\x20=\x20r')(_0x1aea65);}}},_0x5f0dc6={};function _0x177d02(_0x575407){var _0x3a7df7=_0x5f0dc6[_0x575407];if(void 0x0!==_0x3a7df7)return _0x3a7df7['exports'];var _0x378c28=_0x5f0dc6[_0x575407]={'exports':{}};return _0xc667f9[_0x575407](_0x378c28,_0x378c28['exports'],_0x177d02),_0x378c28['exports'];}_0x177d02['n']=function(_0x293967){var _0x46bd3e=_0x293967&&_0x293967['__esModule']?function(){return _0x293967['default'];}:function(){return _0x293967;};return _0x177d02['d'](_0x46bd3e,{'a':_0x46bd3e}),_0x46bd3e;},_0x177d02['d']=function(_0x21c584,_0x5818ac){for(var _0x176168 in _0x5818ac)_0x177d02['o'](_0x5818ac,_0x176168)&&!_0x177d02['o'](_0x21c584,_0x176168)&&Object['defineProperty'](_0x21c584,_0x176168,{'enumerable':!0x0,'get':_0x5818ac[_0x176168]});},_0x177d02['o']=function(_0xd93f0d,_0x16b250){return Object['prototype']['hasOwnProperty']['call'](_0xd93f0d,_0x16b250);},_0x177d02['r']=function(_0x39d44d){'undefined'!=typeof Symbol&&Symbol['toStringTag']&&Object['defineProperty'](_0x39d44d,Symbol['toStringTag'],{'value':'Module'}),Object['defineProperty'](_0x39d44d,'__esModule',{'value':!0x0});};var _0x4d6d3f={};return function(){function _0xa7bfb2(_0x12479b,_0x403c14){if(!(_0x12479b instanceof _0x403c14))throw new TypeError('Cannot\x20call\x20a\x20class\x20as\x20a\x20function');}function _0x10e547(_0x52a39e,_0x25168a){for(var _0x39323f=0x0;_0x39323f<_0x25168a['length'];_0x39323f++){var _0x557b10=_0x25168a[_0x39323f];_0x557b10['enumerable']=_0x557b10['enumerable']||!0x1,_0x557b10['configurable']=!0x0,'value'in _0x557b10&&(_0x557b10['writable']=!0x0),Object['defineProperty'](_0x52a39e,_0x557b10['key'],_0x557b10);}}function _0x3e0d7c(_0x2a7aa6,_0x23c847,_0x582781){return _0x23c847&&_0x10e547(_0x2a7aa6['prototype'],_0x23c847),_0x582781&&_0x10e547(_0x2a7aa6,_0x582781),Object['defineProperty'](_0x2a7aa6,'prototype',{'writable':!0x1}),_0x2a7aa6;}_0x177d02['r'](_0x4d6d3f),_0x177d02['d'](_0x4d6d3f,{'JSPlayCtrl':function JSPlayCtrl(){return _0x32f0cc;}});var _0x3b6cac=0x501,_0x1928b9=0x502,_0x205828=0x505,_0xd535e3=0x507,_0x1ee478=0x508,_0x513d06=0x509,_0x2fcdfc=0x512,_0x515d92=0x516,_0x278af9=0x1,_0x46372b=0x2,_0x138512=0x3,_0x106093=0x0,_0x3f622d=0x100,_0x3a265d=0x200,_0x39d783=0x300,_0x1ae1fd=0x400,_0x4fb0c9=0x500,_0x4ec0ec=0x600,_0x48007e=0x700,_0x27ffa7=0x800,_0x2723d4=0x900,_0x2cbb81=0xa00,_0x64a4f0=0x1,_0x1afe14=0x2,_0x563cdc=0x4,_0x231754=0x8,_0x401beb=0x10,_0x322752=0x20;function _0xb99566(_0x43ff65,_0x1a548b,_0x1307f3,_0x2da018,_0x26b14a,_0x398be8,_0x3f87dd){try{var _0x2f5d50=_0x43ff65[_0x398be8](_0x3f87dd),_0x2c6deb=_0x2f5d50['value'];}catch(_0x39edd4){return void _0x1307f3(_0x39edd4);}_0x2f5d50['done']?_0x1a548b(_0x2c6deb):Promise['resolve'](_0x2c6deb)['then'](_0x2da018,_0x26b14a);}var _0x4ac478=_0x177d02(0x75),_0x127fb4=_0x177d02['n'](_0x4ac478),_0x56e75e=_0x177d02(0x1dd),_0x891839=_0x177d02['n'](_0x56e75e);function _0x1b572b(){return _0x891839()('((()=>{\x27use\x20strict\x27;function\x20_0x4b5b03(_0x4151ce,_0x573b3e){if(!(_0x4151ce\x20instanceof\x20_0x573b3e))throw\x20new\x20TypeError(\x27Cannot\x5cx20call\x5cx20a\x5cx20class\x5cx20as\x5cx20a\x5cx20function\x27);}function\x20_0x404a46(_0xa1488f,_0x46f8af){for(var\x20_0x43e159=0x0;_0x43e159<_0x46f8af[\x27length\x27];_0x43e159++){var\x20_0x4fbbae=_0x46f8af[_0x43e159];_0x4fbbae[\x27enumerable\x27]=_0x4fbbae[\x27enumerable\x27]||!0x1,_0x4fbbae[\x27configurable\x27]=!0x0,\x27value\x27in\x20_0x4fbbae&&(_0x4fbbae[\x27writable\x27]=!0x0),Object[\x27defineProperty\x27](_0xa1488f,_0x4fbbae[\x27key\x27],_0x4fbbae);}}function\x20_0x4023a9(_0x3d67e5,_0x87ce2d,_0x32189e){return\x20_0x87ce2d&&_0x404a46(_0x3d67e5[\x27prototype\x27],_0x87ce2d),_0x32189e&&_0x404a46(_0x3d67e5,_0x32189e),Object[\x27defineProperty\x27](_0x3d67e5,\x27prototype\x27,{\x27writable\x27:!0x1}),_0x3d67e5;}var\x20_0xe627bc=0x501,_0x5487fc=0x502,_0x45ad56=0x505,_0x14bc99=0x507,_0x6d4fc5=0x508,_0x4da770=0x509,_0x26b7a2=0x512,_0xa6211e=0x516,_0x5b2e5d=0x1,_0x53136e=0x2,_0x372248=0x3,_0xf9176d=0x0,_0x1b901e=0x100,_0x5d10c0=0x200,_0x5e8792=0x300,_0x2f6657=0x400,_0x56dd9e=0x500,_0x1b52b7=0x600,_0x20b9af=0x700,_0x54261b=0x800,_0x569baa=0x900,_0x705e63=0xa00,_0x15e32a=0x1,_0x1f8dfc=0x2,_0x507306=0x4,_0x3e4a1a=0x8,_0x41b06f=0x10,_0x44c1dc=0x20,_0x2b8214=(function(){function\x20_0x49001c(_0x488916,_0x457127,_0x398cc4){_0x4b5b03(this,_0x49001c),this[\x27width\x27]=0x0,this[\x27height\x27]=0x0,this[\x27decoderObj\x27]=null,this[\x27FirstFrame\x27]=!0x0,this[\x27ready_frames\x27]=[],this[\x27underflow\x27]=!0x0,this[\x27sab\x27]=_0x488916,this[\x27frameRate\x27]=0x1e,this[\x27needSetPreSoft\x27]=!0x1,this[\x27decoderCurStatus\x27]=0x2,this[\x27decoderOutSuccess\x27]=!0x1,this[\x27decoderObjNeedReset\x27]=!0x1,this[\x27oVideoRenderHandle\x27]=_0x457127,this[\x27output\x27]=this[\x27output\x27][\x27bind\x27](this),this[\x27reportError\x27]=this[\x27reportError\x27][\x27bind\x27](this),this[\x27player\x27]=null,null!=_0x398cc4&&(this[\x27player\x27]=_0x398cc4),this[\x27curFrame\x27]=null;}return\x20_0x4023a9(_0x49001c,[{\x27key\x27:\x27initDecoder\x27,\x27value\x27:function(){if(null==this[\x27decoderObj\x27]){var\x20_0x1571c5={\x27output\x27:this[\x27output\x27],\x27error\x27:this[\x27reportError\x27]};this[\x27decoderObj\x27]=new\x20VideoDecoder(_0x1571c5);}this[\x27underflow\x27]&&(this[\x27underflow\x27]=!0x1,setTimeout(this[\x27oVideoRenderHandle\x27][\x27RenderFrame\x27](),0x0),this[\x27oVideoRenderHandle\x27][\x27displayRunning\x27]=!0x0),this[\x27decoderCurStatus\x27]=0x2,this[\x27FirstFrame\x27]=!0x0;}},{\x27key\x27:\x27inputData\x27,\x27value\x27:function(_0x53c215,_0x5e4827){null!=this[\x27decoderObj\x27]&&(\x27configured\x27==this[\x27decoderObj\x27][\x27state\x27]||this[\x27FirstFrame\x27])&&this[\x27decodeProcess\x27](_0x53c215,_0x5e4827),_0x5e4827[\x27nStreamEnd\x27]&&this[\x27SetStreamEnd\x27]();}},{\x27key\x27:\x27concatenate\x27,\x27value\x27:function(_0x31244a){for(var\x20_0x14df89=0x0,_0x67488c=arguments[\x27length\x27],_0x1cd4db=new\x20Array(_0x67488c>0x1?_0x67488c-0x1:0x0),_0x172a38=0x1;_0x172a38<_0x67488c;_0x172a38++)_0x1cd4db[_0x172a38-0x1]=arguments[_0x172a38];for(var\x20_0x4881d8=0x0,_0x25bfb8=_0x1cd4db;_0x4881d8<_0x25bfb8[\x27length\x27];_0x4881d8++){var\x20_0x1d7dd8=_0x25bfb8[_0x4881d8];_0x14df89+=_0x1d7dd8[\x27length\x27];}for(var\x20_0x317623=new\x20_0x31244a(_0x14df89),_0x1fdc13=0x0,_0x51ab3c=0x0,_0x5d6e98=_0x1cd4db;_0x51ab3c<_0x5d6e98[\x27length\x27];_0x51ab3c++){var\x20_0x323e38=_0x5d6e98[_0x51ab3c];_0x317623[\x27set\x27](_0x323e38,_0x1fdc13),_0x1fdc13+=_0x323e38[\x27length\x27];}return\x20_0x317623;}},{\x27key\x27:\x27processData\x27,\x27value\x27:function(_0x59ce52){for(var\x20_0x19636e=null,_0x363541=null,_0x703de0=null,_0x49eef2=!0x1,_0x22e050=!0x1,_0x1e66d3=0x0,_0x1b9474=0x0;_0x1b9474<_0x59ce52[\x27length\x27]-0x4;_0x1b9474++){if(0x0!=_0x59ce52[_0x1b9474]||0x0!=_0x59ce52[_0x1b9474+0x1]||0x0!=_0x59ce52[_0x1b9474+0x2]||0x1!=_0x59ce52[_0x1b9474+0x3]||0x67!=_0x59ce52[_0x1b9474+0x4]&&0x27!=_0x59ce52[_0x1b9474+0x4]||(0x0!=_0x1b9474?(_0x22e050=!0x0,_0x19636e=_0x59ce52[\x27slice\x27](_0x1b9474),_0x1e66d3=_0x1b9474):_0x19636e=_0x59ce52),0x0==_0x59ce52[_0x1b9474]&&0x0==_0x59ce52[_0x1b9474+0x1]&&0x0==_0x59ce52[_0x1b9474+0x2]&&0x1==_0x59ce52[_0x1b9474+0x3]&&(0x9==_0x59ce52[_0x1b9474+0x4]||0x6==_0x59ce52[_0x1b9474+0x4])){if(null==_0x19636e)continue;null==_0x363541&&(_0x363541=_0x59ce52[\x27slice\x27](_0x1e66d3,_0x1b9474),_0x49eef2=!0x0);}if(0x0==_0x59ce52[_0x1b9474]&&0x0==_0x59ce52[_0x1b9474+0x1]&&0x0==_0x59ce52[_0x1b9474+0x2]&&0x1==_0x59ce52[_0x1b9474+0x3]&&(0x65==_0x59ce52[_0x1b9474+0x4]||0x25==_0x59ce52[_0x1b9474+0x4])){_0x49eef2&&(_0x703de0=_0x59ce52[\x27slice\x27](_0x1b9474));break;}}return\x20_0x49eef2?this[\x27concatenate\x27](Uint8Array,_0x363541,_0x703de0):_0x22e050?_0x19636e:_0x59ce52;}},{\x27key\x27:\x27processData1\x27,\x27value\x27:function(_0x514bd0){return\x200x0!=_0x514bd0[0x0]||0x0!=_0x514bd0[0x1]||0x0!=_0x514bd0[0x2]||0x1!=_0x514bd0[0x3]||0x9!=_0x514bd0[0x4]&&0x6!=_0x514bd0[0x4]?_0x514bd0:_0x514bd0[\x27slice\x27](0x5);}},{\x27key\x27:\x27formatVideoDecoderConfigure\x27,\x27value\x27:function(_0xa89b44,_0x3bead7,_0x65c0e4,_0xb7f936){var\x20_0x3c1e9b=\x27\x27;if(0x5==_0x3bead7)_0x3c1e9b=\x27hvc1.1.6.L123.00\x27,console[\x27log\x27](\x27265\x5cx20hard\x5cx20decoder\x27);else{if(0x100==_0x3bead7){for(var\x20_0x572684=0x0;_0x572684<_0xa89b44[\x27length\x27];_0x572684++)if(0x67===_0xa89b44[_0x572684]||0x27===_0xa89b44[_0x572684]){var\x20_0x2dcdb7=_0xa89b44[\x27subarray\x27](_0x572684+0x1,_0x572684+0x4);_0x3c1e9b=\x27avc1.\x27;for(var\x20_0x1458f3=0x0;_0x1458f3<0x3;_0x1458f3++){var\x20_0x4fc5db=_0x2dcdb7[_0x1458f3][\x27toString\x27](0x10);_0x4fc5db[\x27length\x27]<0x2&&(_0x4fc5db=\x270\x27+_0x4fc5db),_0x3c1e9b+=_0x4fc5db;}break;}console[\x27log\x27](\x27264\x5cx20hard\x5cx20decoder\x27);}else\x20console[\x27log\x27](\x27Support\x5cx20Error:\x5cx20hard\x5cx20decoder\x5cx20only\x5cx20support\x5cx20264\x5cx20and\x5cx20265\x5cx20!!!\x27);}var\x20_0x2695cf={\x27codec\x27:_0x3c1e9b,\x27hardwareAcceleration\x27:\x27prefer-hardware\x27,\x27optimizeForLatency\x27:0x1};return\x200x5!=_0x3bead7&&this[\x27needSetPreSoft\x27]&&(_0x2695cf[\x27hardwareAcceleration\x27]=\x27prefer-software\x27),_0x2695cf;}},{\x27key\x27:\x27decodeProcess\x27,\x27value\x27:function(_0x108071,_0x545724){var\x20_0xc8e1aa=this;this[\x27frameRate\x27]!=_0x545724[\x27frameRate\x27]&&(this[\x27frameRate\x27]=_0x545724[\x27frameRate\x27]),this[\x27width\x27]!=_0x545724[\x27width\x27]&&(this[\x27width\x27]=_0x545724[\x27width\x27]),this[\x27height\x27]!=_0x545724[\x27height\x27]&&(this[\x27height\x27]=_0x545724[\x27height\x27]),_0x545724[\x27needSetPreSoft\x27]&&(this[\x27needSetPreSoft\x27]=_0x545724[\x27needSetPreSoft\x27]);var\x20_0x49e13a=_0x108071;if(0x4!=this[\x27decoderCurStatus\x27]&&null!=this[\x27decoderObj\x27]){if(\x27configured\x27==this[\x27decoderObj\x27][\x27state\x27]){var\x20_0x6f02ca=new\x20EncodedVideoChunk({\x27data\x27:_0x49e13a,\x27timestamp\x27:_0x545724[\x27timeStamp\x27],\x27type\x27:_0x545724[\x27isKeyFrame\x27]?\x27key\x27:\x27delta\x27});this[\x27decoderObj\x27][\x27decode\x27](_0x6f02ca),_0x49e13a=null,_0x108071=null,_0x6f02ca=null,_0x545724[\x27frameType\x27];}else{if(_0x545724[\x27isKeyFrame\x27]&&\x27unconfigured\x27==this[\x27decoderObj\x27][\x27state\x27]){var\x20_0x2bed9a=this[\x27formatVideoDecoderConfigure\x27](_0x108071,_0x545724[\x27codecType\x27],_0x545724[\x27width\x27],_0x545724[\x27height\x27]);if(\x27\x27==_0x2bed9a[\x27codec\x27])return-0x1;VideoDecoder[\x27isConfigSupported\x27](_0x2bed9a)[\x27then\x27](function(_0x354ba3){if(_0x354ba3[\x27supported\x27]){_0xc8e1aa[\x27decoderObj\x27][\x27configure\x27](_0x2bed9a),_0x49e13a=_0xc8e1aa[\x27processData\x27](_0x108071),_0xc8e1aa[\x27FirstFrame\x27]=!0x1;var\x20_0x5cdf13=new\x20EncodedVideoChunk({\x27data\x27:_0x49e13a,\x27timestamp\x27:_0x545724[\x27timeStamp\x27],\x27type\x27:_0x545724[\x27isKeyFrame\x27]?\x27key\x27:\x27delta\x27});_0xc8e1aa[\x27decoderObj\x27][\x27decode\x27](_0x5cdf13),_0x2bed9a=null,_0x49e13a=null,_0x108071=null;}else\x20console[\x27log\x27](\x27%c4>HardDecoder\x5cx20ConfigSupported\x5cx20error,switch\x5cx20hard\x5cx20to\x5cx20soft\x27,\x27color:\x5cx20red\x27),_0xc8e1aa[\x27oVideoRenderHandle\x27][\x27HardDecodeError\x27]();})[\x27catch\x27](function(){console[\x27log\x27](\x27VideoDecoder.js\x5cx20isConfigSupported\x5cx20error\x5cx20switch\x5cx20hard\x5cx20to\x5cx20soft\x5cx20\x27),_0xc8e1aa[\x27oVideoRenderHandle\x27][\x27HardDecodeError\x27]();});}}}}},{\x27key\x27:\x27output\x27,\x27value\x27:function(_0x318d95){if(\x27configured\x27==this[\x27decoderObj\x27][\x27state\x27])_0x318d95[\x27format\x27],_0x318d95[\x27codedWidth\x27],_0x318d95[\x27codedHeight\x27],_0x318d95[\x27displayWidth\x27],_0x318d95[\x27displayHeight\x27],_0x318d95[\x27duration\x27],_0x318d95[\x27timestamp\x27],(this[\x27ready_frames\x27][\x27push\x27](_0x318d95),this[\x27decoderOutSuccess\x27]||(this[\x27decoderOutSuccess\x27]=!0x0),this[\x27decoderObj\x27][\x27decodeQueueSize\x27]<=0x1&&(this[\x27player\x27]?this[\x27player\x27][\x27JSPlayM4_GetRawData\x27]():postMessage({\x27function\x27:\x27GetRawData\x27})));else\x20_0x318d95[\x27close\x27]();}},{\x27key\x27:\x27output2\x27,\x27value\x27:function(_0x4c6a3d){var\x20_0xd08ce0=this;_0x4c6a3d[\x27timestamp\x27],createImageBitmap(_0x4c6a3d)[\x27then\x27](function(_0x2becf2){_0x4c6a3d[\x27close\x27](),_0xd08ce0[\x27ready_frames\x27][\x27push\x27](_0x2becf2);});}},{\x27key\x27:\x27reportError\x27,\x27value\x27:function(_0x331ba5){console[\x27log\x27](\x27hardDecode\x5cx20reportError:\x27+_0x331ba5[\x27message\x27]+\x27,state:\x27+this[\x27decoderObj\x27][\x27state\x27]+\x27,frameRate:\x27+this[\x27frameRate\x27]),this[\x27decoderOutSuccess\x27]?this[\x27decoderObjNeedReset\x27]=!0x0:(this[\x27oVideoRenderHandle\x27][\x27HardDecodeError\x27](),console[\x27log\x27](\x27%cswitch\x5cx20hardVideoDecoder\x5cx20to\x5cx20softVideoDecoder\x27,\x27color:\x5cx20red\x27));}},{\x27key\x27:\x27destroyDecoder\x27,\x27value\x27:function(){var\x20_0x5cab80=this;return\x20new\x20Promise(function(_0x4755bc,_0x581ad7){_0x5cab80[\x27clearDecoderObjBuffer\x27]()[\x27then\x27](function(){null!=_0x5cab80[\x27decoderObj\x27]&&(\x27closed\x27!=_0x5cab80[\x27decoderObj\x27][\x27state\x27]&&_0x5cab80[\x27decoderObj\x27][\x27close\x27](),console[\x27log\x27](\x27>>>JS\x5cx2001\x5cx20destroy\x5cx20decoderObj\x27),_0x5cab80[\x27decoderObj\x27]=null),_0x5cab80[\x27decoderCurStatus\x27]=0x4,_0x5cab80[\x27decoderOutSuccess\x27]=!0x1,_0x5cab80[\x27FirstFrame\x27]=!0x0,_0x5cab80[\x27underflow\x27]=!0x0,_0x5cab80[\x27needSetPreSoft\x27]=!0x1,_0x5cab80[\x27decoderObjNeedReset\x27]=!0x1,_0x4755bc();},function(){_0x581ad7();});});}},{\x27key\x27:\x27resetDecoder\x27,\x27value\x27:function(){var\x20_0x5ac237=this;return\x20new\x20Promise(function(_0x30acf1,_0x13ddc1){_0x5ac237[\x27destroyDecoder\x27]()[\x27then\x27](function(){_0x5ac237[\x27initDecoder\x27](),console[\x27log\x27](\x27%c\x5cx20reset\x5cx20hard\x5cx20decoder\x27,\x27color:red\x27),_0x30acf1();},function(){_0x13ddc1();});});}},{\x27key\x27:\x27clearDecoderObjBuffer\x27,\x27value\x27:function(){var\x20_0x463e92=this;return\x20new\x20Promise(function(_0x3736b0,_0x5e2107){for(var\x20_0x233746=_0x463e92[\x27ready_frames\x27][\x27length\x27],_0x39a292=0x0;_0x39a292<_0x233746;_0x39a292++){_0x463e92[\x27ready_frames\x27][\x27shift\x27]()[\x27close\x27]();}_0x463e92[\x27ready_frames\x27][\x27splice\x27](0x0,_0x463e92[\x27ready_frames\x27][\x27length\x27]),null!=_0x463e92[\x27decoderObj\x27]&&\x27configured\x27==_0x463e92[\x27decoderObj\x27][\x27state\x27]&&_0x463e92[\x27decoderObj\x27][\x27reset\x27](),_0x3736b0();});}},{\x27key\x27:\x27SetStreamEnd\x27,\x27value\x27:function(){return\x200x0==this[\x27decoderObj\x27][\x27decodeQueueSize\x27]&&0x0==this[\x27ready_frames\x27][\x27length\x27]&&(this[\x27decoderObj\x27][\x27flush\x27](),console[\x27log\x27](\x27flush\x27)),0x1;}},{\x27key\x27:\x27GetFrame\x27,\x27value\x27:function(){var\x20_0x1f0764=this;return\x20new\x20Promise(function(_0x31f5cc,_0x4368da){if(null!=_0x1f0764[\x27curFrame\x27]){var\x20_0x250473=_0x1f0764[\x27ready_frames\x27][\x27shift\x27]();_0x250473[\x27close\x27](),_0x250473=null,_0x1f0764[\x27curFrame\x27]=null;}0x0!=_0x1f0764[\x27ready_frames\x27][\x27length\x27]?(_0x1f0764[\x27curFrame\x27]=_0x1f0764[\x27ready_frames\x27][0x0],_0x31f5cc(_0x1f0764[\x27curFrame\x27])):(_0x1f0764[\x27curFrame\x27]=null,_0x31f5cc(null));});}},{\x27key\x27:\x27GetFrameBufferLength\x27,\x27value\x27:function(){return\x20this[\x27ready_frames\x27][\x27length\x27];}},{\x27key\x27:\x27GetImageYUV\x27,\x27value\x27:function(){var\x20_0x4ee2b2=this;return\x20new\x20Promise(function(_0x3f4a1d,_0x3f95d8){var\x20_0x23a84f=null;if(console[\x27log\x27](\x27>>>3000\x5cx20GetImageYUV\x5cx20this.curFrame:\x27+_0x4ee2b2[\x27curFrame\x27]),null!=_0x4ee2b2[\x27curFrame\x27]?_0x23a84f=_0x4ee2b2[\x27curFrame\x27]:0x0!=_0x4ee2b2[\x27ready_frames\x27][\x27length\x27]&&(_0x23a84f=_0x4ee2b2[\x27ready_frames\x27][0x0]),console[\x27log\x27](\x27>>>3001\x5cx20GetImageYUV\x5cx20imageFrame:\x27+_0x23a84f),null!=_0x23a84f){var\x20_0x3c0d73=_0x23a84f[\x27displayWidth\x27],_0x5a125f=_0x23a84f[\x27displayHeight\x27],_0x1678ab=_0x3c0d73*_0x5a125f*0x3/0x2,_0x290db3=new\x20Uint8Array(_0x1678ab),_0x452f4c=_0x23a84f[\x27format\x27];console[\x27log\x27](\x27>>>3002\x5cx20GetImageYUV\x5cx20imageFrame:\x27+_0x23a84f),_0x23a84f[\x27copyTo\x27](_0x290db3)[\x27then\x27](function(){console[\x27log\x27](\x272\x5cx20yuvLength:\x27+_0x1678ab+\x27,displayWidth:\x27+_0x3c0d73),_0x3f4a1d({\x27yuvFrameBuffer\x27:_0x290db3,\x27yuvLength\x27:_0x1678ab,\x27displayWidth\x27:_0x3c0d73,\x27displayHeight\x27:_0x5a125f,\x27yuvType\x27:_0x452f4c});});}else\x20_0x3f4a1d({\x27yuvFrameBuffer\x27:-0x1,\x27yuvLength\x27:-0x1,\x27displayWidth\x27:-0x1,\x27displayHeight\x27:-0x1,\x27yuvType\x27:-0x1});});}}]),_0x49001c;}()),_0x26bcbc=0x1,_0x388f7c=0x80000001,_0x1bcf25=0x80000002,_0x460c4d=0x80000003,_0x127571=0x80000004,_0x4a21f9=0x80000005,_0x28903e=0x8000000a,_0x4cfdfb=0x8000000d,_0x15898c=0x8000000e,_0x3ff926=0x1,_0x5ee8f0=0x2,_0x3409b0={\x27SR_DE_NULL\x27:0x0,\x27SR_DE_FISH_ORIGINAL\x27:0x1,\x27SR_DE_FISH_PTZ_CEILING\x27:0x2,\x27SR_DE_FISH_PTZ_FLOOR\x27:0x3,\x27SR_DE_FISH_PTZ_WALL\x27:0x4,\x27SR_DE_FISH_PANORAMA_CEILING_360\x27:0x5,\x27SR_DE_FISH_PANORAMA_CEILING_180\x27:0x6,\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27:0x7,\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27:0x8,\x27SR_DE_FISH_PANORAMA_WALL\x27:0x9,\x27SR_DE_FISH_SEMISPHERE\x27:0xa,\x27SR_DE_EAGLEEYE_SEMISPHERE\x27:0xb,\x27SR_DE_EAGLEEYE_PLANE\x27:0xc,\x27SR_DE_FISH_CYLINDER_CEILING\x27:0xd,\x27SR_DE_FISH_CYLINDER_FLOOR\x27:0xe,\x27SR_DE_FISH_CYLINDER_SPLIT_CEILING\x27:0xf,\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27:0x10,\x27SR_DE_FISH_PLANET\x27:0x11,\x27SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL\x27:0x12,\x27SR_DE_FISH_ARCSPHERE_VERTICAL_WALL\x27:0x13,\x27SR_DE_FISH_ANIMATION_SWITCH_CEILING\x27:0x14,\x27SR_DE_FISH_ANIMATION_SWITCH_FLOOR\x27:0x15,\x27SR_DE_PANORAMA_SPHERE\x27:0x16,\x27SR_DE_PANORAMA_PLANET\x27:0x17},_0x337b82=0x0,_0x134a08=0x1,_0x3eedf4=0x2,_0x3cdbb9=0x3,_0x512db0=0x4,_0x1eac9d=0x5,_0x4430d6=0x6,_0xa0f65c=0x100,_0x3c0642=0x0,_0x3b72f0=0x1,_0x2948e8=0x2,_0x1ac653=0x3,_0x5a3c33=0x4,_0x59697a=0x0,_0xc63b40=0x1,_0x2fdffc=0x2,_0x33678f=0x1,_0x5e29f3=0x2,_0x263bcd=0x3,_0x328161=0x0,_0x2e799f=0x1,_0x27db0f=0x1,_0xa35613=0x2,_0x2a84ea=0x1,_0x14416d=0x2,_0x3d600a=0x3,_0x2e0f03=0x4,_0x2ff0d6=0x5,_0x2f5be6=\x27\x5cx0aattribute\x5cx20vec3\x5cx20xy;\x5cx0aattribute\x5cx20vec2\x5cx20uv;\x5cx0auniform\x5cx20int\x5cx20bCapture;\x5cx20\x5cx0a\x5cx0avarying\x5cx20highp\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx0avoid\x5cx20main(void)\x5cx20{\x5cx0a\x5cx20\x5cx20if(bCapture\x5cx20==\x5cx201)\x5cx0a\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20gl_Position\x5cx20=\x5cx20vec4(xy.x,\x5cx20-xy.y,\x5cx20xy.z,\x5cx201.0);\x5cx0a\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20gl_Position\x5cx20=\x5cx20vec4(xy,\x5cx201.0);\x5cx0a\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20v_uv\x5cx20=\x5cx20uv;\x5cx0a}\x5cx0a\x27,_0x12e912=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec3\x5cx20position;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec4\x5cx20\x5cx20\x5cx20color;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20pp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20\x5cx20\x5cx20vec4\x5cx20\x5cx20colorOut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20int\x5cx20bCapture;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(bCapture\x5cx20==\x5cx201)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position\x5cx20=\x5cx20vec4(position.x,\x5cx20-position.y,\x5cx200.0,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position\x5cx20=\x5cx20vec4(position.x,\x5cx20position.y,\x5cx200.0,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20pp\x5cx20=\x5cx20position.z;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20colorOut\x5cx20=\x5cx20color;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,_0x26024f=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20\x5cx20mediump\x5cx20float\x5cx20pp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20\x5cx20lowp\x5cx20vec4\x5cx20\x5cx20colorOut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20colorOut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20mediump\x5cx20float\x5cx20fx\x5cx20=\x5cx20abs(pp);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if\x5cx20(fx\x5cx20>\x5cx200.2)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor.a\x5cx20=\x5cx20colorOut.a*(1.25\x5cx20-\x5cx201.25*fx);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x27,_0x50467b=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec4\x5cx20position;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec4\x5cx20texCoord;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20\x5cx20\x5cx20mat4\x5cx20\x5cx20\x5cx20matRotate;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20vec4\x5cx20pp;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20int\x5cx20bCapture;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position\x5cx20=\x5cx20position;\x5cx20//*\x5cx20matRotate;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(bCapture\x5cx20==\x5cx201)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position.y\x5cx20=\x5cx20\x5cx20-position.y;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20pp\x5cx20=\x5cx20texCoord;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x27,_0x1417e9=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20mediump\x5cx20float;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20lowp\x5cx20vec4\x5cx20pp;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fAlpha;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main(void)\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20texture2D(texture,\x5cx20pp.st);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor.a\x5cx20*=\x5cx20fAlpha;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x27,_0x4f027d=0x20,_0x102117=0x400,_0x599f01=0.05,_0x423dca=0.000001,_0x2a16d3=3.1415926,_0x47285b=0.02,_0x4d28a5=0x3e8,_0x264b0d=0.78539815,_0x285a59=0x28,_0x32eacf=-0x1,_0x2114fb=0.000001,_0x36f7b3=\x27undefined\x27!=typeof\x20Float32Array?Float32Array:Array;Math[\x27random\x27],Math[\x27PI\x27],Math[\x27hypot\x27]||(Math[\x27hypot\x27]=function(){for(var\x20_0x45f8d9=0x0,_0x4d0ba6=arguments[\x27length\x27];_0x4d0ba6--;)_0x45f8d9+=arguments[_0x4d0ba6]*arguments[_0x4d0ba6];return\x20Math[\x27sqrt\x27](_0x45f8d9);});function\x20_0x163f4b(){var\x20_0x4d8481=new\x20_0x36f7b3(0x10);return\x20_0x36f7b3!=Float32Array&&(_0x4d8481[0x1]=0x0,_0x4d8481[0x2]=0x0,_0x4d8481[0x3]=0x0,_0x4d8481[0x4]=0x0,_0x4d8481[0x6]=0x0,_0x4d8481[0x7]=0x0,_0x4d8481[0x8]=0x0,_0x4d8481[0x9]=0x0,_0x4d8481[0xb]=0x0,_0x4d8481[0xc]=0x0,_0x4d8481[0xd]=0x0,_0x4d8481[0xe]=0x0),_0x4d8481[0x0]=0x1,_0x4d8481[0x5]=0x1,_0x4d8481[0xa]=0x1,_0x4d8481[0xf]=0x1,_0x4d8481;}function\x20_0x572989(_0x378147,_0x206eb7,_0x518574){var\x20_0x4f003a=_0x206eb7[0x0],_0x194aac=_0x206eb7[0x1],_0x34d1c5=_0x206eb7[0x2],_0x556827=_0x206eb7[0x3],_0x4bac49=_0x206eb7[0x4],_0x1be694=_0x206eb7[0x5],_0x580f92=_0x206eb7[0x6],_0x3a3eba=_0x206eb7[0x7],_0x174240=_0x206eb7[0x8],_0x59b986=_0x206eb7[0x9],_0x58708d=_0x206eb7[0xa],_0x150138=_0x206eb7[0xb],_0x1d4281=_0x206eb7[0xc],_0x48d3a4=_0x206eb7[0xd],_0x37f698=_0x206eb7[0xe],_0x293790=_0x206eb7[0xf],_0x1d3e82=_0x518574[0x0],_0x301755=_0x518574[0x1],_0x56dee3=_0x518574[0x2],_0x5cb55b=_0x518574[0x3];return\x20_0x378147[0x0]=_0x1d3e82*_0x4f003a+_0x301755*_0x4bac49+_0x56dee3*_0x174240+_0x5cb55b*_0x1d4281,_0x378147[0x1]=_0x1d3e82*_0x194aac+_0x301755*_0x1be694+_0x56dee3*_0x59b986+_0x5cb55b*_0x48d3a4,_0x378147[0x2]=_0x1d3e82*_0x34d1c5+_0x301755*_0x580f92+_0x56dee3*_0x58708d+_0x5cb55b*_0x37f698,_0x378147[0x3]=_0x1d3e82*_0x556827+_0x301755*_0x3a3eba+_0x56dee3*_0x150138+_0x5cb55b*_0x293790,_0x1d3e82=_0x518574[0x4],_0x301755=_0x518574[0x5],_0x56dee3=_0x518574[0x6],_0x5cb55b=_0x518574[0x7],_0x378147[0x4]=_0x1d3e82*_0x4f003a+_0x301755*_0x4bac49+_0x56dee3*_0x174240+_0x5cb55b*_0x1d4281,_0x378147[0x5]=_0x1d3e82*_0x194aac+_0x301755*_0x1be694+_0x56dee3*_0x59b986+_0x5cb55b*_0x48d3a4,_0x378147[0x6]=_0x1d3e82*_0x34d1c5+_0x301755*_0x580f92+_0x56dee3*_0x58708d+_0x5cb55b*_0x37f698,_0x378147[0x7]=_0x1d3e82*_0x556827+_0x301755*_0x3a3eba+_0x56dee3*_0x150138+_0x5cb55b*_0x293790,_0x1d3e82=_0x518574[0x8],_0x301755=_0x518574[0x9],_0x56dee3=_0x518574[0xa],_0x5cb55b=_0x518574[0xb],_0x378147[0x8]=_0x1d3e82*_0x4f003a+_0x301755*_0x4bac49+_0x56dee3*_0x174240+_0x5cb55b*_0x1d4281,_0x378147[0x9]=_0x1d3e82*_0x194aac+_0x301755*_0x1be694+_0x56dee3*_0x59b986+_0x5cb55b*_0x48d3a4,_0x378147[0xa]=_0x1d3e82*_0x34d1c5+_0x301755*_0x580f92+_0x56dee3*_0x58708d+_0x5cb55b*_0x37f698,_0x378147[0xb]=_0x1d3e82*_0x556827+_0x301755*_0x3a3eba+_0x56dee3*_0x150138+_0x5cb55b*_0x293790,_0x1d3e82=_0x518574[0xc],_0x301755=_0x518574[0xd],_0x56dee3=_0x518574[0xe],_0x5cb55b=_0x518574[0xf],_0x378147[0xc]=_0x1d3e82*_0x4f003a+_0x301755*_0x4bac49+_0x56dee3*_0x174240+_0x5cb55b*_0x1d4281,_0x378147[0xd]=_0x1d3e82*_0x194aac+_0x301755*_0x1be694+_0x56dee3*_0x59b986+_0x5cb55b*_0x48d3a4,_0x378147[0xe]=_0x1d3e82*_0x34d1c5+_0x301755*_0x580f92+_0x56dee3*_0x58708d+_0x5cb55b*_0x37f698,_0x378147[0xf]=_0x1d3e82*_0x556827+_0x301755*_0x3a3eba+_0x56dee3*_0x150138+_0x5cb55b*_0x293790,_0x378147;}function\x20_0x5767f9(_0xeb6bba,_0x744c63,_0x100744,_0x3fd64b){var\x20_0x462b97,_0x2b7d12,_0x1ffa23,_0x416439,_0x221f24,_0x4f8ff2,_0x466925,_0x686cb6,_0x51e181,_0x527cfe,_0x4dbb5b,_0xda4aa,_0x4387a4,_0x43e8b9,_0x4eb2ba,_0x59f57a,_0xb10f5d,_0x27d5bc,_0x4888fd,_0x178eca,_0x39a6c3,_0x334344,_0xcb49cf,_0x22eda4,_0x453c73=_0x3fd64b[0x0],_0x49c166=_0x3fd64b[0x1],_0x69194f=_0x3fd64b[0x2],_0x54e9f7=Math[\x27hypot\x27](_0x453c73,_0x49c166,_0x69194f);return\x20_0x54e9f7<_0x2114fb?null:(_0x453c73*=_0x54e9f7=0x1/_0x54e9f7,_0x49c166*=_0x54e9f7,_0x69194f*=_0x54e9f7,_0x462b97=Math[\x27sin\x27](_0x100744),_0x1ffa23=0x1-(_0x2b7d12=Math[\x27cos\x27](_0x100744)),_0x416439=_0x744c63[0x0],_0x221f24=_0x744c63[0x1],_0x4f8ff2=_0x744c63[0x2],_0x466925=_0x744c63[0x3],_0x686cb6=_0x744c63[0x4],_0x51e181=_0x744c63[0x5],_0x527cfe=_0x744c63[0x6],_0x4dbb5b=_0x744c63[0x7],_0xda4aa=_0x744c63[0x8],_0x4387a4=_0x744c63[0x9],_0x43e8b9=_0x744c63[0xa],_0x4eb2ba=_0x744c63[0xb],_0x59f57a=_0x453c73*_0x453c73*_0x1ffa23+_0x2b7d12,_0xb10f5d=_0x49c166*_0x453c73*_0x1ffa23+_0x69194f*_0x462b97,_0x27d5bc=_0x69194f*_0x453c73*_0x1ffa23-_0x49c166*_0x462b97,_0x4888fd=_0x453c73*_0x49c166*_0x1ffa23-_0x69194f*_0x462b97,_0x178eca=_0x49c166*_0x49c166*_0x1ffa23+_0x2b7d12,_0x39a6c3=_0x69194f*_0x49c166*_0x1ffa23+_0x453c73*_0x462b97,_0x334344=_0x453c73*_0x69194f*_0x1ffa23+_0x49c166*_0x462b97,_0xcb49cf=_0x49c166*_0x69194f*_0x1ffa23-_0x453c73*_0x462b97,_0x22eda4=_0x69194f*_0x69194f*_0x1ffa23+_0x2b7d12,_0xeb6bba[0x0]=_0x416439*_0x59f57a+_0x686cb6*_0xb10f5d+_0xda4aa*_0x27d5bc,_0xeb6bba[0x1]=_0x221f24*_0x59f57a+_0x51e181*_0xb10f5d+_0x4387a4*_0x27d5bc,_0xeb6bba[0x2]=_0x4f8ff2*_0x59f57a+_0x527cfe*_0xb10f5d+_0x43e8b9*_0x27d5bc,_0xeb6bba[0x3]=_0x466925*_0x59f57a+_0x4dbb5b*_0xb10f5d+_0x4eb2ba*_0x27d5bc,_0xeb6bba[0x4]=_0x416439*_0x4888fd+_0x686cb6*_0x178eca+_0xda4aa*_0x39a6c3,_0xeb6bba[0x5]=_0x221f24*_0x4888fd+_0x51e181*_0x178eca+_0x4387a4*_0x39a6c3,_0xeb6bba[0x6]=_0x4f8ff2*_0x4888fd+_0x527cfe*_0x178eca+_0x43e8b9*_0x39a6c3,_0xeb6bba[0x7]=_0x466925*_0x4888fd+_0x4dbb5b*_0x178eca+_0x4eb2ba*_0x39a6c3,_0xeb6bba[0x8]=_0x416439*_0x334344+_0x686cb6*_0xcb49cf+_0xda4aa*_0x22eda4,_0xeb6bba[0x9]=_0x221f24*_0x334344+_0x51e181*_0xcb49cf+_0x4387a4*_0x22eda4,_0xeb6bba[0xa]=_0x4f8ff2*_0x334344+_0x527cfe*_0xcb49cf+_0x43e8b9*_0x22eda4,_0xeb6bba[0xb]=_0x466925*_0x334344+_0x4dbb5b*_0xcb49cf+_0x4eb2ba*_0x22eda4,_0x744c63!==_0xeb6bba&&(_0xeb6bba[0xc]=_0x744c63[0xc],_0xeb6bba[0xd]=_0x744c63[0xd],_0xeb6bba[0xe]=_0x744c63[0xe],_0xeb6bba[0xf]=_0x744c63[0xf]),_0xeb6bba);}var\x20_0x4c065a=function(_0xdb4363,_0x18a29c,_0x47e970,_0x4300e9,_0x14c107){var\x20_0x7069a0=0x1/Math[\x27tan\x27](_0x18a29c/0x2);if(_0xdb4363[0x0]=_0x7069a0/_0x47e970,_0xdb4363[0x1]=0x0,_0xdb4363[0x2]=0x0,_0xdb4363[0x3]=0x0,_0xdb4363[0x4]=0x0,_0xdb4363[0x5]=_0x7069a0,_0xdb4363[0x6]=0x0,_0xdb4363[0x7]=0x0,_0xdb4363[0x8]=0x0,_0xdb4363[0x9]=0x0,_0xdb4363[0xb]=-0x1,_0xdb4363[0xc]=0x0,_0xdb4363[0xd]=0x0,_0xdb4363[0xf]=0x0,null!=_0x14c107&&_0x14c107!==0x1/0x0){var\x20_0x3154be=0x1/(_0x4300e9-_0x14c107);_0xdb4363[0xa]=(_0x14c107+_0x4300e9)*_0x3154be,_0xdb4363[0xe]=0x2*_0x14c107*_0x4300e9*_0x3154be;}else\x20_0xdb4363[0xa]=-0x1,_0xdb4363[0xe]=-0x2*_0x4300e9;return\x20_0xdb4363;},_0x114562=function(_0x273de4,_0x2439c4,_0x177ec0,_0x2a3ce5,_0x372c2d,_0x3973e0,_0x4db5ac){var\x20_0x2e0247=0x1/(_0x2439c4-_0x177ec0),_0x429da2=0x1/(_0x2a3ce5-_0x372c2d),_0x2bb16a=0x1/(_0x3973e0-_0x4db5ac);return\x20_0x273de4[0x0]=-0x2*_0x2e0247,_0x273de4[0x1]=0x0,_0x273de4[0x2]=0x0,_0x273de4[0x3]=0x0,_0x273de4[0x4]=0x0,_0x273de4[0x5]=-0x2*_0x429da2,_0x273de4[0x6]=0x0,_0x273de4[0x7]=0x0,_0x273de4[0x8]=0x0,_0x273de4[0x9]=0x0,_0x273de4[0xa]=0x2*_0x2bb16a,_0x273de4[0xb]=0x0,_0x273de4[0xc]=(_0x2439c4+_0x177ec0)*_0x2e0247,_0x273de4[0xd]=(_0x372c2d+_0x2a3ce5)*_0x429da2,_0x273de4[0xe]=(_0x4db5ac+_0x3973e0)*_0x2bb16a,_0x273de4[0xf]=0x1,_0x273de4;};function\x20_0x39782e(){var\x20_0x493af3=new\x20_0x36f7b3(0x3);return\x20_0x36f7b3!=Float32Array&&(_0x493af3[0x0]=0x0,_0x493af3[0x1]=0x0,_0x493af3[0x2]=0x0),_0x493af3;}function\x20_0x21136e(_0x2407af,_0x159a6e,_0x4874e4){var\x20_0x9d01cf=new\x20_0x36f7b3(0x3);return\x20_0x9d01cf[0x0]=_0x2407af,_0x9d01cf[0x1]=_0x159a6e,_0x9d01cf[0x2]=_0x4874e4,_0x9d01cf;}function\x20_0x2d187e(_0x47061f,_0x5ebb26){return\x20_0x47061f[0x0]*_0x5ebb26[0x0]+_0x47061f[0x1]*_0x5ebb26[0x1]+_0x47061f[0x2]*_0x5ebb26[0x2];}function\x20_0x45bedb(_0xf9400f,_0x1ecb7a,_0x4f9550){var\x20_0x29f6db=_0x1ecb7a[0x0],_0x109330=_0x1ecb7a[0x1],_0x298575=_0x1ecb7a[0x2],_0x3fbdc6=_0x4f9550[0x0],_0x5b1658=_0x4f9550[0x1],_0x27cf33=_0x4f9550[0x2];return\x20_0xf9400f[0x0]=_0x109330*_0x27cf33-_0x298575*_0x5b1658,_0xf9400f[0x1]=_0x298575*_0x3fbdc6-_0x29f6db*_0x27cf33,_0xf9400f[0x2]=_0x29f6db*_0x5b1658-_0x109330*_0x3fbdc6,_0xf9400f;}var\x20_0x1b28d8,_0x6463d=function(_0x4528fb){var\x20_0x8c59a=_0x4528fb[0x0],_0x2a3e8a=_0x4528fb[0x1],_0x33b234=_0x4528fb[0x2];return\x20Math[\x27hypot\x27](_0x8c59a,_0x2a3e8a,_0x33b234);};_0x1b28d8=_0x39782e(),!(function(){var\x20_0x231ab4,_0x4f6b6d=(_0x231ab4=new\x20_0x36f7b3(0x4),_0x36f7b3!=Float32Array&&(_0x231ab4[0x0]=0x0,_0x231ab4[0x1]=0x0,_0x231ab4[0x2]=0x0,_0x231ab4[0x3]=0x0),_0x231ab4);}());function\x20_0x40b33b(){var\x20_0x37243a=new\x20_0x36f7b3(0x4);return\x20_0x36f7b3!=Float32Array&&(_0x37243a[0x0]=0x0,_0x37243a[0x1]=0x0,_0x37243a[0x2]=0x0),_0x37243a[0x3]=0x1,_0x37243a;}function\x20_0x706a4c(_0xa51ddc,_0x23bc01,_0x5c1281,_0x51e98d){var\x20_0x34df73,_0x1c38e6,_0x2a9d99,_0x16ebb9,_0x253bdd,_0x2878f2=_0x23bc01[0x0],_0x9399c5=_0x23bc01[0x1],_0x550608=_0x23bc01[0x2],_0x622110=_0x23bc01[0x3],_0x449082=_0x5c1281[0x0],_0x3537dd=_0x5c1281[0x1],_0x10c687=_0x5c1281[0x2],_0x5c1f2d=_0x5c1281[0x3];return(_0x1c38e6=_0x2878f2*_0x449082+_0x9399c5*_0x3537dd+_0x550608*_0x10c687+_0x622110*_0x5c1f2d)<0x0&&(_0x1c38e6=-_0x1c38e6,_0x449082=-_0x449082,_0x3537dd=-_0x3537dd,_0x10c687=-_0x10c687,_0x5c1f2d=-_0x5c1f2d),0x1-_0x1c38e6>_0x2114fb?(_0x34df73=Math[\x27acos\x27](_0x1c38e6),_0x2a9d99=Math[\x27sin\x27](_0x34df73),_0x16ebb9=Math[\x27sin\x27]((0x1-_0x51e98d)*_0x34df73)/_0x2a9d99,_0x253bdd=Math[\x27sin\x27](_0x51e98d*_0x34df73)/_0x2a9d99):(_0x16ebb9=0x1-_0x51e98d,_0x253bdd=_0x51e98d),_0xa51ddc[0x0]=_0x16ebb9*_0x2878f2+_0x253bdd*_0x449082,_0xa51ddc[0x1]=_0x16ebb9*_0x9399c5+_0x253bdd*_0x3537dd,_0xa51ddc[0x2]=_0x16ebb9*_0x550608+_0x253bdd*_0x10c687,_0xa51ddc[0x3]=_0x16ebb9*_0x622110+_0x253bdd*_0x5c1f2d,_0xa51ddc;}var\x20_0xec9cad=function(_0x2e28c6,_0x4eaed7){var\x20_0x427ab8=_0x4eaed7[0x0],_0x204892=_0x4eaed7[0x1],_0x5c0d39=_0x4eaed7[0x2],_0x52839e=_0x4eaed7[0x3],_0xd19a3e=_0x427ab8*_0x427ab8+_0x204892*_0x204892+_0x5c0d39*_0x5c0d39+_0x52839e*_0x52839e;return\x20_0xd19a3e>0x0&&(_0xd19a3e=0x1/Math[\x27sqrt\x27](_0xd19a3e)),_0x2e28c6[0x0]=_0x427ab8*_0xd19a3e,_0x2e28c6[0x1]=_0x204892*_0xd19a3e,_0x2e28c6[0x2]=_0x5c0d39*_0xd19a3e,_0x2e28c6[0x3]=_0x52839e*_0xd19a3e,_0x2e28c6;},_0x556902,_0x314e55,_0x35c8ca,_0x4ebf78,_0x3189ef,_0xbf7b34,_0xe1e9cb;_0x556902=_0x39782e(),_0x314e55=_0x21136e(0x1,0x0,0x0),_0x35c8ca=_0x21136e(0x0,0x1,0x0),_0x4ebf78=_0x40b33b(),_0x3189ef=_0x40b33b(),_0xbf7b34=new\x20_0x36f7b3(0x9),_0x36f7b3!=Float32Array&&(_0xbf7b34[0x1]=0x0,_0xbf7b34[0x2]=0x0,_0xbf7b34[0x3]=0x0,_0xbf7b34[0x5]=0x0,_0xbf7b34[0x6]=0x0,_0xbf7b34[0x7]=0x0),_0xbf7b34[0x0]=0x1,_0xbf7b34[0x4]=0x1,_0xbf7b34[0x8]=0x1,_0xe1e9cb=_0xbf7b34,!(function(){var\x20_0xf5a650=(function(){var\x20_0x277b62=new\x20_0x36f7b3(0x2);return\x20_0x36f7b3!=Float32Array&&(_0x277b62[0x0]=0x0,_0x277b62[0x1]=0x0),_0x277b62;}());}());var\x20_0xfa5873,_0x8b82ce=(function(){function\x20_0x2cc2ec(){_0x4b5b03(this,_0x2cc2ec),this[\x27fFov\x27]=0.785,this[\x27fAspect\x27]=0x1,this[\x27fNear\x27]=0.02,this[\x27fFar\x27]=0x3e8,this[\x27fTheta\x27]=0x0,this[\x27fAlpha\x27]=0x0,this[\x27fBeta\x27]=0x0,this[\x27fScale\x27]=0x1,this[\x27bOrtho\x27]=!0x1,this[\x27matView\x27]=_0x163f4b(),this[\x27matProj\x27]=_0x163f4b(),this[\x27vecEye\x27]=_0x21136e(0x0,0x0,0x0),this[\x27vecCenter\x27]=_0x21136e(0x0,0x0,0x64),this[\x27vecUp\x27]=_0x21136e(0x0,0x1,0x0);}return\x20_0x4023a9(_0x2cc2ec,[{\x27key\x27:\x27SetYaw\x27,\x27value\x27:function(_0x19cc39){this[\x27fTheta\x27]=_0x19cc39;}},{\x27key\x27:\x27GetYaw\x27,\x27value\x27:function(){return\x20this[\x27fTheta\x27];}},{\x27key\x27:\x27SetPitch\x27,\x27value\x27:function(_0x23157a){this[\x27fAlpha\x27]=_0x23157a;}},{\x27key\x27:\x27GetPitch\x27,\x27value\x27:function(){return\x20this[\x27fAlpha\x27];}},{\x27key\x27:\x27SetRoll\x27,\x27value\x27:function(_0x26e78b){this[\x27fBeta\x27]=_0x26e78b;}},{\x27key\x27:\x27GetRoll\x27,\x27value\x27:function(){return\x20this[\x27fBeta\x27];}},{\x27key\x27:\x27SetScale\x27,\x27value\x27:function(_0x3b4e22){this[\x27fScale\x27]=_0x3b4e22;}},{\x27key\x27:\x27GetScale\x27,\x27value\x27:function(){return\x20this[\x27fScale\x27];}},{\x27key\x27:\x27SetFov\x27,\x27value\x27:function(_0x4511b6){this[\x27fFov\x27]=_0x4511b6;}},{\x27key\x27:\x27SetAspect\x27,\x27value\x27:function(_0x574bb2){this[\x27fAspect\x27]=_0x574bb2;}},{\x27key\x27:\x27SetNear\x27,\x27value\x27:function(_0x20e085){this[\x27fNear\x27]=_0x20e085;}},{\x27key\x27:\x27SetFar\x27,\x27value\x27:function(_0x16ea4c){this[\x27fFar\x27]=_0x16ea4c;}},{\x27key\x27:\x27SetOrtho\x27,\x27value\x27:function(_0x18cb1f){this[\x27bOrtho\x27]=_0x18cb1f;}},{\x27key\x27:\x27UpdateCamera\x27,\x27value\x27:function(_0x366efb,_0x57f004){if(!(_0x366efb<=0x0||_0x57f004<=0x0)){if(0x1==this[\x27bOrtho\x27])_0x114562(this[\x27matProj\x27],0x0,_0x366efb,_0x57f004,0x0,this[\x27fNear\x27],this[\x27fFar\x27]);else{var\x20_0x2e72d8=this[\x27fFov\x27]/_0x2a16d3*0xb4;_0x4c065a(this[\x27matProj\x27],_0x2e72d8,_0x366efb/_0x57f004,this[\x27fNear\x27],this[\x27fFar\x27]);}this[\x27vecEye\x27]=_0x21136e(0x0,0x0,this[\x27fScale\x27]),this[\x27vecCenter\x27]=_0x21136e(0x0,0x0,0x0),this[\x27vecUp\x27]=_0x21136e(0x0,0x1,0x0);var\x20_0x2e0dd5=_0x21136e(0x1,0x0,0x0),_0x3d5e46=_0x21136e(0x0,0x1,0x0),_0x4c463d=_0x21136e(0x0,0x0,0x1),_0x1972a6=_0x163f4b();!function(_0x4b7580,_0x1c2cf6,_0x4d0930,_0x5917c7){var\x20_0x51d256,_0x2e79c4,_0x5f05ac,_0x3e562,_0x375f5e,_0x16b952,_0x1bb885,_0x462ee6,_0x338b8e,_0x4ea0f7,_0x2dfe0e=_0x1c2cf6[0x0],_0x5e0257=_0x1c2cf6[0x1],_0x51dc20=_0x1c2cf6[0x2],_0x11fc7d=_0x5917c7[0x0],_0x4cfcea=_0x5917c7[0x1],_0x5d80de=_0x5917c7[0x2],_0x5029b1=_0x4d0930[0x0],_0x38edeb=_0x4d0930[0x1],_0xecc49e=_0x4d0930[0x2];Math[\x27abs\x27](_0x2dfe0e-_0x5029b1)<_0x2114fb&&Math[\x27abs\x27](_0x5e0257-_0x38edeb)<_0x2114fb&&Math[\x27abs\x27](_0x51dc20-_0xecc49e)<_0x2114fb?function(_0x392b8d){_0x392b8d[0x0]=0x1,_0x392b8d[0x1]=0x0,_0x392b8d[0x2]=0x0,_0x392b8d[0x3]=0x0,_0x392b8d[0x4]=0x0,_0x392b8d[0x5]=0x1,_0x392b8d[0x6]=0x0,_0x392b8d[0x7]=0x0,_0x392b8d[0x8]=0x0,_0x392b8d[0x9]=0x0,_0x392b8d[0xa]=0x1,_0x392b8d[0xb]=0x0,_0x392b8d[0xc]=0x0,_0x392b8d[0xd]=0x0,_0x392b8d[0xe]=0x0,_0x392b8d[0xf]=0x1;}(_0x4b7580):(_0x1bb885=_0x2dfe0e-_0x5029b1,_0x462ee6=_0x5e0257-_0x38edeb,_0x338b8e=_0x51dc20-_0xecc49e,_0x51d256=_0x4cfcea*(_0x338b8e*=_0x4ea0f7=0x1/Math[\x27hypot\x27](_0x1bb885,_0x462ee6,_0x338b8e))-_0x5d80de*(_0x462ee6*=_0x4ea0f7),_0x2e79c4=_0x5d80de*(_0x1bb885*=_0x4ea0f7)-_0x11fc7d*_0x338b8e,_0x5f05ac=_0x11fc7d*_0x462ee6-_0x4cfcea*_0x1bb885,(_0x4ea0f7=Math[\x27hypot\x27](_0x51d256,_0x2e79c4,_0x5f05ac))?(_0x51d256*=_0x4ea0f7=0x1/_0x4ea0f7,_0x2e79c4*=_0x4ea0f7,_0x5f05ac*=_0x4ea0f7):(_0x51d256=0x0,_0x2e79c4=0x0,_0x5f05ac=0x0),_0x3e562=_0x462ee6*_0x5f05ac-_0x338b8e*_0x2e79c4,_0x375f5e=_0x338b8e*_0x51d256-_0x1bb885*_0x5f05ac,_0x16b952=_0x1bb885*_0x2e79c4-_0x462ee6*_0x51d256,(_0x4ea0f7=Math[\x27hypot\x27](_0x3e562,_0x375f5e,_0x16b952))?(_0x3e562*=_0x4ea0f7=0x1/_0x4ea0f7,_0x375f5e*=_0x4ea0f7,_0x16b952*=_0x4ea0f7):(_0x3e562=0x0,_0x375f5e=0x0,_0x16b952=0x0),_0x4b7580[0x0]=_0x51d256,_0x4b7580[0x1]=_0x3e562,_0x4b7580[0x2]=_0x1bb885,_0x4b7580[0x3]=0x0,_0x4b7580[0x4]=_0x2e79c4,_0x4b7580[0x5]=_0x375f5e,_0x4b7580[0x6]=_0x462ee6,_0x4b7580[0x7]=0x0,_0x4b7580[0x8]=_0x5f05ac,_0x4b7580[0x9]=_0x16b952,_0x4b7580[0xa]=_0x338b8e,_0x4b7580[0xb]=0x0,_0x4b7580[0xc]=-(_0x51d256*_0x2dfe0e+_0x2e79c4*_0x5e0257+_0x5f05ac*_0x51dc20),_0x4b7580[0xd]=-(_0x3e562*_0x2dfe0e+_0x375f5e*_0x5e0257+_0x16b952*_0x51dc20),_0x4b7580[0xe]=-(_0x1bb885*_0x2dfe0e+_0x462ee6*_0x5e0257+_0x338b8e*_0x51dc20),_0x4b7580[0xf]=0x1);}(_0x1972a6,this[\x27vecEye\x27],this[\x27vecCenter\x27],this[\x27vecUp\x27]);var\x20_0x34cee4=_0x163f4b(),_0x32bbf2=_0x163f4b(),_0x142dd1=_0x163f4b(),_0x2640b1=_0x163f4b();_0x5767f9(_0x32bbf2,_0x34cee4,-this[\x27fAlpha\x27],_0x2e0dd5),_0x5767f9(_0x142dd1,_0x32bbf2,-this[\x27fTheta\x27],_0x3d5e46),_0x5767f9(_0x2640b1,_0x142dd1,-this[\x27fBeta\x27],_0x4c463d),_0x572989(this[\x27matView\x27],_0x1972a6,_0x2640b1);}}},{\x27key\x27:\x27GetView\x27,\x27value\x27:function(){return\x20this[\x27matView\x27];}},{\x27key\x27:\x27GetProj\x27,\x27value\x27:function(){return\x20this[\x27matProj\x27];}}]),_0x2cc2ec;}()),_0x16641b=(function(){function\x20_0x51a797(){_0x4b5b03(this,_0x51a797),this[\x27canvas\x27]=null,this[\x27ctx\x27]=null,this[\x27videoShaderProgram\x27]=0x0,this[\x27vertexPosBuffer\x27]=0x0,this[\x27texturePosBuffer\x27]=0x0,this[\x27pFrameData\x27]=null,this[\x27frameDisplayWidth\x27]=0x0,this[\x27frameDisplayHeight\x27]=0x0,this[\x27onlySupportedWebGL1\x27]=!0x1,this[\x27bAntialias\x27]=!0x1,this[\x27bRecreateTex\x27]=!0x0,this[\x27nSurfaceTexture\x27]=[],this[\x27nMaxPointNum\x27]=0x0,this[\x27pLinePosVertices\x27]=null,this[\x27pLineClrVertices\x27]=null,this[\x27glLinePosBuffer\x27]=0x0,this[\x27glLineClrBuffer\x27]=0x0,this[\x27nLineTriangleNum\x27]=0x0,this[\x27nLineShaderProgram\x27]=0x0,this[\x27pFillBlockPosVertices\x27]=null,this[\x27pFillBlockClrVertices\x27]=null,this[\x27nMaxFillBlockTriNum\x27]=0x0,this[\x27glBlockPosBuffer\x27]=0x0,this[\x27glBlockClrBuffer\x27]=0x0,this[\x27nBlockShaderProgram\x27]=0x0,this[\x27nDrawFontWidth\x27]=0x0,this[\x27nDrawFontHeight\x27]=0x0,this[\x27nFontColorTexture\x27]=0x0,this[\x27pFontColorBuffer\x27]=0x0,this[\x27nFontShaderProgram\x27]=0x0,this[\x27nFontBGNum\x27]=0x0,this[\x27pstFontBGLines\x27]=[],this[\x27nImageShaderProgram\x27]=0x0,this[\x27pImagePosVertices\x27]=null,this[\x27pImageClrVertices\x27]=null,this[\x27glImagePosBuffer\x27]=0x0,this[\x27glImageClrBuffer\x27]=0x0,this[\x27nImageColorTexture\x27]=null,this[\x27nDrawImageWidth\x27]=0x0,this[\x27nDrawImageHeight\x27]=0x0,this[\x27nImageColorTextures\x27]=[],this[\x27pFishParamManager\x27]=null,this[\x27enDisplayEffect\x27]=_0x3409b0[\x27SR_DE_NULL\x27],this[\x27nFECPort\x27]=_0x32eacf,this[\x27bIsCapturing\x27]=!0x1,this[\x27pSemiSpherePos\x27]=null,this[\x27pSemiSphereTex\x27]=null,this[\x27nSemiSpherePosNum\x27]=0x0,this[\x27nSemiSpherePosSize\x27]=0x0,this[\x27nSemiSphereTexSize\x27]=0x0,this[\x27pCylinderPos\x27]=null,this[\x27pCylinderTex\x27]=null,this[\x27nCylinderPosNum\x27]=0x0,this[\x27nCylinderPosSize\x27]=0x0,this[\x27nCylinderTexSize\x27]=0x0,this[\x27fCylinderHeight\x27]=0x0,this[\x27fCylinderRadius\x27]=0x0,this[\x27b3DPort\x27]=!0x1,this[\x27pCamera\x27]=null,this[\x27fRotateX\x27]=0x0,this[\x27fRotateY\x27]=0x0,this[\x27fScale\x27]=0x0,this[\x27pfuncCBIn\x27]=null,this[\x27pfuncCBOut\x27]=null,this[\x27pUserIn\x27]=null,this[\x27pUserOut\x27]=null,this[\x27bCullBack\x27]=!0x1,this[\x27fSrcUseLeft\x27]=0x0,this[\x27fSrcUseRight\x27]=0x1,this[\x27fSrcUseTop\x27]=0x0,this[\x27fSrcUseBottom\x27]=0x1,this[\x27fDstUseLeft\x27]=0x0,this[\x27fDstUseRight\x27]=0x1,this[\x27fDstUseTop\x27]=0x0,this[\x27fDstUseBottom\x27]=0x1,this[\x27enPixelFormat\x27]=_0x337b82,this[\x27nTextureNum\x27]=0x0,this[\x27textCanvas\x27]=null,this[\x27textCanvasCtx\x27]=null,this[\x27nCaptureWidth\x27]=0x0,this[\x27nCaptureHeight\x27]=0x0,this[\x27nCaptureRTTex\x27]=0x0,this[\x27nCaptureFBO\x27]=0x0,this[\x27nCaptureFBOWidth\x27]=0x0,this[\x27nCaptureFBOHeight\x27]=0x0,this[\x27nCaptureDepthbuffer\x27]=0x0,this[\x27bCaptureResInit\x27]=!0x1,this[\x27fBrightness\x27]=0x0,this[\x27fHue\x27]=0x0,this[\x27fSaturation\x27]=0x0,this[\x27fContrast\x27]=0x0,this[\x27fSharpness\x27]=0x0,this[\x27nPostProc\x27]=0x0;}return\x20_0x4023a9(_0x51a797,[{\x27key\x27:\x27CompileProgram\x27,\x27value\x27:function(_0x13fd92,_0x43aaaa){var\x20_0x4477fd=this[\x27ctx\x27];if(null==_0x4477fd||null==_0x13fd92||null==_0x43aaaa)return-0x1;var\x20_0x1f3410=_0x4477fd[\x27createShader\x27](_0x4477fd[\x27VERTEX_SHADER\x27]);if(_0x4477fd[\x27shaderSource\x27](_0x1f3410,_0x13fd92),_0x4477fd[\x27compileShader\x27](_0x1f3410),!_0x4477fd[\x27getShaderParameter\x27](_0x1f3410,_0x4477fd[\x27COMPILE_STATUS\x27]))return\x20console[\x27log\x27](\x27Vertex\x5cx20shader\x5cx20failed\x5cx20to\x5cx20compile:\x5cx20\x27+_0x4477fd[\x27getShaderInfoLog\x27](_0x1f3410)),-0x1;var\x20_0x57ed2b=_0x4477fd[\x27createShader\x27](_0x4477fd[\x27FRAGMENT_SHADER\x27]);if(_0x4477fd[\x27shaderSource\x27](_0x57ed2b,_0x43aaaa),_0x4477fd[\x27compileShader\x27](_0x57ed2b),!_0x4477fd[\x27getShaderParameter\x27](_0x57ed2b,_0x4477fd[\x27COMPILE_STATUS\x27]))return\x20console[\x27log\x27](\x27Fragment\x5cx20shader\x5cx20failed\x5cx20to\x5cx20compile:\x5cx20\x27+_0x4477fd[\x27getShaderInfoLog\x27](_0x57ed2b)),-0x1;var\x20_0x2c9112=_0x4477fd[\x27createProgram\x27]();return\x20_0x4477fd[\x27attachShader\x27](_0x2c9112,_0x1f3410),_0x4477fd[\x27attachShader\x27](_0x2c9112,_0x57ed2b),_0x4477fd[\x27linkProgram\x27](_0x2c9112),_0x4477fd[\x27getProgramParameter\x27](_0x2c9112,_0x4477fd[\x27LINK_STATUS\x27])?(_0x4477fd[\x27deleteShader\x27](_0x1f3410),_0x4477fd[\x27deleteShader\x27](_0x57ed2b),_0x2c9112):(console[\x27log\x27](\x27Program\x5cx20failed\x5cx20to\x5cx20compile:\x5cx20\x27+_0x4477fd[\x27getProgramInfoLog\x27](_0x2c9112)),-0x1);}},{\x27key\x27:\x27SR_Init\x27,\x27value\x27:function(_0x562f5b,_0xd46cbe){if(null==_0x562f5b)return\x20_0x4a21f9;if(this[\x27canvas\x27]=_0x562f5b,this[\x27ctx\x27]=this[\x27canvas\x27][\x27getContext\x27](\x27webgl2\x27),this[\x27ctx\x27]||(this[\x27ctx\x27]=this[\x27canvas\x27][\x27getContext\x27](\x27webgl\x27)||this[\x27canvas\x27][\x27getContext\x27](\x27experimental-webgl\x27),this[\x27onlySupportedWebGL1\x27]=!0x0,console[\x27log\x27](\x27only\x5cx20support\x5cx20webgl1\x27)),!this[\x27ctx\x27])return\x20console[\x27log\x27](\x27your\x5cx20browser\x5cx20does\x5cx20not\x5cx20support\x5cx20WebGL\x27),_0x15898c;if(_0xd46cbe==_0x3eedf4||_0xd46cbe==_0x4430d6)return\x20_0x388f7c;switch(_0xd46cbe){case\x20_0x134a08:case\x20_0x3cdbb9:this[\x27nTextureNum\x27]=0x3;break;case\x20_0x3eedf4:case\x20_0x4430d6:this[\x27nTextureNum\x27]=0x2;break;case\x20_0xa0f65c:this[\x27nTextureNum\x27]=0x1;break;default:return\x20_0x388f7c;}return\x20this[\x27enPixelFormat\x27]=_0xd46cbe,_0x26bcbc;}},{\x27key\x27:\x27SR_Draw\x27,\x27value\x27:function(_0x37b680,_0x20b646,_0xe5a798,_0x2fa190,_0x32521b){if(null==this[\x27ctx\x27])return\x20_0x127571;var\x20_0x47f0eb=this[\x27nTextureNum\x27];if(null==_0x37b680||_0x20b646<=0x0||_0xe5a798<=0x0)return\x20_0x4a21f9;if(0x0==this[\x27videoShaderProgram\x27]||0x0==this[\x27vertexPosBuffer\x27]||0x0==this[\x27texturePosBuffer\x27])return\x20_0x127571;var\x20_0x7f39cd=_0x26bcbc;if(_0xa0f65c==this[\x27enPixelFormat\x27])this[\x27frameDisplayWidth\x27]=_0x20b646,this[\x27frameDisplayHeight\x27]=_0xe5a798;else{if(_0x7f39cd=this[\x27_ResizeFrameData\x27](_0x37b680,_0x20b646,_0xe5a798,_0x2fa190),_0x26bcbc!=_0x7f39cd)return\x20_0x7f39cd;}if(this[\x27ctx\x27][\x27useProgram\x27](this[\x27videoShaderProgram\x27]),0x1==this[\x27bRecreateTex\x27]){if(this[\x27enPixelFormat\x27]==_0xa0f65c){if(0x0!=this[\x27nSurfaceTexture\x27][0x0]){var\x20_0xd296a8=this[\x27nSurfaceTexture\x27][0x0];this[\x27ctx\x27][\x27deleteTexture\x27](_0xd296a8),this[\x27nSurfaceTexture\x27][0x0]=0x0;}var\x20_0x2d6142=this[\x27ctx\x27][\x27createTexture\x27]();if(_0x2d6142<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],_0x2d6142),0x1==this[\x27bAntialias\x27]?this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR_MIPMAP_NEAREST\x27]):this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27nSurfaceTexture\x27][0x0]=_0x2d6142;}else{if(this[\x27enPixelFormat\x27]==_0x134a08||this[\x27enPixelFormat\x27]==_0x3cdbb9)for(var\x20_0x2db296=0x0;_0x2db296<_0x47f0eb;_0x2db296++){if(0x0!=this[\x27nSurfaceTexture\x27][_0x2db296]){var\x20_0x34d2ac=this[\x27nSurfaceTexture\x27][_0x2db296];this[\x27ctx\x27][\x27deleteTexture\x27](_0x34d2ac),this[\x27nSurfaceTexture\x27][_0x2db296]=0x0;}var\x20_0x4ac557=this[\x27ctx\x27][\x27createTexture\x27]();if(_0x4ac557<=0x0)return\x20_0x4cfdfb;if(this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],_0x4ac557),0x1==this[\x27bAntialias\x27]?this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR_MIPMAP_NEAREST\x27]):this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),0x0==_0x2db296){var\x20_0x5bb96e=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27Ytexture\x27);this[\x27ctx\x27][\x27uniform1i\x27](_0x5bb96e,0x0);}else{if(0x1==_0x2db296){var\x20_0x4ab615=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27Utexture\x27);this[\x27ctx\x27][\x27uniform1i\x27](_0x4ab615,0x1);}else{if(0x2==_0x2db296){var\x20_0x12b16e=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27Vtexture\x27);this[\x27ctx\x27][\x27uniform1i\x27](_0x12b16e,0x2);}}}this[\x27nSurfaceTexture\x27][_0x2db296]=_0x4ac557,this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],null);}}this[\x27bRecreateTex\x27]=!0x1;}this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27vertexPosBuffer\x27]);var\x20_0x12fc63=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27videoShaderProgram\x27],\x27xy\x27);if(_0x12fc63<0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x12fc63,0x3,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x12fc63),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27texturePosBuffer\x27]);var\x20_0x3c895f=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27videoShaderProgram\x27],\x27uv\x27);if(_0x3c895f<0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x3c895f,0x2,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x3c895f),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null);var\x20_0x245139=this[\x27enDisplayEffect\x27],_0x5d1c49=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27bCapture\x27);if(_0x5d1c49<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1i\x27](_0x5d1c49,0x0);var\x20_0x495d6e=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27nPostProc\x27);switch(this[\x27ctx\x27][\x27uniform1i\x27](_0x495d6e,this[\x27nPostProc\x27]),0x1==this[\x27nPostProc\x27]&&(_0x7f39cd=this[\x27_SetImagePostProcess\x27]()),_0x245139){case\x20_0x3409b0[\x27SR_DE_NULL\x27]:break;case\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:if(null==this[\x27pFishParamManager\x27])return\x20_0x127571;var\x20_0x399828={};if(_0x7f39cd=this[\x27pFishParamManager\x27][\x27GetRenderParam\x27](this[\x27nFECPort\x27],_0x399828),_0x26bcbc!=_0x7f39cd)return\x20_0x7f39cd;if(_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]==_0x245139){var\x20_0x4fcdf4=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27bBlack\x27);if(_0x4fcdf4<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1i\x27](_0x4fcdf4,_0x399828[\x27bBlack\x27]);var\x20_0x183252=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27bCut\x27);if(_0x183252<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1i\x27](_0x183252,_0x399828[\x27bCut\x27]);}if(_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]==_0x245139||_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]==_0x245139||_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]==_0x245139){var\x20_0x2704f0=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fHAngleCos\x27);if(_0x2704f0<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x2704f0,_0x399828[\x27fCosH\x27]);var\x20_0x593de3=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fHAngleSin\x27);if(_0x593de3<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x593de3,_0x399828[\x27fSinH\x27]);var\x20_0x45100d=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fVAngleCos\x27);if(_0x45100d<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x45100d,_0x399828[\x27fCosV\x27]);var\x20_0x3fb3ce=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fVAngleSin\x27);if(_0x3fb3ce<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x3fb3ce,_0x399828[\x27fSinV\x27]);var\x20_0x4482b1=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fZoom\x27);if(_0x4482b1<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x4482b1,_0x399828[\x27fZoom\x27]);}if(_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]==_0x245139||_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]==_0x245139||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]==_0x245139||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]==_0x245139){var\x20_0x2eaf35=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fAngle\x27);if(_0x2eaf35<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x2eaf35,_0x399828[\x27fAngle\x27]);}var\x20_0x189cd2=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRX1\x27);if(_0x189cd2<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x189cd2,_0x399828[\x27fRXLeft\x27]);var\x20_0x2581bc=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRX2\x27);if(_0x2581bc<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x2581bc,_0x399828[\x27fRXRight\x27]);var\x20_0x30b977=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRY1\x27);if(_0x30b977<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x30b977,_0x399828[\x27fRYTop\x27]);var\x20_0x4808ee=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRY2\x27);if(_0x4808ee<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x4808ee,_0x399828[\x27fRYBottom\x27]);break;case\x20_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:this[\x27pCamera\x27][\x27SetScale\x27](this[\x27fScale\x27]),this[\x27pCamera\x27][\x27SetPitch\x27](3.14-this[\x27fRotateX\x27]),this[\x27pCamera\x27][\x27SetYaw\x27](-this[\x27fRotateY\x27]),this[\x27pCamera\x27][\x27UpdateCamera\x27](this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]);var\x20_0x20c44b=this[\x27pCamera\x27][\x27GetView\x27](),_0x1e02f7=this[\x27pCamera\x27][\x27GetProj\x27](),_0x317ce3=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matView\x27);if(_0x317ce3<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0x317ce3,!0x1,_0x20c44b);var\x20_0x4db55d=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matProj\x27);if(_0x4db55d<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0x4db55d,!0x1,_0x1e02f7);break;case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]:this[\x27pCamera\x27][\x27SetScale\x27](this[\x27fScale\x27]),this[\x27pCamera\x27][\x27SetPitch\x27](-this[\x27fRotateX\x27]),this[\x27pCamera\x27][\x27SetYaw\x27](-this[\x27fRotateY\x27]),this[\x27pCamera\x27][\x27UpdateCamera\x27](this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]);var\x20_0x6e707=this[\x27pCamera\x27][\x27GetView\x27](),_0x263aab=this[\x27pCamera\x27][\x27GetProj\x27](),_0x38ee15=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matView\x27);if(_0x38ee15<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0x38ee15,!0x1,_0x6e707);var\x20_0xe3b48a=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matProj\x27);if(_0xe3b48a<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0xe3b48a,!0x1,_0x263aab);}if(this[\x27canvas\x27][\x27width\x27]<=0x0||this[\x27canvas\x27][\x27height\x27]<=0x0)return\x20_0x15898c;if(null!=_0x32521b&&(_0x7f39cd=this[\x27SR_SetDisplayRect\x27](_0x32521b[\x27fx\x27],_0x32521b[\x27fy\x27],_0x32521b[\x27width\x27],_0x32521b[\x27height\x27],_0x5ee8f0))!=_0x26bcbc)return\x20_0x7f39cd;if(null!=_0x32521b?this[\x27ctx\x27][\x27viewport\x27](this[\x27canvas\x27][\x27width\x27]*this[\x27fDstUseLeft\x27],this[\x27canvas\x27][\x27height\x27]*this[\x27fDstUseTop\x27],this[\x27canvas\x27][\x27width\x27]*this[\x27fDstUseRight\x27],this[\x27canvas\x27][\x27height\x27]*this[\x27fDstUseBottom\x27]):(this[\x27ctx\x27][\x27viewport\x27](0x0,0x0,this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]),this[\x27ctx\x27][\x27clearColor\x27](0x0,0x0,0x0,0x1),this[\x27ctx\x27][\x27clear\x27](this[\x27ctx\x27][\x27COLOR_BUFFER_BIT\x27]|this[\x27ctx\x27][\x27DEPTH_BUFFER_BIT\x27])),this[\x27b3DPort\x27]&&(this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27DEPTH_TEST\x27]),this[\x27ctx\x27][\x27depthFunc\x27](this[\x27ctx\x27][\x27LESS\x27]),this[\x27ctx\x27][\x27depthMask\x27](!0x0),0x1==this[\x27bCullBack\x27]?this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27CULL_FACE\x27]):this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27CULL_FACE\x27])),this[\x27enPixelFormat\x27]==_0xa0f65c)this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x0]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],_0x20b646,_0xe5a798,0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x37b680),0x1==this[\x27bAntialias\x27]&&this[\x27ctx\x27][\x27generateMipmap\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27]);else{if(this[\x27enPixelFormat\x27]==_0x134a08){var\x20_0x21daef=this[\x27pFrameData\x27][\x27subarray\x27](0x0,_0x20b646*_0xe5a798);this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE0\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x0]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],_0x20b646,_0xe5a798,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x21daef);var\x20_0x2a7538=this[\x27pFrameData\x27][\x27subarray\x27](_0x20b646*_0xe5a798+_0x20b646/0x2*_0xe5a798/0x2,_0x20b646*_0xe5a798+_0x20b646/0x2*_0xe5a798/0x2+_0x20b646/0x2*_0xe5a798/0x2);this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE1\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x1]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],_0x20b646/0x2,_0xe5a798/0x2,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x2a7538);var\x20_0x57a26a=this[\x27pFrameData\x27][\x27subarray\x27](_0x20b646*_0xe5a798,_0x20b646*_0xe5a798+_0x20b646/0x2*_0xe5a798/0x2);this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE2\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x2]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],_0x20b646/0x2,_0xe5a798/0x2,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x57a26a),0x1==this[\x27bAntialias\x27]&&this[\x27ctx\x27][\x27generateMipmap\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27]),_0x21daef=null,_0x2a7538=null,_0x57a26a=null;}else\x20this[\x27enPixelFormat\x27]==_0x3cdbb9&&(_0x21daef=this[\x27pFrameData\x27][\x27subarray\x27](0x0,_0x20b646*_0xe5a798),(this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE0\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x0]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],_0x20b646,_0xe5a798,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x21daef)),_0x2a7538=this[\x27pFrameData\x27][\x27subarray\x27](_0x20b646*_0xe5a798,_0x20b646*_0xe5a798+_0x20b646/0x2*_0xe5a798/0x2),(this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE1\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x1]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],_0x20b646/0x2,_0xe5a798/0x2,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x2a7538)),_0x57a26a=this[\x27pFrameData\x27][\x27subarray\x27](_0x20b646*_0xe5a798+_0x20b646/0x2*_0xe5a798/0x2,_0x20b646*_0xe5a798+_0x20b646/0x2*_0xe5a798/0x2+_0x20b646/0x2*_0xe5a798/0x2),(this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE2\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x2]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],_0x20b646/0x2,_0xe5a798/0x2,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x57a26a),0x1==this[\x27bAntialias\x27]&&this[\x27ctx\x27][\x27generateMipmap\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27]),_0x21daef=null,_0x2a7538=null,_0x57a26a=null));}if(this[\x27onlySupportedWebGL1\x27]||this[\x27ctx\x27][\x27clearBufferfi\x27](this[\x27ctx\x27][\x27DEPTH_STENCIL\x27],0x0,0x1,0x0),0x0==this[\x27b3DPort\x27])this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLE_FAN\x27],0x0,0x4);else{if(this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]){if(this[\x27nSemiSpherePosNum\x27]<=0x0)return\x20_0x127571;this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLES\x27],0x0,this[\x27nSemiSpherePosNum\x27]);}else{if(this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]||this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]){if(this[\x27nCylinderPosNum\x27]<=0x0)return\x20_0x127571;this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLES\x27],0x0,this[\x27nCylinderPosNum\x27]);}}}if(this[\x27ctx\x27][\x27useProgram\x27](null),null!=this[\x27pFishParamManager\x27]){var\x20_0x4c3aaa=this[\x27pFishParamManager\x27][\x27GetWndPort\x27]();_0x4c3aaa!=_0x32eacf&&_0x4c3aaa==this[\x27nFECPort\x27]&&this[\x27DrawPTZLines\x27]();}return\x20null!=this[\x27pfuncCBIn\x27]&&this[\x27pfuncCBIn\x27](this[\x27pUserIn\x27]),null!=this[\x27pfuncCBOut\x27]&&this[\x27pfuncCBOut\x27](this[\x27pUserOut\x27]),_0x26bcbc;}},{\x27key\x27:\x27DrawPTZLines\x27,\x27value\x27:function(){if(null==this[\x27pFishParamManager\x27])return\x20_0x127571;var\x20_0x11ff60=this[\x27pFishParamManager\x27][\x27GetPTZDisplayMode\x27]();if(_0x11ff60==_0x2fdffc||_0x11ff60==_0xc63b40){for(var\x20_0x32edbb=0x0,_0x1e3bd1={\x27fR\x27:0x0,\x27fG\x27:0x0,\x27fB\x27:0x0,\x27fA\x27:0x0},_0x6e065a=_0x26bcbc,_0x24c81e=0x0;_0x24c81e<_0x4f027d;++_0x24c81e)if(0x0!=this[\x27pFishParamManager\x27][\x27IsPortAllocated\x27](_0x24c81e)&&(_0x32edbb=0x2,_0x6e065a=this[\x27pFishParamManager\x27][\x27GetPTZColor\x27](_0x24c81e,_0x1e3bd1),_0x26bcbc==_0x6e065a)){0x1==this[\x27pFishParamManager\x27][\x27IsPTZSelected\x27](_0x24c81e)&&(_0x32edbb+=0x1);var\x20_0xd1f0c5=this[\x27pFishParamManager\x27][\x27GetWndPort\x27]();if(_0x24c81e!=_0xd1f0c5&&_0x2fdffc==_0x11ff60){if(_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]==this[\x27pFishParamManager\x27][\x27GetDisplayEffect\x27](_0xd1f0c5)){var\x20_0x230d44={};if(_0x6e065a=this[\x27pFishParamManager\x27][\x27GetPTZPoints\x27](_0x24c81e,_0x230d44,_0x2fdffc),_0x26bcbc!=_0x6e065a)continue;if(null!=_0x230d44[\x27pstPoints\x27]&&0x0!=_0x230d44[\x27nPointNum\x27]&&(_0x6e065a=this[\x27SR_DrawLines\x27](_0x230d44[\x27pstPoints\x27],_0x230d44[\x27nPointNum\x27],!0x0,_0x1e3bd1,_0x32edbb,!0x1),_0x26bcbc!=_0x6e065a))continue;}else{var\x20_0x318b01;if((_0x318b01=this[\x27pFishParamManager\x27][\x27GetPTZFragmentNum\x27](_0x24c81e))<=0x0)continue;for(var\x20_0x14b40d=0x0;_0x14b40d<_0x318b01;_0x14b40d++){var\x20_0x47608e={};this[\x27pFishParamManager\x27][\x27GetPTZFragmentPoints\x27](_0x24c81e,_0x47608e,_0x14b40d),null!=_0x47608e[\x27pstPoints\x27]&&0x0!=_0x47608e[\x27nPointNum\x27]&&this[\x27SR_DrawLines\x27](_0x47608e[\x27pstPoints\x27],_0x47608e[\x27nPointNum\x27],!0x1,_0x1e3bd1,_0x32edbb,!0x1);}}}else{if(_0x24c81e!=_0xd1f0c5&&_0xc63b40==_0x11ff60){var\x20_0x307336={};if(_0x6e065a=this[\x27pFishParamManager\x27][\x27GetPTZPoints\x27](_0x24c81e,_0x307336,_0xc63b40),_0x26bcbc!=_0x6e065a)continue;if(null!=_0x307336[\x27pstPoints\x27]&&0x0!=_0x307336[\x27nPointNum\x27]&&(_0x6e065a=this[\x27SR_DrawLines\x27](_0x307336[\x27pstPoints\x27],_0x307336[\x27nPointNum\x27],!0x0,_0x1e3bd1,_0x32edbb,!0x1),_0x26bcbc!=_0x6e065a))continue;}}}}return\x20_0x26bcbc;}},{\x27key\x27:\x27DrawFillBlock\x27,\x27value\x27:function(_0x5d7d8b,_0x44ac20,_0x27ef08){if(null==this[\x27ctx\x27])return\x20_0x127571;if(null==_0x5d7d8b||_0x44ac20<0x1||_0x27ef08<0x2)return\x20_0x4a21f9;for(var\x20_0xa3eb5b=0x0,_0x5b9c26=0x0;_0x5b9c26<_0x44ac20;++_0x5b9c26){if(null==_0x5d7d8b[_0x5b9c26][\x27pstPoints\x27]||_0x5d7d8b[_0x5b9c26][\x27nPointNum\x27]<0x3||!0x0!==_0x5d7d8b[_0x5b9c26][\x27bLoop\x27]||null==_0x5d7d8b[_0x5b9c26][\x27pstColor\x27])return\x20_0x4a21f9;_0xa3eb5b+=_0x5d7d8b[_0x5b9c26][\x27nPointNum\x27];}if(_0xa3eb5b!==_0x27ef08)return\x20_0x4a21f9;var\x20_0x4f4ebb=_0x27ef08-0x2*_0x44ac20;if(_0x4f4ebb>this[\x27nMaxFillBlockTriNum\x27]&&(this[\x27pFillBlockPosVertices\x27]=null,this[\x27pFillBlockClrVertices\x27]=null,this[\x27nMaxFillBlockTriNum\x27]=_0x4f4ebb),0x0==this[\x27glBlockPosBuffer\x27]&&(this[\x27glBlockPosBuffer\x27]=this[\x27ctx\x27][\x27createBuffer\x27](),0x0==this[\x27glBlockPosBuffer\x27]))return\x20_0x4cfdfb;if(0x0==this[\x27glBlockClrBuffer\x27]&&(this[\x27glBlockClrBuffer\x27]=this[\x27ctx\x27][\x27createBuffer\x27](),0x0==this[\x27glBlockClrBuffer\x27]))return\x20_0x4cfdfb;if(null==this[\x27pFillBlockPosVertices\x27]){var\x20_0x57cd93=this[\x27nMaxFillBlockTriNum\x27];if(this[\x27pFillBlockPosVertices\x27]=new\x20Float32Array(0x3*_0x57cd93*0x3),null==this[\x27pFillBlockPosVertices\x27])return\x20_0x460c4d;}if(this[\x27pFillBlockPosVertices\x27][\x27fill\x27](0x0),null==this[\x27pFillBlockClrVertices\x27]){var\x20_0x39a718=this[\x27nMaxFillBlockTriNum\x27];if(this[\x27pFillBlockClrVertices\x27]=new\x20Float32Array(0x4*_0x39a718*0x3),null==this[\x27pFillBlockClrVertices\x27])return\x20_0x460c4d;}this[\x27pFillBlockClrVertices\x27][\x27fill\x27](0x0);for(var\x20_0x264081=0x0,_0x35de95=0x0,_0xf3e1e=0x0,_0x21a097=null,_0x1a049f=null,_0x343eb3={},_0x55a4be={},_0x5cd62b={},_0x28d7d3=0x0;_0x28d7d3<_0x44ac20;++_0x28d7d3){_0xf3e1e=_0x5d7d8b[_0x28d7d3][\x27nPointNum\x27],_0x21a097=_0x5d7d8b[_0x28d7d3][\x27pstPoints\x27],_0x1a049f=_0x5d7d8b[_0x28d7d3][\x27pstColor\x27],_0x343eb3[\x27fX\x27]=(_0x21a097[0x0][\x27fX\x27]-this[\x27fSrcUseLeft\x27])/(this[\x27fSrcUseRight\x27]-this[\x27fSrcUseLeft\x27]),_0x343eb3[\x27fX\x27]=this[\x27fDstUseLeft\x27]+_0x343eb3[\x27fX\x27]*(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27]),_0x343eb3[\x27fX\x27]=0x2*_0x343eb3[\x27fX\x27]-0x1,_0x343eb3[\x27fY\x27]=(_0x21a097[0x0][\x27fY\x27]-this[\x27fSrcUseTop\x27])/(this[\x27fSrcUseBottom\x27]-this[\x27fSrcUseTop\x27]),_0x343eb3[\x27fY\x27]=this[\x27fDstUseTop\x27]+_0x343eb3[\x27fY\x27]*(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27]),_0x343eb3[\x27fY\x27]=0x1-0x2*_0x343eb3[\x27fY\x27];for(var\x20_0x273ad3=0x1;_0x273ad3<_0xf3e1e-0x1;_0x273ad3++)_0x55a4be[\x27fX\x27]=(_0x21a097[_0x273ad3][\x27fX\x27]-this[\x27fSrcUseLeft\x27])/(this[\x27fSrcUseRight\x27]-this[\x27fSrcUseLeft\x27]),_0x55a4be[\x27fX\x27]=this[\x27fDstUseLeft\x27]+_0x55a4be[\x27fX\x27]*(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27]),_0x55a4be[\x27fX\x27]=0x2*_0x55a4be[\x27fX\x27]-0x1,_0x55a4be[\x27fY\x27]=(_0x21a097[_0x273ad3][\x27fY\x27]-this[\x27fSrcUseTop\x27])/(this[\x27fSrcUseBottom\x27]-this[\x27fSrcUseTop\x27]),_0x55a4be[\x27fY\x27]=this[\x27fDstUseTop\x27]+_0x55a4be[\x27fY\x27]*(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27]),_0x55a4be[\x27fY\x27]=0x1-0x2*_0x55a4be[\x27fY\x27],_0x5cd62b[\x27fX\x27]=(_0x21a097[_0x273ad3+0x1][\x27fX\x27]-this[\x27fSrcUseLeft\x27])/(this[\x27fSrcUseRight\x27]-this[\x27fSrcUseLeft\x27]),_0x5cd62b[\x27fX\x27]=this[\x27fDstUseLeft\x27]+_0x5cd62b[\x27fX\x27]*(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27]),_0x5cd62b[\x27fX\x27]=0x2*_0x5cd62b[\x27fX\x27]-0x1,_0x5cd62b[\x27fY\x27]=(_0x21a097[_0x273ad3+0x1][\x27fY\x27]-this[\x27fSrcUseTop\x27])/(this[\x27fSrcUseBottom\x27]-this[\x27fSrcUseTop\x27]),_0x5cd62b[\x27fY\x27]=this[\x27fDstUseTop\x27]+_0x5cd62b[\x27fY\x27]*(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27]),_0x5cd62b[\x27fY\x27]=0x1-0x2*_0x5cd62b[\x27fY\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=_0x343eb3[\x27fX\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=_0x343eb3[\x27fY\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=0x0,this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fR\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fG\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fB\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fA\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=_0x55a4be[\x27fX\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=_0x55a4be[\x27fY\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=0x0,this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fR\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fG\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fB\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fA\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=_0x5cd62b[\x27fX\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=_0x5cd62b[\x27fY\x27],this[\x27pFillBlockPosVertices\x27][_0x264081++]=0x0,this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fR\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fG\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fB\x27],this[\x27pFillBlockClrVertices\x27][_0x35de95++]=_0x1a049f[\x27fA\x27];}if(0x0==this[\x27nBlockShaderProgram\x27]&&(this[\x27nBlockShaderProgram\x27]=this[\x27CompileProgram\x27](_0x12e912,_0x26024f),this[\x27nBlockShaderProgram\x27]<=0x0))return\x20_0x4cfdfb;this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27BLEND\x27]),this[\x27ctx\x27][\x27blendFunc\x27](this[\x27ctx\x27][\x27SRC_ALPHA\x27],this[\x27ctx\x27][\x27ONE_MINUS_SRC_ALPHA\x27]),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27glBlockPosBuffer\x27]),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27pFillBlockPosVertices\x27],this[\x27ctx\x27][\x27STATIC_DRAW\x27]),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27glBlockClrBuffer\x27]),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27pFillBlockClrVertices\x27],this[\x27ctx\x27][\x27STATIC_DRAW\x27]),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),this[\x27ctx\x27][\x27useProgram\x27](this[\x27nBlockShaderProgram\x27]);var\x20_0x388680=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27nLineShaderProgram\x27],\x27bCapture\x27);if(_0x388680<=0x0)return\x20_0x4cfdfb;0x1==this[\x27bIsCapturing\x27]?this[\x27ctx\x27][\x27uniform1i\x27](_0x388680,0x1):this[\x27ctx\x27][\x27uniform1i\x27](_0x388680,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27glBlockPosBuffer\x27]);var\x20_0x40d4ed=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27nBlockShaderProgram\x27],\x27position\x27);this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x40d4ed),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x40d4ed,0x3,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27glBlockClrBuffer\x27]);var\x20_0x47a360=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27nBlockShaderProgram\x27],\x27color\x27);return\x20this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x47a360),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x47a360,0x4,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLES\x27],0x0,0x3*_0x4f4ebb),this[\x27ctx\x27][\x27useProgram\x27](null),this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27BLEND\x27]),_0x26bcbc;}},{\x27key\x27:\x27ComputeLinePoint\x27,\x27value\x27:function(_0x51198e,_0x12277c){if(null==_0x51198e||_0x12277c<0x1)return\x20_0x4a21f9;if(null==this[\x27pLinePosVertices\x27]||null==this[\x27pLineClrVertices\x27])return\x20_0x127571;var\x20_0x3e89d8=0x0,_0x5a3a4a=0x0;0x1==this[\x27bIsCapturing\x27]?(_0x3e89d8=(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27])*this[\x27nCaptureWidth\x27],_0x5a3a4a=(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27])*this[\x27nCaptureHeight\x27]):(_0x3e89d8=(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27])*this[\x27canvas\x27][\x27width\x27],_0x5a3a4a=(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27])*this[\x27canvas\x27][\x27height\x27]);for(var\x20_0x27fbf5=0x0,_0x172e3f=0x0,_0x4b612a=0x0,_0x2907c7=0x0,_0x1012f2=0x0,_0x4a4cf9=0x0,_0x5f15c1=0x0,_0x3b57fc=0x0,_0x26728b=0x0,_0x26753d=0x0,_0x292c95=0x0,_0x1cdab7=0x0;_0x1cdab7<_0x12277c;++_0x1cdab7){var\x20_0x51f115=[];if(!((_0x292c95=_0x51198e[_0x1cdab7][\x27nPointNum\x27])<=0x0)){for(var\x20_0x5aa672=0x0;_0x5aa672<_0x292c95;++_0x5aa672){var\x20_0x261978={};_0x261978[\x27fX\x27]=(_0x51198e[_0x1cdab7][\x27pstPoints\x27][_0x5aa672][\x27fX\x27]-this[\x27fSrcUseLeft\x27])/(this[\x27fSrcUseRight\x27]-this[\x27fSrcUseLeft\x27]),_0x261978[\x27fX\x27]=this[\x27fDstUseLeft\x27]+_0x261978[\x27fX\x27]*(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27]),_0x261978[\x27fX\x27]=0x2*_0x261978[\x27fX\x27]-0x1,_0x261978[\x27fY\x27]=(_0x51198e[_0x1cdab7][\x27pstPoints\x27][_0x5aa672][\x27fY\x27]-this[\x27fSrcUseTop\x27])/(this[\x27fSrcUseBottom\x27]-this[\x27fSrcUseTop\x27]),_0x261978[\x27fY\x27]=this[\x27fDstUseTop\x27]+_0x261978[\x27fY\x27]*(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27]),_0x261978[\x27fY\x27]=0x1-0x2*_0x261978[\x27fY\x27],_0x51f115[\x27push\x27](_0x261978);}if(this[\x27canvas\x27][\x27width\x27]<=0x0||this[\x27canvas\x27][\x27height\x27]<=0x0)return\x20_0x15898c;if(_0x4a4cf9=3.5*_0x51198e[_0x1cdab7][\x27nLineWidth\x27]/_0x3e89d8,_0x5f15c1=3.5*_0x51198e[_0x1cdab7][\x27nLineWidth\x27]/_0x5a3a4a,_0x4a4cf9<=0x0||_0x5f15c1<=0x0)return\x20_0x4a21f9;var\x20_0x4d8644=_0x51198e[_0x1cdab7][\x27pstColor\x27];if(null==_0x4d8644||null==_0x4d8644)return\x20_0x4a21f9;for(var\x20_0x332976=0x0;_0x332976<_0x292c95-0x1;++_0x332976)_0x172e3f=_0x51f115[_0x332976+0x1][\x27fX\x27]-_0x51f115[_0x332976][\x27fX\x27],_0x4b612a=_0x51f115[_0x332976+0x1][\x27fY\x27]-_0x51f115[_0x332976][\x27fY\x27],_0x27fbf5=Math[\x27sqrt\x27](_0x172e3f*_0x172e3f+_0x4b612a*_0x4b612a),Math[\x27abs\x27](_0x27fbf5-0x0)<0.000001||(_0x2907c7=-_0x4a4cf9*_0x4b612a/_0x27fbf5/0x2,_0x1012f2=_0x5f15c1*_0x172e3f/_0x27fbf5/0x2,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976][\x27fX\x27]+_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976][\x27fY\x27]+_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=-0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976+0x1][\x27fX\x27]-_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976+0x1][\x27fY\x27]-_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976][\x27fX\x27]-_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976][\x27fY\x27]-_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976][\x27fX\x27]+_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976][\x27fY\x27]+_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=-0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976+0x1][\x27fX\x27]+_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976+0x1][\x27fY\x27]+_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=-0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976+0x1][\x27fX\x27]-_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x332976+0x1][\x27fY\x27]-_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],_0x3b57fc+=0x2);0x1==_0x51198e[_0x1cdab7][\x27bLoop\x27]&&0x2<_0x292c95&&(_0x172e3f=_0x51f115[_0x292c95-0x1][\x27fX\x27]-_0x51f115[0x0][\x27fX\x27],_0x4b612a=_0x51f115[_0x292c95-0x1][\x27fY\x27]-_0x51f115[0x0][\x27fY\x27],_0x27fbf5=Math[\x27sqrt\x27](_0x172e3f*_0x172e3f+_0x4b612a*_0x4b612a),Math[\x27abs\x27](_0x27fbf5-0x0)>0.000001&&(_0x2907c7=-_0x4a4cf9*_0x4b612a/_0x27fbf5/0x2,_0x1012f2=_0x5f15c1*_0x172e3f/_0x27fbf5/0x2,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[0x0][\x27fX\x27]+_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[0x0][\x27fY\x27]+_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=-0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x292c95-0x1][\x27fX\x27]-_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x292c95-0x1][\x27fY\x27]-_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[0x0][\x27fX\x27]-_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[0x0][\x27fY\x27]-_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[0x0][\x27fX\x27]+_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[0x0][\x27fY\x27]+_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=-0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x292c95-0x1][\x27fX\x27]+_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x292c95-0x1][\x27fY\x27]+_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=-0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x292c95-0x1][\x27fX\x27]-_0x2907c7,this[\x27pLinePosVertices\x27][_0x26728b++]=_0x51f115[_0x292c95-0x1][\x27fY\x27]-_0x1012f2,this[\x27pLinePosVertices\x27][_0x26728b++]=0x1,this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fR\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fG\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fB\x27],this[\x27pLineClrVertices\x27][_0x26753d++]=_0x4d8644[\x27fA\x27],_0x3b57fc+=0x2));}}return\x200x0==_0x3b57fc?_0x4a21f9:(this[\x27nLineTriangleNum\x27]=_0x3b57fc,_0x26bcbc);}},{\x27key\x27:\x27SR_DrawLines\x27,\x27value\x27:function(_0x1234cc,_0x11e5ca,_0x11cda2,_0x2a242b,_0x3f75b3,_0xc471b3){var\x20_0x3becf1=[],_0x22d4b7={};return\x20_0x22d4b7[\x27pstPoints\x27]=_0x1234cc,_0x22d4b7[\x27nPointNum\x27]=_0x11e5ca,_0x22d4b7[\x27bLoop\x27]=_0x11cda2,_0x22d4b7[\x27pstColor\x27]=_0x2a242b,_0x22d4b7[\x27nLineWidth\x27]=_0x3f75b3,_0x3becf1[\x27push\x27](_0x22d4b7),this[\x27SR_DrawLinesEx\x27](_0x3becf1,0x1,_0x11e5ca,_0xc471b3);}},{\x27key\x27:\x27SR_DrawLinesEx\x27,\x27value\x27:function(_0x217338,_0x1bf3f7,_0x560f81,_0x3762b9){if(null==this[\x27ctx\x27])return\x20_0x127571;if(null==_0x217338||_0x1bf3f7<0x1||_0x560f81<0x2)return\x20_0x4a21f9;if(0x0==this[\x27nLineShaderProgram\x27]){var\x20_0x26390f=this[\x27CompileProgram\x27](_0x12e912,_0x26024f);if(_0x26390f<=0x0)return\x20_0x4cfdfb;this[\x27nLineShaderProgram\x27]=_0x26390f;}if(0x1==_0x3762b9)return\x20this[\x27DrawFillBlock\x27](_0x217338,_0x1bf3f7,_0x560f81);for(var\x20_0x287503=0x0,_0x4ebe84=0x0;_0x4ebe84<_0x1bf3f7;++_0x4ebe84){if(null==_0x217338[_0x4ebe84][\x27pstPoints\x27]||_0x217338[_0x4ebe84][\x27nPointNum\x27]<=0x1||_0x217338[_0x4ebe84][\x27nPointNum\x27]>=0x400||_0x217338[_0x4ebe84][\x27nLineWidth\x27]<=0x0||null==_0x217338[_0x4ebe84][\x27pstColor\x27])return\x20_0x4a21f9;_0x287503+=_0x217338[_0x4ebe84][\x27nPointNum\x27];}if(_0x287503!=_0x560f81)return\x20_0x4a21f9;if((_0x287503+=_0x1bf3f7)>this[\x27nMaxPointNum\x27]&&(this[\x27nMaxPointNum\x27]=_0x287503,this[\x27pLinePosVertices\x27]=null,this[\x27pLineClrVertices\x27]=null),null==this[\x27pLinePosVertices\x27]&&(this[\x27pLinePosVertices\x27]=new\x20Float32Array(0x6*this[\x27nMaxPointNum\x27]*0x3),null==this[\x27pLinePosVertices\x27]))return\x20_0x460c4d;if(this[\x27pLinePosVertices\x27][\x27fill\x27](0x0),null==this[\x27pLineClrVertices\x27]&&(this[\x27pLineClrVertices\x27]=new\x20Float32Array(0x6*this[\x27nMaxPointNum\x27]*0x4),null==this[\x27pLineClrVertices\x27]))return\x20_0x460c4d;if(this[\x27pLineClrVertices\x27][\x27fill\x27](0x0),0x0==this[\x27glLinePosBuffer\x27]&&(this[\x27glLinePosBuffer\x27]=this[\x27ctx\x27][\x27createBuffer\x27](),0x0==this[\x27glLinePosBuffer\x27]))return\x20_0x4cfdfb;if(0x0==this[\x27glLineClrBuffer\x27]&&(this[\x27glLineClrBuffer\x27]=this[\x27ctx\x27][\x27createBuffer\x27](),0x0==this[\x27glLineClrBuffer\x27]))return\x20_0x4cfdfb;var\x20_0x399dac=this[\x27ComputeLinePoint\x27](_0x217338,_0x1bf3f7);if(_0x26bcbc!=_0x399dac)return\x20_0x399dac;this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27BLEND\x27]),this[\x27ctx\x27][\x27blendFunc\x27](this[\x27ctx\x27][\x27SRC_ALPHA\x27],this[\x27ctx\x27][\x27ONE_MINUS_SRC_ALPHA\x27]);var\x20_0x802105=this[\x27nLineShaderProgram\x27];this[\x27ctx\x27][\x27useProgram\x27](_0x802105);var\x20_0x55db95=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27nLineShaderProgram\x27],\x27bCapture\x27);if(_0x55db95<=0x0)return\x20_0x4cfdfb;0x1==this[\x27bIsCapturing\x27]?this[\x27ctx\x27][\x27uniform1i\x27](_0x55db95,0x1):this[\x27ctx\x27][\x27uniform1i\x27](_0x55db95,0x0);var\x20_0x4dc65a=this[\x27glLinePosBuffer\x27],_0x358627=this[\x27glLineClrBuffer\x27],_0x48da47=this[\x27nLineTriangleNum\x27],_0x45e5cf=this[\x27pLinePosVertices\x27],_0x1e03d3=this[\x27pLineClrVertices\x27];this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0x4dc65a),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0x45e5cf,this[\x27ctx\x27][\x27STATIC_DRAW\x27]);var\x20_0x35d856=this[\x27ctx\x27][\x27getAttribLocation\x27](_0x802105,\x27position\x27);this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x35d856),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x35d856,0x3,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0x358627),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0x1e03d3,this[\x27ctx\x27][\x27STATIC_DRAW\x27]);var\x20_0x268417=this[\x27ctx\x27][\x27getAttribLocation\x27](_0x802105,\x27color\x27);return\x20this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x268417),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x268417,0x4,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),0x1==this[\x27bIsCapturing\x27]?this[\x27ctx\x27][\x27viewport\x27](0x0,0x0,this[\x27nCaptureWidth\x27],this[\x27nCaptureHeight\x27]):this[\x27ctx\x27][\x27viewport\x27](0x0,0x0,this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]),this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLES\x27],0x0,0x3*_0x48da47),this[\x27ctx\x27][\x27useProgram\x27](null),this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27BLEND\x27]),_0x26bcbc;}},{\x27key\x27:\x27SR_DrawFont\x27,\x27value\x27:function(_0x6dc94,_0x1b9259,_0x3a545b,_0x4fe6bd,_0x457d6a,_0xb11316,_0x10e93b,_0x369787,_0x3ef218){if(null==_0x6dc94||null==_0x1b9259||null==_0x3a545b||_0x4fe6bd<=0x1||_0x457d6a<=0x1)return\x20_0x4a21f9;if(0x1==_0xb11316&&null==_0x10e93b)return\x20_0x4a21f9;var\x20_0x42ca90=[],_0x2451d0={};return\x20_0x2451d0[\x27bBackground\x27]=_0xb11316,_0x2451d0[\x27nFontWidth\x27]=_0x4fe6bd,_0x2451d0[\x27nFontHeight\x27]=_0x457d6a,_0x2451d0[\x27pstBGColor\x27]=_0x10e93b,_0x2451d0[\x27pstFontColor\x27]=_0x3a545b,_0x2451d0[\x27pString\x27]=_0x6dc94,_0x2451d0[\x27pstStartPos\x27]=_0x1b9259,_0x2451d0[\x27fRotateAngle\x27]=_0x369787,_0x2451d0[\x27pFontFamily\x27]=_0x3ef218,_0x42ca90[\x27push\x27](_0x2451d0),this[\x27SR_DrawFontEx\x27](_0x42ca90,0x1);}},{\x27key\x27:\x27SR_DrawFontEx\x27,\x27value\x27:function(_0x52ab2d,_0x2f7047){if(null==this[\x27ctx\x27])return\x20_0x127571;if(0x0>_0x2f7047||null==_0x52ab2d)return\x20_0x4a21f9;var\x20_0x44aa8b,_0x502623,_0x3548e6=0x0,_0x46ff14=0x0;if(0x1==this[\x27bIsCapturing\x27]){if(0x0==this[\x27nCaptureWidth\x27]||0x0==this[\x27nCaptureHeight\x27])return\x20_0x127571;_0x3548e6=Math[\x27round\x27]((this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27])*this[\x27nCaptureWidth\x27]),_0x46ff14=Math[\x27round\x27]((this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27])*this[\x27nCaptureHeight\x27]);}else\x20_0x3548e6=Math[\x27round\x27]((this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27])*this[\x27canvas\x27][\x27width\x27]),_0x46ff14=Math[\x27round\x27]((this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27])*this[\x27canvas\x27][\x27height\x27]);if(_0x3548e6=_0x3548e6+0x4-_0x3548e6%0x4,_0x46ff14=_0x46ff14+0x4-_0x46ff14%0x4,this[\x27nDrawFontWidth\x27]==_0x3548e6&&this[\x27nDrawFontHeight\x27]==_0x46ff14||(this[\x27pFontColorBuffer\x27]=null,this[\x27nFontColorTexture\x27]=0x0,this[\x27nDrawFontWidth\x27]=_0x3548e6,this[\x27nDrawFontHeight\x27]=_0x46ff14,null!=this[\x27textCanvas\x27]&&(this[\x27textCanvas\x27][\x27remove\x27](),this[\x27textCanvas\x27]=null,this[\x27textCanvasCtx\x27]=null)),0x0==this[\x27nFontColorTexture\x27]){if(this[\x27nFontColorTexture\x27]=this[\x27ctx\x27][\x27createTexture\x27](),0x0==this[\x27nFontColorTexture\x27])return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nFontColorTexture\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]);}if(null==this[\x27textCanvas\x27]){if(this[\x27textCanvas\x27]=document[\x27createElement\x27](\x27canvas\x27),null==this[\x27textCanvas\x27])return\x20_0x28903e;if(this[\x27textCanvasCtx\x27]=this[\x27textCanvas\x27][\x27getContext\x27](\x272d\x27),null==this[\x27textCanvasCtx\x27])return\x20_0x28903e;this[\x27textCanvasCtx\x27][\x27canvas\x27][\x27width\x27]=this[\x27nDrawFontWidth\x27],this[\x27textCanvasCtx\x27][\x27canvas\x27][\x27height\x27]=this[\x27nDrawFontHeight\x27];}this[\x27textCanvasCtx\x27][\x27clearRect\x27](0x0,0x0,this[\x27nDrawFontWidth\x27],this[\x27nDrawFontHeight\x27]);for(var\x20_0x35a565=0x0;_0x35a565<_0x2f7047;++_0x35a565){var\x20_0x1933a9=_0x52ab2d[_0x35a565][\x27nFontWidth\x27],_0xad3d07=_0x52ab2d[_0x35a565][\x27nFontHeight\x27];0x1==this[\x27bIsCapturing\x27]&&(_0x1933a9=Math[\x27round\x27](0.7*this[\x27nCaptureWidth\x27]/this[\x27canvas\x27][\x27width\x27]*_0x1933a9),_0xad3d07=Math[\x27round\x27](0.7*this[\x27nCaptureHeight\x27]/this[\x27canvas\x27][\x27height\x27]*_0xad3d07));var\x20_0x52c96c=_0x1933a9<_0xad3d07?_0x1933a9:_0xad3d07;this[\x27textCanvasCtx\x27][\x27font\x27]=_0x52c96c[\x27toString\x27]()+\x27px\x5cx20\x27+_0x52ab2d[_0x35a565][\x27pFontFamily\x27],this[\x27textCanvasCtx\x27][\x27textAlign\x27]=\x27left\x27,this[\x27textCanvasCtx\x27][\x27textBaseline\x27]=\x27top\x27;var\x20_0x3f391c=parseInt(0xff*_0x52ab2d[_0x35a565][\x27pstFontColor\x27][\x27fR\x27]),_0x59f700=parseInt(0xff*_0x52ab2d[_0x35a565][\x27pstFontColor\x27][\x27fG\x27]),_0x483413=parseInt(0xff*_0x52ab2d[_0x35a565][\x27pstFontColor\x27][\x27fB\x27]),_0xe50cd5=_0x3f391c<0x10?\x270\x27+_0x3f391c[\x27toString\x27](0x10):_0x3f391c[\x27toString\x27](0x10),_0xc00b62=_0x59f700<0x10?\x270\x27+_0x59f700[\x27toString\x27](0x10):_0x59f700[\x27toString\x27](0x10),_0x16220a=_0x483413<0x10?\x270\x27+_0x483413[\x27toString\x27](0x10):_0x483413[\x27toString\x27](0x10);this[\x27textCanvasCtx\x27][\x27fillStyle\x27]=\x27#\x27+_0xe50cd5+_0xc00b62+_0x16220a,this[\x27textCanvasCtx\x27][\x27globalAlpha\x27]=_0x52ab2d[_0x35a565][\x27pstFontColor\x27][\x27fA\x27];var\x20_0xcdec46=_0x52ab2d[_0x35a565][\x27pstStartPos\x27][\x27fX\x27]*this[\x27nDrawFontWidth\x27],_0x196a70=_0x52ab2d[_0x35a565][\x27pstStartPos\x27][\x27fY\x27]*this[\x27nDrawFontHeight\x27];this[\x27textCanvasCtx\x27][\x27save\x27](),this[\x27textCanvasCtx\x27][\x27translate\x27](_0xcdec46,_0x196a70),this[\x27textCanvasCtx\x27][\x27rotate\x27](_0x52ab2d[_0x35a565][\x27fRotateAngle\x27]*Math[\x27PI\x27]/0xb4),this[\x27textCanvasCtx\x27][\x27fillText\x27](_0x52ab2d[_0x35a565][\x27pString\x27],0x0,0x0),this[\x27textCanvasCtx\x27][\x27restore\x27]();}if(this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nFontColorTexture\x27]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],this[\x27textCanvasCtx\x27][\x27canvas\x27]),0x0==this[\x27nFontShaderProgram\x27]&&(this[\x27nFontShaderProgram\x27]=this[\x27CompileProgram\x27](\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec4\x5cx20\x5cx20position;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec4\x5cx20\x5cx20texCoord;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20vec4\x5cx20\x5cx20pp;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20int\x5cx20bCapture;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position.x\x5cx20\x5cx20=\x5cx20position.x;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position.y\x5cx20\x5cx20=\x5cx20position.y;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(bCapture\x5cx20==\x5cx201)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position.y\x5cx20=\x5cx20-position.y;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position.z\x5cx20\x5cx20=\x5cx200.1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position.w\x5cx20\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20pp\x5cx20=\x5cx20texCoord;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20lowp\x5cx20vec4\x5cx20pp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main(void)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20texture2D(texture,\x5cx20pp.st);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27),this[\x27nFontShaderProgram\x27]<=0x0))return\x20_0x4cfdfb;0x1==this[\x27bIsCapturing\x27]?(_0x44aa8b=this[\x27nCaptureWidth\x27]+0x4-this[\x27nCaptureWidth\x27]%0x4,_0x502623=this[\x27nCaptureHeight\x27]+0x4-this[\x27nCaptureHeight\x27]%0x4):(_0x44aa8b=this[\x27canvas\x27][\x27width\x27]+0x4-this[\x27canvas\x27][\x27width\x27]%0x4,_0x502623=this[\x27canvas\x27][\x27height\x27]+0x4-this[\x27canvas\x27][\x27height\x27]%0x4),this[\x27ctx\x27][\x27viewport\x27](0x0,0x0,_0x44aa8b,_0x502623),this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27BLEND\x27]),this[\x27ctx\x27][\x27blendFunc\x27](this[\x27ctx\x27][\x27SRC_ALPHA\x27],this[\x27ctx\x27][\x27ONE_MINUS_SRC_ALPHA\x27]),this[\x27ctx\x27][\x27useProgram\x27](this[\x27nFontShaderProgram\x27]);var\x20_0x21ab01=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27nFontShaderProgram\x27],\x27bCapture\x27);if(_0x21ab01<=0x0)return\x20_0x4cfdfb;0x1==this[\x27bIsCapturing\x27]?this[\x27ctx\x27][\x27uniform1i\x27](_0x21ab01,0x1):this[\x27ctx\x27][\x27uniform1i\x27](_0x21ab01,0x0),this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE0\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nFontColorTexture\x27]);var\x20_0xc12648=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27nFontShaderProgram\x27],\x27texture\x27);this[\x27ctx\x27][\x27uniform1i\x27](_0xc12648,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27vertexPosBuffer\x27]);var\x20_0x3c5528=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27nFontShaderProgram\x27],\x27position\x27);this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x3c5528),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x3c5528,0x3,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27texturePosBuffer\x27]);var\x20_0x292f9b=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27nFontShaderProgram\x27],\x27texCoord\x27);return\x20this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x292f9b),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x292f9b,0x2,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLE_FAN\x27],0x0,0x4),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],null),this[\x27ctx\x27][\x27useProgram\x27](null),this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27BLEND\x27]),_0x26bcbc;}},{\x27key\x27:\x27SR_DrawImage\x27,\x27value\x27:function(_0x3a1862,_0x21ed0d,_0x209fc9,_0x3d7ef2,_0x380fcd,_0x35750d){if(null==this[\x27ctx\x27])return\x20_0x127571;if(null==_0x3a1862||_0x21ed0d<=0x0||_0x209fc9<=0x0||null==_0x3d7ef2||_0x35750d<0x0||_0x35750d>0x1)return\x20_0x4a21f9;if(this[\x27nDrawImageWidth\x27]=_0x21ed0d,this[\x27nDrawImageHeight\x27]=_0x209fc9,0x0==this[\x27glImagePosBuffer\x27]&&(this[\x27glImagePosBuffer\x27]=this[\x27ctx\x27][\x27createBuffer\x27](),0x0==this[\x27glImagePosBuffer\x27]))return\x20_0x4cfdfb;if(0x0==this[\x27glImageClrBuffer\x27]&&(this[\x27glImageClrBuffer\x27]=this[\x27ctx\x27][\x27createBuffer\x27](),0x0==this[\x27glImageClrBuffer\x27]))return\x20_0x4cfdfb;if(null==this[\x27pImageClrVertices\x27]){if(this[\x27pImageClrVertices\x27]=new\x20Float32Array(0xc),null==this[\x27pImageClrVertices\x27])return\x20_0x460c4d;this[\x27pImageClrVertices\x27][0x0]=0x0,this[\x27pImageClrVertices\x27][0x1]=0x0,this[\x27pImageClrVertices\x27][0x2]=0x0,this[\x27pImageClrVertices\x27][0x3]=0x1,this[\x27pImageClrVertices\x27][0x4]=0x1,this[\x27pImageClrVertices\x27][0x5]=0x0,this[\x27pImageClrVertices\x27][0x6]=0x1,this[\x27pImageClrVertices\x27][0x7]=0x0,this[\x27pImageClrVertices\x27][0x8]=0x0,this[\x27pImageClrVertices\x27][0x9]=0x1,this[\x27pImageClrVertices\x27][0xa]=0x1,this[\x27pImageClrVertices\x27][0xb]=0x1;}var\x20_0x263831={},_0x40ceb1={};if(_0x263831[\x27fLeft\x27]=(_0x3d7ef2[\x27fLeft\x27]-this[\x27fSrcUseLeft\x27])/(this[\x27fSrcUseRight\x27]-this[\x27fSrcUseLeft\x27]),_0x263831[\x27fRight\x27]=(_0x3d7ef2[\x27fRight\x27]-this[\x27fSrcUseLeft\x27])/(this[\x27fSrcUseRight\x27]-this[\x27fSrcUseLeft\x27]),_0x263831[\x27fTop\x27]=(_0x3d7ef2[\x27fTop\x27]-this[\x27fSrcUseTop\x27])/(this[\x27fSrcUseBottom\x27]-this[\x27fSrcUseTop\x27]),_0x263831[\x27fBottom\x27]=(_0x3d7ef2[\x27fBottom\x27]-this[\x27fSrcUseTop\x27])/(this[\x27fSrcUseBottom\x27]-this[\x27fSrcUseTop\x27]),_0x40ceb1[\x27fLeft\x27]=this[\x27fDstUseLeft\x27]+_0x263831[\x27fLeft\x27]*(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27]),_0x40ceb1[\x27fRight\x27]=this[\x27fDstUseLeft\x27]+_0x263831[\x27fRight\x27]*(this[\x27fDstUseRight\x27]-this[\x27fDstUseLeft\x27]),_0x40ceb1[\x27fTop\x27]=this[\x27fDstUseTop\x27]+_0x263831[\x27fTop\x27]*(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27]),_0x40ceb1[\x27fBottom\x27]=this[\x27fDstUseTop\x27]+_0x263831[\x27fBottom\x27]*(this[\x27fDstUseBottom\x27]-this[\x27fDstUseTop\x27]),null==this[\x27pImagePosVertices\x27]&&(this[\x27pImagePosVertices\x27]=new\x20Float32Array(0xc),null==this[\x27pImagePosVertices\x27]))return\x20_0x460c4d;switch(this[\x27pImagePosVertices\x27][\x27fill\x27](0x0),this[\x27pImagePosVertices\x27][0x0]=0x2*_0x40ceb1[\x27fLeft\x27]-0x1,this[\x27pImagePosVertices\x27][0x1]=0x1-0x2*_0x40ceb1[\x27fTop\x27],this[\x27pImagePosVertices\x27][0x2]=0x2*_0x40ceb1[\x27fLeft\x27]-0x1,this[\x27pImagePosVertices\x27][0x3]=0x1-0x2*_0x40ceb1[\x27fBottom\x27],this[\x27pImagePosVertices\x27][0x4]=0x2*_0x40ceb1[\x27fRight\x27]-0x1,this[\x27pImagePosVertices\x27][0x5]=0x1-0x2*_0x40ceb1[\x27fTop\x27],this[\x27pImagePosVertices\x27][0x6]=0x2*_0x40ceb1[\x27fRight\x27]-0x1,this[\x27pImagePosVertices\x27][0x7]=0x1-0x2*_0x40ceb1[\x27fTop\x27],this[\x27pImagePosVertices\x27][0x8]=0x2*_0x40ceb1[\x27fLeft\x27]-0x1,this[\x27pImagePosVertices\x27][0x9]=0x1-0x2*_0x40ceb1[\x27fBottom\x27],this[\x27pImagePosVertices\x27][0xa]=0x2*_0x40ceb1[\x27fRight\x27]-0x1,this[\x27pImagePosVertices\x27][0xb]=0x1-0x2*_0x40ceb1[\x27fBottom\x27],0x1==this[\x27bIsCapturing\x27]?this[\x27ctx\x27][\x27viewport\x27](0x0,0x0,this[\x27nCaptureWidth\x27],this[\x27nCaptureHeight\x27]):this[\x27ctx\x27][\x27viewport\x27](0x0,0x0,this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]),this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27BLEND\x27]),this[\x27ctx\x27][\x27blendFunc\x27](this[\x27ctx\x27][\x27SRC_ALPHA\x27],this[\x27ctx\x27][\x27ONE_MINUS_SRC_ALPHA\x27]),_0x380fcd){case\x20_0x1eac9d:if(null==this[\x27nImageColorTexture\x27]){if(this[\x27nImageColorTexture\x27]=this[\x27ctx\x27][\x27createTexture\x27](),0x0==this[\x27nImageColorTexture\x27])return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTexture\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]);}if(this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTexture\x27]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27nDrawImageWidth\x27],this[\x27nDrawImageHeight\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x3a1862),0x0==this[\x27nImageShaderProgram\x27]){var\x20_0x28d080=this[\x27CompileProgram\x27](_0x50467b,_0x1417e9);if(_0x28d080<=0x0)return\x20_0x4cfdfb;this[\x27nImageShaderProgram\x27]=_0x28d080;}break;case\x20_0x512db0:if(null==this[\x27nImageColorTexture\x27]){if(this[\x27nImageColorTexture\x27]=this[\x27ctx\x27][\x27createTexture\x27](),0x0==this[\x27nImageColorTexture\x27])return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTexture\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]);}if(this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTexture\x27]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27RGB\x27],this[\x27nDrawImageWidth\x27],this[\x27nDrawImageHeight\x27],0x0,this[\x27ctx\x27][\x27RGB\x27],this[\x27ctx\x27][\x27UNSIGNED_SHORT_5_6_5\x27],_0x3a1862),0x0==this[\x27nImageShaderProgram\x27]){var\x20_0x171022=this[\x27CompileProgram\x27](_0x50467b,\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20mediump\x5cx20float;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20lowp\x5cx20vec4\x5cx20pp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fAlpha;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main(void)\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20texture2D(texture,\x5cx20pp.st);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor.a\x5cx20*=\x5cx20fAlpha;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x27);if(_0x171022<=0x0)return\x20_0x4cfdfb;this[\x27nImageShaderProgram\x27]=_0x171022;}break;case\x20_0x134a08:for(var\x20_0xac603f=0x0;_0xac603f<0x3;_0xac603f++){if(this[\x27nImageColorTextures\x27][_0xac603f]=this[\x27ctx\x27][\x27createTexture\x27](),0x0==this[\x27nImageColorTextures\x27][_0xac603f])return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTextures\x27][_0xac603f]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]);}if(this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTextures\x27][0x0]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27nDrawImageWidth\x27],this[\x27nDrawImageHeight\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x3a1862),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTextures\x27][0x1]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27nDrawImageWidth\x27]/0x2,this[\x27nDrawImageHeight\x27]/0x2,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x3a1862+this[\x27nDrawImageWidth\x27]*this[\x27nDrawImageHeight\x27]*0x5/0x4),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTextures\x27][0x2]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27nDrawImageWidth\x27]/0x2,this[\x27nDrawImageHeight\x27]/0x2,0x0,this[\x27ctx\x27][\x27LUMINANCE\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x3a1862+this[\x27nDrawImageWidth\x27]*this[\x27nDrawImageHeight\x27]),0x0==this[\x27nImageShaderProgram\x27]){var\x20_0x5c0c2f=this[\x27CompileProgram\x27](_0x50467b,\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20mediump\x5cx20float;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20Ytexture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20Utexture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20Vtexture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fAlpha;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20lowp\x5cx20vec4\x5cx20pp;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main(void)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,\x5cx20g,\x5cx20b,\x5cx20y,\x5cx20u,\x5cx20v;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20y\x5cx20=\x5cx20texture2D(Ytexture,\x5cx20pp.st).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20u\x5cx20=\x5cx20texture2D(Utexture,\x5cx20pp.st).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20v\x5cx20=\x5cx20texture2D(Vtexture,\x5cx20pp.st).r;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20y\x5cx20=\x5cx201.1643\x5cx20*\x5cx20(y\x5cx20-\x5cx200.0625);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20u\x5cx20=\x5cx20u\x5cx20-\x5cx200.5;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20v\x5cx20=\x5cx20v\x5cx20-\x5cx200.5;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20y\x5cx20+\x5cx201.5958\x5cx20*\x5cx20v;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20y\x5cx20-\x5cx200.39173\x5cx20*\x5cx20u\x5cx20-\x5cx200.81290\x5cx20*\x5cx20v;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20y\x5cx20+\x5cx202.017\x5cx20*\x5cx20u;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r,\x5cx20g,\x5cx20b,\x5cx20fAlpha);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27);if(_0x5c0c2f<=0x0)return\x20_0x4cfdfb;this[\x27nImageShaderProgram\x27]=_0x5c0c2f;}break;case\x20_0xa0f65c:if(null==this[\x27nImageColorTexture\x27]){if(this[\x27nImageColorTexture\x27]=this[\x27ctx\x27][\x27createTexture\x27](),0x0==this[\x27nImageColorTexture\x27])return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTexture\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]);}this[\x27ctx\x27][\x27useProgram\x27](this[\x27videoShaderProgram\x27]),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27vertexPosBuffer\x27]);var\x20_0x1e0790=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27videoShaderProgram\x27],\x27xy\x27);if(_0x1e0790<0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x1e0790,0x3,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x1e0790),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27texturePosBuffer\x27]);var\x20_0x2ebf2d=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27videoShaderProgram\x27],\x27uv\x27);if(_0x2ebf2d<0x0)return\x20_0x4cfdfb;if(this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x2ebf2d,0x2,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x2ebf2d),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),this[\x27ctx\x27][\x27useProgram\x27](null),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTexture\x27]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27nDrawImageWidth\x27],this[\x27nDrawImageHeight\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x3a1862),0x0==this[\x27nImageShaderProgram\x27]){var\x20_0x25e7d4=this[\x27CompileProgram\x27](_0x50467b,_0x1417e9);if(_0x25e7d4<=0x0)return\x20_0x4cfdfb;this[\x27nImageShaderProgram\x27]=_0x25e7d4;}}var\x20_0x4e10e4=this[\x27nImageShaderProgram\x27];this[\x27ctx\x27][\x27useProgram\x27](_0x4e10e4);var\x20_0x3f8bba=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27nImageShaderProgram\x27],\x27bCapture\x27);if(_0x3f8bba<=0x0)return\x20_0x4cfdfb;0x1==this[\x27bIsCapturing\x27]?this[\x27ctx\x27][\x27uniform1i\x27](_0x3f8bba,0x1):this[\x27ctx\x27][\x27uniform1i\x27](_0x3f8bba,0x0),this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE0\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nImageColorTexture\x27]);var\x20_0x31725d=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27nImageShaderProgram\x27],\x27texture\x27);this[\x27ctx\x27][\x27uniform1i\x27](_0x31725d,0x0),_0x31725d=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27nImageShaderProgram\x27],\x27fAlpha\x27),this[\x27ctx\x27][\x27uniform1f\x27](_0x31725d,_0x35750d),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27glImagePosBuffer\x27]),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27pImagePosVertices\x27],this[\x27ctx\x27][\x27STATIC_DRAW\x27]);var\x20_0x225415=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27nImageShaderProgram\x27],\x27position\x27);this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x225415),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x225415,0x2,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27glImageClrBuffer\x27]),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27pImageClrVertices\x27],this[\x27ctx\x27][\x27STATIC_DRAW\x27]);var\x20_0x4d93d7=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27nImageShaderProgram\x27],\x27texCoord\x27);return\x20this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x4d93d7),this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x4d93d7,0x2,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLES\x27],0x0,0x6),this[\x27ctx\x27][\x27useProgram\x27](null),this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27BLEND\x27]),_0x26bcbc;}},{\x27key\x27:\x27SR_AddSubPort\x27,\x27value\x27:function(_0x4210d9){var\x20_0x289231,_0x322ccb,_0x9bc4dc=_0x32eacf;if(null==this[\x27ctx\x27])return\x20_0x9bc4dc;if(null!=this[\x27pFishParamManager\x27]?_0x9bc4dc=this[\x27pFishParamManager\x27][\x27GetFECPort\x27](_0x4210d9):_0x4210d9==_0x3409b0[\x27SR_DE_NULL\x27]&&(_0x9bc4dc=0x0),_0x9bc4dc==_0x32eacf)return\x20_0x32eacf;switch(this[\x27nFECPort\x27]=_0x9bc4dc,_0x4210d9){case\x20_0x3409b0[\x27SR_DE_NULL\x27]:_0x289231=_0x2f5be6,this[\x27enPixelFormat\x27]==_0xa0f65c?_0x322ccb=\x27\x5cx0aprecision\x5cx20mediump\x5cx20float;\x5cx0avarying\x5cx20highp\x5cx20vec2\x5cx20v_uv;\x5cx0auniform\x5cx20sampler2D\x5cx20texture;\x5cx0auniform\x5cx20float\x5cx20fWndWidth;\x5cx0auniform\x5cx20float\x5cx20fWndHeight;\x5cx0auniform\x5cx20float\x5cx20fBrightness;\x5cx0auniform\x5cx20float\x5cx20fHue;\x5cx0auniform\x5cx20float\x5cx20fSaturation;\x5cx0auniform\x5cx20float\x5cx20fContrast;\x5cx0auniform\x5cx20float\x5cx20fSharpness;\x5cx0auniform\x5cx20int\x5cx20nPostProc;\x5cx0avec3\x5cx20rgb2hsv(vec3\x5cx20c)\x5cx20\x5cx0a{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20K\x5cx20=\x5cx20vec4(0.0,\x5cx20-1.0\x5cx20/\x5cx203.0,\x5cx202.0\x5cx20/\x5cx203.0,\x5cx20-1.0);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20p\x5cx20=\x5cx20c.g\x5cx20<\x5cx20c.b\x5cx20?\x5cx20vec4(c.bg,\x5cx20K.wz)\x5cx20:\x5cx20vec4(c.gb,\x5cx20K.xy);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20q\x5cx20=\x5cx20c.r\x5cx20<\x5cx20p.x\x5cx20?\x5cx20vec4(p.xyw,\x5cx20c.r)\x5cx20:\x5cx20vec4(c.r,\x5cx20p.yzx);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20d\x5cx20=\x5cx20q.x\x5cx20-\x5cx20min(q.w,\x5cx20q.y);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20e\x5cx20=\x5cx201.0e-10;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20return\x5cx20vec3(abs(q.z\x5cx20+\x5cx20(q.w\x5cx20-\x5cx20q.y)\x5cx20/\x5cx20(6.0\x5cx20*\x5cx20d\x5cx20+\x5cx20e)),\x5cx20d\x5cx20/\x5cx20(q.x\x5cx20+\x5cx20e),\x5cx20q.x);\x5cx20\x5cx0a}\x5cx20\x5cx0avec3\x5cx20hsv2rgb(vec3\x5cx20c)\x5cx20\x5cx0a{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20K\x5cx20=\x5cx20vec4(1.0,\x5cx202.0\x5cx20/\x5cx203.0,\x5cx201.0\x5cx20/\x5cx203.0,\x5cx203.0);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20p\x5cx20=\x5cx20abs(fract(c.xxx\x5cx20+\x5cx20K.xyz)\x5cx20*\x5cx206.0\x5cx20-\x5cx20K.www);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20return\x5cx20c.z\x5cx20*\x5cx20mix(K.xxx,\x5cx20clamp(p\x5cx20-\x5cx20K.xxx,\x5cx200.0,\x5cx201.0),\x5cx20c.y);\x5cx20\x5cx0a}\x5cx20\x5cx0avec3\x5cx20sharpen()\x5cx20\x5cx0a{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20sharpenColor;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20offWidth\x5cx20=\x5cx201.0\x5cx20/\x5cx20fWndWidth;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20offHeight\x5cx20=\x5cx201.0\x5cx20/\x5cx20fWndHeight;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tempSharpness\x5cx20=\x5cx20fSharpness\x5cx20*\x5cx20100.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec2\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20\x5cx20=\x5cx20(1.0\x5cx20+\x5cx204.0\x5cx20*\x5cx20tempSharpness)\x5cx20*\x5cx20texture2D(texture,\x5cx20uv).rgb;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(offWidth,\x5cx200);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20texture2D(texture,\x5cx20uv).rgb;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(-offWidth,\x5cx200);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20texture2D(texture,\x5cx20uv).rgb;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(0,\x5cx20offHeight);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20texture2D(texture,\x5cx20uv).rgb;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(0,\x5cx20-offHeight);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20texture2D(texture,\x5cx20uv).rgb;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20return\x5cx20sharpenColor;\x5cx20\x5cx0a}\x5cx20\x5cx0avoid\x5cx20main(void)\x5cx20\x5cx0a{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20if(1\x5cx20==\x5cx20nPostProc)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20fragRGB\x5cx20=\x5cx20sharpen();\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//sharpen\x5cx20锐度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20fragHSV\x5cx20=\x5cx20rgb2hsv(fragRGB);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragHSV.x\x5cx20=\x5cx20fragHSV.x\x5cx20+\x5cx20fHue;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//hue\x5cx20色度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragHSV.y\x5cx20=\x5cx20fragHSV.y\x5cx20*\x5cx20(fSaturation\x5cx20+\x5cx201.0);\x5cx20\x5cx20\x5cx20\x5cx20//saturation\x5cx20饱和度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20hsv2rgb(fragHSV);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if\x5cx20(fBrightness\x5cx20>\x5cx200.0)\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//brightness\x5cx20亮度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20fragRGB\x5cx20+\x5cx20(1.0\x5cx20-\x5cx20fragRGB)\x5cx20*\x5cx20fBrightness;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20fragRGB\x5cx20+\x5cx20fragRGB\x5cx20*\x5cx20fBrightness;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tempContrast\x5cx20=\x5cx20fContrast\x5cx20>\x5cx200.0\x5cx20?\x5cx20fContrast\x5cx20*\x5cx2010.0\x5cx20:\x5cx20fContrast;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20((fragRGB\x5cx20-\x5cx200.5)\x5cx20*\x5cx20max(tempContrast\x5cx20+\x5cx201.0,\x5cx200.0))\x5cx20+\x5cx200.5;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//contrast\x5cx20对比度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(fragRGB,\x5cx201.0);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20texture2D(texture,\x5cx20v_uv);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a}\x5cx0a\x27:this[\x27enPixelFormat\x27]!=_0x134a08&&this[\x27enPixelFormat\x27]!=_0x3cdbb9||(_0x322ccb=\x27\x5cx0aprecision\x5cx20mediump\x5cx20float;\x5cx0avarying\x5cx20highp\x5cx20vec2\x5cx20v_uv;\x5cx0auniform\x5cx20sampler2D\x5cx20Ytexture;\x5cx0auniform\x5cx20sampler2D\x5cx20Utexture;\x5cx0auniform\x5cx20sampler2D\x5cx20Vtexture;\x5cx0auniform\x5cx20float\x5cx20fWndWidth;\x5cx0auniform\x5cx20float\x5cx20fWndHeight;\x5cx0auniform\x5cx20float\x5cx20fBrightness;\x5cx0auniform\x5cx20float\x5cx20fHue;\x5cx0auniform\x5cx20float\x5cx20fSaturation;\x5cx0auniform\x5cx20float\x5cx20fContrast;\x5cx0auniform\x5cx20float\x5cx20fSharpness;\x5cx0auniform\x5cx20int\x5cx20nPostProc;\x5cx0avec3\x5cx20rgb;\x5cx0avec3\x5cx20yuv2rgb(float\x5cx20y,\x5cx20float\x5cx20u,\x5cx20float\x5cx20v)\x5cx0a{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20y\x5cx20=\x5cx201.1643\x5cx20*\x5cx20(y\x5cx20-\x5cx200.0625);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20u\x5cx20=\x5cx20u\x5cx20-\x5cx200.5;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20v\x5cx20=\x5cx20v\x5cx20-\x5cx200.5;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20y\x5cx20+\x5cx201.5958\x5cx20*\x5cx20v;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20y\x5cx20-\x5cx200.39173\x5cx20*\x5cx20u\x5cx20-\x5cx200.81290\x5cx20*\x5cx20v;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20y\x5cx20+\x5cx202.017\x5cx20*\x5cx20u;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20return\x5cx20vec3(r,\x5cx20g,\x5cx20b);\x5cx0a}\x5cx0avec3\x5cx20rgb2hsv(vec3\x5cx20c)\x5cx20\x5cx0a{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20K\x5cx20=\x5cx20vec4(0.0,\x5cx20-1.0\x5cx20/\x5cx203.0,\x5cx202.0\x5cx20/\x5cx203.0,\x5cx20-1.0);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20p\x5cx20=\x5cx20c.g\x5cx20<\x5cx20c.b\x5cx20?\x5cx20vec4(c.bg,\x5cx20K.wz)\x5cx20:\x5cx20vec4(c.gb,\x5cx20K.xy);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20q\x5cx20=\x5cx20c.r\x5cx20<\x5cx20p.x\x5cx20?\x5cx20vec4(p.xyw,\x5cx20c.r)\x5cx20:\x5cx20vec4(c.r,\x5cx20p.yzx);\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20d\x5cx20=\x5cx20q.x\x5cx20-\x5cx20min(q.w,\x5cx20q.y);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20e\x5cx20=\x5cx201.0e-10;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20return\x5cx20vec3(abs(q.z\x5cx20+\x5cx20(q.w\x5cx20-\x5cx20q.y)\x5cx20/\x5cx20(6.0\x5cx20*\x5cx20d\x5cx20+\x5cx20e)),\x5cx20d\x5cx20/\x5cx20(q.x\x5cx20+\x5cx20e),\x5cx20q.x);\x5cx20\x5cx0a}\x5cx20\x5cx0a\x5cx0avec3\x5cx20hsv2rgb(vec3\x5cx20c)\x5cx20\x5cx0a{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20K\x5cx20=\x5cx20vec4(1.0,\x5cx202.0\x5cx20/\x5cx203.0,\x5cx201.0\x5cx20/\x5cx203.0,\x5cx203.0);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20p\x5cx20=\x5cx20abs(fract(c.xxx\x5cx20+\x5cx20K.xyz)\x5cx20*\x5cx206.0\x5cx20-\x5cx20K.www);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20return\x5cx20c.z\x5cx20*\x5cx20mix(K.xxx,\x5cx20clamp(p\x5cx20-\x5cx20K.xxx,\x5cx200.0,\x5cx201.0),\x5cx20c.y);\x5cx20\x5cx0a}\x5cx20\x5cx0a\x5cx0avec3\x5cx20sharpen(vec3\x5cx20c)\x5cx20\x5cx0a{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20sharpenColor;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20sharpenColorY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20sharpenColorU;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20sharpenColorV;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20offWidth\x5cx20\x5cx20=\x5cx201.0\x5cx20/\x5cx20fWndWidth;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20offHeight\x5cx20=\x5cx201.0\x5cx20/\x5cx20fWndHeight;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tempSharpness\x5cx20=\x5cx20fSharpness\x5cx20*\x5cx20100.0;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20=\x5cx20(1.0\x5cx20+\x5cx204.0\x5cx20*\x5cx20tempSharpness)\x5cx20*\x5cx20c;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec2\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(offWidth,\x5cx200);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorY\x5cx20=\x5cx20texture2D(Ytexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorU\x5cx20=\x5cx20texture2D(Utexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorV\x5cx20=\x5cx20texture2D(Vtexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20\x5cx20yuv2rgb(sharpenColorY,\x5cx20sharpenColorU,\x5cx20sharpenColorV);\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(-offWidth,\x5cx200);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorY\x5cx20=\x5cx20texture2D(Ytexture,\x5cx20uv).r;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorU\x5cx20=\x5cx20texture2D(Utexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorV\x5cx20=\x5cx20texture2D(Vtexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20\x5cx20yuv2rgb(sharpenColorY,\x5cx20sharpenColorU,\x5cx20sharpenColorV);\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(0,\x5cx20offHeight);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorY\x5cx20=\x5cx20texture2D(Ytexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorU\x5cx20=\x5cx20texture2D(Utexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorV\x5cx20=\x5cx20texture2D(Vtexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20yuv2rgb(sharpenColorY,\x5cx20sharpenColorU,\x5cx20sharpenColorV);\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uv\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20=\x5cx20v_uv\x5cx20+\x5cx20vec2(0,\x5cx20-offHeight);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorY\x5cx20=\x5cx20texture2D(Ytexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorU\x5cx20=\x5cx20texture2D(Utexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColorV\x5cx20=\x5cx20texture2D(Vtexture,\x5cx20uv).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20sharpenColor\x5cx20-=\x5cx20tempSharpness\x5cx20*\x5cx20\x5cx20yuv2rgb(sharpenColorY,\x5cx20sharpenColorU,\x5cx20sharpenColorV);\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20return\x5cx20sharpenColor;\x5cx20\x5cx0a}\x5cx20\x5cx0avoid\x5cx20main(void)\x5cx0a{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20y,\x5cx20u,\x5cx20v;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20y\x5cx20=\x5cx20texture2D(Ytexture,\x5cx20v_uv).r;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20u\x5cx20=\x5cx20texture2D(Utexture,\x5cx20v_uv).r;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20v\x5cx20=\x5cx20texture2D(Vtexture,\x5cx20v_uv).r;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20rgb\x5cx20=\x5cx20yuv2rgb(y,\x5cx20u,\x5cx20v);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20if(1\x5cx20==\x5cx20nPostProc)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20fragRGB\x5cx20=\x5cx20sharpen(rgb);\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//sharpen\x5cx20锐度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec3\x5cx20fragHSV\x5cx20=\x5cx20rgb2hsv(fragRGB);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragHSV.x\x5cx20=\x5cx20fragHSV.x\x5cx20+\x5cx20fHue;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//hue\x5cx20色度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragHSV.y\x5cx20=\x5cx20fragHSV.y\x5cx20*\x5cx20(fSaturation\x5cx20+\x5cx201.0);\x5cx20\x5cx20\x5cx20\x5cx20//saturation\x5cx20饱和度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20hsv2rgb(fragHSV);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if\x5cx20(fBrightness\x5cx20>\x5cx200.0)\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//brightness\x5cx20亮度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20fragRGB\x5cx20+\x5cx20(1.0\x5cx20-\x5cx20fragRGB)\x5cx20*\x5cx20fBrightness;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20fragRGB\x5cx20+\x5cx20fragRGB\x5cx20*\x5cx20fBrightness;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tempContrast\x5cx20=\x5cx20fContrast\x5cx20>\x5cx200.0\x5cx20?\x5cx20fContrast\x5cx20*\x5cx2010.0\x5cx20:\x5cx20fContrast;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fragRGB\x5cx20=\x5cx20((fragRGB\x5cx20-\x5cx200.5)\x5cx20*\x5cx20max(tempContrast\x5cx20+\x5cx201.0,\x5cx200.0))\x5cx20+\x5cx200.5;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20//contrast\x5cx20对比度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(fragRGB,\x5cx201.0);\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(rgb,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a}\x5cx0a\x27),this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0aprecision\x5cx20mediump\x5cx20float;\x5cx0avarying\x5cx20vec2\x5cx20v_uv;\x5cx0auniform\x5cx20sampler2D\x5cx20texture;\x5cx0auniform\x5cx20float\x5cx20fRX1;\x5cx0auniform\x5cx20float\x5cx20fRX2;\x5cx0auniform\x5cx20float\x5cx20fRY1;\x5cx0auniform\x5cx20float\x5cx20fRY2;\x5cx0auniform\x5cx20int\x5cx20bBlack;\x5cx20\x5cx0auniform\x5cx20int\x5cx20bCut;\x5cx0a\x5cx0avoid\x5cx20main()\x5cx0a{\x5cx20\x5cx0a\x5cx09float\x5cx20r,g,b;\x5cx0a\x5cx09vec4\x5cx20origin;\x5cx0a\x5cx0a\x5cx09float\x5cx20\x5cx20w;\x5cx0a\x5cx09float\x5cx20\x5cx20h;\x5cx0a\x5cx09float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx09float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx09float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx09w\x5cx20=\x5cx201.0;\x5cx0a\x5cx09h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx09fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<圆心实际坐标\x5cx0a\x5cx09fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx09fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<半径实际长度\x5cx0a\x5cx09float\x5cx20\x5cx20leftCut\x5cx20=\x5cx200.0;\x5cx0a\x5cx09float\x5cx20\x5cx20rightCut\x5cx20=\x5cx201.0;\x5cx0a\x5cx09float\x5cx20\x5cx20topCut\x5cx20=\x5cx200.0;\x5cx0a\x5cx09float\x5cx20\x5cx20bottomCut\x5cx20=\x5cx201.0;\x5cx0a\x5cx09if(bCut\x5cx20==\x5cx201)\x5cx0a\x5cx09{\x5cx0a\x5cx09\x5cx09if(fRX1\x5cx20>\x5cx200.0)\x5cx0a\x5cx09\x5cx09{\x5cx0a\x5cx09\x5cx09\x5cx09leftCut\x5cx20=\x5cx20fRX1;\x5cx0a\x5cx09\x5cx09}\x5cx0a\x5cx09\x5cx09if(fRX2\x5cx20<\x5cx201.0)\x5cx0a\x5cx09\x5cx09{\x5cx0a\x5cx09\x5cx09\x5cx09rightCut\x5cx20=\x5cx20fRX2;\x5cx0a\x5cx09\x5cx09}\x5cx0a\x5cx09\x5cx09if(fRY1\x5cx20>\x5cx200.0)\x5cx0a\x5cx09\x5cx09{\x5cx0a\x5cx09\x5cx09\x5cx09topCut\x5cx20=\x5cx20fRY1;\x5cx0a\x5cx09\x5cx09}\x5cx0a\x5cx09\x5cx09if(fRY2\x5cx20<\x5cx201.0)\x5cx0a\x5cx09\x5cx09{\x5cx0a\x5cx09\x5cx09\x5cx09bottomCut\x5cx20=\x5cx20fRY2;\x5cx0a\x5cx09\x5cx09}\x5cx0a\x5cx09}\x5cx0a\x5cx09origin.s\x5cx20=\x5cx20v_uv.s\x5cx20*\x5cx20(rightCut-leftCut)\x5cx20+\x5cx20leftCut;\x5cx0a\x5cx09origin.t\x5cx20=\x5cx20v_uv.t\x5cx20*\x5cx20(bottomCut-topCut)\x5cx20+\x5cx20topCut;\x5cx0a\x5cx0a\x5cx09r\x5cx20=\x5cx20texture2D(texture,\x5cx20origin.st).r;\x5cx20\x5cx0a\x5cx09g\x5cx20=\x5cx20texture2D(texture,\x5cx20origin.st).g;\x5cx20\x5cx0a\x5cx09b\x5cx20=\x5cx20texture2D(texture,\x5cx20origin.st).b;\x5cx20\x5cx0a\x5cx0a\x5cx09if(bBlack\x5cx20==\x5cx201)\x5cx0a\x5cx09{\x5cx0a\x5cx09\x5cx09float\x5cx20tmpX,\x5cx20tmpY;\x5cx0a\x5cx09\x5cx09tmpX\x5cx20=\x5cx20origin.s\x5cx20*\x5cx20w;\x5cx20\x5cx0a\x5cx09\x5cx09tmpY\x5cx20=\x5cx20origin.t\x5cx20*\x5cx20h;\x5cx20\x5cx0a\x5cx09\x5cx09float\x5cx20d2\x5cx20=\x5cx20(tmpX-fCenterX)*(tmpX-fCenterX)\x5cx20+\x5cx20(tmpY-fCenterY)*(tmpY-fCenterY);\x5cx0a\x5cx09\x5cx09if(d2\x5cx20>\x5cx20fRadius*fRadius)\x5cx0a\x5cx09\x5cx09{\x5cx0a\x5cx09\x5cx09\x5cx09r\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx09\x5cx09\x5cx09g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx09\x5cx09\x5cx09b\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx09\x5cx09}\x5cx0a\x5cx09}\x5cx0a\x5cx0a\x5cx09gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a}\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0aprecision\x5cx20mediump\x5cx20float;\x5cx0avarying\x5cx20vec2\x5cx20v_uv;\x5cx0auniform\x5cx20sampler2D\x5cx20texture;\x5cx0auniform\x5cx20float\x5cx20fHAngleCos;\x5cx0auniform\x5cx20float\x5cx20fHAngleSin;\x5cx0auniform\x5cx20float\x5cx20fVAngleCos;\x5cx0auniform\x5cx20float\x5cx20fVAngleSin;\x5cx0auniform\x5cx20float\x5cx20fZoom;\x5cx0a\x5cx0auniform\x5cx20float\x5cx20fRX1;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRX2;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRY1;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRY2;\x5cx20\x5cx0a\x5cx0avoid\x5cx20main()\x5cx0a{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx20\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20z1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20z2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20dnew;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin1.s\x5cx20=\x5cx20v_uv.s\x5cx20-\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin1.t\x5cx20=\x5cx200.5\x5cx20-\x5cx20v_uv.t;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20z1\x5cx20=\x5cx20fZoom\x5cx20;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.s\x5cx20=\x5cx20origin1.s\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.t\x5cx20=\x5cx20(origin1.t*fVAngleCos\x5cx20+\x5cx20z1*fVAngleSin);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20z2\x5cx20=\x5cx20z1*fVAngleCos\x5cx20-\x5cx20origin1.t*fVAngleSin;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20dnew\x5cx20=\x5cx20sqrt(origin2.s*origin2.s\x5cx20+\x5cx20origin2.t*origin2.t)\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20d\x5cx20=\x5cx20sqrt(origin2.s*origin2.s\x5cx20+\x5cx20origin2.t*origin2.t\x5cx20+\x5cx20z2*z2);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20theta\x5cx20=\x5cx20asin(dnew/d);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp\x5cx20=\x5cx20theta\x5cx20/\x5cx201.5707963\x5cx20*\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.s\x5cx20=\x5cx20tmp*origin2.s\x5cx20/\x5cx20dnew\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.t\x5cx20=\x5cx20tmp*origin2.t\x5cx20/\x5cx20dnew\x5cx20;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20((origin2.s*fHAngleCos\x5cx20-\x5cx20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20(-(origin2.s*fHAngleSin\x5cx20+\x5cx20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a}\x5cx20\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0aprecision\x5cx20mediump\x5cx20float;\x5cx0avarying\x5cx20vec2\x5cx20v_uv;\x5cx0auniform\x5cx20sampler2D\x5cx20texture;\x5cx20\x5cx20\x5cx0auniform\x5cx20float\x5cx20fHAngleCos;\x5cx20\x5cx20\x5cx0auniform\x5cx20float\x5cx20fHAngleSin;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fVAngleCos;\x5cx20\x5cx20\x5cx0auniform\x5cx20float\x5cx20fVAngleSin;\x5cx20\x5cx20\x5cx0auniform\x5cx20float\x5cx20fZoom;\x5cx0a\x5cx0auniform\x5cx20float\x5cx20fRX1;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRX2;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRY1;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRY2;\x5cx20\x5cx0a\x5cx0avoid\x5cx20main()\x5cx0a{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20z1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20z2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20dnew;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<Բ��ʵ������\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<�뾶ʵ�ʳ���\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin1.s\x5cx20=\x5cx20v_uv.s\x5cx20-\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin1.t\x5cx20=\x5cx20v_uv.t\x5cx20-\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20z1\x5cx20=\x5cx20fZoom\x5cx20;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.s\x5cx20=\x5cx20origin1.s\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.t\x5cx20=\x5cx20(origin1.t*fVAngleCos\x5cx20+\x5cx20z1*fVAngleSin);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20z2\x5cx20=\x5cx20z1*fVAngleCos\x5cx20-\x5cx20origin1.t*fVAngleSin;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20dnew\x5cx20=\x5cx20sqrt(origin2.s*origin2.s\x5cx20+\x5cx20origin2.t*origin2.t)\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20d\x5cx20=\x5cx20sqrt(origin2.s*origin2.s\x5cx20+\x5cx20origin2.t*origin2.t\x5cx20+\x5cx20z2*z2);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20theta\x5cx20=\x5cx20asin(dnew/d);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp\x5cx20=\x5cx20theta\x5cx20/\x5cx201.5707963\x5cx20*\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.s\x5cx20=\x5cx20tmp*origin2.s\x5cx20/\x5cx20dnew\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.t\x5cx20=\x5cx20tmp*origin2.t\x5cx20/\x5cx20dnew\x5cx20;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20((origin2.s*fHAngleCos\x5cx20-\x5cx20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20((origin2.s*fHAngleSin\x5cx20+\x5cx20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a}\x5cx20\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0aprecision\x5cx20mediump\x5cx20float;\x5cx0avarying\x5cx20vec2\x5cx20v_uv;\x5cx0auniform\x5cx20sampler2D\x5cx20texture;\x5cx0auniform\x5cx20float\x5cx20fHAngleCos;\x5cx0auniform\x5cx20float\x5cx20fHAngleSin;\x5cx20\x5cx20\x5cx0auniform\x5cx20float\x5cx20fVAngleCos;\x5cx20\x5cx20\x5cx0auniform\x5cx20float\x5cx20fVAngleSin;\x5cx20\x5cx20\x5cx0auniform\x5cx20float\x5cx20fZoom;\x5cx0a\x5cx0auniform\x5cx20float\x5cx20fRX1;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRX2;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRY1;\x5cx20\x5cx0auniform\x5cx20float\x5cx20fRY2;\x5cx20\x5cx0a\x5cx0avoid\x5cx20main()\x5cx0a{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx20\x5cx20\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin3;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20z1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20z2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20z3;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20dnew;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<Բ��ʵ������\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<�뾶ʵ�ʳ���\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin1.s\x5cx20=\x5cx20v_uv.s\x5cx20-\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin1.t\x5cx20=\x5cx20v_uv.t\x5cx20-\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20z1\x5cx20=\x5cx20fZoom\x5cx20;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.s\x5cx20=\x5cx20origin1.s\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin2.t\x5cx20=\x5cx20(origin1.t*fVAngleCos\x5cx20+\x5cx20z1*fVAngleSin);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20z2\x5cx20=\x5cx20z1*fVAngleCos\x5cx20-\x5cx20origin1.t*fVAngleSin;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin3.s\x5cx20=\x5cx20origin2.s*fHAngleCos\x5cx20+\x5cx20z2*fHAngleSin\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20origin3.t\x5cx20=\x5cx20origin2.y;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20z3\x5cx20=\x5cx20z2*fHAngleCos\x5cx20-\x5cx20origin2.x*fHAngleSin;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20dnew\x5cx20=\x5cx20sqrt(origin3.s*origin3.s\x5cx20+\x5cx20origin3.t*origin3.t)\x5cx20;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20d\x5cx20=\x5cx20sqrt(origin3.s*origin3.s\x5cx20+\x5cx20origin3.t*origin3.t\x5cx20+\x5cx20z3*z3);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20theta\x5cx20=\x5cx20asin(dnew/d);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp\x5cx20=\x5cx20theta\x5cx20/\x5cx201.5707963\x5cx20*\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20(tmp*origin3.s\x5cx20/\x5cx20dnew\x5cx20*\x5cx20fRadius\x5cx20*\x5cx202.0\x5cx20+\x5cx20fCenterX)/w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20(tmp*origin3.t\x5cx20/\x5cx20dnew\x5cx20*\x5cx20fRadius\x5cx20*\x5cx202.0\x5cx20+\x5cx20fCenterY)/h;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a}\x5cx20\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20highp\x5cx20float;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20thetabase;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20d;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<圆心实际坐标\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<半径实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20fMax\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRY2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRX1\x5cx20<\x5cx200.0\x5cx20||\x5cx20fRY1\x5cx20<\x5cx200.0)\x5cx20///<如果不是一个完整的圆\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRX1\x5cx20*\x5cx20w;\x5cx20///<左边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20w;\x5cx20///<右边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRY1\x5cx20*\x5cx20h;\x5cx20///<上边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRY2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20h;\x5cx20///<下边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20topCut\x5cx20=\x5cx20fMax\x5cx20/\x5cx20fRadius;\x5cx20\x5cx20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20bottomCut\x5cx20=\x5cx200.8;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<为矫正效果,最终矫正图固定切掉下面一部分\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.s\x5cx20=\x5cx20v_uv.s;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.t\x5cx20=\x5cx20(bottomCut\x5cx20-\x5cx20topCut)\x5cx20*\x5cx20v_uv.t\x5cx20+\x5cx20topCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20thetabase\x5cx20=\x5cx206.2831853\x5cx20*\x5cx20origin.s\x5cx20+\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20d\x5cx20=\x5cx20fRadius\x5cx20*\x5cx20(1.0\x5cx20-\x5cx20origin.t);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20(fCenterX\x5cx20-\x5cx20d*sin(thetabase))\x5cx20/\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20(fCenterY\x5cx20+\x5cx20d*cos(thetabase))\x5cx20/\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r,\x5cx20g,\x5cx20b,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20highp\x5cx20float;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX1;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX2;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY1;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY2;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20thetabase;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20d;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20newpp;\x5cx20\x5cx20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if\x5cx20(v_uv.t\x5cx20\x5cx20<=\x5cx200.5)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.s\x5cx20=\x5cx20\x5cx20v_uv.s\x5cx20/\x5cx202.0\x5cx20+\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.t\x5cx20=\x5cx20\x5cx20v_uv.t\x5cx20*\x5cx202.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.s\x5cx20=\x5cx20\x5cx20v_uv.s\x5cx20/\x5cx202.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.t\x5cx20=\x5cx20\x5cx20(v_uv.t\x5cx20-\x5cx200.5)\x5cx20*\x5cx202.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<圆心实际坐标\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<半径实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20fMax\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRY2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRX1\x5cx20<\x5cx200.0\x5cx20||\x5cx20fRY1\x5cx20<\x5cx200.0)\x5cx20///<如果不是一个完整的圆\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRX1\x5cx20*\x5cx20w;\x5cx20///<左边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20w;\x5cx20///<右边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRY1\x5cx20*\x5cx20h;\x5cx20///<上边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRY2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20h;\x5cx20///<下边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20topCut\x5cx20=\x5cx20fMax\x5cx20/\x5cx20fRadius;\x5cx20\x5cx20\x5cx20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20bottomCut\x5cx20=\x5cx200.8;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<为矫正效果,最终矫正图固定切掉下面一部分\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.s\x5cx20=\x5cx20newpp.s;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.t\x5cx20=\x5cx20(bottomCut\x5cx20-\x5cx20topCut)\x5cx20*\x5cx20newpp.t\x5cx20+\x5cx20topCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20thetabase\x5cx20=\x5cx206.2831853\x5cx20*\x5cx20origin.s\x5cx20+\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20d\x5cx20=\x5cx20fRadius\x5cx20*\x5cx20(1.0\x5cx20-\x5cx20origin.t);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20(fCenterX\x5cx20-\x5cx20d*sin(thetabase))\x5cx20/\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20(fCenterY\x5cx20+\x5cx20d*cos(thetabase))\x5cx20/\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20highp\x5cx20float;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20thetabase;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20d;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<圆心实际坐标\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<半径实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20fMax\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRY2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRX1\x5cx20<\x5cx200.0\x5cx20||\x5cx20fRY1\x5cx20<\x5cx200.0)\x5cx20///<如果不是一个完整的圆\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRX1\x5cx20*\x5cx20w;\x5cx20///<左边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20w;\x5cx20///<右边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRY1\x5cx20*\x5cx20h;\x5cx20///<上边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRY2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20h;\x5cx20///<下边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20topCut\x5cx20=\x5cx20fMax\x5cx20/\x5cx20fRadius;\x5cx20\x5cx20\x5cx20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20bottomCut\x5cx20=\x5cx200.8;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<为矫正效果,最终矫正图固定切掉下面一部分\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.s\x5cx20=\x5cx201.0\x5cx20-\x5cx20v_uv.s;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.t\x5cx20=\x5cx20(bottomCut\x5cx20-\x5cx20topCut)\x5cx20*\x5cx20(1.0\x5cx20-\x5cx20v_uv.t)\x5cx20+\x5cx20topCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20thetabase\x5cx20=\x5cx206.2831853\x5cx20*\x5cx20origin.s\x5cx20+\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20d\x5cx20=\x5cx20fRadius\x5cx20*\x5cx20(1.0\x5cx20-\x5cx20origin.t);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20(fCenterX\x5cx20-\x5cx20d*sin(thetabase))\x5cx20/\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20(fCenterY\x5cx20+\x5cx20d*cos(thetabase))\x5cx20/\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20highp\x5cx20float;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY2;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20thetabase;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20d;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20newpp;\x5cx20\x5cx20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if\x5cx20(v_uv.t\x5cx20\x5cx20<=\x5cx200.5)\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.s\x5cx20=\x5cx20\x5cx20v_uv.s\x5cx20/\x5cx202.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.t\x5cx20=\x5cx20\x5cx20v_uv.t\x5cx20*\x5cx202.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.s\x5cx20=\x5cx20\x5cx20v_uv.s\x5cx20/\x5cx202.0\x5cx20+\x5cx200.5;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20newpp.t\x5cx20=\x5cx20\x5cx20(v_uv.t\x5cx20-\x5cx200.5)\x5cx20*\x5cx202.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20///<圆心实际坐标\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<半径实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20fMax\x5cx20=\x5cx200.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRY2\x5cx20>\x5cx201.0\x5cx20||\x5cx20fRX1\x5cx20<\x5cx200.0\x5cx20||\x5cx20fRY1\x5cx20<\x5cx200.0)\x5cx20///<如果不是一个完整的圆\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRX1\x5cx20*\x5cx20w;\x5cx20///<左边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20w;\x5cx20///<右边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRY1\x5cx20*\x5cx20h;\x5cx20///<上边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRY2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20h;\x5cx20///<下边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20fMax)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fMax\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20topCut\x5cx20=\x5cx20fMax\x5cx20/\x5cx20fRadius;\x5cx20\x5cx20\x5cx20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20bottomCut\x5cx20=\x5cx200.8;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<为矫正效果,最终矫正图固定切掉下面一部分\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.s\x5cx20=\x5cx201.0\x5cx20-\x5cx20newpp.s;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.t\x5cx20=\x5cx20(bottomCut\x5cx20-\x5cx20topCut)\x5cx20*\x5cx20(1.0\x5cx20-\x5cx20newpp.t)\x5cx20+\x5cx20topCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20thetabase\x5cx20=\x5cx206.2831853\x5cx20*\x5cx20origin.s\x5cx20+\x5cx20fAngle;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20d\x5cx20=\x5cx20fRadius\x5cx20*\x5cx20(1.0\x5cx20-\x5cx20origin.t);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20(fCenterX\x5cx20-\x5cx20d*sin(thetabase))\x5cx20/\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20(fCenterY\x5cx20+\x5cx20d*cos(thetabase))\x5cx20/\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx20\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:_0x289231=_0x2f5be6,_0x322ccb=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20precision\x5cx20highp\x5cx20float;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRX2;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY1;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20float\x5cx20fRY2;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main()\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20r,g,b;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20origin;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20vec4\x5cx20result;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20d;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterX;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fCenterY;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20w\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20h\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx20(fRY2\x5cx20-\x5cx20fRY1);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterX\x5cx20=\x5cx20(fRX1\x5cx20+\x5cx20fRX2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<圆心实际坐标\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fCenterY\x5cx20=\x5cx20(fRY1\x5cx20+\x5cx20fRY2)\x5cx20/\x5cx202.0\x5cx20*\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20fRadius\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx20fRX1)\x5cx20/\x5cx202.0\x5cx20*\x5cx20w;\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20///<半径实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20defaultTopCut\x5cx20=\x5cx200.1;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20defaultBottomCut\x5cx20=\x5cx200.9;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20leftCut\x5cx20=\x5cx200.0;\x5cx20\x5cx20\x5cx20\x5cx20///<当图像中圆不完整时需要切掉无图像部分,即使图像完整,为了效果,也要切掉上下固定的一部分\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20rightCut\x5cx20=\x5cx201.0;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20topCut\x5cx20=\x5cx20defaultTopCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20\x5cx20bottomCut\x5cx20=\x5cx20defaultBottomCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRX1\x5cx20*\x5cx20w;\x5cx20///<左边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20tmp\x5cx20/\x5cx20(2.0*fRadius);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20leftCut\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRX2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRX2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20w;\x5cx20///<右边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20tmp\x5cx20/\x5cx20(2.0*fRadius);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20rightCut\x5cx20=\x5cx201.0\x5cx20-\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY1\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20-fRY1\x5cx20*\x5cx20h;\x5cx20///<上边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20tmp\x5cx20/\x5cx20(2.0*fRadius);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx20defaultTopCut)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20topCut\x5cx20=\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20topCut\x5cx20=\x5cx20defaultTopCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(fRY2\x5cx20>\x5cx201.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20(fRY2\x5cx20-\x5cx201.0)\x5cx20*\x5cx20h;\x5cx20///<下边超出图像部分最大实际长度\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20tmp\x5cx20=\x5cx20tmp\x5cx20/\x5cx20(2.0*fRadius);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(tmp\x5cx20>\x5cx201.0\x5cx20-\x5cx20defaultBottomCut)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20bottomCut\x5cx20=\x5cx201.0\x5cx20-\x5cx20tmp;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20else\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20bottomCut\x5cx20=\x5cx20defaultBottomCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.s\x5cx20=\x5cx20v_uv.s\x5cx20*\x5cx20(rightCut-leftCut)\x5cx20+\x5cx20leftCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20origin.t\x5cx20=\x5cx20v_uv.t\x5cx20*\x5cx20(bottomCut-topCut)\x5cx20+\x5cx20topCut;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmpx\x5cx20=\x5cx20origin.s\x5cx20*\x5cx202.0\x5cx20*\x5cx20fRadius\x5cx20+\x5cx20fCenterX\x5cx20-\x5cx20fRadius;\x5cx20///<纹理坐标转化为原图上的实际坐标\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20float\x5cx20tmpy\x5cx20=\x5cx20origin.t\x5cx20*\x5cx202.0\x5cx20*\x5cx20fRadius\x5cx20+\x5cx20fCenterY\x5cx20-\x5cx20fRadius;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20d\x5cx20=\x5cx20sqrt(fRadius*fRadius\x5cx20-\x5cx20(tmpy-fCenterY)*(tmpy-fCenterY));\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.s\x5cx20=\x5cx20((tmpx-fCenterX)\x5cx20*\x5cx20d\x5cx20/\x5cx20fRadius\x5cx20+\x5cx20fCenterX)\x5cx20/\x5cx20w;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20result.t\x5cx20=\x5cx20tmpy\x5cx20/\x5cx20h;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).r;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).g;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx20texture2D(texture,\x5cx20result.st).b;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(result.s\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.t\x5cx20>\x5cx201.0\x5cx20||\x5cx20result.s\x5cx20<\x5cx200.0\x5cx20||\x5cx20result.t\x5cx20<\x5cx200.0)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20r\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20g\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20b\x5cx20=\x5cx200.0;\x5cx20\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20vec4(r\x5cx20,g\x5cx20,b\x5cx20,\x5cx201.0);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,this[\x27b3DPort\x27]=!0x1;break;case\x20_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]:_0x4210d9==_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]&&(this[\x27bCullBack\x27]=!0x0),_0x289231=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec4\x5cx20xy;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20attribute\x5cx20vec2\x5cx20uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20highp\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20int\x5cx20bCapture;\x5cx0a\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20mat4\x5cx20matProj;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20mat4\x5cx20matView;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main(void)\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_Position\x5cx20=\x5cx20matProj\x5cx20*\x5cx20matView\x5cx20*\x5cx20xy;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20v_uv\x5cx20=\x5cx20uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20if(bCapture\x5cx20==\x5cx201)\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20v_uv.y\x5cx20=\x5cx201.0\x5cx20-\x5cx20uv.y;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,_0x322ccb=\x27\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20varying\x5cx20highp\x5cx20vec2\x5cx20v_uv;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20uniform\x5cx20sampler2D\x5cx20texture;\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20void\x5cx20main(void)\x5cx20{\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20\x5cx20gl_FragColor\x5cx20=\x5cx20texture2D(texture,\x5cx20v_uv);\x5cx0a\x5cx20\x5cx20\x5cx20\x5cx20}\x5cx0a\x27,this[\x27b3DPort\x27]=!0x0;}var\x20_0x10de02=this[\x27CompileProgram\x27](_0x289231,_0x322ccb);if(_0x10de02<=0x0)return\x20_0x4cfdfb;this[\x27videoShaderProgram\x27]=_0x10de02;var\x20_0xfd3147=null,_0x409b23=null;0x0==this[\x27b3DPort\x27]?(_0xfd3147=new\x20Float32Array([-0x1,-0x1,0x0,-0x1,0x1,0x0,0x1,0x1,0x0,0x1,-0x1,0x0]),_0x409b23=new\x20Float32Array([0x0,0x1,0x0,0x0,0x1,0x0,0x1,0x1])):_0x4210d9==_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]?(this[\x27CreateSemiSphere\x27](0x0,0x1,0x0,0x1),_0xfd3147=this[\x27pSemiSpherePos\x27],_0x409b23=this[\x27pSemiSphereTex\x27]):_0x4210d9!=_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]&&_0x4210d9!=_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]||(this[\x27CreateCylinder\x27](_0x4210d9,0x0,0x1,0x0,0x1,0x2,0x2),_0xfd3147=this[\x27pCylinderPos\x27],_0x409b23=this[\x27pCylinderTex\x27]);var\x20_0x2fb0ab=this[\x27ctx\x27][\x27createBuffer\x27]();this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0x2fb0ab),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0xfd3147,this[\x27ctx\x27][\x27STATIC_DRAW\x27]),this[\x27vertexPosBuffer\x27]=_0x2fb0ab;var\x20_0x424508=this[\x27ctx\x27][\x27createBuffer\x27]();this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0x424508),this[\x27ctx\x27][\x27bufferData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],_0x409b23,this[\x27ctx\x27][\x27STATIC_DRAW\x27]),this[\x27texturePosBuffer\x27]=_0x424508,this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),0x0==this[\x27b3DPort\x27]&&(_0xfd3147=null,_0x409b23=null);var\x20_0xe77d57=this[\x27InitCamera\x27](_0x4210d9);return\x20_0x26bcbc!=_0xe77d57?_0x32eacf:(this[\x27enDisplayEffect\x27]=_0x4210d9,this[\x27nFECPort\x27]);}},{\x27key\x27:\x27SR_DelSubPort\x27,\x27value\x27:function(_0x104ef1){return\x20null==this[\x27ctx\x27]?_0x127571:(null!=this[\x27pFishParamManager\x27]&&this[\x27nFECPort\x27]==_0x104ef1&&this[\x27pFishParamManager\x27][\x27FreeFECPort\x27](this[\x27nFECPort\x27]),this[\x27enDisplayEffect\x27]=_0x3409b0[\x27SR_DE_NULL\x27],0x0!=this[\x27videoShaderProgram\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteProgram\x27](this[\x27videoShaderProgram\x27]),this[\x27videoShaderProgram\x27]=0x0),0x0!=this[\x27vertexPosBuffer\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteBuffer\x27](this[\x27vertexPosBuffer\x27]),this[\x27vertexPosBuffer\x27]=0x0),0x0!=this[\x27texturePosBuffer\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteBuffer\x27](this[\x27texturePosBuffer\x27]),this[\x27texturePosBuffer\x27]=0x0),this[\x27nMaxPointNum\x27]=0x0,this[\x27pLinePosVertices\x27]=null,this[\x27pLineClrVertices\x27]=null,0x0!=this[\x27glLinePosBuffer\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteBuffer\x27](this[\x27glLinePosBuffer\x27]),this[\x27glLinePosBuffer\x27]=0x0),0x0!=this[\x27glLineTexBuffer\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteBuffer\x27](this[\x27glLineTexBuffer\x27]),this[\x27glLineTexBuffer\x27]=0x0),this[\x27nLineTriangleNum\x27]=0x0,0x0!=this[\x27nLineShaderProgram\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteProgram\x27](this[\x27nLineShaderProgram\x27]),this[\x27nLineShaderProgram\x27]=0x0),this[\x27pFillBlockPosVertices\x27]=null,this[\x27pFillBlockClrVertices\x27]=null,this[\x27nMaxFillBlockTriNum\x27]=0x0,0x0!=this[\x27glBlockPosBuffer\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteBuffer\x27](this[\x27glBlockPosBuffer\x27]),this[\x27glBlockPosBuffer\x27]=0x0),0x0!=this[\x27glBlockClrBuffer\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteBuffer\x27](this[\x27glBlockClrBuffer\x27]),this[\x27glBlockClrBuffer\x27]=0x0),0x0!=this[\x27nBlockShaderProgram\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteProgram\x27](this[\x27nBlockShaderProgram\x27]),this[\x27nBlockShaderProgram\x27]=0x0),this[\x27nDrawFontWidth\x27]=0x0,this[\x27nDrawFontHeight\x27]=0x0,0x0!=this[\x27nFontColorTexture\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteTexture\x27](this[\x27nFontColorTexture\x27]),this[\x27nFontColorTexture\x27]=0x0),this[\x27pFontColorBuffer\x27]=0x0,0x0!=this[\x27nFontShaderProgram\x27]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteProgram\x27](this[\x27nFontShaderProgram\x27]),this[\x27nFontShaderProgram\x27]=0x0),0x0!=this[\x27nCaptureRTTex\x27]&&(this[\x27ctx\x27][\x27deleteTexture\x27](this[\x27nCaptureRTTex\x27]),this[\x27nCaptureRTTex\x27]=0x0),0x0!=this[\x27nCaptureFBO\x27]&&(this[\x27ctx\x27][\x27deleteFramebuffer\x27](this[\x27nCaptureFBO\x27]),this[\x27nCaptureFBO\x27]=0x0),0x0!=this[\x27nCaptureDepthbuffer\x27]&&(this[\x27ctx\x27][\x27deleteRenderbuffer\x27](this[\x27nCaptureDepthbuffer\x27]),this[\x27nCaptureDepthbuffer\x27]=0x0),this[\x27pSemiSpherePos\x27]=null,this[\x27pSemiSphereTex\x27]=null,this[\x27nSemiSpherePosNum\x27]=0x0,this[\x27nSemiSpherePosSize\x27]=0x0,this[\x27nSemiSphereTexSize\x27]=0x0,this[\x27pCylinderPos\x27]=null,this[\x27pCylinderTex\x27]=null,this[\x27nCylinderPosNum\x27]=0x0,this[\x27nCylinderPosSize\x27]=0x0,this[\x27nCylinderTexSize\x27]=0x0,this[\x27fCylinderHeight\x27]=0x0,this[\x27fCylinderRadius\x27]=0x0,this[\x27b3DPort\x27]=!0x1,this[\x27pCamera\x27]=null,this[\x27fRotateX\x27]=0x0,this[\x27fRotateY\x27]=0x0,this[\x27fScale\x27]=0x0,this[\x27pfuncCBIn\x27]=null,this[\x27pfuncCBOut\x27]=null,this[\x27pUserIn\x27]=null,this[\x27pUserOut\x27]=null,this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27CULL_FACE\x27]),this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27DEPTH_TEST\x27]),_0x26bcbc);}},{\x27key\x27:\x27SR_GetFishParam\x27,\x27value\x27:function(_0x532950){return\x20null==_0x532950?_0x4a21f9:null==this[\x27pFishParamManager\x27]?_0x127571:this[\x27pFishParamManager\x27][\x27GetFishParam\x27](this[\x27nFECPort\x27],_0x532950);}},{\x27key\x27:\x27SR_SetFishParam\x27,\x27value\x27:function(_0xe2a4d3){return\x20null==_0xe2a4d3?_0x4a21f9:null==this[\x27pFishParamManager\x27]?_0x127571:this[\x27pFishParamManager\x27][\x27SetFishParam\x27](this[\x27nFECPort\x27],_0xe2a4d3);}},{\x27key\x27:\x27SR_SetDisplayRect\x27,\x27value\x27:function(_0x1580d0,_0x2374ba,_0x224287,_0x5d76e0,_0x2c413e){if(null==this[\x27ctx\x27])return\x20_0x127571;var\x20_0x4c091d=_0x1580d0,_0x4f856b=_0x2374ba,_0x5a063d=_0x1580d0+_0x224287,_0x1c9aaa=_0x2374ba+_0x5d76e0,_0x2d00cf=null,_0x2c9a9e=null;switch(_0x2c413e){case\x20_0x3ff926:if(this[\x27frameDisplayWidth\x27]>0x0&&this[\x27frameDisplayHeight\x27]>0x0){if(this[\x27fSrcUseLeft\x27]=_0x4c091d/this[\x27frameDisplayWidth\x27],this[\x27fSrcUseLeft\x27]<0x0?this[\x27fSrcUseLeft\x27]=0x0:this[\x27fSrcUseLeft\x27]>0x1&&(this[\x27fSrcUseLeft\x27]=0x1),this[\x27fSrcUseTop\x27]=_0x4f856b/this[\x27frameDisplayHeight\x27],this[\x27fSrcUseTop\x27]<0x0?this[\x27fSrcUseTop\x27]=0x0:this[\x27fSrcUseTop\x27]>0x1&&(this[\x27fSrcUseTop\x27]=0x1),this[\x27fSrcUseRight\x27]=_0x5a063d/this[\x27frameDisplayWidth\x27],this[\x27fSrcUseRight\x27]<0x0?this[\x27fSrcUseRight\x27]=0x0:this[\x27fSrcUseRight\x27]>0x1&&(this[\x27fSrcUseRight\x27]=0x1),this[\x27fSrcUseBottom\x27]=_0x1c9aaa/this[\x27frameDisplayHeight\x27],this[\x27fSrcUseBottom\x27]<0x0?this[\x27fSrcUseBottom\x27]=0x0:this[\x27fSrcUseBottom\x27]>0x1&&(this[\x27fSrcUseBottom\x27]=0x1),this[\x27fSrcUseLeft\x27]>=this[\x27fSrcUseRight\x27]||this[\x27fSrcUseTop\x27]>=this[\x27fSrcUseBottom\x27])return\x20_0x4a21f9;_0x2d00cf=new\x20Float32Array([this[\x27fSrcUseLeft\x27],this[\x27fSrcUseBottom\x27],this[\x27fSrcUseLeft\x27],this[\x27fSrcUseTop\x27],this[\x27fSrcUseRight\x27],this[\x27fSrcUseTop\x27],this[\x27fSrcUseRight\x27],this[\x27fSrcUseBottom\x27]]);}else\x20_0x2d00cf=new\x20Float32Array([0x0,0x1,0x0,0x0,0x1,0x0,0x1,0x1]);this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27texturePosBuffer\x27]),this[\x27ctx\x27][\x27bufferSubData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],0x0,_0x2d00cf),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),_0x2d00cf=null;break;case\x20_0x5ee8f0:if(this[\x27frameDisplayWidth\x27]>0x0&&this[\x27frameDisplayHeight\x27]>0x0){if(this[\x27fDstUseLeft\x27]=_0x4c091d/this[\x27frameDisplayWidth\x27],this[\x27fDstUseLeft\x27]<0x0?this[\x27fDstUseLeft\x27]=0x0:this[\x27fDstUseLeft\x27]>0x1&&(this[\x27fDstUseLeft\x27]=0x1),this[\x27fDstUseTop\x27]=_0x4f856b/this[\x27frameDisplayHeight\x27],this[\x27fDstUseTop\x27]<0x0?this[\x27fDstUseTop\x27]=0x0:this[\x27fDstUseTop\x27]>0x1&&(this[\x27fDstUseTop\x27]=0x1),this[\x27fDstUseRight\x27]=_0x5a063d/this[\x27frameDisplayWidth\x27],this[\x27fDstUseRight\x27]<0x0?this[\x27fDstUseRight\x27]=0x0:this[\x27fDstUseRight\x27]>0x1&&(this[\x27fDstUseRight\x27]=0x1),this[\x27fDstUseBottom\x27]=_0x1c9aaa/this[\x27frameDisplayHeight\x27],this[\x27fDstUseBottom\x27]<0x0?this[\x27fDstUseBottom\x27]=0x0:this[\x27fDstUseBottom\x27]>0x1&&(this[\x27fDstUseBottom\x27]=0x1),this[\x27fDstUseLeft\x27]>=this[\x27fDstUseRight\x27]||this[\x27fDstUseTop\x27]>=this[\x27fDstUseBottom\x27])return\x20_0x4a21f9;(_0x2c9a9e=new\x20Float32Array(0xc))[0x0]=0x2*this[\x27fDstUseLeft\x27]-0x1,_0x2c9a9e[0x1]=0x1-0x2*this[\x27fDstUseBottom\x27],_0x2c9a9e[0x2]=0x0,_0x2c9a9e[0x3]=0x2*this[\x27fDstUseLeft\x27]-0x1,_0x2c9a9e[0x4]=0x1-0x2*this[\x27fDstUseTop\x27],_0x2c9a9e[0x5]=0x0,_0x2c9a9e[0x6]=0x2*this[\x27fDstUseRight\x27]-0x1,_0x2c9a9e[0x7]=0x1-0x2*this[\x27fDstUseTop\x27],_0x2c9a9e[0x8]=0x0,_0x2c9a9e[0x9]=0x2*this[\x27fDstUseRight\x27]-0x1,_0x2c9a9e[0xa]=0x1-0x2*this[\x27fDstUseBottom\x27],_0x2c9a9e[0xb]=0x0,this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27vertexPosBuffer\x27]),this[\x27ctx\x27][\x27bufferSubData\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],0x0,_0x2c9a9e),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null),_0x2c9a9e=null;}}return\x20_0x26bcbc;}},{\x27key\x27:\x27SR_Destroy\x27,\x27value\x27:function(){if(null==this[\x27ctx\x27])return\x20_0x127571;this[\x27frameDisplayWidth\x27]=0x0,this[\x27frameDisplayHeight\x27]=0x0,this[\x27pFrameData\x27]=null;for(var\x20_0x4de26f=0x0;_0x4de26f<this[\x27nTextureNum\x27];_0x4de26f++)0x0!=this[\x27nSurfaceTexture\x27][_0x4de26f]&&null!=this[\x27ctx\x27]&&(this[\x27ctx\x27][\x27deleteTexture\x27](this[\x27nSurfaceTexture\x27][_0x4de26f]),this[\x27nSurfaceTexture\x27][_0x4de26f]=0x0);return\x20this[\x27SR_DelSubPort\x27](this[\x27nFECPort\x27]),this[\x27onlySupportedWebGL1\x27]=!0x1,this[\x27bAntialias\x27]=!0x1,this[\x27bRecreateTex\x27]=!0x0,this[\x27pFishParamManager\x27]=null,this[\x27canvas\x27]=null,this[\x27ctx\x27][\x27getExtension\x27](\x27WEBGL_lose_context\x27)[\x27loseContext\x27](),this[\x27ctx\x27]=null,_0x26bcbc;}},{\x27key\x27:\x27SR_SetCanvasSize\x27,\x27value\x27:function(_0xda507a,_0x41b1e1){return\x20this[\x27canvas\x27][\x27width\x27]=_0xda507a,this[\x27canvas\x27][\x27height\x27]=_0x41b1e1,_0x26bcbc;}},{\x27key\x27:\x27SR_GetCanvasSize\x27,\x27value\x27:function(){return\x20console[\x27log\x27](\x27canvas\x5cx20width:\x27+this[\x27canvas\x27][\x27width\x27]+\x27,height:\x27+this[\x27canvas\x27][\x27height\x27]),_0x26bcbc;}},{\x27key\x27:\x27SR_SetAntialias\x27,\x27value\x27:function(_0x28ebcf){return\x200x1==this[\x27onlySupportedWebGL1\x27]?_0x388f7c:(this[\x27bAntialias\x27]!=_0x28ebcf&&(this[\x27bRecreateTex\x27]=!0x0,this[\x27bAntialias\x27]=_0x28ebcf),_0x26bcbc);}},{\x27key\x27:\x27SR_SetPTZDisplayMode\x27,\x27value\x27:function(_0x45ccff){return\x20null==this[\x27pFishParamManager\x27]?_0x127571:this[\x27pFishParamManager\x27][\x27SetPTZDisplayMode\x27](_0x45ccff);}},{\x27key\x27:\x27SR_SetFishParamManager\x27,\x27value\x27:function(_0x35bb01){return\x20null!=this[\x27pFishParamManager\x27]?_0x388f7c:(this[\x27pFishParamManager\x27]=_0x35bb01,_0x26bcbc);}},{\x27key\x27:\x27CreateSemiSphere\x27,\x27value\x27:function(_0x4d906e,_0x2a4672,_0x2176f2,_0x4951ee){if(null!=this[\x27pSemiSpherePos\x27]||null!=this[\x27pSemiSphereTex\x27])return\x20_0x127571;this[\x27pSemiSpherePos\x27]=new\x20Float32Array(0xa8c0),this[\x27pSemiSphereTex\x27]=new\x20Float32Array(0x7080);for(var\x20_0x2c2d62=(_0x2a4672-_0x4d906e)/(_0x4951ee-_0x2176f2),_0x5ea693=(_0x2a4672-_0x4d906e)/0x2*0x1,_0x31851a=6.2831852/0x3c,_0x323f08=0.0392699075,_0x5951b3=0x0,_0x14dff2=0x0,_0xd1f622=0x0,_0x219c42=0x0;_0x219c42<0x3c;++_0x219c42)for(var\x20_0x52e897=0x0;_0x52e897<0x28;++_0x52e897){var\x20_0x19747a=_0x219c42*_0x31851a;0x0==_0x219c42&&(_0x5951b3=_0x19747a);var\x20_0x114a9c=0x3b==_0x219c42?_0x5951b3:(_0x219c42+0x1)*_0x31851a,_0x287e63=-_0x52e897*_0x323f08,_0xe1d87=-(_0x52e897+0x1)*_0x323f08,_0x566486=void\x200x0,_0x56640c=void\x200x0;this[\x27pSemiSpherePos\x27][_0x14dff2]=-0x1*Math[\x27cos\x27](_0x287e63)*Math[\x27cos\x27](_0x19747a),this[\x27pSemiSpherePos\x27][_0x14dff2+0x1]=0x1*Math[\x27sin\x27](_0x287e63),this[\x27pSemiSpherePos\x27][_0x14dff2+0x2]=-0x1*Math[\x27cos\x27](_0x287e63)*Math[\x27sin\x27](_0x19747a),_0x56640c=0.5-0.5*(0x1+_0x287e63/1.5707963)*Math[\x27sin\x27](_0x19747a),_0x566486=0.5-0.5*(0x1+_0x287e63/1.5707963)*Math[\x27cos\x27](_0x19747a),this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x566486*_0x5ea693+0x1*_0x4d906e)/0x1,this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x56640c*_0x5ea693+_0x2176f2*_0x2c2d62)/_0x2c2d62,_0x14dff2+=0x3,this[\x27pSemiSpherePos\x27][_0x14dff2]=-0x1*Math[\x27cos\x27](_0xe1d87)*Math[\x27cos\x27](_0x19747a),this[\x27pSemiSpherePos\x27][_0x14dff2+0x1]=0x1*Math[\x27sin\x27](_0xe1d87),this[\x27pSemiSpherePos\x27][_0x14dff2+0x2]=-0x1*Math[\x27cos\x27](_0xe1d87)*Math[\x27sin\x27](_0x19747a),_0x56640c=0.5-0.5*(0x1+_0xe1d87/1.5707963)*Math[\x27sin\x27](_0x19747a),_0x566486=0.5-0.5*(0x1+_0xe1d87/1.5707963)*Math[\x27cos\x27](_0x19747a),this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x566486*_0x5ea693+0x1*_0x4d906e)/0x1,this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x56640c*_0x5ea693+_0x2176f2*_0x2c2d62)/_0x2c2d62,_0x14dff2+=0x3,this[\x27pSemiSpherePos\x27][_0x14dff2]=-0x1*Math[\x27cos\x27](_0x287e63)*Math[\x27cos\x27](_0x114a9c),this[\x27pSemiSpherePos\x27][_0x14dff2+0x1]=0x1*Math[\x27sin\x27](_0x287e63),this[\x27pSemiSpherePos\x27][_0x14dff2+0x2]=-0x1*Math[\x27cos\x27](_0x287e63)*Math[\x27sin\x27](_0x114a9c),_0x56640c=0.5-0.5*(0x1+_0x287e63/1.5707963)*Math[\x27sin\x27](_0x114a9c),_0x566486=0.5-0.5*(0x1+_0x287e63/1.5707963)*Math[\x27cos\x27](_0x114a9c),this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x566486*_0x5ea693+0x1*_0x4d906e)/0x1,this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x56640c*_0x5ea693+_0x2176f2*_0x2c2d62)/_0x2c2d62,_0x14dff2+=0x3,this[\x27pSemiSpherePos\x27][_0x14dff2]=-0x1*Math[\x27cos\x27](_0x287e63)*Math[\x27cos\x27](_0x114a9c),this[\x27pSemiSpherePos\x27][_0x14dff2+0x1]=0x1*Math[\x27sin\x27](_0x287e63),this[\x27pSemiSpherePos\x27][_0x14dff2+0x2]=-0x1*Math[\x27cos\x27](_0x287e63)*Math[\x27sin\x27](_0x114a9c),_0x56640c=0.5-0.5*(0x1+_0x287e63/1.5707963)*Math[\x27sin\x27](_0x114a9c),_0x566486=0.5-0.5*(0x1+_0x287e63/1.5707963)*Math[\x27cos\x27](_0x114a9c),this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x566486*_0x5ea693+0x1*_0x4d906e)/0x1,this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x56640c*_0x5ea693+_0x2176f2*_0x2c2d62)/_0x2c2d62,_0x14dff2+=0x3,this[\x27pSemiSpherePos\x27][_0x14dff2]=-0x1*Math[\x27cos\x27](_0xe1d87)*Math[\x27cos\x27](_0x19747a),this[\x27pSemiSpherePos\x27][_0x14dff2+0x1]=0x1*Math[\x27sin\x27](_0xe1d87),this[\x27pSemiSpherePos\x27][_0x14dff2+0x2]=-0x1*Math[\x27cos\x27](_0xe1d87)*Math[\x27sin\x27](_0x19747a),_0x56640c=0.5-0.5*(0x1+_0xe1d87/1.5707963)*Math[\x27sin\x27](_0x19747a),_0x566486=0.5-0.5*(0x1+_0xe1d87/1.5707963)*Math[\x27cos\x27](_0x19747a),this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x566486*_0x5ea693+0x1*_0x4d906e)/0x1,this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x56640c*_0x5ea693+_0x2176f2*_0x2c2d62)/_0x2c2d62,_0x14dff2+=0x3,this[\x27pSemiSpherePos\x27][_0x14dff2]=-0x1*Math[\x27cos\x27](_0xe1d87)*Math[\x27cos\x27](_0x114a9c),this[\x27pSemiSpherePos\x27][_0x14dff2+0x1]=0x1*Math[\x27sin\x27](_0xe1d87),this[\x27pSemiSpherePos\x27][_0x14dff2+0x2]=-0x1*Math[\x27cos\x27](_0xe1d87)*Math[\x27sin\x27](_0x114a9c),_0x56640c=0.5-0.5*(0x1+_0xe1d87/1.5707963)*Math[\x27sin\x27](_0x114a9c),_0x566486=0.5-0.5*(0x1+_0xe1d87/1.5707963)*Math[\x27cos\x27](_0x114a9c),this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x566486*_0x5ea693+0x1*_0x4d906e)/0x1,this[\x27pSemiSphereTex\x27][_0xd1f622++]=(0x2*_0x56640c*_0x5ea693+_0x2176f2*_0x2c2d62)/_0x2c2d62,_0x14dff2+=0x3;}return\x20this[\x27nSemiSpherePosNum\x27]=_0x14dff2/0x3,this[\x27nSemiSpherePosSize\x27]=0x3,this[\x27nSemiSphereTexSize\x27]=0x2,_0x26bcbc;}},{\x27key\x27:\x27CreateCylinder\x27,\x27value\x27:function(_0x5dbbec,_0x520c84,_0x450775,_0x3032fb,_0x20a582,_0x587d4a,_0x550fc6){if(null!=this[\x27pCylinderPos\x27]||null!=this[\x27pCylinderTex\x27])return\x20_0x127571;if(Math[\x27abs\x27](_0x587d4a-0x0)<_0x423dca)this[\x27fCylinderHeight\x27]=0x2;else{if(_0x587d4a<0.5||_0x587d4a>0x6)return\x20_0x4a21f9;this[\x27fCylinderHeight\x27]=_0x587d4a;}if(Math[\x27abs\x27](_0x550fc6-0x0)<_0x423dca)this[\x27fCylinderRadius\x27]=_0x5dbbec==_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]||_0x5dbbec==_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]?0x2:0x1;else{if(_0x550fc6<0.5||_0x550fc6>0x4)return\x20_0x4a21f9;this[\x27fCylinderRadius\x27]=_0x550fc6;}if(this[\x27pCylinderPos\x27]=new\x20Float32Array(0xa8c0),this[\x27pCylinderTex\x27]=new\x20Float32Array(0x7080),null==this[\x27pCylinderPos\x27]||null==this[\x27pCylinderTex\x27])return\x20this[\x27pCylinderPos\x27]=null,this[\x27pCylinderTex\x27]=null,_0x460c4d;for(var\x20_0x3b1672=(_0x450775-_0x520c84)/(_0x20a582-_0x3032fb),_0x1f018e=(_0x450775-_0x520c84)/0x2*0x1,_0x52d863=6.2831852/0x3c,_0x3d72ac=this[\x27fCylinderHeight\x27]/_0x285a59,_0x1450ab=0x0,_0x51450e=0x0,_0x1f80f6=0x0;_0x1f80f6<0x3c;++_0x1f80f6)for(var\x20_0x46b7c6=0x0;_0x46b7c6<_0x285a59;++_0x46b7c6){var\x20_0x566996=_0x1f80f6*_0x52d863,_0x8dd583=(_0x1f80f6+0x1)*_0x52d863,_0x5bcdf4=void\x200x0,_0x3d3061=void\x200x0;this[\x27pCylinderPos\x27][_0x1450ab]=-this[\x27fCylinderRadius\x27]*Math[\x27sin\x27](_0x566996),this[\x27pCylinderPos\x27][_0x1450ab+0x1]=this[\x27fCylinderHeight\x27]/0x2-_0x46b7c6*_0x3d72ac,this[\x27pCylinderPos\x27][_0x1450ab+0x2]=-this[\x27fCylinderRadius\x27]*Math[\x27cos\x27](_0x566996),_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]==_0x5dbbec||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]==_0x5dbbec?(_0x5bcdf4=0.5+(0.1+0.01*_0x46b7c6)*Math[\x27sin\x27](_0x566996),_0x3d3061=0.5+(0.1+0.01*_0x46b7c6)*Math[\x27cos\x27](_0x566996)):(_0x5bcdf4=0.5-(0.5-0.01*_0x46b7c6)*Math[\x27sin\x27](_0x566996),_0x3d3061=0.5+(0.5-0.01*_0x46b7c6)*Math[\x27cos\x27](_0x566996)),this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x5bcdf4*_0x1f018e+0x1*_0x520c84)/0x1,this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x3d3061*_0x1f018e+_0x3032fb*_0x3b1672)/_0x3b1672,_0x1450ab+=0x3,this[\x27pCylinderPos\x27][_0x1450ab]=-this[\x27fCylinderRadius\x27]*Math[\x27sin\x27](_0x566996),this[\x27pCylinderPos\x27][_0x1450ab+0x1]=this[\x27fCylinderHeight\x27]/0x2-(_0x46b7c6+0x1)*_0x3d72ac,this[\x27pCylinderPos\x27][_0x1450ab+0x2]=-this[\x27fCylinderRadius\x27]*Math[\x27cos\x27](_0x566996),_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]==_0x5dbbec||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]==_0x5dbbec?(_0x5bcdf4=0.5+(0.1+0.01*(_0x46b7c6+0x1))*Math[\x27sin\x27](_0x566996),_0x3d3061=0.5+(0.1+0.01*(_0x46b7c6+0x1))*Math[\x27cos\x27](_0x566996)):(_0x5bcdf4=0.5-(0.5-0.01*(_0x46b7c6+0x1))*Math[\x27sin\x27](_0x566996),_0x3d3061=0.5+(0.5-0.01*(_0x46b7c6+0x1))*Math[\x27cos\x27](_0x566996)),this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x5bcdf4*_0x1f018e+0x1*_0x520c84)/0x1,this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x3d3061*_0x1f018e+_0x3032fb*_0x3b1672)/_0x3b1672,_0x1450ab+=0x3,this[\x27pCylinderPos\x27][_0x1450ab]=-this[\x27fCylinderRadius\x27]*Math[\x27sin\x27](_0x8dd583),this[\x27pCylinderPos\x27][_0x1450ab+0x1]=this[\x27fCylinderHeight\x27]/0x2-_0x46b7c6*_0x3d72ac,this[\x27pCylinderPos\x27][_0x1450ab+0x2]=-this[\x27fCylinderRadius\x27]*Math[\x27cos\x27](_0x8dd583),_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]==_0x5dbbec||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]==_0x5dbbec?(_0x5bcdf4=0.5+(0.1+0.01*_0x46b7c6)*Math[\x27sin\x27](_0x8dd583),_0x3d3061=0.5+(0.1+0.01*_0x46b7c6)*Math[\x27cos\x27](_0x8dd583)):(_0x5bcdf4=0.5-(0.5-0.01*_0x46b7c6)*Math[\x27sin\x27](_0x8dd583),_0x3d3061=0.5+(0.5-0.01*_0x46b7c6)*Math[\x27cos\x27](_0x8dd583)),this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x5bcdf4*_0x1f018e+0x1*_0x520c84)/0x1,this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x3d3061*_0x1f018e+_0x3032fb*_0x3b1672)/_0x3b1672,_0x1450ab+=0x3,this[\x27pCylinderPos\x27][_0x1450ab]=-this[\x27fCylinderRadius\x27]*Math[\x27sin\x27](_0x8dd583),this[\x27pCylinderPos\x27][_0x1450ab+0x1]=this[\x27fCylinderHeight\x27]/0x2-_0x46b7c6*_0x3d72ac,this[\x27pCylinderPos\x27][_0x1450ab+0x2]=-this[\x27fCylinderRadius\x27]*Math[\x27cos\x27](_0x8dd583),_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]==_0x5dbbec||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]==_0x5dbbec?(_0x5bcdf4=0.5+(0.1+0.01*_0x46b7c6)*Math[\x27sin\x27](_0x8dd583),_0x3d3061=0.5+(0.1+0.01*_0x46b7c6)*Math[\x27cos\x27](_0x8dd583)):(_0x5bcdf4=0.5-(0.5-0.01*_0x46b7c6)*Math[\x27sin\x27](_0x8dd583),_0x3d3061=0.5+(0.5-0.01*_0x46b7c6)*Math[\x27cos\x27](_0x8dd583)),this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x5bcdf4*_0x1f018e+0x1*_0x520c84)/0x1,this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x3d3061*_0x1f018e+_0x3032fb*_0x3b1672)/_0x3b1672,_0x1450ab+=0x3,this[\x27pCylinderPos\x27][_0x1450ab]=-this[\x27fCylinderRadius\x27]*Math[\x27sin\x27](_0x566996),this[\x27pCylinderPos\x27][_0x1450ab+0x1]=this[\x27fCylinderHeight\x27]/0x2-(_0x46b7c6+0x1)*_0x3d72ac,this[\x27pCylinderPos\x27][_0x1450ab+0x2]=-this[\x27fCylinderRadius\x27]*Math[\x27cos\x27](_0x566996),_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]==_0x5dbbec||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]==_0x5dbbec?(_0x5bcdf4=0.5+(0.1+0.01*(_0x46b7c6+0x1))*Math[\x27sin\x27](_0x566996),_0x3d3061=0.5+(0.1+0.01*(_0x46b7c6+0x1))*Math[\x27cos\x27](_0x566996)):(_0x5bcdf4=0.5-(0.5-0.01*(_0x46b7c6+0x1))*Math[\x27sin\x27](_0x566996),_0x3d3061=0.5+(0.5-0.01*(_0x46b7c6+0x1))*Math[\x27cos\x27](_0x566996)),this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x5bcdf4*_0x1f018e+0x1*_0x520c84)/0x1,this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x3d3061*_0x1f018e+_0x3032fb*_0x3b1672)/_0x3b1672,_0x1450ab+=0x3,this[\x27pCylinderPos\x27][_0x1450ab]=-this[\x27fCylinderRadius\x27]*Math[\x27sin\x27](_0x8dd583),this[\x27pCylinderPos\x27][_0x1450ab+0x1]=this[\x27fCylinderHeight\x27]/0x2-(_0x46b7c6+0x1)*_0x3d72ac,this[\x27pCylinderPos\x27][_0x1450ab+0x2]=-this[\x27fCylinderRadius\x27]*Math[\x27cos\x27](_0x8dd583),_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]==_0x5dbbec||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]==_0x5dbbec?(_0x5bcdf4=0.5+(0.1+0.01*(_0x46b7c6+0x1))*Math[\x27sin\x27](_0x8dd583),_0x3d3061=0.5+(0.1+0.01*(_0x46b7c6+0x1))*Math[\x27cos\x27](_0x8dd583)):(_0x5bcdf4=0.5-(0.5-0.01*(_0x46b7c6+0x1))*Math[\x27sin\x27](_0x8dd583),_0x3d3061=0.5+(0.5-0.01*(_0x46b7c6+0x1))*Math[\x27cos\x27](_0x8dd583)),this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x5bcdf4*_0x1f018e+0x1*_0x520c84)/0x1,this[\x27pCylinderTex\x27][_0x51450e++]=(0x2*_0x3d3061*_0x1f018e+_0x3032fb*_0x3b1672)/_0x3b1672,_0x1450ab+=0x3;}this[\x27nCylinderPosNum\x27]=_0x1450ab/0x3,this[\x27nCylinderPosSize\x27]=0x3,this[\x27nCylinderTexSize\x27]=0x2;}},{\x27key\x27:\x27InitCamera\x27,\x27value\x27:function(_0x4fa1bf){if(null!=this[\x27pCamera\x27])return\x20SR_ERR_CALL_ORDER;switch(_0x4fa1bf){case\x20_0x3409b0[\x27SR_DE_NULL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:return\x20_0x26bcbc;case\x20_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:if(this[\x27pCamera\x27]=new\x20_0x8b82ce(),null==this[\x27pCamera\x27])return\x20_0x460c4d;this[\x27pCamera\x27][\x27SetFov\x27](_0x264b0d),this[\x27pCamera\x27][\x27SetNear\x27](_0x47285b),this[\x27pCamera\x27][\x27SetFar\x27](_0x4d28a5),this[\x27fRotateX\x27]=1.57,this[\x27pCamera\x27][\x27SetPitch\x27](3.14-this[\x27fRotateX\x27]),this[\x27fScale\x27]=0x3,this[\x27pCamera\x27][\x27SetScale\x27](this[\x27fScale\x27]);break;case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]:if(this[\x27pCamera\x27]=new\x20_0x8b82ce(),null==this[\x27pCamera\x27])return\x20_0x460c4d;this[\x27pCamera\x27][\x27SetFov\x27](_0x264b0d),this[\x27pCamera\x27][\x27SetNear\x27](_0x47285b),this[\x27pCamera\x27][\x27SetFar\x27](_0x4d28a5),this[\x27fRotateX\x27]=0.785,this[\x27pCamera\x27][\x27SetPitch\x27](-this[\x27fRotateX\x27]),this[\x27fScale\x27]=0x6,this[\x27pCamera\x27][\x27SetScale\x27](this[\x27fScale\x27]);break;case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]:if(this[\x27pCamera\x27]=new\x20_0x8b82ce(),null==this[\x27pCamera\x27])return\x20_0x460c4d;this[\x27pCamera\x27][\x27SetOrtho\x27](!0x0),this[\x27pCamera\x27][\x27SetNear\x27](_0x47285b),this[\x27pCamera\x27][\x27SetFar\x27](_0x4d28a5),this[\x27fScale\x27]=0x3,this[\x27pCamera\x27][\x27SetScale\x27](this[\x27fScale\x27]);break;default:return\x20_0x388f7c;}return\x20_0x26bcbc;}},{\x27key\x27:\x27SR_SetViewParam\x27,\x27value\x27:function(_0x3b93c6,_0x395b42){if(!this[\x27b3DPort\x27])return\x20_0x388f7c;switch(_0x3b93c6){case\x20_0x33678f:this[\x27fRotateX\x27]=_0x395b42;break;case\x20_0x5e29f3:this[\x27fRotateY\x27]=_0x395b42;break;case\x20_0x263bcd:if(this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]){if(_0x395b42<-0.8||_0x395b42>0x384)return\x20_0x4a21f9;}else{if((this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]||this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27])&&(_0x395b42<0x0||_0x395b42>0x384))return\x20_0x4a21f9;}this[\x27fScale\x27]=_0x395b42;break;default:return\x20_0x388f7c;}return\x20_0x26bcbc;}},{\x27key\x27:\x27SR_GetViewParam\x27,\x27value\x27:function(_0x32c677,_0x4289b2){if(!this[\x27b3DPort\x27])return\x20_0x127571;var\x20_0x20da47=0x0;switch(_0x32c677){case\x20_0x33678f:_0x20da47=this[\x27fRotateX\x27];break;case\x20_0x5e29f3:_0x20da47=this[\x27fRotateY\x27];break;case\x20_0x263bcd:_0x20da47=this[\x27fScale\x27];}return\x20_0x4289b2[\x27fValue\x27]=_0x20da47,_0x26bcbc;}},{\x27key\x27:\x27SR_SetCallBack\x27,\x27value\x27:function(_0x3256b1,_0x2af696,_0x235924){switch(_0x235924){case\x20_0x328161:this[\x27pfuncCBIn\x27]=_0x3256b1,this[\x27pUserIn\x27]=_0x2af696;break;case\x20_0x2e799f:this[\x27pfuncCBOut\x27]=_0x3256b1,this[\x27pUserOut\x27]=_0x2af696;break;default:return\x20_0x388f7c;}return\x20_0x26bcbc;}},{\x27key\x27:\x27SR_SetRenderState\x27,\x27value\x27:function(_0x56af76,_0x44616d){switch(_0x56af76){case\x20_0x27db0f:if(this[\x27b3DPort\x27])return\x20_0x388f7c;break;case\x20_0xa35613:if(!this[\x27b3DPort\x27])return\x20_0x388f7c;Math[\x27abs\x27](_0x44616d-0x0)<_0x423dca?this[\x27bCullBack\x27]=!0x1:this[\x27bCullBack\x27]=!0x0;break;default:return\x20_0x388f7c;}return\x20_0x26bcbc;}},{\x27key\x27:\x27SR_SetPTZColor\x27,\x27value\x27:function(_0x1e4b3c,_0x2b713d){return\x20null==this[\x27pFishParamManager\x27]?_0x127571:this[\x27pFishParamManager\x27][\x27SetPTZColor\x27](_0x1e4b3c,_0x2b713d);}},{\x27key\x27:\x27SR_GetPTZColor\x27,\x27value\x27:function(_0x1f2031,_0x1a05e5){return\x20null==this[\x27pFishParamManager\x27]?_0x127571:this[\x27pFishParamManager\x27][\x27GetPTZColor\x27](_0x1f2031,_0x1a05e5);}},{\x27key\x27:\x27SR_SetPTZPort\x27,\x27value\x27:function(_0x2fb061){return\x20null==this[\x27pFishParamManager\x27]?_0x127571:this[\x27pFishParamManager\x27][\x27SetPTZPort\x27](_0x2fb061);}},{\x27key\x27:\x27SR_GetPTZPort\x27,\x27value\x27:function(_0x81773b,_0xf9875d,_0x22a893){return\x20null==this[\x27pFishParamManager\x27]?_0x127571:null==_0x22a893?_0x4a21f9:this[\x27pFishParamManager\x27][\x27GetPTZPort\x27](_0x81773b,_0xf9875d,_0x22a893);}},{\x27key\x27:\x27SR_GetCaptureSize\x27,\x27value\x27:function(_0x5b1cda){if(null==_0x5b1cda)return\x20_0x4a21f9;if(null==this[\x27ctx\x27])return\x20_0x127571;if(null==_0x5b1cda[\x27nWidth\x27]||null==_0x5b1cda[\x27nWidth\x27]||null==_0x5b1cda[\x27nHeight\x27]||null==_0x5b1cda[\x27nHeight\x27])return\x20_0x4a21f9;var\x20_0x1ec492=0x0,_0x355821=0x0;if(0x0==_0x5b1cda[\x27nWidth\x27]&&0x0==_0x5b1cda[\x27nHeight\x27])switch(this[\x27enDisplayEffect\x27]){case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:_0x1ec492=Math[\x27round\x27](0x5*this[\x27frameDisplayHeight\x27]/0x8),_0x355821=Math[\x27round\x27](0x3*_0x1ec492/0x4);break;case\x20_0x3409b0[\x27SR_DE_NULL\x27]:_0x1ec492=Math[\x27round\x27]((this[\x27fSrcUseRight\x27]-this[\x27fSrcUseLeft\x27])*this[\x27frameDisplayWidth\x27]),_0x355821=Math[\x27round\x27]((this[\x27fSrcUseBottom\x27]-this[\x27fSrcUseTop\x27])*this[\x27frameDisplayHeight\x27]);break;case\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_VERTICAL_WALL\x27]:_0x1ec492=Math[\x27round\x27](this[\x27frameDisplayWidth\x27]),_0x355821=Math[\x27round\x27](this[\x27frameDisplayHeight\x27]);break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:this[\x27frameDisplayHeight\x27]>=0x800?(_0x1ec492=0x1800,_0x355821=0x360):this[\x27frameDisplayHeight\x27]>=0x600&&0x800>this[\x27frameDisplayHeight\x27]?(_0x1ec492=0x1000,_0x355821=0x240):(_0x1ec492=Math[\x27round\x27](3.14*this[\x27frameDisplayHeight\x27]/1.6),_0x355821=Math[\x27round\x27](0x9*this[\x27frameDisplayWidth\x27]/0x10),_0x1ec492=Math[\x27round\x27](0x2*_0x1ec492),_0x355821=Math[\x27round\x27](_0x355821/0x2));break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]:this[\x27frameDisplayHeight\x27]>=0xc00?(_0x1ec492=0x1000,_0x355821=0x900):this[\x27frameDisplayHeight\x27]>=0x800&&0xc00>this[\x27frameDisplayHeight\x27]?(_0x1ec492=0xc00,_0x355821=0x6c0):this[\x27frameDisplayHeight\x27]>=0x600&&0x800>this[\x27frameDisplayHeight\x27]?(_0x1ec492=0x800,_0x355821=0x480):(_0x1ec492=Math[\x27round\x27](3.14*this[\x27frameDisplayHeight\x27]/1.6),_0x355821=Math[\x27round\x27](0x9*_0x1ec492/0x10));break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:_0x1ec492=Math[\x27round\x27](this[\x27frameDisplayHeight\x27]),_0x355821=Math[\x27round\x27](0x9*_0x1ec492/0x10);break;default:return\x20_0x4a21f9;}else\x20_0x1ec492=Math[\x27round\x27](_0x5b1cda[\x27nWidth\x27]),_0x355821=Math[\x27round\x27](_0x5b1cda[\x27nHeight\x27]);return\x20_0x1ec492<0x10||_0x355821<0x10?_0x4a21f9:(this[\x27nCaptureWidth\x27]=0x4*Math[\x27round\x27](_0x1ec492/0x4),this[\x27nCaptureHeight\x27]=Math[\x27round\x27](_0x355821),_0x5b1cda[\x27nWidth\x27]=this[\x27nCaptureWidth\x27],_0x5b1cda[\x27nHeight\x27]=this[\x27nCaptureHeight\x27],_0x5b1cda[\x27nBufferLen\x27]=this[\x27nCaptureWidth\x27]*this[\x27nCaptureHeight\x27]*0x4,_0x26bcbc);}},{\x27key\x27:\x27SR_CaptureScreen\x27,\x27value\x27:function(_0x508b58){var\x20_0x4320db=_0x26bcbc;if(_0x4320db=this[\x27_BeginCapture\x27](),_0x26bcbc!=_0x4320db)return\x20_0x4320db;if(0x0==this[\x27videoShaderProgram\x27]||0x0==this[\x27vertexPosBuffer\x27]||0x0==this[\x27texturePosBuffer\x27])return\x20_0x127571;this[\x27ctx\x27][\x27useProgram\x27](this[\x27videoShaderProgram\x27]),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27vertexPosBuffer\x27]);var\x20_0x5642bc=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27videoShaderProgram\x27],\x27xy\x27);if(_0x5642bc<0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x5642bc,0x3,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x5642bc),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],this[\x27texturePosBuffer\x27]);var\x20_0x5863fa=this[\x27ctx\x27][\x27getAttribLocation\x27](this[\x27videoShaderProgram\x27],\x27uv\x27);if(_0x5863fa<0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27vertexAttribPointer\x27](_0x5863fa,0x2,this[\x27ctx\x27][\x27FLOAT\x27],!0x1,0x0,0x0),this[\x27ctx\x27][\x27enableVertexAttribArray\x27](_0x5863fa),this[\x27ctx\x27][\x27bindBuffer\x27](this[\x27ctx\x27][\x27ARRAY_BUFFER\x27],null);var\x20_0x1b0603=this[\x27enDisplayEffect\x27],_0x186151=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27bCapture\x27);if(_0x186151<=0x0)return\x20_0x4cfdfb;switch(this[\x27ctx\x27][\x27uniform1i\x27](_0x186151,0x1),_0x1b0603){case\x20_0x3409b0[\x27SR_DE_NULL\x27]:break;case\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:if(null==this[\x27pFishParamManager\x27])return\x20_0x127571;var\x20_0x500400={};if(_0x4320db=this[\x27pFishParamManager\x27][\x27GetRenderParam\x27](this[\x27nFECPort\x27],_0x500400),_0x26bcbc!=_0x4320db)return\x20_0x4320db;if(_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]==_0x1b0603){var\x20_0x5b52dc=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27bBlack\x27);if(_0x5b52dc<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1i\x27](_0x5b52dc,_0x500400[\x27bBlack\x27]);var\x20_0x431fdc=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27bCut\x27);if(_0x431fdc<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1i\x27](_0x431fdc,_0x500400[\x27bCut\x27]);}if(_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]==_0x1b0603||_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]==_0x1b0603||_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]==_0x1b0603){var\x20_0x2283df=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fHAngleCos\x27);if(_0x2283df<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x2283df,_0x500400[\x27fCosH\x27]);var\x20_0x4a1872=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fHAngleSin\x27);if(_0x4a1872<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x4a1872,_0x500400[\x27fSinH\x27]);var\x20_0x371b50=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fVAngleCos\x27);if(_0x371b50<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x371b50,_0x500400[\x27fCosV\x27]);var\x20_0x49462f=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fVAngleSin\x27);if(_0x49462f<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x49462f,_0x500400[\x27fSinV\x27]);var\x20_0x4cb7c2=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fZoom\x27);if(_0x4cb7c2<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x4cb7c2,_0x500400[\x27fZoom\x27]);}if(_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]==_0x1b0603||_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]==_0x1b0603||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]==_0x1b0603||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]==_0x1b0603){var\x20_0x3aa253=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fAngle\x27);if(_0x3aa253<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x3aa253,_0x500400[\x27fAngle\x27]);}var\x20_0x70c69a=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRX1\x27);if(_0x70c69a<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x70c69a,_0x500400[\x27fRXLeft\x27]);var\x20_0x2ad205=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRX2\x27);if(_0x2ad205<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x2ad205,_0x500400[\x27fRXRight\x27]);var\x20_0x3db323=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRY1\x27);if(_0x3db323<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x3db323,_0x500400[\x27fRYTop\x27]);var\x20_0x542bb0=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fRY2\x27);if(_0x542bb0<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x542bb0,_0x500400[\x27fRYBottom\x27]);break;case\x20_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:this[\x27pCamera\x27][\x27SetScale\x27](this[\x27fScale\x27]),this[\x27pCamera\x27][\x27SetPitch\x27](3.14-this[\x27fRotateX\x27]),this[\x27pCamera\x27][\x27SetYaw\x27](-this[\x27fRotateY\x27]),this[\x27pCamera\x27][\x27UpdateCamera\x27](this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]);var\x20_0x58c294=this[\x27pCamera\x27][\x27GetView\x27](),_0x63ca1a=this[\x27pCamera\x27][\x27GetProj\x27](),_0x43f380=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matView\x27);if(_0x43f380<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0x43f380,!0x1,_0x58c294);var\x20_0x4e6eb0=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matProj\x27);if(_0x4e6eb0<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0x4e6eb0,!0x1,_0x63ca1a);break;case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]:this[\x27pCamera\x27][\x27SetScale\x27](this[\x27fScale\x27]),this[\x27pCamera\x27][\x27SetPitch\x27](-this[\x27fRotateX\x27]),this[\x27pCamera\x27][\x27SetYaw\x27](-this[\x27fRotateY\x27]),this[\x27pCamera\x27][\x27UpdateCamera\x27](this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]);var\x20_0x868187=this[\x27pCamera\x27][\x27GetView\x27](),_0x51182a=this[\x27pCamera\x27][\x27GetProj\x27](),_0x729c4b=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matView\x27);if(_0x729c4b<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0x729c4b,!0x1,_0x868187);var\x20_0xae4d9f=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27matProj\x27);if(_0xae4d9f<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniformMatrix4fv\x27](_0xae4d9f,!0x1,_0x51182a);}if(this[\x27nCaptureWidth\x27]<=0x0||this[\x27nCaptureHeight\x27]<=0x0)return\x20_0x15898c;if(this[\x27ctx\x27][\x27viewport\x27](0x0,0x0,this[\x27nCaptureWidth\x27],this[\x27nCaptureHeight\x27]),this[\x27ctx\x27][\x27clearColor\x27](0x0,0x0,0x0,0x1),this[\x27ctx\x27][\x27clear\x27](this[\x27ctx\x27][\x27COLOR_BUFFER_BIT\x27]|this[\x27ctx\x27][\x27DEPTH_BUFFER_BIT\x27]),this[\x27b3DPort\x27]&&(this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27DEPTH_TEST\x27]),this[\x27ctx\x27][\x27depthFunc\x27](this[\x27ctx\x27][\x27LESS\x27]),this[\x27ctx\x27][\x27depthMask\x27](!0x0),0x1==this[\x27bCullBack\x27]?this[\x27ctx\x27][\x27enable\x27](this[\x27ctx\x27][\x27CULL_FACE\x27]):this[\x27ctx\x27][\x27disable\x27](this[\x27ctx\x27][\x27CULL_FACE\x27])),this[\x27enPixelFormat\x27]==_0xa0f65c?this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x0]):(this[\x27enPixelFormat\x27]==_0x134a08||this[\x27enPixelFormat\x27]==_0x3cdbb9)&&(this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE0\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x0]),this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE1\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x1]),this[\x27ctx\x27][\x27activeTexture\x27](this[\x27ctx\x27][\x27TEXTURE2\x27]),this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nSurfaceTexture\x27][0x2])),this[\x27onlySupportedWebGL1\x27]||this[\x27ctx\x27][\x27clearBufferfi\x27](this[\x27ctx\x27][\x27DEPTH_STENCIL\x27],0x0,0x1,0x0),0x0==this[\x27b3DPort\x27])this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLE_FAN\x27],0x0,0x4);else{if(this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]){if(this[\x27nSemiSpherePosNum\x27]<=0x0)return\x20_0x127571;this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLES\x27],0x0,this[\x27nSemiSpherePosNum\x27]);}else{if(this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]||this[\x27enDisplayEffect\x27]==_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]){if(this[\x27nCylinderPosNum\x27]<=0x0)return\x20_0x127571;this[\x27ctx\x27][\x27drawArrays\x27](this[\x27ctx\x27][\x27TRIANGLES\x27],0x0,this[\x27nCylinderPosNum\x27]);}}}return\x20this[\x27ctx\x27][\x27useProgram\x27](null),null!=this[\x27pfuncCBIn\x27]&&this[\x27pfuncCBIn\x27](this[\x27pUserIn\x27]),null!=this[\x27pfuncCBOut\x27]&&this[\x27pfuncCBOut\x27](this[\x27pUserOut\x27]),_0x4320db=this[\x27_EndCapture\x27](_0x508b58),_0x26bcbc!=_0x4320db?_0x4320db:_0x26bcbc;}},{\x27key\x27:\x27SR_SetImagePostProcess\x27,\x27value\x27:function(_0x2e5f1c,_0x5e7779){if(null==this[\x27ctx\x27])return\x20_0x127571;if(_0x2ff0d6==_0x2e5f1c||_0x14416d==_0x2e5f1c){if(0x0-_0x5e7779>_0x423dca||_0x5e7779-0x1>_0x423dca)return\x20_0x4a21f9;}else{if((_0x2a84ea==_0x2e5f1c||_0x3d600a==_0x2e5f1c||_0x2e0f03==_0x2e5f1c)&&(-0x1-_0x5e7779>_0x423dca||_0x5e7779-0x1>_0x423dca))return\x20_0x4a21f9;}switch(_0x2e5f1c){case\x20_0x2a84ea:this[\x27fBrightness\x27]=_0x5e7779;break;case\x20_0x14416d:this[\x27fHue\x27]=_0x5e7779;break;case\x20_0x3d600a:this[\x27fSaturation\x27]=_0x5e7779;break;case\x20_0x2e0f03:this[\x27fContrast\x27]=_0x5e7779;break;case\x20_0x2ff0d6:this[\x27fSharpness\x27]=_0x5e7779;break;default:return\x20_0x1bcf25;}return\x20Math[\x27abs\x27](this[\x27fBrightness\x27]-0x0)<_0x423dca&&Math[\x27abs\x27](this[\x27fHue\x27]-0x0)<_0x423dca&&Math[\x27abs\x27](this[\x27fSaturation\x27]-0x0)<_0x423dca&&Math[\x27abs\x27](this[\x27fContrast\x27]-0x0)<_0x423dca&&Math[\x27abs\x27](this[\x27fSharpness\x27]-0x0)<_0x423dca?this[\x27nPostProc\x27]=0x0:this[\x27nPostProc\x27]=0x1,_0x26bcbc;}},{\x27key\x27:\x27_BeginCapture\x27,\x27value\x27:function(){var\x20_0x3bc5b5=_0x26bcbc;return\x200x0==this[\x27bCaptureResInit\x27]&&(_0x3bc5b5=this[\x27_InitRenderTarget\x27](this[\x27nCaptureWidth\x27],this[\x27nCaptureHeight\x27],!0x1,!0x0),_0x26bcbc!=_0x3bc5b5)?_0x3bc5b5:(_0x3bc5b5=this[\x27_Resize\x27](this[\x27nCaptureWidth\x27],this[\x27nCaptureHeight\x27],!0x1,!0x0),_0x26bcbc!=_0x3bc5b5?_0x3bc5b5:(this[\x27ctx\x27][\x27bindFramebuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],this[\x27nCaptureFBO\x27]),this[\x27bIsCapturing\x27]=!0x0,_0x26bcbc));}},{\x27key\x27:\x27_InitRenderTarget\x27,\x27value\x27:function(_0x37a15e,_0x4ee1d6,_0x528857,_0x38ade9){if(0x0!=this[\x27nCaptureRTTex\x27]||0x0!=this[\x27nCaptureFBO\x27])return\x20_0x127571;if(_0x37a15e<=0x0||_0x4ee1d6<=0x0)return\x20_0x4a21f9;if(this[\x27nCaptureRTTex\x27]=this[\x27ctx\x27][\x27createTexture\x27](),this[\x27nCaptureRTTex\x27]<=0x0)return\x20_0x4cfdfb;if(this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nCaptureRTTex\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],_0x37a15e,_0x4ee1d6,0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],null),0x0==this[\x27nCaptureFBO\x27]&&(this[\x27nCaptureFBO\x27]=this[\x27ctx\x27][\x27createFramebuffer\x27](),this[\x27nCaptureFBO\x27]<=0x0))return\x20_0x4cfdfb;if(this[\x27ctx\x27][\x27bindFramebuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],this[\x27nCaptureFBO\x27]),this[\x27ctx\x27][\x27framebufferTexture2D\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],this[\x27ctx\x27][\x27COLOR_ATTACHMENT0\x27],this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nCaptureRTTex\x27],0x0),0x1==_0x38ade9&&0x0==this[\x27nCaptureDepthbuffer\x27]){if(this[\x27nCaptureDepthbuffer\x27]=this[\x27ctx\x27][\x27createRenderbuffer\x27](),this[\x27nCaptureDepthbuffer\x27]<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindRenderbuffer\x27](this[\x27ctx\x27][\x27RENDERBUFFER\x27],this[\x27nCaptureDepthbuffer\x27]),this[\x27ctx\x27][\x27renderbufferStorage\x27](this[\x27ctx\x27][\x27RENDERBUFFER\x27],this[\x27ctx\x27][\x27DEPTH_COMPONENT16\x27],_0x37a15e,_0x4ee1d6),this[\x27ctx\x27][\x27framebufferRenderbuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],this[\x27ctx\x27][\x27DEPTH_ATTACHMENT\x27],this[\x27ctx\x27][\x27RENDERBUFFER\x27],this[\x27nCaptureDepthbuffer\x27]);}return\x20this[\x27ctx\x27][\x27bindFramebuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],null),this[\x27nCaptureFBOWidth\x27]=_0x37a15e,this[\x27nCaptureFBOHeight\x27]=_0x4ee1d6,this[\x27bCaptureResInit\x27]=!0x0,_0x26bcbc;}},{\x27key\x27:\x27_Resize\x27,\x27value\x27:function(_0x13cdae,_0x4c06c5,_0x193854,_0x4f87dd){if(this[\x27nCaptureFBOWidth\x27]!=_0x13cdae||this[\x27nCaptureFBOHeight\x27]!=_0x4c06c5){if(this[\x27nCaptureFBOWidth\x27]=_0x13cdae,this[\x27nCaptureFBOHeight\x27]=_0x4c06c5,0x0!=this[\x27nCaptureRTTex\x27]&&(this[\x27ctx\x27][\x27deleteTexture\x27](this[\x27nCaptureRTTex\x27]),this[\x27nCaptureRTTex\x27]=0x0),0x0!=this[\x27nCaptureDepthbuffer\x27]&&(this[\x27ctx\x27][\x27deleteRenderbuffer\x27](this[\x27nCaptureDepthbuffer\x27]),this[\x27nCaptureDepthbuffer\x27]=0x0),0x0==this[\x27nCaptureRTTex\x27]&&(this[\x27nCaptureRTTex\x27]=this[\x27ctx\x27][\x27createTexture\x27](),this[\x27nCaptureRTTex\x27]<=0x0))return\x20_0x4cfdfb;if(this[\x27ctx\x27][\x27bindTexture\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nCaptureRTTex\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MAG_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_MIN_FILTER\x27],this[\x27ctx\x27][\x27LINEAR\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_S\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texParameteri\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27ctx\x27][\x27TEXTURE_WRAP_T\x27],this[\x27ctx\x27][\x27CLAMP_TO_EDGE\x27]),this[\x27ctx\x27][\x27texImage2D\x27](this[\x27ctx\x27][\x27TEXTURE_2D\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27nCaptureFBOWidth\x27],this[\x27nCaptureFBOHeight\x27],0x0,this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],null),this[\x27ctx\x27][\x27bindFramebuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],this[\x27nCaptureFBO\x27]),this[\x27ctx\x27][\x27framebufferTexture2D\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],this[\x27ctx\x27][\x27COLOR_ATTACHMENT0\x27],this[\x27ctx\x27][\x27TEXTURE_2D\x27],this[\x27nCaptureRTTex\x27],0x0),0x1==_0x4f87dd&&0x0==this[\x27nCaptureDepthbuffer\x27]){if(this[\x27nCaptureDepthbuffer\x27]=this[\x27ctx\x27][\x27createRenderbuffer\x27](),this[\x27nCaptureDepthbuffer\x27]<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27bindRenderbuffer\x27](this[\x27ctx\x27][\x27RENDERBUFFER\x27],this[\x27nCaptureDepthbuffer\x27]),this[\x27ctx\x27][\x27renderbufferStorage\x27](this[\x27ctx\x27][\x27RENDERBUFFER\x27],this[\x27ctx\x27][\x27DEPTH_COMPONENT16\x27],_0x13cdae,_0x4c06c5),this[\x27ctx\x27][\x27framebufferRenderbuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],this[\x27ctx\x27][\x27DEPTH_ATTACHMENT\x27],this[\x27ctx\x27][\x27RENDERBUFFER\x27],this[\x27nCaptureDepthbuffer\x27]);}this[\x27ctx\x27][\x27bindFramebuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],null);}return\x20_0x26bcbc;}},{\x27key\x27:\x27_EndCapture\x27,\x27value\x27:function(_0x4af116){return\x20null==this[\x27ctx\x27]?_0x127571:null==_0x4af116[\x27pBuffer\x27]||null==_0x4af116[\x27pBuffer\x27]?_0x4a21f9:(this[\x27ctx\x27][\x27readPixels\x27](0x0,0x0,this[\x27nCaptureWidth\x27],this[\x27nCaptureHeight\x27],this[\x27ctx\x27][\x27RGBA\x27],this[\x27ctx\x27][\x27UNSIGNED_BYTE\x27],_0x4af116[\x27pBuffer\x27]),this[\x27ctx\x27][\x27bindFramebuffer\x27](this[\x27ctx\x27][\x27FRAMEBUFFER\x27],null),this[\x27bIsCapturing\x27]=!0x1,_0x26bcbc);}},{\x27key\x27:\x27_ResizeFrameData\x27,\x27value\x27:function(_0x152244,_0x2b02d5,_0x162d03,_0x192b67){if(0x0==_0x2b02d5%0x8&&null==_0x192b67)return\x20this[\x27frameDisplayWidth\x27]=Math[\x27round\x27](_0x2b02d5),this[\x27frameDisplayHeight\x27]=Math[\x27round\x27](_0x162d03),this[\x27pFrameData\x27]=_0x152244,_0x26bcbc;if(null!=_0x192b67&&0x0==_0x192b67[\x27nCropBottom\x27]&&0x0==_0x192b67[\x27nCropLeft\x27]&&0x0==_0x192b67[\x27nCropRight\x27]&&0x0==_0x192b67[\x27nCropTop\x27]&&0x0==_0x2b02d5%0x8)return\x20this[\x27frameDisplayWidth\x27]=Math[\x27round\x27](_0x2b02d5),this[\x27frameDisplayHeight\x27]=Math[\x27round\x27](_0x162d03),this[\x27pFrameData\x27]=_0x152244,_0x26bcbc;if((null==this[\x27pFrameData\x27]||this[\x27frameDisplayWidth\x27]!=_0x2b02d5/0x8*0x8||this[\x27frameDisplayHeight\x27]!=_0x162d03)&&(this[\x27frameDisplayWidth\x27]=0x8*Math[\x27round\x27](_0x2b02d5/0x8),this[\x27frameDisplayHeight\x27]=Math[\x27round\x27](_0x162d03),this[\x27pFrameData\x27]=null,this[\x27pFrameData\x27]=new\x20Uint8Array(this[\x27frameDisplayWidth\x27]*this[\x27frameDisplayHeight\x27]*0x3/0x2),null==this[\x27pFrameData\x27]))return\x20_0x460c4d;var\x20_0x108e29=0x0,_0x1b7038=0x0,_0xc8c9c4=Math[\x27round\x27](_0x192b67[\x27nCodeWidth\x27]),_0x2fe3fc=Math[\x27round\x27](_0x192b67[\x27nCodeHeight\x27]),_0x344b6c=0x0;if(_0x134a08==this[\x27enPixelFormat\x27]||_0x3cdbb9==this[\x27enPixelFormat\x27]){var\x20_0x45c1ba,_0x112692,_0x354bd8;null!=_0x192b67?(_0x108e29=Math[\x27round\x27](_0x192b67[\x27nCropLeft\x27]),_0x1b7038=Math[\x27round\x27](_0x192b67[\x27nCropTop\x27]),_0x45c1ba=_0x152244[\x27subarray\x27](_0x108e29*_0xc8c9c4+_0x1b7038,_0xc8c9c4*_0x2fe3fc),_0x112692=_0x152244[\x27subarray\x27](_0xc8c9c4*_0x2fe3fc+_0x1b7038*_0xc8c9c4/0x4+_0x108e29/0x2,_0xc8c9c4*_0x2fe3fc*0x5/0x4),_0x354bd8=_0x152244[\x27subarray\x27](_0xc8c9c4*_0x2fe3fc*0x5/0x4+_0x1b7038*_0xc8c9c4/0x4+_0x108e29/0x2,_0xc8c9c4*_0x2fe3fc*0x3/0x2),_0x344b6c=_0xc8c9c4):(_0x45c1ba=_0x152244[\x27subarray\x27](0x0,_0x2b02d5*_0x162d03),_0x112692=_0x152244[\x27subarray\x27](_0x2b02d5*_0x162d03,_0x2b02d5*_0x162d03*0x5/0x4),_0x354bd8=_0x152244[\x27subarray\x27](_0x2b02d5*_0x162d03*0x5/0x4,_0x2b02d5*_0x162d03*0x3/0x2),_0x344b6c=this[\x27frameDisplayWidth\x27]);for(var\x20_0xd4bfc0=null,_0x462895=0x0;_0x462895<this[\x27frameDisplayHeight\x27];++_0x462895){var\x20_0x45a9da=Math[\x27round\x27](_0x462895*_0x344b6c),_0x1976c0=Math[\x27round\x27](_0x462895*_0x344b6c+this[\x27frameDisplayWidth\x27]);_0xd4bfc0=_0x45c1ba[\x27slice\x27](_0x45a9da,_0x1976c0);var\x20_0x29d3fe=Math[\x27round\x27](_0x462895*this[\x27frameDisplayWidth\x27]);this[\x27pFrameData\x27][\x27set\x27](_0xd4bfc0,_0x29d3fe);}for(var\x20_0x2ea8e3=0x0;_0x2ea8e3<this[\x27frameDisplayHeight\x27]/0x2;++_0x2ea8e3){var\x20_0x158ad1=Math[\x27round\x27](_0x2ea8e3*_0x344b6c/0x2),_0x454aa1=Math[\x27round\x27](_0x2ea8e3*_0x344b6c/0x2+this[\x27frameDisplayWidth\x27]/0x2);_0xd4bfc0=_0x112692[\x27slice\x27](_0x158ad1,_0x454aa1);var\x20_0x39e34d=Math[\x27round\x27](this[\x27frameDisplayWidth\x27]*this[\x27frameDisplayHeight\x27]+_0x2ea8e3*this[\x27frameDisplayWidth\x27]/0x2);this[\x27pFrameData\x27][\x27set\x27](_0xd4bfc0,_0x39e34d);}for(var\x20_0x5854de=0x0;_0x5854de<this[\x27frameDisplayHeight\x27]/0x2;++_0x5854de){var\x20_0x1219a5=Math[\x27round\x27](_0x5854de*_0x344b6c/0x2),_0x5f1a8e=Math[\x27round\x27](_0x5854de*_0x344b6c/0x2+this[\x27frameDisplayWidth\x27]/0x2);_0xd4bfc0=_0x354bd8[\x27slice\x27](_0x1219a5,_0x5f1a8e);var\x20_0x36d152=Math[\x27round\x27](this[\x27frameDisplayWidth\x27]*this[\x27frameDisplayHeight\x27]*0x5/0x4+_0x5854de*this[\x27frameDisplayWidth\x27]/0x2);this[\x27pFrameData\x27][\x27set\x27](_0xd4bfc0,_0x36d152);}_0x45c1ba=null,_0x112692=null,_0x354bd8=null,_0xd4bfc0=null;}else{if(_0x3eedf4==this[\x27enPixelFormat\x27]){var\x20_0x5e60fd,_0x207105,_0x5a05ef;null!=_0x192b67?(_0x108e29=Math[\x27round\x27](_0x192b67[\x27nCropLeft\x27]),_0x1b7038=Math[\x27round\x27](_0x192b67[\x27nCropTop\x27]),_0x5e60fd=_0x152244[\x27subarray\x27](_0x1b7038*_0xc8c9c4+_0x108e29,_0xc8c9c4*_0x2fe3fc),_0x207105=_0x152244[\x27subarray\x27](_0xc8c9c4*_0x2fe3fc+_0x1b7038*_0xc8c9c4/0x4+_0x108e29/0x2,_0xc8c9c4*_0x2fe3fc*0x3/0x2),_0x344b6c=Math[\x27round\x27](_0x192b67[\x27nCodeWidth\x27])):(_0x5e60fd=_0x152244[\x27subarray\x27](0x0,_0xc8c9c4*_0x2fe3fc),_0x207105=_0x152244[\x27subarray\x27](_0xc8c9c4*_0x2fe3fc,_0xc8c9c4*_0x2fe3fc*0x3/0x2),_0x344b6c=this[\x27frameDisplayWidth\x27]);for(var\x20_0x56cb2f=0x0;_0x56cb2f<this[\x27frameDisplayHeight\x27];++_0x56cb2f){var\x20_0x1274a2=Math[\x27round\x27](_0x56cb2f*_0x344b6c),_0xe7565=Math[\x27round\x27](_0x56cb2f*_0x344b6c+this[\x27frameDisplayWidth\x27]);_0x5a05ef=_0x5e60fd[\x27slice\x27](_0x1274a2,_0xe7565);var\x20_0x56d5be=Math[\x27round\x27](_0x56cb2f*this[\x27frameDisplayWidth\x27]);this[\x27pFrameData\x27][\x27set\x27](_0x5a05ef,_0x56d5be);}for(var\x20_0x4a670d=0x0;_0x4a670d<this[\x27frameDisplayHeight\x27]/0x2;++_0x4a670d){var\x20_0x4ae7de=Math[\x27round\x27](_0x4a670d*_0x344b6c),_0x3bf157=Math[\x27round\x27](_0x4a670d*_0x344b6c+this[\x27frameDisplayWidth\x27]);_0x5a05ef=_0x207105[\x27slice\x27](_0x4ae7de,_0x3bf157);var\x20_0x384ba=Math[\x27round\x27](this[\x27frameDisplayWidth\x27]*this[\x27frameDisplayHeight\x27]+_0x4a670d*this[\x27frameDisplayWidth\x27]);this[\x27pFrameData\x27][\x27set\x27](_0x5a05ef,_0x384ba);}_0x5e60fd=null,_0x207105=null,_0x5a05ef=null;}}return\x20_0x26bcbc;}},{\x27key\x27:\x27_SetImagePostProcess\x27,\x27value\x27:function(){var\x20_0x12d142=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fBrightness\x27);if(_0x12d142<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x12d142,this[\x27fBrightness\x27]);var\x20_0xe0bfcc=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fHue\x27);if(_0xe0bfcc<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0xe0bfcc,this[\x27fHue\x27]);var\x20_0x275f1f=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fSaturation\x27);if(_0x275f1f<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x275f1f,this[\x27fSaturation\x27]);var\x20_0x337248=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fContrast\x27);if(_0x337248<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x337248,this[\x27fContrast\x27]);var\x20_0x444760=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fSharpness\x27);if(_0x444760<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x444760,this[\x27fSharpness\x27]);var\x20_0x4bd638=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fWndWidth\x27);if(_0x4bd638<=0x0)return\x20_0x4cfdfb;this[\x27ctx\x27][\x27uniform1f\x27](_0x4bd638,this[\x27frameDisplayWidth\x27]);var\x20_0x4ece48=this[\x27ctx\x27][\x27getUniformLocation\x27](this[\x27videoShaderProgram\x27],\x27fWndHeight\x27);return\x20_0x4ece48<=0x0?_0x4cfdfb:(this[\x27ctx\x27][\x27uniform1f\x27](_0x4ece48,this[\x27frameDisplayHeight\x27]),_0x26bcbc);}}]),_0x51a797;}()),_0xef2477=(function(){function\x20_0xc572ac(){_0x4b5b03(this,_0xc572ac),this[\x27canvas\x27]=null,this[\x27ctx\x27]=null,this[\x27regionSx\x27]=0x0,this[\x27regionSy\x27]=0x0,this[\x27regionSw\x27]=0x0,this[\x27regionSh\x27]=0x0,this[\x27needRect\x27]=!0x1,this[\x27bAntialias\x27]=!0x1,this[\x27bRecreateAntia\x27]=!0x1;}return\x20_0x4023a9(_0xc572ac,[{\x27key\x27:\x27SR_Init\x27,\x27value\x27:function(_0x36f67b){this[\x27canvas\x27]=_0x36f67b,this[\x27ctx\x27]=this[\x27canvas\x27][\x27getContext\x27](\x272d\x27),this[\x27ctx\x27]||console[\x27log\x27](\x27your\x5cx20browser\x5cx20does\x5cx20not\x5cx20support\x5cx202d\x5cx20render\x27);}},{\x27key\x27:\x27SR_Draw\x27,\x27value\x27:function(_0x3d90d0){return\x20this[\x27needRect\x27]?this[\x27ctx\x27][\x27drawImage\x27](_0x3d90d0,this[\x27regionSx\x27],this[\x27regionSy\x27],this[\x27regionSw\x27],this[\x27regionSh\x27],0x0,0x0,this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]):this[\x27ctx\x27][\x27drawImage\x27](_0x3d90d0,0x0,0x0,_0x3d90d0[\x27displayWidth\x27],_0x3d90d0[\x27displayHeight\x27],0x0,0x0,this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]),0x1;}},{\x27key\x27:\x27GetCanvasData\x27,\x27value\x27:function(_0x19799c){console[\x27log\x27](\x27%c\x5cx20start\x5cx20time:\x27+new\x20Date()[\x27getMinutes\x27]()+\x27:\x27+new\x20Date()[\x27getSeconds\x27]()+\x27.\x27+new\x20Date()[\x27getMilliseconds\x27](),\x27color:\x5cx20blue\x27);var\x20_0x449331=this[\x27ctx\x27][\x27getImageData\x27](0x0,0x0,this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]);console[\x27log\x27](\x27%c\x5cx202\x5cx20time:\x27+new\x20Date()[\x27getMinutes\x27]()+\x27:\x27+new\x20Date()[\x27getSeconds\x27]()+\x27.\x27+new\x20Date()[\x27getMilliseconds\x27](),\x27color:\x5cx20blue\x27);var\x20_0x56a125=\x27jpeg\x27,_0x277a1d=\x27image/jpeg\x27,_0x384a31=document[\x27createElement\x27](\x27canvas\x27),_0x1aae80=_0x384a31[\x27getContext\x27](\x272d\x27);_0x384a31[\x27width\x27]=this[\x27canvas\x27][\x27width\x27],_0x384a31[\x27height\x27]=this[\x27canvas\x27][\x27height\x27],_0x1aae80[\x27putImageData\x27](_0x449331,0x0,0x0);var\x20_0x16c07d=_0x384a31[\x27toDataURL\x27](),_0x47fabb=document[\x27createElement\x27](\x27a\x27);_0x47fabb[\x27download\x27]=new\x20Date()[\x27getTime\x27]()+\x27.\x27+_0x56a125,_0x47fabb[\x27href\x27]=_0x16c07d,_0x47fabb[\x27dataset\x27][\x27downloadurl\x27]=[_0x277a1d,_0x47fabb[\x27download\x27],_0x47fabb[\x27href\x27]][\x27join\x27](\x27:\x27),document[\x27body\x27][\x27appendChild\x27](_0x47fabb),_0x47fabb[\x27click\x27](),document[\x27body\x27][\x27removeChild\x27](_0x47fabb),console[\x27log\x27](\x27%c\x5cx20end\x5cx20time:\x27+new\x20Date()[\x27getMinutes\x27]()+\x27:\x27+new\x20Date()[\x27getSeconds\x27]()+\x27.\x27+new\x20Date()[\x27getMilliseconds\x27](),\x27color:\x5cx20blue\x27);}},{\x27key\x27:\x27SR_DelSubPort\x27,\x27value\x27:function(_0x2fa8a0){return\x200x0;}},{\x27key\x27:\x27SR_AddSubPort\x27,\x27value\x27:function(_0x36494a){return\x200x0;}},{\x27key\x27:\x27SR_SetDisplayRect\x27,\x27value\x27:function(_0xd35056,_0x369c18,_0x49ae7f,_0x365eb5){this[\x27regionSx\x27]=_0xd35056,this[\x27regionSy\x27]=_0x369c18,this[\x27regionSw\x27]=_0x49ae7f,this[\x27regionSh\x27]=_0x365eb5,this[\x27needRect\x27]=!0x0;}},{\x27key\x27:\x27SR_Destroy\x27,\x27value\x27:function(){this[\x27canvas\x27]=null,this[\x27ctx\x27]=null,this[\x27regionSx\x27]=0x0,this[\x27regionSy\x27]=0x0,this[\x27regionSw\x27]=0x0,this[\x27regionSh\x27]=0x0,this[\x27needRect\x27]=!0x1;}},{\x27key\x27:\x27SR_SetCanvasSize\x27,\x27value\x27:function(_0x17ef9b,_0x45c9f3){this[\x27canvas\x27][\x27width\x27]=_0x17ef9b,this[\x27canvas\x27][\x27height\x27]=_0x45c9f3;}},{\x27key\x27:\x27SR_GetCanvasSize\x27,\x27value\x27:function(){console[\x27log\x27](\x27canvas\x5cx20width:\x27+this[\x27canvas\x27][\x27width\x27]+\x27,height:\x27+this[\x27canvas\x27][\x27height\x27]);}},{\x27key\x27:\x27SR_SetAntialias\x27,\x27value\x27:function(_0xa7a8cb){return\x20_0xa7a8cb!=this[\x27bAntialias\x27]?(this[\x27bAntialias\x27]=_0xa7a8cb,this[\x27bRecreateAntia\x27]=!0x0):this[\x27bRecreateAntia\x27]=!0x1,this[\x27bRecreateAntia\x27]&&(this[\x27bAntialias\x27]?(this[\x27canvas\x27][\x27width\x27]=0x5*this[\x27canvas\x27][\x27width\x27],this[\x27canvas\x27][\x27height\x27]=0x5*this[\x27canvas\x27][\x27height\x27],this[\x27canvas\x27][\x27style\x27][\x27transform\x27]=\x27scale(0.2)\x27,this[\x27canvas\x27][\x27style\x27][\x27transformOrigin\x27]=\x270\x5cx200\x27):(this[\x27canvas\x27][\x27width\x27]=this[\x27canvas\x27][\x27width\x27]/0x5,this[\x27canvas\x27][\x27height\x27]=this[\x27canvas\x27][\x27height\x27]/0x5,this[\x27canvas\x27][\x27style\x27][\x27transform\x27]=\x27scale(1)\x27,this[\x27canvas\x27][\x27style\x27][\x27transformOrigin\x27]=\x270\x5cx200\x27)),0x1;}},{\x27key\x27:\x27SR_SetCallBack\x27,\x27value\x27:function(_0x11196e,_0x15b58b,_0x9ba863){return\x200x1;}},{\x27key\x27:\x27SR_DrawFont\x27,\x27value\x27:function(){}}]),_0xc572ac;}()),_0x22aa88=(function(){function\x20_0x121bd5(){_0x4b5b03(this,_0x121bd5),this[\x27bPortAllocated\x27]=[],this[\x27pRenderParam\x27]=[],this[\x27pFishParam\x27]=[],this[\x27stPTZColor\x27]=[],this[\x27pPTZSetColor\x27]=null,this[\x27nBasePTZPointNum\x27]=[],this[\x27nOriPTZPointNum\x27]=[],this[\x27nPanoPTZPointNum\x27]=[],this[\x27nPTZFragmentNum\x27]=[],this[\x27pBasePTZPoints\x27]=[],this[\x27pPanoPTZPoints\x27]=[],this[\x27pRectPoints\x27]=[],this[\x27nPTZRectNum\x27]=[],this[\x27nPTZDisplayMode\x27]=_0x59697a,this[\x27fRX1\x27]=0x0,this[\x27fRX2\x27]=0x1,this[\x27fRY1\x27]=0x0,this[\x27fRY2\x27]=0x1,this[\x27bBlack\x27]=!0x1,this[\x27pOriPTZPoints\x27]=[],this[\x27nWndPort\x27]=_0x32eacf,this[\x27nPlaceType\x27]=0x0,this[\x27nPTZFragmentNode\x27]=[],this[\x27bPTZSelected\x27]=[],this[\x27nPTZDisplayMode\x27]=_0x2fdffc;for(var\x20_0x2f0fe7=0x0;_0x2f0fe7<_0x4f027d;++_0x2f0fe7){this[\x27bPortAllocated\x27][_0x2f0fe7]=!0x1,this[\x27bPTZSelected\x27][_0x2f0fe7]=!0x1,this[\x27pRenderParam\x27][_0x2f0fe7]={},this[\x27pRenderParam\x27][_0x2f0fe7][\x27fCosH\x27]=0x1,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fSinH\x27]=0x0,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fCosV\x27]=0x1,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fSinV\x27]=0x0,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fAngle\x27]=0x0,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fZoom\x27]=0x0,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fRX1\x27]=0x0,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fRX2\x27]=0x1,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fRY1\x27]=0x0,this[\x27pRenderParam\x27][_0x2f0fe7][\x27fRY2\x27]=0x1,this[\x27pRenderParam\x27][_0x2f0fe7][\x27nDisplayEffect\x27]=0x0,this[\x27pRenderParam\x27][_0x2f0fe7][\x27bBlack\x27]=!0x1,this[\x27pRenderParam\x27][_0x2f0fe7][\x27bCut\x27]=!0x1,this[\x27pFishParam\x27][_0x2f0fe7]={},this[\x27pFishParam\x27][_0x2f0fe7][\x27nFishParamType\x27]=0x0,this[\x27pFishParam\x27][_0x2f0fe7][\x27fRXLeft\x27]=0x0,this[\x27pFishParam\x27][_0x2f0fe7][\x27fRXRight\x27]=0x1,this[\x27pFishParam\x27][_0x2f0fe7][\x27fRYTop\x27]=0x0,this[\x27pFishParam\x27][_0x2f0fe7][\x27fRYBottom\x27]=0x1,this[\x27pFishParam\x27][_0x2f0fe7][\x27bBlack\x27]=!0x1,this[\x27pFishParam\x27][_0x2f0fe7][\x27bCut\x27]=!0x1,this[\x27pFishParam\x27][_0x2f0fe7][\x27fAngle\x27]=0x0,this[\x27pFishParam\x27][_0x2f0fe7][\x27fZoom\x27]=0x0,this[\x27pFishParam\x27][_0x2f0fe7][\x27fPTZX\x27]=0.5,this[\x27pFishParam\x27][_0x2f0fe7][\x27fPTZY\x27]=0.5,this[\x27stPTZColor\x27][_0x2f0fe7]={},this[\x27stPTZColor\x27][_0x2f0fe7][\x27fR\x27]=0x0,this[\x27stPTZColor\x27][_0x2f0fe7][\x27fG\x27]=0x0,this[\x27stPTZColor\x27][_0x2f0fe7][\x27fB\x27]=0x0,this[\x27stPTZColor\x27][_0x2f0fe7][\x27fA\x27]=0x0,this[\x27nBasePTZPointNum\x27][_0x2f0fe7]=0x0,this[\x27nOriPTZPointNum\x27][_0x2f0fe7]=0x0,this[\x27nPanoPTZPointNum\x27][_0x2f0fe7]=0x0,this[\x27nPTZRectNum\x27][_0x2f0fe7]=0x0,this[\x27pPanoPTZPoints\x27][_0x2f0fe7]=[],this[\x27pRectPoints\x27][_0x2f0fe7]=[],this[\x27pBasePTZPoints\x27][_0x2f0fe7]=[],this[\x27pOriPTZPoints\x27][_0x2f0fe7]=[];for(var\x20_0x585afa=0x0;_0x585afa<0x4;++_0x585afa)this[\x27pRectPoints\x27][_0x2f0fe7][_0x585afa]={},this[\x27pRectPoints\x27][_0x2f0fe7][_0x585afa][\x27fX\x27]=0x0,this[\x27pRectPoints\x27][_0x2f0fe7][_0x585afa][\x27fY\x27]=0x0;for(var\x20_0x573e05=0x0;_0x573e05<_0x102117;++_0x573e05)this[\x27pBasePTZPoints\x27][_0x2f0fe7][_0x573e05]={},this[\x27pBasePTZPoints\x27][_0x2f0fe7][_0x573e05][\x27fX\x27]=0x0,this[\x27pBasePTZPoints\x27][_0x2f0fe7][_0x573e05][\x27fY\x27]=0x0,this[\x27pOriPTZPoints\x27][_0x2f0fe7][_0x573e05]={},this[\x27pOriPTZPoints\x27][_0x2f0fe7][_0x573e05][\x27fX\x27]=0x0,this[\x27pOriPTZPoints\x27][_0x2f0fe7][_0x573e05][\x27fY\x27]=0x0,this[\x27pPanoPTZPoints\x27][_0x2f0fe7][_0x573e05]={},this[\x27pPanoPTZPoints\x27][_0x2f0fe7][_0x573e05][\x27fX\x27]=0x0,this[\x27pPanoPTZPoints\x27][_0x2f0fe7][_0x573e05][\x27fY\x27]=0x0;this[\x27nPTZFragmentNum\x27][_0x2f0fe7]=0x0,this[\x27nPTZFragmentNode\x27][_0x2f0fe7]=[];for(var\x20_0x18d38b=0x0;_0x18d38b<0x64;++_0x18d38b)this[\x27nPTZFragmentNode\x27][_0x2f0fe7][_0x18d38b]=0x0;}this[\x27InitColorList\x27]();}return\x20_0x4023a9(_0x121bd5,[{\x27key\x27:\x27GetFECPort\x27,\x27value\x27:function(_0x9fbf01){for(var\x20_0x42b1ad=_0x32eacf,_0x3a5935=0x0;_0x3a5935<_0x4f027d;++_0x3a5935)if(0x0==this[\x27bPortAllocated\x27][_0x3a5935]){_0x42b1ad=_0x3a5935;break;}if(_0x42b1ad==_0x32eacf)return\x20_0x42b1ad;if(_0x9fbf01==_0x3409b0[\x27SR_DE_NULL\x27])return\x20_0x42b1ad;var\x20_0x2c32b2=this[\x27JudgeDisplayEffect\x27](_0x9fbf01);if(_0x26bcbc!=_0x2c32b2)return\x20this[\x27FreeFECPort\x27](_0x42b1ad),_0x42b1ad=_0x32eacf;if(_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]==_0x9fbf01||_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]==_0x9fbf01||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]==_0x9fbf01||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]==_0x9fbf01||_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]==_0x9fbf01||_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]==_0x9fbf01){if(_0x32eacf!=this[\x27nWndPort\x27])return\x20this[\x27FreeFECPort\x27](_0x42b1ad),_0x42b1ad=_0x32eacf;this[\x27nWndPort\x27]=_0x42b1ad;}if(!(_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]!=_0x9fbf01&&_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]!=_0x9fbf01&&_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]!=_0x9fbf01||_0x32eacf==this[\x27nWndPort\x27]||null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]]||_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]!=this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]!=this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27nDisplayEffect\x27]))return\x20this[\x27FreeFECPort\x27](_0x42b1ad),_0x42b1ad=_0x32eacf;if(_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]==_0x9fbf01||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]==_0x9fbf01){for(var\x20_0x536047=0x0;_0x536047<_0x4f027d;++_0x536047)if(null!=this[\x27pRenderParam\x27][_0x536047]&&(_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]==this[\x27pRenderParam\x27][_0x536047][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]==this[\x27pRenderParam\x27][_0x536047][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]==this[\x27pRenderParam\x27][_0x536047][\x27nDisplayEffect\x27]))return\x20this[\x27FreeFECPort\x27](_0x42b1ad),_0x42b1ad=_0x32eacf;}if(_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL\x27]==_0x9fbf01){for(var\x20_0xc088e3=0x0;_0xc088e3<_0x4f027d;++_0xc088e3)if(null!=this[\x27pRenderParam\x27][_0xc088e3]&&_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_VERTICAL_WALL\x27]==this[\x27pRenderParam\x27][_0xc088e3][\x27nDisplayEffect\x27])return\x20this[\x27FreeFECPort\x27](_0x42b1ad),_0x42b1ad=_0x32eacf;}if(_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_VERTICAL_WALL\x27]==_0x9fbf01){for(var\x20_0x321934=0x0;_0x321934<_0x4f027d;++_0x321934)if(null!=this[\x27pRenderParam\x27][_0x321934]&&_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL\x27]==this[\x27pRenderParam\x27][_0x321934][\x27nDisplayEffect\x27])return\x20this[\x27FreeFECPort\x27](_0x42b1ad),_0x42b1ad=_0x32eacf;}return\x20this[\x27pRenderParam\x27][_0x42b1ad][\x27fCosH\x27]=0x1,this[\x27pRenderParam\x27][_0x42b1ad][\x27fSinH\x27]=0x0,this[\x27pRenderParam\x27][_0x42b1ad][\x27fCosV\x27]=0x1,this[\x27pRenderParam\x27][_0x42b1ad][\x27fSinH\x27]=0x0,this[\x27pRenderParam\x27][_0x42b1ad][\x27fAngle\x27]=0x0,this[\x27pRenderParam\x27][_0x42b1ad][\x27fRX1\x27]=this[\x27fRX1\x27],this[\x27pRenderParam\x27][_0x42b1ad][\x27fRX2\x27]=this[\x27fRX2\x27],this[\x27pRenderParam\x27][_0x42b1ad][\x27fRY1\x27]=this[\x27fRY1\x27],this[\x27pRenderParam\x27][_0x42b1ad][\x27fRY2\x27]=this[\x27fRY2\x27],this[\x27pRenderParam\x27][_0x42b1ad][\x27bBlack\x27]=this[\x27bBlack\x27],this[\x27pRenderParam\x27][_0x42b1ad][\x27fZoom\x27]=0.035+0.8,this[\x27pRenderParam\x27][_0x42b1ad][\x27nDisplayEffect\x27]=_0x9fbf01,this[\x27pFishParam\x27][_0x42b1ad][\x27fAngle\x27]=this[\x27pRenderParam\x27][_0x42b1ad][\x27fAngle\x27],this[\x27pFishParam\x27][_0x42b1ad][\x27fPTZX\x27]=0.5,this[\x27pFishParam\x27][_0x42b1ad][\x27fPTZY\x27]=0.5,this[\x27pFishParam\x27][_0x42b1ad][\x27fRXLeft\x27]=this[\x27pRenderParam\x27][_0x42b1ad][\x27fRX1\x27],this[\x27pFishParam\x27][_0x42b1ad][\x27fRXRight\x27]=this[\x27pRenderParam\x27][_0x42b1ad][\x27fRX2\x27],this[\x27pFishParam\x27][_0x42b1ad][\x27fRYTop\x27]=this[\x27pRenderParam\x27][_0x42b1ad][\x27fRY1\x27],this[\x27pFishParam\x27][_0x42b1ad][\x27fRYBottom\x27]=this[\x27pRenderParam\x27][_0x42b1ad][\x27fRY2\x27],this[\x27pFishParam\x27][_0x42b1ad][\x27bBlack\x27]=this[\x27pRenderParam\x27][_0x42b1ad][\x27bBlack\x27],this[\x27pFishParam\x27][_0x42b1ad][\x27fZoom\x27]=(this[\x27pRenderParam\x27][_0x42b1ad][\x27fZoom\x27]-0.8)/0x7,this[\x27bPortAllocated\x27][_0x42b1ad]=!0x0,_0x42b1ad;}},{\x27key\x27:\x27FreeFECPort\x27,\x27value\x27:function(_0x28dace){if(_0x28dace<0x0||_0x28dace>=_0x4f027d)return\x20_0x4a21f9;this[\x27nWndPort\x27]==_0x28dace&&(this[\x27nWndPort\x27]=_0x32eacf),this[\x27pRenderParam\x27][_0x28dace][\x27fCosH\x27]=0x1,this[\x27pRenderParam\x27][_0x28dace][\x27fSinH\x27]=0x0,this[\x27pRenderParam\x27][_0x28dace][\x27fCosV\x27]=0x1,this[\x27pRenderParam\x27][_0x28dace][\x27fSinV\x27]=0x0,this[\x27pRenderParam\x27][_0x28dace][\x27fAngle\x27]=0x0,this[\x27pRenderParam\x27][_0x28dace][\x27fZoom\x27]=0x0,this[\x27pRenderParam\x27][_0x28dace][\x27fRX1\x27]=0x0,this[\x27pRenderParam\x27][_0x28dace][\x27fRX2\x27]=0x1,this[\x27pRenderParam\x27][_0x28dace][\x27fRY1\x27]=0x0,this[\x27pRenderParam\x27][_0x28dace][\x27fRY2\x27]=0x1,this[\x27pRenderParam\x27][_0x28dace][\x27nDisplayEffect\x27]=0x0,this[\x27pRenderParam\x27][_0x28dace][\x27bBlack\x27]=!0x1,this[\x27pRenderParam\x27][_0x28dace][\x27bCut\x27]=!0x1,this[\x27pFishParam\x27][_0x28dace][\x27nFishParamType\x27]=0x0,this[\x27pFishParam\x27][_0x28dace][\x27fRXLeft\x27]=0x0,this[\x27pFishParam\x27][_0x28dace][\x27fRXRight\x27]=0x1,this[\x27pFishParam\x27][_0x28dace][\x27fRYTop\x27]=0x0,this[\x27pFishParam\x27][_0x28dace][\x27fRYBottom\x27]=0x1,this[\x27pFishParam\x27][_0x28dace][\x27bBlack\x27]=!0x1,this[\x27pFishParam\x27][_0x28dace][\x27bCut\x27]=!0x1,this[\x27pFishParam\x27][_0x28dace][\x27fAngle\x27]=0x0,this[\x27pFishParam\x27][_0x28dace][\x27fZoom\x27]=0x0,this[\x27pFishParam\x27][_0x28dace][\x27fPTZX\x27]=0.5,this[\x27pFishParam\x27][_0x28dace][\x27fPTZY\x27]=0.5,this[\x27nBasePTZPointNum\x27][_0x28dace]=0x0,this[\x27nOriPTZPointNum\x27][_0x28dace]=0x0,this[\x27nPanoPTZPointNum\x27][_0x28dace]=0x0,this[\x27nPTZRectNum\x27][_0x28dace]=0x0;for(var\x20_0x2a5d8f=0x0;_0x2a5d8f<0x4;++_0x2a5d8f)this[\x27pRectPoints\x27][_0x28dace][_0x2a5d8f][\x27fX\x27]=0x0,this[\x27pRectPoints\x27][_0x28dace][_0x2a5d8f][\x27fY\x27]=0x0;for(var\x20_0x201336=0x0;_0x201336<_0x102117;++_0x201336)this[\x27pBasePTZPoints\x27][_0x28dace][_0x201336][\x27fX\x27]=0x0,this[\x27pBasePTZPoints\x27][_0x28dace][_0x201336][\x27fY\x27]=0x0,this[\x27pOriPTZPoints\x27][_0x28dace][_0x201336][\x27fX\x27]=0x0,this[\x27pOriPTZPoints\x27][_0x28dace][_0x201336][\x27fY\x27]=0x0,this[\x27pPanoPTZPoints\x27][_0x28dace][_0x201336][\x27fX\x27]=0x0,this[\x27pPanoPTZPoints\x27][_0x28dace][_0x201336][\x27fY\x27]=0x0;if(null!=this[\x27pPTZSetColor\x27]&&(this[\x27pPTZSetColor\x27][_0x28dace][\x27fA\x27]=0x0,this[\x27pPTZSetColor\x27][_0x28dace][\x27fR\x27]=0x0,this[\x27pPTZSetColor\x27][_0x28dace][\x27fG\x27]=0x0,this[\x27pPTZSetColor\x27][_0x28dace][\x27fB\x27]=0x0),this[\x27bPTZSelected\x27][_0x28dace]=!0x1,0x0!=this[\x27nPlaceType\x27]){var\x20_0x52c46f=!0x1;if(null!=this[\x27pRenderParam\x27][i]){for(var\x20_0x308551=0x0;_0x308551<_0x4f027d;++_0x308551)if(null!=this[\x27pRenderParam\x27][_0x308551]&&(_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_CEILING\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_VERTICAL_WALL\x27]==this[\x27pRenderParam\x27][_0x308551][\x27nDisplayEffect\x27])){_0x52c46f=!0x0;break;}}_0x52c46f||(this[\x27nPlaceType\x27]=0x0);}for(var\x20_0x319f9c=!0x1,_0x216788=0x0;_0x216788<_0x4f027d;++_0x216788)if(null!=this[\x27pRenderParam\x27][_0x216788]){_0x319f9c=!0x0;break;}_0x319f9c||(this[\x27fRX1\x27]=0x0,this[\x27fRX2\x27]=0x1,this[\x27fRY1\x27]=0x0,this[\x27fRY2\x27]=0x1,this[\x27bBlack\x27]=!0x1),this[\x27nPTZFragmentNum\x27][_0x28dace]=0x0;for(var\x20_0x314a77=0x0;_0x314a77<0x64;++_0x314a77)this[\x27nPTZFragmentNode\x27][_0x28dace][_0x314a77]=0x0;return\x20this[\x27bPortAllocated\x27][_0x28dace]=!0x1,_0x26bcbc;}},{\x27key\x27:\x27DeInit\x27,\x27value\x27:function(){for(var\x20_0x579b79=0x0;_0x579b79<_0x4f027d;++_0x579b79){for(var\x20_0x44a9f9=0x0;_0x44a9f9<0x4;++_0x44a9f9)this[\x27pRectPoints\x27][_0x579b79][_0x44a9f9]=null;for(var\x20_0x1426b4=0x0;_0x1426b4<_0x102117;++_0x1426b4)this[\x27pBasePTZPoints\x27][_0x579b79][_0x1426b4]=null,this[\x27pOriPTZPoints\x27][_0x579b79][_0x1426b4]=null,this[\x27pPanoPTZPoints\x27][_0x579b79][_0x1426b4]=null;this[\x27nPTZFragmentNum\x27][_0x579b79]=0x0,this[\x27nPTZFragmentNode\x27][_0x579b79]=null,this[\x27bPortAllocated\x27][_0x579b79]=!0x1,this[\x27bPTZSelected\x27][_0x579b79]=!0x1,this[\x27pRenderParam\x27][_0x579b79]=null,this[\x27pFishParam\x27][_0x579b79]=null,this[\x27stPTZColor\x27][_0x579b79]=null,this[\x27nBasePTZPointNum\x27][_0x579b79]=0x0,this[\x27nOriPTZPointNum\x27][_0x579b79]=0x0,this[\x27nPanoPTZPointNum\x27][_0x579b79]=0x0,this[\x27nPTZRectNum\x27][_0x579b79]=0x0,this[\x27pPanoPTZPoints\x27][_0x579b79]=null,this[\x27pRectPoints\x27][_0x579b79]=null,this[\x27pBasePTZPoints\x27][_0x579b79]=null,this[\x27pOriPTZPoints\x27][_0x579b79]=null;}return\x20this[\x27bPortAllocated\x27]=null,this[\x27pRenderParam\x27]=null,this[\x27pFishParam\x27]=null,this[\x27stPTZColor\x27]=null,this[\x27pPTZSetColor\x27]=null,this[\x27nBasePTZPointNum\x27]=null,this[\x27nOriPTZPointNum\x27]=null,this[\x27nPanoPTZPointNum\x27]=null,this[\x27nPTZFragmentNum\x27]=null,this[\x27pBasePTZPoints\x27]=null,this[\x27pPanoPTZPoints\x27]=null,this[\x27pRectPoints\x27]=null,this[\x27nPTZRectNum\x27]=null,this[\x27nPTZDisplayMode\x27]=_0x59697a,this[\x27fRX1\x27]=0x0,this[\x27fRX2\x27]=0x1,this[\x27fRY1\x27]=0x0,this[\x27fRY2\x27]=0x1,this[\x27bBlack\x27]=!0x1,this[\x27pOriPTZPoints\x27]=null,this[\x27pBasePTZPoints\x27]=null,this[\x27nWndPort\x27]=_0x32eacf,this[\x27nPlaceType\x27]=0x0,this[\x27nPTZFragmentNode\x27]=null,this[\x27bPTZSelected\x27]=null,this[\x27nPTZDisplayMode\x27]=_0x2fdffc,_0x26bcbc;}},{\x27key\x27:\x27InitColorList\x27,\x27value\x27:function(){this[\x27stPTZColor\x27][0x0][\x27fR\x27]=0.5,this[\x27stPTZColor\x27][0x0][\x27fG\x27]=0.5,this[\x27stPTZColor\x27][0x0][\x27fB\x27]=0x0,this[\x27stPTZColor\x27][0x0][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x1][\x27fR\x27]=0x1,this[\x27stPTZColor\x27][0x1][\x27fG\x27]=0x0,this[\x27stPTZColor\x27][0x1][\x27fB\x27]=0x0,this[\x27stPTZColor\x27][0x1][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x2][\x27fR\x27]=0x0,this[\x27stPTZColor\x27][0x2][\x27fG\x27]=0x1,this[\x27stPTZColor\x27][0x2][\x27fB\x27]=0x0,this[\x27stPTZColor\x27][0x2][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x3][\x27fR\x27]=0x0,this[\x27stPTZColor\x27][0x3][\x27fG\x27]=0x0,this[\x27stPTZColor\x27][0x3][\x27fB\x27]=0x1,this[\x27stPTZColor\x27][0x3][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x4][\x27fR\x27]=0x1,this[\x27stPTZColor\x27][0x4][\x27fG\x27]=0x1,this[\x27stPTZColor\x27][0x4][\x27fB\x27]=0x0,this[\x27stPTZColor\x27][0x4][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x5][\x27fR\x27]=0.5,this[\x27stPTZColor\x27][0x5][\x27fG\x27]=0x0,this[\x27stPTZColor\x27][0x5][\x27fB\x27]=0x1,this[\x27stPTZColor\x27][0x5][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x6][\x27fR\x27]=0x0,this[\x27stPTZColor\x27][0x6][\x27fG\x27]=0x1,this[\x27stPTZColor\x27][0x6][\x27fB\x27]=0x1,this[\x27stPTZColor\x27][0x6][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x7][\x27fR\x27]=0x1,this[\x27stPTZColor\x27][0x7][\x27fG\x27]=0.5,this[\x27stPTZColor\x27][0x7][\x27fB\x27]=0x0,this[\x27stPTZColor\x27][0x7][\x27fA\x27]=0x1,this[\x27stPTZColor\x27][0x8][\x27fR\x27]=0x0,this[\x27stPTZColor\x27][0x8][\x27fG\x27]=0.5,this[\x27stPTZColor\x27][0x8][\x27fB\x27]=0.5,this[\x27stPTZColor\x27][0x8][\x27fA\x27]=0x1;for(var\x20_0x29994b=0x9;_0x29994b<_0x4f027d;_0x29994b++)this[\x27stPTZColor\x27][_0x29994b][\x27fR\x27]=0x1*_0x29994b/_0x4f027d,this[\x27stPTZColor\x27][_0x29994b][\x27fG\x27]=0x1*_0x29994b/_0x4f027d,this[\x27stPTZColor\x27][_0x29994b][\x27fB\x27]=0x1*_0x29994b/_0x4f027d,this[\x27stPTZColor\x27][_0x29994b][\x27fA\x27]=0x1;return\x20_0x26bcbc;}},{\x27key\x27:\x27GetRangePoints\x27,\x27value\x27:function(_0x57b03d){if(_0x57b03d<0x0||_0x57b03d>=_0x4f027d)return\x20_0x4a21f9;if(null==this[\x27pRenderParam\x27][_0x57b03d])return\x20_0x127571;var\x20_0x43fe6c=0x0,_0x583a5f=0x0;switch(this[\x27nOriPTZPointNum\x27][_0x57b03d]=0x0,this[\x27nBasePTZPointNum\x27][_0x57b03d]=0x0,this[\x27pRenderParam\x27][_0x57b03d][\x27nDisplayEffect\x27]){case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:for(_0x583a5f=0x0;_0x583a5f<0x1;_0x583a5f+=0.01)this[\x27GetFishPTZCeiling\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x583a5f=0.9995,_0x43fe6c=0x0;_0x43fe6c<0x1;_0x43fe6c+=0.02)this[\x27GetFishPTZCeiling\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x43fe6c=0.999,_0x583a5f=0.9995;_0x583a5f>=0x0;_0x583a5f-=0.01)this[\x27GetFishPTZCeiling\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x583a5f=0x0,_0x43fe6c=0.999;_0x43fe6c>=0x0;_0x43fe6c-=0.02)this[\x27GetFishPTZCeiling\x27](_0x43fe6c,_0x583a5f,_0x57b03d);break;case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:for(_0x583a5f=0x0;_0x583a5f<0x1;_0x583a5f+=0.01)this[\x27GetFishPTZFloor\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x583a5f=0.9995,_0x43fe6c=0x0;_0x43fe6c<0x1;_0x43fe6c+=0.02)this[\x27GetFishPTZFloor\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x43fe6c=0.999,_0x583a5f=0.9995;_0x583a5f>=0x0;_0x583a5f-=0.01)this[\x27GetFishPTZFloor\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x583a5f=0x0,_0x43fe6c=0.999;_0x43fe6c>=0x0;_0x43fe6c-=0.02)this[\x27GetFishPTZFloor\x27](_0x43fe6c,_0x583a5f,_0x57b03d);break;case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:for(_0x583a5f=0x0;_0x583a5f<0x1;_0x583a5f+=0.01)this[\x27GetFishPTZWALL\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x583a5f=0.9995,_0x43fe6c=0x0;_0x43fe6c<0x1;_0x43fe6c+=0.02)this[\x27GetFishPTZWALL\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x43fe6c=0.999,_0x583a5f=0.9995;_0x583a5f>=0x0;_0x583a5f-=0.01)this[\x27GetFishPTZWALL\x27](_0x43fe6c,_0x583a5f,_0x57b03d);for(_0x583a5f=0x0,_0x43fe6c=0.999;_0x43fe6c>=0x0;_0x43fe6c-=0.02)this[\x27GetFishPTZWALL\x27](_0x43fe6c,_0x583a5f,_0x57b03d);}return\x20_0x26bcbc;}},{\x27key\x27:\x27TransformPTZRangePoints\x27,\x27value\x27:function(_0x2c95d7){if(_0x32eacf==this[\x27nWndPort\x27])return\x20_0x127571;if(null==this[\x27pBasePTZPoints\x27][_0x2c95d7]||null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;this[\x27nPanoPTZPointNum\x27][_0x2c95d7]=0x0;var\x20_0x261187=_0x26bcbc,_0x50b94c=this[\x27nWndPort\x27];switch(this[\x27pRenderParam\x27][_0x50b94c][\x27nDisplayEffect\x27]){case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:if(_0x261187=this[\x27GetPanoPTZWall\x27](_0x2c95d7),_0x26bcbc!=_0x261187)return\x20_0x261187;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:if(_0x261187=this[\x27GetPanoPTZFloor\x27](_0x2c95d7),_0x26bcbc!=_0x261187)return\x20_0x261187;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:if(_0x261187=this[\x27GetPanoPTZCeiling\x27](_0x2c95d7),_0x26bcbc!=_0x261187)return\x20_0x261187;break;default:return\x20_0x388f7c;}return\x20this[\x27CalcPTZFragmentPoints\x27](_0x2c95d7),_0x26bcbc;}},{\x27key\x27:\x27GetRectPoints\x27,\x27value\x27:function(_0x58dc82){if(_0x58dc82<0x0||_0x58dc82>=_0x4f027d)return\x20_0x4a21f9;if(this[\x27nWndPort\x27]==_0x32eacf)return\x20_0x127571;if(null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]]||null==this[\x27pFishParam\x27][_0x58dc82])return\x20_0x127571;var\x20_0x3a6d6f=this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27nDisplayEffect\x27],_0x65e947=_0x26bcbc,_0x3b8f72={\x27fX\x27:0x0,\x27fY\x27:0x0};switch(_0x3a6d6f){case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:if(_0x65e947=this[\x27GetPointFish2PanoWall\x27](_0x3b8f72,this[\x27pFishParam\x27][_0x58dc82][\x27fPTZX\x27],this[\x27pFishParam\x27][_0x58dc82][\x27fPTZY\x27]),_0x26bcbc!=_0x65e947)return\x20_0x65e947;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:if(_0x65e947=this[\x27GetPointFish2PanoFloor\x27](_0x3b8f72,this[\x27pFishParam\x27][_0x58dc82][\x27fPTZX\x27],this[\x27pFishParam\x27][_0x58dc82][\x27fPTZY\x27]),_0x26bcbc!=_0x65e947)return\x20_0x388f7c==_0x65e947&&(this[\x27pRectPoints\x27][_0x58dc82]=null),_0x65e947;break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:if(_0x65e947=this[\x27GetPointFish2PanoCeiling\x27](_0x3b8f72,this[\x27pFishParam\x27][_0x58dc82][\x27fPTZX\x27],this[\x27pFishParam\x27][_0x58dc82][\x27fPTZY\x27]),_0x26bcbc!=_0x65e947)return\x20_0x388f7c==_0x65e947&&(this[\x27pRectPoints\x27][_0x58dc82]=null),_0x65e947;break;case\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]:_0x3b8f72[\x27fX\x27]=this[\x27pFishParam\x27][_0x58dc82][\x27fPTZX\x27],_0x3b8f72[\x27fY\x27]=this[\x27pFishParam\x27][_0x58dc82][\x27fPTZY\x27];break;default:return\x20_0x388f7c;}if(null==this[\x27pRectPoints\x27][_0x58dc82]){this[\x27pRectPoints\x27][_0x58dc82]=[];for(var\x20_0x2ce2ce=0x0;_0x2ce2ce<0x4;++_0x2ce2ce)this[\x27pRectPoints\x27][_0x58dc82][_0x2ce2ce]={},this[\x27pRectPoints\x27][_0x58dc82][_0x2ce2ce][\x27fX\x27]=0x0,this[\x27pRectPoints\x27][_0x58dc82][_0x2ce2ce][\x27fY\x27]=0x0;}return\x20this[\x27pRectPoints\x27][_0x58dc82][0x0][\x27fX\x27]=_0x3b8f72[\x27fX\x27]-_0x599f01,this[\x27pRectPoints\x27][_0x58dc82][0x0][\x27fY\x27]=_0x3b8f72[\x27fY\x27]-_0x599f01,this[\x27pRectPoints\x27][_0x58dc82][0x1][\x27fX\x27]=_0x3b8f72[\x27fX\x27]+_0x599f01,this[\x27pRectPoints\x27][_0x58dc82][0x1][\x27fY\x27]=_0x3b8f72[\x27fY\x27]-_0x599f01,this[\x27pRectPoints\x27][_0x58dc82][0x2][\x27fX\x27]=_0x3b8f72[\x27fX\x27]+_0x599f01,this[\x27pRectPoints\x27][_0x58dc82][0x2][\x27fY\x27]=_0x3b8f72[\x27fY\x27]+_0x599f01,this[\x27pRectPoints\x27][_0x58dc82][0x3][\x27fX\x27]=_0x3b8f72[\x27fX\x27]-_0x599f01,this[\x27pRectPoints\x27][_0x58dc82][0x3][\x27fY\x27]=_0x3b8f72[\x27fY\x27]+_0x599f01,this[\x27nPTZRectNum\x27][_0x58dc82]=0x4,_0x26bcbc;}},{\x27key\x27:\x27GetFishPTZCeiling\x27,\x27value\x27:function(_0x4f7330,_0x55a9bc,_0x19d4ab){var\x20_0x5422c4,_0x35775c,_0x1786a5,_0x2793d9,_0x4ea66c,_0x49baf0,_0x2e2dcb,_0x3b91e5={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x7d16ce={\x27fX\x27:0x0,\x27fY\x27:0x0},_0xc3b08={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x4bc490={};_0x2793d9=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x4ea66c=(this[\x27fRX1\x27]+this[\x27fRX2\x27])/0x2*0x1,_0x49baf0=(this[\x27fRY1\x27]+this[\x27fRY2\x27])/0x2*_0x2793d9,_0x2e2dcb=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1,_0x3b91e5[\x27fX\x27]=_0x55a9bc-0.5,_0x3b91e5[\x27fY\x27]=0.5-_0x4f7330,_0x5422c4=this[\x27pRenderParam\x27][_0x19d4ab][\x27fZoom\x27],_0x7d16ce[\x27fX\x27]=_0x3b91e5[\x27fX\x27],_0x7d16ce[\x27fY\x27]=_0x3b91e5[\x27fY\x27]*this[\x27pRenderParam\x27][_0x19d4ab][\x27fCosV\x27]+_0x5422c4*this[\x27pRenderParam\x27][_0x19d4ab][\x27fSinV\x27],_0x35775c=_0x5422c4*this[\x27pRenderParam\x27][_0x19d4ab][\x27fCosV\x27]-_0x3b91e5[\x27fY\x27]*this[\x27pRenderParam\x27][_0x19d4ab][\x27fSinV\x27],_0x1786a5=Math[\x27sqrt\x27](_0x7d16ce[\x27fX\x27]*_0x7d16ce[\x27fX\x27]+_0x7d16ce[\x27fY\x27]*_0x7d16ce[\x27fY\x27]);var\x20_0x3d324c=Math[\x27sqrt\x27](_0x7d16ce[\x27fX\x27]*_0x7d16ce[\x27fX\x27]+_0x7d16ce[\x27fY\x27]*_0x7d16ce[\x27fY\x27]+_0x35775c*_0x35775c),_0x211211=Math[\x27asin\x27](_0x1786a5/_0x3d324c)/1.5707963*0.5;_0x7d16ce[\x27fX\x27]=_0x211211*_0x7d16ce[\x27fX\x27]/_0x1786a5,_0x7d16ce[\x27fY\x27]=_0x211211*_0x7d16ce[\x27fY\x27]/_0x1786a5,_0xc3b08[\x27fX\x27]=_0x7d16ce[\x27fX\x27]*this[\x27pRenderParam\x27][_0x19d4ab][\x27fCosH\x27]-_0x7d16ce[\x27fY\x27]*this[\x27pRenderParam\x27][_0x19d4ab][\x27fSinH\x27],_0xc3b08[\x27fY\x27]=_0x7d16ce[\x27fX\x27]*this[\x27pRenderParam\x27][_0x19d4ab][\x27fSinH\x27]+_0x7d16ce[\x27fY\x27]*this[\x27pRenderParam\x27][_0x19d4ab][\x27fCosH\x27],_0x4bc490[\x27fX\x27]=0x2*_0xc3b08[\x27fX\x27]*_0x2e2dcb+_0x4ea66c,_0x4bc490[\x27fY\x27]=0x2*-_0xc3b08[\x27fY\x27]*_0x2e2dcb+_0x49baf0;var\x20_0x2d4a6e=this[\x27nBasePTZPointNum\x27][_0x19d4ab];this[\x27pBasePTZPoints\x27][_0x19d4ab][_0x2d4a6e][\x27fX\x27]=_0xc3b08[\x27fX\x27]+0.5,this[\x27pBasePTZPoints\x27][_0x19d4ab][_0x2d4a6e][\x27fY\x27]=0.5-_0xc3b08[\x27fY\x27],this[\x27nBasePTZPointNum\x27][_0x19d4ab]=this[\x27nBasePTZPointNum\x27][_0x19d4ab]+0x1;var\x20_0x1931c3=this[\x27fRX1\x27]<=0x0?0x0:0x1*this[\x27fRX1\x27],_0x52439e=this[\x27fRY1\x27]<=0x0?0x0:this[\x27fRY1\x27]*_0x2793d9,_0x58c320=this[\x27fRX2\x27]>=0x1?0x1-_0x1931c3:0x1*this[\x27fRX2\x27]-_0x1931c3,_0x121364=this[\x27fRY2\x27]>=0x1?_0x2793d9-_0x52439e:this[\x27fRY2\x27]*_0x2793d9-_0x52439e;if(_0x4bc490[\x27fX\x27]=(_0x4bc490[\x27fX\x27]-_0x1931c3)/_0x58c320,_0x4bc490[\x27fY\x27]=(_0x4bc490[\x27fY\x27]-_0x52439e)/_0x121364,_0x4bc490[\x27fX\x27]<=0x1&&_0x4bc490[\x27fY\x27]<=0x1&&_0x4bc490[\x27fX\x27]>=0x0&&_0x4bc490[\x27fY\x27]>=0x0){var\x20_0x422b4c=this[\x27nOriPTZPointNum\x27][_0x19d4ab];this[\x27pOriPTZPoints\x27][_0x19d4ab][_0x422b4c][\x27fX\x27]=_0x4bc490[\x27fX\x27],this[\x27pOriPTZPoints\x27][_0x19d4ab][_0x422b4c][\x27fY\x27]=_0x4bc490[\x27fY\x27],this[\x27nOriPTZPointNum\x27][_0x19d4ab]=this[\x27nOriPTZPointNum\x27][_0x19d4ab]+0x1;}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetFishPTZFloor\x27,\x27value\x27:function(_0x44de71,_0x4f46ab,_0x48b751){var\x20_0x364f41,_0x28b22b,_0x35b7c5,_0x3a2a3d,_0xadc11f,_0x321b89,_0x2db369,_0x32b987={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x575697={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x3d0ff9={\x27fX\x27:0x0,\x27fY\x27:0x0},_0xd2682e={};_0x3a2a3d=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0xadc11f=(this[\x27fRX1\x27]+this[\x27fRX2\x27])/0x2*0x1,_0x321b89=(this[\x27fRY1\x27]+this[\x27fRY2\x27])/0x2*_0x3a2a3d,_0x2db369=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1,_0x32b987[\x27fX\x27]=_0x44de71-0.5,_0x32b987[\x27fY\x27]=_0x4f46ab-0.5,_0x364f41=this[\x27pRenderParam\x27][_0x48b751][\x27fZoom\x27],_0x575697[\x27fX\x27]=_0x32b987[\x27fX\x27],_0x575697[\x27fY\x27]=_0x32b987[\x27fY\x27]*this[\x27pRenderParam\x27][_0x48b751][\x27fCosV\x27]+_0x364f41*this[\x27pRenderParam\x27][_0x48b751][\x27fSinV\x27],_0x28b22b=_0x364f41*this[\x27pRenderParam\x27][_0x48b751][\x27fCosV\x27]-_0x32b987[\x27fY\x27]*this[\x27pRenderParam\x27][_0x48b751][\x27fSinV\x27],_0x35b7c5=Math[\x27sqrt\x27](_0x575697[\x27fX\x27]*_0x575697[\x27fX\x27]+_0x575697[\x27fY\x27]*_0x575697[\x27fY\x27]);var\x20_0x32b0bb=Math[\x27sqrt\x27](_0x575697[\x27fX\x27]*_0x575697[\x27fX\x27]+_0x575697[\x27fY\x27]*_0x575697[\x27fY\x27]+_0x28b22b*_0x28b22b),_0x1e58f4=Math[\x27asin\x27](_0x35b7c5/_0x32b0bb)/1.5707963*0.5;_0x575697[\x27fX\x27]=_0x1e58f4*_0x575697[\x27fX\x27]/_0x35b7c5,_0x575697[\x27fY\x27]=_0x1e58f4*_0x575697[\x27fY\x27]/_0x35b7c5,_0x3d0ff9[\x27fX\x27]=_0x575697[\x27fX\x27]*this[\x27pRenderParam\x27][_0x48b751][\x27fCosH\x27]-_0x575697[\x27fY\x27]*this[\x27pRenderParam\x27][_0x48b751][\x27fSinH\x27],_0x3d0ff9[\x27fY\x27]=_0x575697[\x27fX\x27]*this[\x27pRenderParam\x27][_0x48b751][\x27fSinH\x27]+_0x575697[\x27fY\x27]*this[\x27pRenderParam\x27][_0x48b751][\x27fCosH\x27],_0xd2682e[\x27fX\x27]=0x2*_0x3d0ff9[\x27fX\x27]*_0x2db369+_0xadc11f,_0xd2682e[\x27fY\x27]=0x2*_0x3d0ff9[\x27fY\x27]*_0x2db369+_0x321b89;var\x20_0x3be879=this[\x27nBasePTZPointNum\x27][_0x48b751];this[\x27pBasePTZPoints\x27][_0x48b751][_0x3be879][\x27fX\x27]=_0x3d0ff9[\x27fX\x27]+0.5,this[\x27pBasePTZPoints\x27][_0x48b751][_0x3be879][\x27fY\x27]=_0x3d0ff9[\x27fY\x27]+0.5,this[\x27nBasePTZPointNum\x27][_0x48b751]=this[\x27nBasePTZPointNum\x27][_0x48b751]+0x1;var\x20_0x4cdb0d=this[\x27fRX1\x27]<=0x0?0x0:0x1*this[\x27fRX1\x27],_0x1b9ce5=this[\x27fRY1\x27]<=0x0?0x0:this[\x27fRY1\x27]*_0x3a2a3d,_0x50a93e=this[\x27fRX2\x27]>=0x1?0x1-_0x4cdb0d:0x1*this[\x27fRX2\x27]-_0x4cdb0d,_0x3f5b37=this[\x27fRY2\x27]>=0x1?_0x3a2a3d-_0x1b9ce5:this[\x27fRY2\x27]*_0x3a2a3d-_0x1b9ce5;if(_0xd2682e[\x27fX\x27]=(_0xd2682e[\x27fX\x27]-_0x4cdb0d)/_0x50a93e,_0xd2682e[\x27fY\x27]=(_0xd2682e[\x27fY\x27]-_0x1b9ce5)/_0x3f5b37,_0xd2682e[\x27fX\x27]<=0x1&&_0xd2682e[\x27fY\x27]<=0x1&&_0xd2682e[\x27fX\x27]>=0x0&&_0xd2682e[\x27fY\x27]>=0x0){var\x20_0x58dd4c=this[\x27nOriPTZPointNum\x27][_0x48b751];this[\x27pOriPTZPoints\x27][_0x48b751][_0x58dd4c][\x27fX\x27]=_0xd2682e[\x27fX\x27],this[\x27pOriPTZPoints\x27][_0x48b751][_0x58dd4c][\x27fY\x27]=_0xd2682e[\x27fY\x27],this[\x27nOriPTZPointNum\x27][_0x48b751]=this[\x27nOriPTZPointNum\x27][_0x48b751]+0x1;}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetFishPTZWALL\x27,\x27value\x27:function(_0x3f78bb,_0x4c2899,_0x3b58b7){var\x20_0x133d66,_0x567dfd,_0x51ab97,_0x1c4087,_0xd87861,_0x3fdb72,_0x3dc518,_0x434d50,_0x4e45fc={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x54e4d9={\x27fX\x27:0x0,\x27fY\x27:0x0},_0xab9006={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x57d587={};_0xd87861=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x3fdb72=(this[\x27fRX1\x27]+this[\x27fRX2\x27])/0x2*0x1,_0x3dc518=(this[\x27fRY1\x27]+this[\x27fRY2\x27])/0x2*_0xd87861,_0x434d50=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1,_0x4e45fc[\x27fX\x27]=_0x4c2899-0.5,_0x4e45fc[\x27fY\x27]=_0x3f78bb-0.5,_0x133d66=this[\x27pRenderParam\x27][_0x3b58b7][\x27fZoom\x27],_0x54e4d9[\x27fX\x27]=_0x4e45fc[\x27fX\x27],_0x54e4d9[\x27fY\x27]=_0x4e45fc[\x27fY\x27]*this[\x27pRenderParam\x27][_0x3b58b7][\x27fCosV\x27]+_0x133d66*this[\x27pRenderParam\x27][_0x3b58b7][\x27fSinV\x27],_0x567dfd=_0x133d66*this[\x27pRenderParam\x27][_0x3b58b7][\x27fCosV\x27]-_0x4e45fc[\x27fY\x27]*this[\x27pRenderParam\x27][_0x3b58b7][\x27fSinV\x27],_0xab9006[\x27fX\x27]=_0x54e4d9[\x27fX\x27]*this[\x27pRenderParam\x27][_0x3b58b7][\x27fCosH\x27]+_0x567dfd*this[\x27pRenderParam\x27][_0x3b58b7][\x27fSinH\x27],_0xab9006[\x27fY\x27]=_0x54e4d9[\x27fY\x27],_0x51ab97=_0x567dfd*this[\x27pRenderParam\x27][_0x3b58b7][\x27fCosH\x27]-_0x54e4d9[\x27fX\x27]*this[\x27pRenderParam\x27][_0x3b58b7][\x27fSinH\x27],_0x1c4087=Math[\x27sqrt\x27](_0xab9006[\x27fX\x27]*_0xab9006[\x27fX\x27]+_0xab9006[\x27fY\x27]*_0xab9006[\x27fY\x27]);var\x20_0x1e6a52=Math[\x27sqrt\x27](_0xab9006[\x27fX\x27]*_0xab9006[\x27fX\x27]+_0xab9006[\x27fY\x27]*_0xab9006[\x27fY\x27]+_0x51ab97*_0x51ab97),_0xe6fbb5=Math[\x27asin\x27](_0x1c4087/_0x1e6a52)/1.5707963*0.5;_0x57d587[\x27fX\x27]=_0xe6fbb5*_0xab9006[\x27fX\x27]/_0x1c4087*_0x434d50*0x2+_0x3fdb72,_0x57d587[\x27fY\x27]=_0xe6fbb5*_0xab9006[\x27fY\x27]/_0x1c4087*_0x434d50*0x2+_0x3dc518;var\x20_0x31fd43=this[\x27nBasePTZPointNum\x27][_0x3b58b7];this[\x27pBasePTZPoints\x27][_0x3b58b7][_0x31fd43][\x27fX\x27]=_0xe6fbb5*_0xab9006[\x27fX\x27]/_0x1c4087+0.5,this[\x27pBasePTZPoints\x27][_0x3b58b7][_0x31fd43][\x27fY\x27]=_0xe6fbb5*_0xab9006[\x27fY\x27]/_0x1c4087+0.5,this[\x27nBasePTZPointNum\x27][_0x3b58b7]=this[\x27nBasePTZPointNum\x27][_0x3b58b7]+0x1;var\x20_0x1693e8=this[\x27fRX1\x27]<=0x0?0x0:0x1*this[\x27fRX1\x27],_0x15f54d=this[\x27fRY1\x27]<=0x0?0x0:this[\x27fRY1\x27]*_0xd87861,_0x29334a=this[\x27fRX2\x27]>=0x1?0x1-_0x1693e8:0x1*this[\x27fRX2\x27]-_0x1693e8,_0xa6d92e=this[\x27fRY2\x27]>=0x1?_0xd87861-_0x15f54d:this[\x27fRY2\x27]*_0xd87861-_0x15f54d;if(_0x57d587[\x27fX\x27]=(_0x57d587[\x27fX\x27]-_0x1693e8)/_0x29334a,_0x57d587[\x27fY\x27]=(_0x57d587[\x27fY\x27]-_0x15f54d)/_0xa6d92e,_0x57d587[\x27fX\x27]<=0x1&&_0x57d587[\x27fY\x27]<=0x1&&_0x57d587[\x27fX\x27]>=0x0&&_0x57d587[\x27fY\x27]>=0x0){var\x20_0x5b8e90=this[\x27nOriPTZPointNum\x27][_0x3b58b7];this[\x27pOriPTZPoints\x27][_0x3b58b7][_0x5b8e90][\x27fX\x27]=_0x57d587[\x27fX\x27],this[\x27pOriPTZPoints\x27][_0x3b58b7][_0x5b8e90][\x27fY\x27]=_0x57d587[\x27fY\x27],this[\x27nOriPTZPointNum\x27][_0x3b58b7]=this[\x27nOriPTZPointNum\x27][_0x3b58b7]+0x1;}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetPanoPTZCeiling\x27,\x27value\x27:function(_0x2b7db0){if(null==this[\x27pRenderParam\x27][_0x2b7db0]||null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==this[\x27pBasePTZPoints\x27][_0x2b7db0])return\x20_0x127571;var\x20_0x2ea2fa,_0x17cc07,_0x11ce5f=this[\x27nBasePTZPointNum\x27][_0x2b7db0];_0x2ea2fa=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x17cc07=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x4393fd,_0xba81cc=0x0;(this[\x27fRX2\x27]>0x1||this[\x27fRY2\x27]>0x1||this[\x27fRY1\x27]<0x0||this[\x27fRX1\x27]<0x0)&&(this[\x27fRX1\x27]<0x0&&(_0x4393fd=0x1*-this[\x27fRX1\x27])>_0xba81cc&&(_0xba81cc=_0x4393fd),this[\x27fRX2\x27]>0x1&&(_0x4393fd=0x1*(this[\x27fRX2\x27]-0x1))>_0xba81cc&&(_0xba81cc=_0x4393fd),this[\x27fRY1\x27]<0x0&&(_0x4393fd=-this[\x27fRY1\x27]*_0x2ea2fa)>_0xba81cc&&(_0xba81cc=_0x4393fd),this[\x27fRY2\x27]>0x1&&(_0x4393fd=(this[\x27fRY2\x27]-0x1)*_0x2ea2fa)>_0xba81cc&&(_0xba81cc=_0x4393fd));for(var\x20_0x11985d,_0x2ff48b=_0xba81cc/_0x17cc07,_0x4db0ae={\x27fX\x27:0x0,\x27fY\x27:0x0},_0xe79bd6={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x4b200d=0x0;_0x4b200d<_0x11ce5f;++_0x4b200d)if(_0xe79bd6[\x27fX\x27]=this[\x27pBasePTZPoints\x27][_0x2b7db0][_0x4b200d][\x27fX\x27],_0xe79bd6[\x27fY\x27]=this[\x27pBasePTZPoints\x27][_0x2b7db0][_0x4b200d][\x27fY\x27],!(Math[\x27abs\x27](_0xe79bd6[\x27fX\x27]-0.5)<_0x423dca&&Math[\x27abs\x27](_0xe79bd6[\x27fY\x27]-0.5)<_0x423dca)){var\x20_0x560939={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x1228ae={\x27fX\x27:0x0,\x27fY\x27:0x0};_0x560939[\x27fX\x27]=_0xe79bd6[\x27fX\x27]-0.5,_0x560939[\x27fY\x27]=_0xe79bd6[\x27fY\x27]-0.5,_0x1228ae[\x27fX\x27]=-0.5*Math[\x27sin\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]),_0x1228ae[\x27fY\x27]=0.5*Math[\x27cos\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]);var\x20_0xd1200a=Math[\x27sqrt\x27](_0x560939[\x27fX\x27]*_0x560939[\x27fX\x27]+_0x560939[\x27fY\x27]*_0x560939[\x27fY\x27]),_0x3f3eb5=Math[\x27sqrt\x27](_0x1228ae[\x27fX\x27]*_0x1228ae[\x27fX\x27]+_0x1228ae[\x27fY\x27]*_0x1228ae[\x27fY\x27]);if(_0x11985d=Math[\x27acos\x27]((_0x560939[\x27fX\x27]*_0x1228ae[\x27fX\x27]+_0x560939[\x27fY\x27]*_0x1228ae[\x27fY\x27])/(_0xd1200a*_0x3f3eb5)),_0x560939[\x27fX\x27]*_0x1228ae[\x27fY\x27]-_0x560939[\x27fY\x27]*_0x1228ae[\x27fX\x27]>0x0&&(_0x11985d=6.2831852-_0x11985d),_0x4db0ae[\x27fX\x27]=_0x11985d/6.2831853,_0x4db0ae[\x27fY\x27]=(0x2*(0.5-_0xd1200a)-_0x2ff48b)/(0.8-_0x2ff48b),_0x4db0ae[\x27fY\x27]>=0x0&&_0x4db0ae[\x27fX\x27]>=0x0&&_0x4db0ae[\x27fY\x27]<=0x1&&_0x4db0ae[\x27fX\x27]<=0x1){var\x20_0x535f83=this[\x27nPanoPTZPointNum\x27][_0x2b7db0];this[\x27pPanoPTZPoints\x27][_0x2b7db0][_0x535f83][\x27fX\x27]=_0x4db0ae[\x27fX\x27],this[\x27pPanoPTZPoints\x27][_0x2b7db0][_0x535f83][\x27fY\x27]=_0x4db0ae[\x27fY\x27],this[\x27nPanoPTZPointNum\x27][_0x2b7db0]=this[\x27nPanoPTZPointNum\x27][_0x2b7db0]+0x1;}}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetPanoPTZFloor\x27,\x27value\x27:function(_0x3a806c){if(null==this[\x27pRenderParam\x27][_0x3a806c]||null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==this[\x27pBasePTZPoints\x27][_0x3a806c])return\x20_0x127571;var\x20_0x10ecd3,_0x26428d,_0xe9365b=this[\x27nBasePTZPointNum\x27][_0x3a806c];_0x10ecd3=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x26428d=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x4e1733,_0x49b30c=0x0;(this[\x27fRX2\x27]>0x1||this[\x27fRY2\x27]>0x1||this[\x27fRY1\x27]<0x0||this[\x27fRX1\x27]<0x0)&&(this[\x27fRX1\x27]<0x0&&(_0x4e1733=0x1*-this[\x27fRX1\x27])>_0x49b30c&&(_0x49b30c=_0x4e1733),this[\x27fRX2\x27]>0x1&&(_0x4e1733=0x1*(this[\x27fRX2\x27]-0x1))>_0x49b30c&&(_0x49b30c=_0x4e1733),this[\x27fRY1\x27]<0x0&&(_0x4e1733=-this[\x27fRY1\x27]*_0x10ecd3)>_0x49b30c&&(_0x49b30c=_0x4e1733),this[\x27fRY2\x27]>0x1&&(_0x4e1733=(this[\x27fRY2\x27]-0x1)*_0x10ecd3)>_0x49b30c&&(_0x49b30c=_0x4e1733));for(var\x20_0x223052,_0x2a4be3=_0x49b30c/_0x26428d,_0x51f306={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x50e5bf={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x4c4938=0x0;_0x4c4938<_0xe9365b;++_0x4c4938)if(_0x50e5bf[\x27fX\x27]=this[\x27pBasePTZPoints\x27][_0x3a806c][_0x4c4938][\x27fX\x27],_0x50e5bf[\x27fY\x27]=this[\x27pBasePTZPoints\x27][_0x3a806c][_0x4c4938][\x27fY\x27],!(Math[\x27abs\x27](_0x50e5bf[\x27fX\x27]-0.5)<_0x423dca&&Math[\x27abs\x27](_0x50e5bf[\x27fY\x27]-0.5)<_0x423dca)){var\x20_0x3834de={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x21f98b={\x27fX\x27:0x0,\x27fY\x27:0x0};_0x3834de[\x27fX\x27]=_0x50e5bf[\x27fX\x27]-0.5,_0x3834de[\x27fY\x27]=_0x50e5bf[\x27fY\x27]-0.5,_0x21f98b[\x27fX\x27]=-0.5*Math[\x27sin\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]),_0x21f98b[\x27fY\x27]=0.5*Math[\x27cos\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]);var\x20_0x5c0053=Math[\x27sqrt\x27](_0x3834de[\x27fX\x27]*_0x3834de[\x27fX\x27]+_0x3834de[\x27fY\x27]*_0x3834de[\x27fY\x27]),_0x115bef=Math[\x27sqrt\x27](_0x21f98b[\x27fX\x27]*_0x21f98b[\x27fX\x27]+_0x21f98b[\x27fY\x27]*_0x21f98b[\x27fY\x27]);if(_0x223052=Math[\x27acos\x27]((_0x3834de[\x27fX\x27]*_0x21f98b[\x27fX\x27]+_0x3834de[\x27fY\x27]*_0x21f98b[\x27fY\x27])/(_0x5c0053*_0x115bef)),_0x3834de[\x27fX\x27]*_0x21f98b[\x27fY\x27]-_0x3834de[\x27fY\x27]*_0x21f98b[\x27fX\x27]>0x0&&(_0x223052=6.2831852-_0x223052),_0x51f306[\x27fX\x27]=0x1-_0x223052/6.2831853,_0x51f306[\x27fY\x27]=0x1-(0x2*(0.5-_0x5c0053)-_0x2a4be3)/(0.8-_0x2a4be3),_0x51f306[\x27fY\x27]>=0x0&&_0x51f306[\x27fX\x27]>=0x0&&_0x51f306[\x27fY\x27]<=0x1&&_0x51f306[\x27fX\x27]<=0x1){var\x20_0x11238c=this[\x27nPanoPTZPointNum\x27][_0x3a806c];this[\x27pPanoPTZPoints\x27][_0x3a806c][_0x11238c][\x27fX\x27]=_0x51f306[\x27fX\x27],this[\x27pPanoPTZPoints\x27][_0x3a806c][_0x11238c][\x27fY\x27]=_0x51f306[\x27fY\x27],this[\x27nPanoPTZPointNum\x27][_0x3a806c]=this[\x27nPanoPTZPointNum\x27][_0x3a806c]+0x1;}}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetPanoPTZWall\x27,\x27value\x27:function(_0x8c0046){if(null==this[\x27pRenderParam\x27][_0x8c0046]||null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==this[\x27pBasePTZPoints\x27][_0x8c0046])return\x20_0x127571;var\x20_0x1dda7a,_0x3aa1e6,_0x476ace=this[\x27nBasePTZPointNum\x27][_0x8c0046];_0x1dda7a=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x3aa1e6=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x3dff93,_0x4f3a26,_0x1723a4,_0x53cc87,_0x5680ec,_0x588edd=0x0,_0x2fb353=0x1,_0xa77182=0.1,_0x2cc17d=0.9;this[\x27fRX1\x27]<0x0&&(_0x3dff93=0x1*-this[\x27fRX1\x27],_0x588edd=_0x3dff93/=0x2*_0x3aa1e6),this[\x27fRX2\x27]>0x1&&(_0x4f3a26=0x1*(this[\x27fRX2\x27]-0x1),_0x2fb353=0x1-(_0x4f3a26/=0x2*_0x3aa1e6)),this[\x27fRY1\x27]<0x0&&(_0x1723a4=-this[\x27fRY1\x27]*_0x1dda7a,_0xa77182=(_0x1723a4/=0x2*_0x3aa1e6)>0.1?_0x1723a4:0.1),this[\x27fRY2\x27]>0x1&&(_0x53cc87=(this[\x27fRY2\x27]-0x1)*_0x1dda7a,_0x2cc17d=(_0x53cc87/=0x2*_0x3aa1e6)>0x1-0.9?0x1-_0x53cc87:0.9);for(var\x20_0xd2206c={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x16b838={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x4e6bdc=0x0;_0x4e6bdc<_0x476ace;++_0x4e6bdc){_0x16b838[\x27fX\x27]=this[\x27pBasePTZPoints\x27][_0x8c0046][_0x4e6bdc][\x27fX\x27],_0x16b838[\x27fY\x27]=this[\x27pBasePTZPoints\x27][_0x8c0046][_0x4e6bdc][\x27fY\x27];var\x20_0x2e4c46=0x2*_0x16b838[\x27fX\x27]*_0x3aa1e6,_0x21af84=0x2*_0x16b838[\x27fY\x27]*_0x3aa1e6;if(_0x5680ec=Math[\x27sqrt\x27](_0x3aa1e6*_0x3aa1e6-(_0x21af84-_0x3aa1e6)*(_0x21af84-_0x3aa1e6)),!(Math[\x27abs\x27](_0x5680ec)<_0x423dca)&&(_0x16b838[\x27fX\x27]=_0x3aa1e6*(_0x2e4c46-_0x3aa1e6)/_0x5680ec+_0x3aa1e6,_0x16b838[\x27fY\x27]=_0x21af84,_0xd2206c[\x27fX\x27]=(_0x16b838[\x27fX\x27]-0x2*_0x588edd*_0x3aa1e6)/(0x2*(_0x2fb353-_0x588edd)*_0x3aa1e6),_0xd2206c[\x27fY\x27]=(_0x16b838[\x27fY\x27]-0x2*_0xa77182*_0x3aa1e6)/(0x2*(_0x2cc17d-_0xa77182)*_0x3aa1e6),_0xd2206c[\x27fY\x27]>=0x0&&_0xd2206c[\x27fX\x27]>=0x0&&_0xd2206c[\x27fY\x27]<=0x1&&_0xd2206c[\x27fX\x27]<=0x1)){var\x20_0x567106=this[\x27nPanoPTZPointNum\x27][_0x8c0046];this[\x27pPanoPTZPoints\x27][_0x8c0046][_0x567106][\x27fX\x27]=_0xd2206c[\x27fX\x27],this[\x27pPanoPTZPoints\x27][_0x8c0046][_0x567106][\x27fY\x27]=_0xd2206c[\x27fY\x27],this[\x27nPanoPTZPointNum\x27][_0x8c0046]=this[\x27nPanoPTZPointNum\x27][_0x8c0046]+0x1;}}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetPointPano2FishCeiling\x27,\x27value\x27:function(_0x406d64,_0x2d0795,_0x6ace57){if(null==_0x406d64||null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;var\x20_0x169248,_0x53a028;_0x169248=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x53a028=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x1af3a3,_0x572e39=0x0,_0x4ee6fd=0x1,_0x49c02e=0x0,_0x2dcba9=0x1,_0x16b778=0x0;(this[\x27fRX2\x27]>0x1||this[\x27fRY2\x27]>0x1||this[\x27fRX1\x27]<0x0||this[\x27fRY1\x27]<0x0)&&(this[\x27fRX1\x27]<0x0&&((_0x1af3a3=0x1*-this[\x27fRX1\x27])>_0x16b778&&(_0x16b778=_0x1af3a3),_0x572e39=_0x1af3a3/=0x2*_0x53a028),this[\x27fRX2\x27]>0x1&&((_0x1af3a3=0x1*(this[\x27fRX2\x27]-0x1))>_0x16b778&&(_0x16b778=_0x1af3a3),_0x4ee6fd=0x1-(_0x1af3a3/=0x2*_0x53a028)),this[\x27fRY1\x27]<0x0&&((_0x1af3a3=-this[\x27fRY1\x27]*_0x169248)>_0x16b778&&(_0x16b778=_0x1af3a3),_0x49c02e=_0x1af3a3/=0x2*_0x53a028),this[\x27fRY2\x27]>0x1&&((_0x1af3a3=(this[\x27fRY2\x27]-0x1)*_0x169248)>_0x16b778&&(_0x16b778=_0x1af3a3),_0x2dcba9=0x1-(_0x1af3a3/=0x2*_0x53a028)));var\x20_0x5b5483,_0x599bc8,_0x546249=_0x16b778/_0x53a028,_0x2f2b5f={},_0x52e168={};return\x20_0x2f2b5f[\x27fX\x27]=_0x2d0795,_0x2f2b5f[\x27fY\x27]=(0.8-_0x546249)*_0x6ace57+_0x546249,_0x5b5483=6.2831853*_0x2f2b5f[\x27fX\x27]+this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27],_0x599bc8=0.5*(0x1-_0x2f2b5f[\x27fY\x27]),_0x52e168[\x27fX\x27]=0.5-_0x599bc8*Math[\x27sin\x27](_0x5b5483),_0x52e168[\x27fY\x27]=0.5+_0x599bc8*Math[\x27cos\x27](_0x5b5483),_0x52e168[\x27fX\x27]=(_0x52e168[\x27fX\x27]-_0x572e39)/(_0x4ee6fd-_0x572e39),_0x52e168[\x27fY\x27]=(_0x52e168[\x27fY\x27]-_0x49c02e)/(_0x2dcba9-_0x49c02e),_0x406d64[\x27fX\x27]=_0x52e168[\x27fX\x27],_0x406d64[\x27fY\x27]=_0x52e168[\x27fY\x27],_0x26bcbc;}},{\x27key\x27:\x27GetPointPano2FishFloor\x27,\x27value\x27:function(_0xbb663d,_0x95c264,_0x5dc177){if(null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==_0xbb663d)return\x20_0x4a21f9;var\x20_0x14e777,_0x433b6c;_0x14e777=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x433b6c=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x5c82ef,_0x5a3aaa=0x0,_0x45b343=0x1,_0x29ad09=0x0,_0x4f8853=0x1,_0x339769=0x0;(this[\x27fRX2\x27]>0x1||this[\x27fRY2\x27]>0x1||this[\x27fRX1\x27]<0x0||this[\x27fRY1\x27]<0x0)&&(this[\x27fRX1\x27]<0x0&&((_0x5c82ef=0x1*-this[\x27fRX1\x27])>_0x339769&&(_0x339769=_0x5c82ef),_0x5a3aaa=_0x5c82ef/=0x2*_0x433b6c),this[\x27fRX2\x27]>0x1&&((_0x5c82ef=0x1*(this[\x27fRX2\x27]-0x1))>_0x339769&&(_0x339769=_0x5c82ef),_0x45b343=0x1-(_0x5c82ef/=0x2*_0x433b6c)),this[\x27fRY1\x27]<0x0&&((_0x5c82ef=-this[\x27fRY1\x27]*_0x14e777)>_0x339769&&(_0x339769=_0x5c82ef),_0x29ad09=_0x5c82ef/=0x2*_0x433b6c),this[\x27fRY2\x27]>0x1&&((_0x5c82ef=(this[\x27fRY2\x27]-0x1)*_0x14e777)>_0x339769&&(_0x339769=_0x5c82ef),_0x4f8853=0x1-(_0x5c82ef/=0x2*_0x433b6c)));var\x20_0x2c26ab,_0x1b536e,_0x51d40c=_0x339769/_0x433b6c,_0x5cad0f={},_0x73528={};return\x20_0x5cad0f[\x27fX\x27]=0x1-_0x95c264,_0x5cad0f[\x27fY\x27]=(0.8-_0x51d40c)*(0x1-_0x5dc177)+_0x51d40c,_0x2c26ab=6.2831853*_0x5cad0f[\x27fX\x27]+this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27],_0x1b536e=0.5*(0x1-_0x5cad0f[\x27fY\x27]),_0x73528[\x27fX\x27]=0.5-_0x1b536e*Math[\x27sin\x27](_0x2c26ab),_0x73528[\x27fY\x27]=0.5+_0x1b536e*Math[\x27cos\x27](_0x2c26ab),_0x73528[\x27fX\x27]=(_0x73528[\x27fX\x27]-_0x5a3aaa)/(_0x45b343-_0x5a3aaa),_0x73528[\x27fY\x27]=(_0x73528[\x27fY\x27]-_0x29ad09)/(_0x4f8853-_0x29ad09),_0xbb663d[\x27fX\x27]=_0x73528[\x27fX\x27],_0xbb663d[\x27fY\x27]=_0x73528[\x27fY\x27],_0x26bcbc;}},{\x27key\x27:\x27GetPointPano2FishWall\x27,\x27value\x27:function(_0x3007af,_0x2275e7,_0x143be1){if(null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==_0x3007af)return\x20_0x4a21f9;var\x20_0x3590f7,_0x508d0a;_0x3590f7=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x508d0a=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x5b8fac,_0x20a5fb,_0x351c2a,_0x318d96,_0x1881f7=0x0,_0x13c51e=0x1,_0x4812db=0.1,_0x53119c=0.9,_0x4e2aa2=0x0,_0xb75096=0x1,_0x565009=0x0,_0x8f208a=0x1;this[\x27fRX1\x27]<0x0&&(_0x5b8fac=0x1*-this[\x27fRX1\x27],_0x1881f7=_0x5b8fac/=0x2*_0x508d0a,_0x4e2aa2=_0x5b8fac),this[\x27fRX2\x27]>0x1&&(_0x20a5fb=0x1*(this[\x27fRX2\x27]-0x1),_0x13c51e=0x1-(_0x20a5fb/=0x2*_0x508d0a),_0xb75096=0x1-_0x20a5fb),this[\x27fRY1\x27]<0x0&&(_0x351c2a=-this[\x27fRY1\x27]*_0x3590f7,_0x4812db=(_0x351c2a/=0x2*_0x508d0a)>0.1?_0x351c2a:0.1,_0x565009=_0x351c2a),this[\x27fRY2\x27]>0x1&&(_0x318d96=(this[\x27fRY2\x27]-0x1)*_0x3590f7,_0x53119c=(_0x318d96/=0x2*_0x508d0a)>0x1-0.9?0x1-_0x318d96:0.9,_0x8f208a=0x1-_0x318d96);var\x20_0x19cc91={},_0x2c4c93={};_0x19cc91[\x27fX\x27]=_0x2275e7*(_0x13c51e-_0x1881f7)+_0x1881f7,_0x19cc91[\x27fY\x27]=_0x143be1*(_0x53119c-_0x4812db)+_0x4812db;var\x20_0x2e0120=Math[\x27sqrt\x27](0.25-(_0x19cc91[\x27fY\x27]-0.5)*(_0x19cc91[\x27fY\x27]-0.5));return\x20_0x2c4c93[\x27fX\x27]=(_0x19cc91[\x27fX\x27]-0.5)*_0x2e0120/0.5+0.5,_0x2c4c93[\x27fY\x27]=_0x19cc91[\x27fY\x27],_0x2c4c93[\x27fX\x27]=(_0x2c4c93[\x27fX\x27]-_0x4e2aa2)/(_0xb75096-_0x4e2aa2),_0x2c4c93[\x27fY\x27]=(_0x2c4c93[\x27fY\x27]-_0x565009)/(_0x8f208a-_0x565009),_0x3007af[\x27fX\x27]=_0x2c4c93[\x27fX\x27],_0x3007af[\x27fY\x27]=_0x2c4c93[\x27fY\x27],_0x26bcbc;}},{\x27key\x27:\x27UpdatePTZPosition\x27,\x27value\x27:function(_0x4e1df1,_0x26d0ed,_0x11be90){if(null==this[\x27pRenderParam\x27][_0x4e1df1])return\x20_0x127571;var\x20_0x1f9ffc={\x27fHAngleSin\x27:0x0,\x27fHAngleCos\x27:0x0,\x27fVAngleSin\x27:0x0,\x27fVAngleCos\x27:0x0},_0x4546a7=_0x26bcbc;if(_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]==this[\x27pRenderParam\x27][_0x4e1df1][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]==this[\x27pRenderParam\x27][_0x4e1df1][\x27nDisplayEffect\x27]){if((_0x4546a7=this[\x27ComputeAngleVertical\x27](_0x26d0ed,_0x11be90,_0x1f9ffc,this[\x27pRenderParam\x27][_0x4e1df1][\x27nDisplayEffect\x27]))!=_0x26bcbc)return\x20_0x4546a7;}else{if(_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]!=this[\x27pRenderParam\x27][_0x4e1df1][\x27nDisplayEffect\x27])return\x20_0x388f7c;if((_0x4546a7=this[\x27ComputeAngleHorizontal\x27](_0x26d0ed,_0x11be90,_0x1f9ffc))!=_0x26bcbc)return\x20_0x4546a7;}return\x200x0==this[\x27IsInImage\x27](this[\x27fRX1\x27],this[\x27fRX2\x27],this[\x27fRY1\x27],this[\x27fRY2\x27],_0x1f9ffc,this[\x27pRenderParam\x27][_0x4e1df1][\x27fZoom\x27],this[\x27pRenderParam\x27][_0x4e1df1][\x27nDisplayEffect\x27])?_0x4a21f9:(this[\x27pRenderParam\x27][_0x4e1df1][\x27fCosH\x27]=_0x1f9ffc[\x27fHAngleCos\x27],this[\x27pRenderParam\x27][_0x4e1df1][\x27fSinH\x27]=_0x1f9ffc[\x27fHAngleSin\x27],this[\x27pRenderParam\x27][_0x4e1df1][\x27fCosV\x27]=_0x1f9ffc[\x27fVAngleCos\x27],this[\x27pRenderParam\x27][_0x4e1df1][\x27fSinV\x27]=_0x1f9ffc[\x27fVAngleSin\x27],_0x26bcbc);}},{\x27key\x27:\x27JudgeDisplayEffect\x27,\x27value\x27:function(_0x4ae545){var\x20_0x46ef6c=0x0;switch(_0x46ef6c){case\x200x0:return\x20_0x46ef6c=this[\x27GetPlaceType\x27](_0x4ae545),0x4==this[\x27nPlaceType\x27]&&(this[\x27nPlaceType\x27]=0x0),_0x26bcbc;case\x200x3:return(_0x46ef6c=this[\x27GetPlaceType\x27](_0x4ae545))==this[\x27nPlaceType\x27]||0x4==this[\x27nPlaceType\x27]?_0x26bcbc:_0x388f7c;case\x200x2:case\x200x1:return(_0x46ef6c=this[\x27GetPlaceType\x27](_0x4ae545))==this[\x27nPlaceType\x27]||0x4==_0x46ef6c?_0x26bcbc:_0x388f7c;default:return\x20_0x388f7c;}return\x20_0x388f7c;}},{\x27key\x27:\x27GetPlaceType\x27,\x27value\x27:function(_0x5eff61){switch(_0x5eff61){case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_CEILING\x27]:return\x200x3;case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANARAMA_FLOOR_180\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]:return\x200x2;case\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_VERTICAL_WALL\x27]:return\x200x1;case\x20_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PLANET\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_SPHERE\x27]:case\x20_0x3409b0[\x27SR_DE_FISH_PLANET\x27]:return\x200x4;default:return\x200x0;}return\x200x0;}},{\x27key\x27:\x27SetFishParam\x27,\x27value\x27:function(_0x368d91,_0x5c30c6){if(_0x368d91<0x0||_0x368d91>=_0x4f027d)return\x20_0x4a21f9;if(null==_0x5c30c6)return\x20_0x4a21f9;if(null==this[\x27pRenderParam\x27][_0x368d91])return\x20_0x127571;var\x20_0x5f34af=_0x26bcbc;switch(_0x5c30c6[\x27nFishParamType\x27]){case\x20_0x3b72f0:if((_0x5f34af=this[\x27UpdateCircyeParam\x27](_0x5c30c6[\x27fRXLeft\x27],_0x5c30c6[\x27fRXRight\x27],_0x5c30c6[\x27fRYTop\x27],_0x5c30c6[\x27fRYBottom\x27]))!=_0x26bcbc)return\x20_0x5f34af;this[\x27pRenderParam\x27][_0x368d91][\x27bCut\x27]=_0x5c30c6[\x27bCut\x27],this[\x27bBlack\x27]=_0x5c30c6[\x27bBlack\x27];break;case\x20_0x2948e8:if(_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27])return\x20_0x388f7c;if((_0x5f34af=this[\x27UpdateWideScanAngle\x27](_0x368d91,_0x5c30c6[\x27fAngle\x27]))!=_0x26bcbc)return\x20_0x5f34af;this[\x27pFishParam\x27][_0x368d91][\x27fAngle\x27]=_0x5c30c6[\x27fAngle\x27];break;case\x20_0x1ac653:if(_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27])return\x20_0x388f7c;if((_0x5f34af=this[\x27UpdateRangeParam\x27](_0x368d91,_0x5c30c6[\x27fZoom\x27]))!=_0x26bcbc)return\x20_0x5f34af;this[\x27pFishParam\x27][_0x368d91][\x27fZoom\x27]=_0x5c30c6[\x27fZoom\x27];break;case\x20_0x5a3c33:if(_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]!=this[\x27pRenderParam\x27][_0x368d91][\x27nDisplayEffect\x27])return\x20_0x388f7c;if((_0x5f34af=this[\x27UpdatePTZPosition\x27](_0x368d91,_0x5c30c6[\x27fPTZX\x27],_0x5c30c6[\x27fPTZY\x27],this[\x27pRenderParam\x27][_0x368d91][\x27fZoom\x27],!0x0))!=_0x26bcbc)return\x20_0x5f34af;this[\x27pFishParam\x27][_0x368d91][\x27fPTZX\x27]=_0x5c30c6[\x27fPTZX\x27],this[\x27pFishParam\x27][_0x368d91][\x27fPTZY\x27]=_0x5c30c6[\x27fPTZY\x27];break;case\x20_0x3c0642:return\x20_0x388f7c;}return\x20_0x5f34af=this[\x27ComputePTZPoints\x27]();}},{\x27key\x27:\x27GetFishParam\x27,\x27value\x27:function(_0xfe11a9,_0x3c95ce){return\x20_0xfe11a9<0x0||_0xfe11a9>=_0x4f027d||null==_0x3c95ce||null==this[\x27pFishParam\x27][_0xfe11a9]?_0x4a21f9:(_0x3c95ce[\x27fRXLeft\x27]=this[\x27fRX1\x27],_0x3c95ce[\x27fRXRight\x27]=this[\x27fRX2\x27],_0x3c95ce[\x27fRYTop\x27]=this[\x27fRY1\x27],_0x3c95ce[\x27fRYBottom\x27]=this[\x27fRY2\x27],_0x3c95ce[\x27bBlack\x27]=this[\x27bBlack\x27],_0x3c95ce[\x27bCut\x27]=this[\x27pRenderParam\x27][_0xfe11a9][\x27bCut\x27],_0x3c95ce[\x27nFishParamType\x27]=this[\x27pFishParam\x27][_0xfe11a9][\x27nFishParamType\x27],_0x3c95ce[\x27fAngle\x27]=this[\x27pFishParam\x27][_0xfe11a9][\x27fAngle\x27],_0x3c95ce[\x27fZoom\x27]=this[\x27pFishParam\x27][_0xfe11a9][\x27fZoom\x27],_0x3c95ce[\x27fPTZX\x27]=this[\x27pFishParam\x27][_0xfe11a9][\x27fPTZX\x27],_0x3c95ce[\x27fPTZY\x27]=this[\x27pFishParam\x27][_0xfe11a9][\x27fPTZY\x27],_0x26bcbc);}},{\x27key\x27:\x27GetRenderParam\x27,\x27value\x27:function(_0x3e3fd0,_0x537433){return\x20_0x3e3fd0<0x0||_0x3e3fd0>=_0x4f027d||null==_0x537433||null==this[\x27pRenderParam\x27][_0x3e3fd0]?_0x4a21f9:(_0x537433[\x27fRXLeft\x27]=this[\x27fRX1\x27],_0x537433[\x27fRXRight\x27]=this[\x27fRX2\x27],_0x537433[\x27fRYTop\x27]=this[\x27fRY1\x27],_0x537433[\x27fRYBottom\x27]=this[\x27fRY2\x27],_0x537433[\x27bBlack\x27]=this[\x27bBlack\x27],_0x537433[\x27fCosH\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27fCosH\x27],_0x537433[\x27fSinH\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27fSinH\x27],_0x537433[\x27fCosV\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27fCosV\x27],_0x537433[\x27fSinV\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27fSinV\x27],_0x537433[\x27fAngle\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27fAngle\x27],_0x537433[\x27fZoom\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27fZoom\x27],_0x537433[\x27nDisplayEffect\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27nDisplayEffect\x27],_0x537433[\x27bCut\x27]=this[\x27pRenderParam\x27][_0x3e3fd0][\x27bCut\x27],_0x26bcbc);}},{\x27key\x27:\x27UpdateCircyeParam\x27,\x27value\x27:function(_0x3a3b21,_0x564e26,_0x23ee4e,_0x988509){if(_0x3a3b21<=-0.5||_0x3a3b21>=0.4||_0x564e26<=0.6||_0x564e26>=1.5||_0x23ee4e<=-0.5||_0x23ee4e>=0.4||_0x988509<=0.6||_0x988509>=1.5||_0x3a3b21+_0x564e26<=0.8||_0x3a3b21+_0x564e26>=1.2||_0x23ee4e+_0x988509<=0.8||_0x23ee4e+_0x988509>=1.2)return\x20_0x4a21f9;if(_0x3a3b21<0x0||_0x564e26>0x1||_0x23ee4e<0x0||_0x988509>0x1){for(var\x20_0x571b6b=0x0;_0x571b6b<_0x4f027d;++_0x571b6b)if(_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]==this[\x27pRenderParam\x27][_0x571b6b][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]==this[\x27pRenderParam\x27][_0x571b6b][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]==this[\x27pRenderParam\x27][_0x571b6b][\x27nDisplayEffect\x27]){var\x20_0x1b843d={};if(_0x1b843d[\x27fHAngleCos\x27]=this[\x27pRenderParam\x27][_0x571b6b][\x27fCosH\x27],_0x1b843d[\x27fHAngleSin\x27]=this[\x27pRenderParam\x27][_0x571b6b][\x27fSinH\x27],_0x1b843d[\x27fVAngleCos\x27]=this[\x27pRenderParam\x27][_0x571b6b][\x27fCosV\x27],_0x1b843d[\x27fVAngleSin\x27]=this[\x27pRenderParam\x27][_0x571b6b][\x27fSinV\x27],0x0==this[\x27IsInImage\x27](_0x3a3b21,_0x564e26,_0x23ee4e,_0x988509,_0x1b843d,this[\x27pRenderParam\x27][_0x571b6b][\x27fZoom\x27],this[\x27pRenderParam\x27][_0x571b6b][\x27nDisplayEffect\x27]))return\x20_0x4a21f9;}}return\x20this[\x27fRX1\x27]=_0x3a3b21,this[\x27fRX2\x27]=_0x564e26,this[\x27fRY1\x27]=_0x23ee4e,this[\x27fRY2\x27]=_0x988509,_0x26bcbc;}},{\x27key\x27:\x27UpdateWideScanAngle\x27,\x27value\x27:function(_0x120080,_0x45f6ce){return\x20null==this[\x27pRenderParam\x27][_0x120080]?_0x127571:(_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]==this[\x27pRenderParam\x27][_0x120080][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]==this[\x27pRenderParam\x27][_0x120080][\x27nDisplayEffect\x27]?this[\x27pRenderParam\x27][_0x120080][\x27fAngle\x27]=_0x45f6ce:_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]!=this[\x27pRenderParam\x27][_0x120080][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]!=this[\x27pRenderParam\x27][_0x120080][\x27nDisplayEffect\x27]||(this[\x27pRenderParam\x27][_0x120080][\x27fAngle\x27]=-_0x45f6ce),_0x26bcbc);}},{\x27key\x27:\x27ComputeAngleVertical\x27,\x27value\x27:function(_0x3ea512,_0xc5e913,_0x1fe6fa,_0xc81b52){var\x20_0x36bcf2=_0x3ea512,_0x56386f=_0xc5e913,_0x1e8a4b=Math[\x27sqrt\x27]((_0x56386f-0.5)*(_0x56386f-0.5)+(_0x36bcf2-0.5)*(_0x36bcf2-0.5));if(_0x1e8a4b>0.5)return\x20_0x4a21f9;if(_0x1e8a4b<0.001)return\x20_0x1fe6fa[\x27fVAngleCos\x27]=0x1,_0x1fe6fa[\x27fVAngleSin\x27]=0x0,_0x1fe6fa[\x27fHAngleCos\x27]=0x1,_0x1fe6fa[\x27fHAngleSin\x27]=0x0,_0x26bcbc;if(_0xc81b52==_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]){_0x1fe6fa[\x27fHAngleCos\x27]=(0.5-_0x56386f)/_0x1e8a4b,_0x1fe6fa[\x27fHAngleSin\x27]=(0.5-_0x36bcf2)/_0x1e8a4b;var\x20_0x35be56=_0x1e8a4b*_0x2a16d3;_0x1fe6fa[\x27fVAngleCos\x27]=Math[\x27cos\x27](_0x35be56),_0x1fe6fa[\x27fVAngleSin\x27]=Math[\x27sin\x27](_0x35be56);}else{if(_0xc81b52!=_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27])return\x20_0x4a21f9;_0x1fe6fa[\x27fHAngleCos\x27]=(_0x56386f-0.5)/_0x1e8a4b,_0x1fe6fa[\x27fHAngleSin\x27]=(0.5-_0x36bcf2)/_0x1e8a4b;var\x20_0x3b14e1=_0x1e8a4b*_0x2a16d3;_0x1fe6fa[\x27fVAngleCos\x27]=Math[\x27cos\x27](_0x3b14e1),_0x1fe6fa[\x27fVAngleSin\x27]=Math[\x27sin\x27](_0x3b14e1);}return\x20_0x26bcbc;}},{\x27key\x27:\x27ComputeAngleHorizontal\x27,\x27value\x27:function(_0x27ef9a,_0xd863cf,_0x4b70f5){var\x20_0x296055,_0x44a04a,_0x2fcb19,_0xfe32b0,_0x408606,_0x16dc08,_0x4528f0,_0x19b6cc=_0x27ef9a;return(_0xd863cf-(_0x408606=0.5))*(_0xd863cf-_0x408606)+(_0x19b6cc-_0x408606)*(_0x19b6cc-_0x408606)>0.25?_0x4a21f9:(_0x16dc08=(_0xd863cf-_0x408606)/_0x408606*_0x2a16d3/0x2,_0x296055=Math[\x27cos\x27](_0x16dc08),_0x44a04a=Math[\x27sin\x27](_0x16dc08),(_0x19b6cc-_0x408606)/_0x408606/_0x296055>0x1||(_0x19b6cc-_0x408606)/_0x408606/_0x296055<-0x1?SR_ERR_PARAM:(_0x4528f0=(_0x19b6cc-_0x408606)/_0x408606/_0x296055*_0x2a16d3/0x2,_0x2fcb19=Math[\x27cos\x27](_0x4528f0),_0xfe32b0=Math[\x27sin\x27](_0x4528f0),_0x4b70f5[\x27fVAngleCos\x27]=_0x296055,_0x4b70f5[\x27fVAngleSin\x27]=_0x44a04a,_0x4b70f5[\x27fHAngleCos\x27]=_0x2fcb19,_0x4b70f5[\x27fHAngleSin\x27]=_0xfe32b0,_0x26bcbc));}},{\x27key\x27:\x27IsInImage\x27,\x27value\x27:function(_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df,_0x591723,_0xa91aa1){return\x200x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0x1,0.5,_0xa91aa1)&&(0x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0x0,0.5,_0xa91aa1)&&(0x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0.5,0x1,_0xa91aa1)&&(0x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0.5,0x0,_0xa91aa1)&&(0x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0x0,0x0,_0xa91aa1)&&(0x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0x0,0x1,_0xa91aa1)&&(0x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0x1,0x1,_0xa91aa1)&&0x1!=this[\x27IsOutofImage\x27](_0x4d6d74,_0x19801e,_0x300a5d,_0x23713a,_0x1316df[\x27fHAngleCos\x27],_0x1316df[\x27fHAngleSin\x27],_0x1316df[\x27fVAngleCos\x27],_0x1316df[\x27fVAngleSin\x27],_0x591723,0x1,0x0,_0xa91aa1)))))));}},{\x27key\x27:\x27IsOutofImage\x27,\x27value\x27:function(_0x520313,_0x3d1cce,_0x581595,_0x1b416b,_0x73b9c3,_0xdf50c6,_0x42b336,_0x2e14eb,_0x57b728,_0x5ba6a1,_0x4ec096,_0x46cb28){var\x20_0x3cda36,_0x1961ff,_0x5adfa2,_0x2137a4,_0x5894ce,_0x30ee79,_0x509b50,_0x5d85ca,_0x30671b,_0x18ca64,_0x2145bb,_0x9af622,_0x2b4cfb;if(0x1,_0x2145bb=(_0x520313+_0x3d1cce)/0x2*0x1,_0x9af622=(_0x581595+_0x1b416b)/0x2*(_0x18ca64=(_0x3d1cce-_0x520313)/(_0x1b416b-_0x581595)),_0x2b4cfb=(_0x3d1cce-_0x520313)/0x2*0x1,_0x46cb28==_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]){if(_0x1961ff=_0x5ba6a1-0.5,_0x5adfa2=(_0x3cda36=0.5-_0x4ec096)*_0x42b336+(_0x30ee79=_0x57b728)*_0x2e14eb,(_0x509b50=_0x30ee79*_0x42b336-_0x3cda36*_0x2e14eb)<=0x0)return!0x0;_0x30671b=Math[\x27sqrt\x27](_0x1961ff*_0x1961ff+_0x5adfa2*_0x5adfa2);var\x20_0x5ab042=Math[\x27sqrt\x27](_0x1961ff*_0x1961ff+_0x5adfa2*_0x5adfa2+_0x509b50*_0x509b50),_0x18b886=Math[\x27asin\x27](_0x30671b/_0x5ab042)/1.5707963*0.5;if(_0x5894ce=(-((_0x1961ff=_0x18b886*_0x1961ff/_0x30671b)*_0xdf50c6+(_0x5adfa2=_0x18b886*_0x5adfa2/_0x30671b)*_0x73b9c3)*_0x2b4cfb*0x2+_0x9af622)/_0x18ca64,(_0x2137a4=((_0x1961ff*_0x73b9c3-_0x5adfa2*_0xdf50c6)*_0x2b4cfb*0x2+_0x2145bb)/0x1)<0x0||_0x2137a4>0x1||_0x5894ce<0x0||_0x5894ce>0x1)return!0x0;}if(_0x46cb28==_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]){if(_0x1961ff=_0x5ba6a1-0.5,_0x5adfa2=(_0x3cda36=_0x4ec096-0.5)*_0x42b336+(_0x30ee79=_0x57b728)*_0x2e14eb,(_0x509b50=_0x30ee79*_0x42b336-_0x3cda36*_0x2e14eb)<=0x0)return!0x0;_0x30671b=Math[\x27sqrt\x27](_0x1961ff*_0x1961ff+_0x5adfa2*_0x5adfa2);var\x20_0x235deb=Math[\x27sqrt\x27](_0x1961ff*_0x1961ff+_0x5adfa2*_0x5adfa2+_0x509b50*_0x509b50),_0x451442=Math[\x27asin\x27](_0x30671b/_0x235deb)/1.5707963*0.5;if(_0x5894ce=(((_0x1961ff=_0x451442*_0x1961ff/_0x30671b)*_0xdf50c6+(_0x5adfa2=_0x451442*_0x5adfa2/_0x30671b)*_0x73b9c3)*_0x2b4cfb*0x2+_0x9af622)/_0x18ca64,(_0x2137a4=((_0x1961ff*_0x73b9c3-_0x5adfa2*_0xdf50c6)*_0x2b4cfb*0x2+_0x2145bb)/0x1)<0x0||_0x2137a4>0x1||_0x5894ce<0x0||_0x5894ce>0x1)return!0x0;}if(_0x46cb28==_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]){if(_0x2137a4=(_0x1961ff=_0x5ba6a1-0.5)*_0x73b9c3+(_0x509b50=(_0x30ee79=_0x57b728)*_0x42b336-(_0x3cda36=_0x4ec096-0.5)*_0x2e14eb)*_0xdf50c6,_0x5894ce=_0x5adfa2=_0x3cda36*_0x42b336+_0x30ee79*_0x2e14eb,(_0x5d85ca=_0x509b50*_0x73b9c3-_0x1961ff*_0xdf50c6)<=0x0)return!0x0;_0x30671b=Math[\x27sqrt\x27](_0x2137a4*_0x2137a4+_0x5894ce*_0x5894ce);var\x20_0x1ec7eb=Math[\x27sqrt\x27](_0x2137a4*_0x2137a4+_0x5894ce*_0x5894ce+_0x5d85ca*_0x5d85ca),_0x3ce2f8=Math[\x27asin\x27](_0x30671b/_0x1ec7eb)/1.5707963*0.5;if(_0x5894ce=(_0x3ce2f8*_0x5894ce/_0x30671b*_0x2b4cfb*0x2+_0x9af622)/_0x18ca64,(_0x2137a4=(_0x3ce2f8*_0x2137a4/_0x30671b*_0x2b4cfb*0x2+_0x2145bb)/0x1)<0x0||_0x2137a4>0x1||_0x5894ce<0x0||_0x5894ce>0x1)return!0x0;}return!0x1;}},{\x27key\x27:\x27ComputePTZPoints\x27,\x27value\x27:function(){if(_0x32eacf==this[\x27nWndPort\x27])return\x20_0x127571;for(var\x20_0x2249f1=0x0;_0x2249f1<_0x4f027d;++_0x2249f1)if(null!=this[\x27pRenderParam\x27][_0x2249f1]&&(_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]==this[\x27pRenderParam\x27][_0x2249f1][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]==this[\x27pRenderParam\x27][_0x2249f1][\x27nDisplayEffect\x27]||_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]==this[\x27pRenderParam\x27][_0x2249f1][\x27nDisplayEffect\x27])){var\x20_0x44d0f1=_0x26bcbc;if(this[\x27nPTZDisplayMode\x27]==_0x2fdffc){if(_0x44d0f1=this[\x27GetRangePoints\x27](_0x2249f1),_0x26bcbc!=_0x44d0f1)continue;if(_0x44d0f1=this[\x27TransformPTZRangePoints\x27](_0x2249f1),_0x26bcbc!=_0x44d0f1)continue;}else{if(this[\x27nPTZDisplayMode\x27]==_0xc63b40&&(_0x44d0f1=this[\x27GetRectPoints\x27](_0x2249f1),_0x26bcbc!=_0x44d0f1))continue;}}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetWndPort\x27,\x27value\x27:function(){return\x20this[\x27nWndPort\x27];}},{\x27key\x27:\x27GetPTZDisplayMode\x27,\x27value\x27:function(){return\x20this[\x27nPTZDisplayMode\x27];}},{\x27key\x27:\x27GetPTZColor\x27,\x27value\x27:function(_0x226ad8,_0x20ed84){return\x20_0x226ad8<0x0||_0x226ad8>=_0x4f027d||null==_0x20ed84?_0x4a21f9:(_0x20ed84[\x27fA\x27]=this[\x27stPTZColor\x27][_0x226ad8][\x27fA\x27],_0x20ed84[\x27fR\x27]=this[\x27stPTZColor\x27][_0x226ad8][\x27fR\x27],_0x20ed84[\x27fG\x27]=this[\x27stPTZColor\x27][_0x226ad8][\x27fG\x27],_0x20ed84[\x27fB\x27]=this[\x27stPTZColor\x27][_0x226ad8][\x27fB\x27],null!=this[\x27pPTZSetColor\x27]&&(Math[\x27abs\x27](this[\x27pPTZSetColor\x27][_0x226ad8][\x27fA\x27])<_0x423dca||Math[\x27abs\x27](this[\x27pPTZSetColor\x27][_0x226ad8][\x27fR\x27])<_0x423dca||Math[\x27abs\x27](this[\x27pPTZSetColor\x27][_0x226ad8][\x27fG\x27])<_0x423dca||Math[\x27abs\x27](this[\x27pPTZSetColor\x27][_0x226ad8][\x27fB\x27])<_0x423dca)&&(_0x20ed84[\x27fA\x27]=this[\x27pPTZSetColor\x27][_0x226ad8][\x27fA\x27],_0x20ed84[\x27fR\x27]=this[\x27pPTZSetColor\x27][_0x226ad8][\x27fR\x27],_0x20ed84[\x27fG\x27]=this[\x27pPTZSetColor\x27][_0x226ad8][\x27fG\x27],_0x20ed84[\x27fB\x27]=this[\x27pPTZSetColor\x27][_0x226ad8][\x27fB\x27]),_0x26bcbc);}},{\x27key\x27:\x27SetPTZColor\x27,\x27value\x27:function(_0x16a634,_0x31f53f){if(_0x16a634<0x0||_0x16a634>=_0x4f027d)return\x20_0x4a21f9;if(null==_0x31f53f)return\x20_0x4a21f9;if(null==this[\x27pPTZSetColor\x27]){this[\x27pPTZSetColor\x27]=[];for(var\x20_0x59f991=0x0;_0x59f991<_0x4f027d;++_0x59f991)this[\x27pPTZSetColor\x27][_0x59f991]={},this[\x27pPTZSetColor\x27][_0x59f991][\x27fR\x27]=0x0,this[\x27pPTZSetColor\x27][_0x59f991][\x27fG\x27]=0x0,this[\x27pPTZSetColor\x27][_0x59f991][\x27fB\x27]=0x0,this[\x27pPTZSetColor\x27][_0x59f991][\x27fA\x27]=0x1;}return\x20this[\x27pPTZSetColor\x27][_0x16a634][\x27fR\x27]=_0x31f53f[\x27fR\x27],this[\x27pPTZSetColor\x27][_0x16a634][\x27fG\x27]=_0x31f53f[\x27fG\x27],this[\x27pPTZSetColor\x27][_0x16a634][\x27fB\x27]=_0x31f53f[\x27fB\x27],this[\x27pPTZSetColor\x27][_0x16a634][\x27fA\x27]=_0x31f53f[\x27fA\x27],_0x26bcbc;}},{\x27key\x27:\x27IsPTZSelected\x27,\x27value\x27:function(_0x2f2e35){return!(_0x2f2e35<0x0||_0x2f2e35>=_0x4f027d)&&this[\x27bPTZSelected\x27][_0x2f2e35];}},{\x27key\x27:\x27GetPTZPort\x27,\x27value\x27:function(_0x4aeb4e,_0x3b8458,_0x55c241){if(this[\x27nWndPort\x27]==_0x32eacf)return\x20_0x127571;if(null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;var\x20_0x2b9d27=_0x4f027d,_0x1b216b={};_0x1b216b[\x27fX\x27]=_0x4aeb4e,_0x1b216b[\x27fY\x27]=_0x3b8458;for(var\x20_0x22cdb7=0x0;_0x22cdb7<_0x4f027d;++_0x22cdb7)this[\x27bPTZSelected\x27][_0x22cdb7]=!0x1;if(this[\x27nPTZDisplayMode\x27]==_0x2fdffc){switch(this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27nDisplayEffect\x27]){case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:this[\x27GetPointPano2FishFloor\x27](_0x1b216b,_0x4aeb4e,_0x3b8458);break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:this[\x27GetPointPano2FishCeiling\x27](_0x1b216b,_0x4aeb4e,_0x3b8458);break;case\x20_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:this[\x27GetPointPano2FishWall\x27](_0x1b216b,_0x4aeb4e,_0x3b8458);}for(var\x20_0xefb493=0x0;_0xefb493<_0x4f027d;++_0xefb493)if(0x0!=this[\x27nOriPTZPointNum\x27][_0xefb493]){var\x20_0x3023a4={};_0x3023a4[\x27fX\x27]=this[\x27pOriPTZPoints\x27][_0xefb493][0x0][\x27fX\x27],_0x3023a4[\x27fY\x27]=this[\x27pOriPTZPoints\x27][_0xefb493][0x0][\x27fY\x27];var\x20_0x22e604={};_0x22e604[\x27fX\x27]=this[\x27pOriPTZPoints\x27][_0xefb493][0x0][\x27fX\x27],_0x22e604[\x27fY\x27]=this[\x27pOriPTZPoints\x27][_0xefb493][0x0][\x27fY\x27];for(var\x20_0x348d2e=0x1;_0x348d2e<this[\x27nOriPTZPointNum\x27][_0xefb493];++_0x348d2e)this[\x27GetPTZRectange\x27](_0x3023a4,_0x22e604,this[\x27pOriPTZPoints\x27][_0xefb493][_0x348d2e]);if(_0x1b216b[\x27fX\x27]<=_0x3023a4[\x27fX\x27]&&_0x1b216b[\x27fX\x27]>=_0x22e604[\x27fX\x27]&&_0x1b216b[\x27fY\x27]>=_0x22e604[\x27fY\x27]&&_0x1b216b[\x27fY\x27]<=_0x3023a4[\x27fY\x27]){_0x2b9d27=_0xefb493;break;}}}else{if(this[\x27nPTZDisplayMode\x27]!=_0xc63b40)return\x20_0x388f7c;for(var\x20_0x1c705c=0x0;_0x1c705c<_0x4f027d;++_0x1c705c)if(_0x1b216b[\x27fX\x27]<=this[\x27pRectPoints\x27][_0x1c705c][0x2][\x27fX\x27]&&_0x1b216b[\x27fX\x27]>=this[\x27pRectPoints\x27][_0x1c705c][0x0][\x27fX\x27]&&_0x1b216b[\x27fY\x27]>=this[\x27pRectPoints\x27][_0x1c705c][0x0][\x27fY\x27]&&_0x1b216b[\x27fY\x27]<=this[\x27pRectPoints\x27][_0x1c705c][0x2][\x27fY\x27]){_0x2b9d27=_0x1c705c;break;}}return\x20_0x2b9d27<_0x4f027d?(this[\x27bPTZSelected\x27][_0x2b9d27]=!0x0,_0x55c241[\x27nPTZPort\x27]=_0x2b9d27,_0x26bcbc):_0x388f7c;}},{\x27key\x27:\x27SetPTZPort\x27,\x27value\x27:function(_0x3335c4){if(_0x3335c4<0x0||_0x3335c4>=_0x4f027d)return\x20_0x4a21f9;for(var\x20_0x182228=0x0;_0x182228<_0x4f027d;++_0x182228)this[\x27bPTZSelected\x27][_0x182228]=!0x1;if(this[\x27nPTZDisplayMode\x27]==_0x2fdffc){if(0x0==this[\x27nOriPTZPointNum\x27][_0x3335c4])return\x20_0x4a21f9;this[\x27bPTZSelected\x27][_0x3335c4]=!0x0;}else{if(0x0==this[\x27nPTZRectNum\x27][_0x3335c4])return\x20_0x4a21f9;this[\x27bPTZSelected\x27][_0x3335c4]=!0x0;}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetPTZRectange\x27,\x27value\x27:function(_0x551b4d,_0x534c3f,_0x4c9806){return\x20_0x4c9806[\x27fX\x27]<_0x534c3f[\x27fX\x27]&&(_0x534c3f[\x27fX\x27]=_0x4c9806[\x27fX\x27]),_0x4c9806[\x27fY\x27]<_0x534c3f[\x27fY\x27]&&(_0x534c3f[\x27fY\x27]=_0x4c9806[\x27fY\x27]),_0x4c9806[\x27fX\x27]>_0x551b4d[\x27fX\x27]&&(_0x551b4d[\x27fX\x27]=_0x4c9806[\x27fX\x27]),_0x4c9806[\x27fY\x27]>_0x551b4d[\x27fY\x27]&&(_0x551b4d[\x27fY\x27]=_0x4c9806[\x27fY\x27]),_0x26bcbc;}},{\x27key\x27:\x27GetPTZPoints\x27,\x27value\x27:function(_0x58df4b,_0xada6c1,_0xb77dc6){return\x20_0x58df4b<0x0||_0x58df4b>=_0x4f027d?_0x4a21f9:null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]]?_0x127571:(_0x2fdffc==_0xb77dc6?null!=this[\x27pOriPTZPoints\x27][_0x58df4b]&&0x0!=this[\x27nOriPTZPointNum\x27][_0x58df4b]&&(_0xada6c1[\x27pstPoints\x27]=this[\x27pOriPTZPoints\x27][_0x58df4b],_0xada6c1[\x27nPointNum\x27]=this[\x27nOriPTZPointNum\x27][_0x58df4b]):_0xc63b40==_0xb77dc6&&null!=this[\x27pRectPoints\x27][_0x58df4b]&&(_0xada6c1[\x27pstPoints\x27]=this[\x27pRectPoints\x27][_0x58df4b],_0xada6c1[\x27nPointNum\x27]=0x4),_0x26bcbc);}},{\x27key\x27:\x27SetPTZDisplayMode\x27,\x27value\x27:function(_0x2e0593){return\x20this[\x27nPTZDisplayMode\x27]=_0x2e0593,this[\x27ComputePTZPoints\x27]();}},{\x27key\x27:\x27GetDisplayEffect\x27,\x27value\x27:function(_0x52970e){return\x20_0x52970e<0x0||_0x52970e>=_0x4f027d||null==this[\x27pRenderParam\x27]?_0x3409b0[\x27SR_DE_NULL\x27]:this[\x27pRenderParam\x27][_0x52970e][\x27nDisplayEffect\x27];}},{\x27key\x27:\x27GetPTZFragmentPoints\x27,\x27value\x27:function(_0x506e65,_0x3fa59f,_0x2a2f78){if(_0x506e65<0x0||_0x506e65>=_0x4f027d)return\x20_0x4a21f9;if(null==this[\x27pPanoPTZPoints\x27][_0x506e65]||0x0==this[\x27nPanoPTZPointNum\x27][_0x506e65])return\x20_0x4a21f9;var\x20_0x5bb9e2=this[\x27nPTZFragmentNode\x27][_0x506e65][_0x2a2f78];if(_0x3fa59f[\x27nPointNum\x27]=this[\x27nPTZFragmentNode\x27][_0x506e65][_0x2a2f78+0x1]-this[\x27nPTZFragmentNode\x27][_0x506e65][_0x2a2f78],_0x3fa59f[\x27nPointNum\x27]<0x0)return\x20_0x127571;_0x3fa59f[\x27pstPoints\x27]=[];for(var\x20_0x5c41dd=0x0;_0x5c41dd<_0x3fa59f[\x27nPointNum\x27];++_0x5c41dd){var\x20_0x447d47={};_0x447d47[\x27fX\x27]=this[\x27pPanoPTZPoints\x27][_0x506e65][_0x5bb9e2+_0x5c41dd][\x27fX\x27],_0x447d47[\x27fY\x27]=this[\x27pPanoPTZPoints\x27][_0x506e65][_0x5bb9e2+_0x5c41dd][\x27fY\x27],_0x3fa59f[\x27pstPoints\x27][\x27push\x27](_0x447d47);}return\x20_0x26bcbc;}},{\x27key\x27:\x27GetPTZFragmentNum\x27,\x27value\x27:function(_0x26ea26){return\x20_0x26ea26<0x0||_0x26ea26>=_0x4f027d||0x0==this[\x27nPTZFragmentNum\x27][_0x26ea26]?0x0:this[\x27nPTZFragmentNum\x27][_0x26ea26];}},{\x27key\x27:\x27CalcPTZFragmentPoints\x27,\x27value\x27:function(_0x4d3d69){if(_0x4d3d69<0x0||_0x4d3d69>=_0x4f027d)return\x20_0x4a21f9;if(null==this[\x27pPanoPTZPoints\x27][_0x4d3d69]||0x0==this[\x27nPanoPTZPointNum\x27][_0x4d3d69])return\x20_0x127571;this[\x27nPTZFragmentNode\x27][_0x4d3d69][0x0]=0x0,this[\x27nPTZFragmentNum\x27][_0x4d3d69]=0x1;for(var\x20_0x439e5b=0x0,_0x17316c=0x0;_0x17316c<this[\x27nPanoPTZPointNum\x27][_0x4d3d69]-0x1;_0x17316c++)Math[\x27abs\x27](this[\x27pPanoPTZPoints\x27][_0x4d3d69][_0x17316c+0x1][\x27fX\x27]-this[\x27pPanoPTZPoints\x27][_0x4d3d69][_0x17316c][\x27fX\x27])>0.5&&(_0x439e5b=this[\x27nPTZFragmentNum\x27][_0x4d3d69],this[\x27nPTZFragmentNode\x27][_0x4d3d69][_0x439e5b]=_0x17316c+0x1,this[\x27nPTZFragmentNum\x27][_0x4d3d69]=this[\x27nPTZFragmentNum\x27][_0x4d3d69]+0x1);var\x20_0x57e006=this[\x27nPanoPTZPointNum\x27][_0x4d3d69];return\x20Math[\x27abs\x27](this[\x27pPanoPTZPoints\x27][_0x4d3d69][0x0][\x27fX\x27]-this[\x27pPanoPTZPoints\x27][_0x4d3d69][_0x57e006-0x1][\x27fX\x27])<0.5&&(this[\x27pPanoPTZPoints\x27][_0x4d3d69][_0x57e006][\x27fX\x27]=this[\x27pPanoPTZPoints\x27][_0x4d3d69][0x0][\x27fX\x27],this[\x27pPanoPTZPoints\x27][_0x4d3d69][_0x57e006][\x27fY\x27]=this[\x27pPanoPTZPoints\x27][_0x4d3d69][0x0][\x27fY\x27],this[\x27nPanoPTZPointNum\x27][_0x4d3d69]=this[\x27nPanoPTZPointNum\x27][_0x4d3d69]+0x1),_0x439e5b=this[\x27nPTZFragmentNum\x27][_0x4d3d69],this[\x27nPTZFragmentNode\x27][_0x4d3d69][_0x439e5b]=this[\x27nPanoPTZPointNum\x27][_0x4d3d69],_0x26bcbc;}},{\x27key\x27:\x27IsPortAllocated\x27,\x27value\x27:function(_0x2ff9e1){return\x20this[\x27bPortAllocated\x27][_0x2ff9e1];}},{\x27key\x27:\x27GetPointFish2PanoCeiling\x27,\x27value\x27:function(_0x2bad51,_0x28a00f,_0x26de30){if(null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==_0x2bad51)return\x20_0x4a21f9;var\x20_0x52c2c4,_0x7c39e1;_0x52c2c4=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x7c39e1=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x3bfe36,_0x2d8073=0x0;(this[\x27fRX2\x27]>0x1||this[\x27fRY2\x27]>0x1||this[\x27fRX1\x27]<0x0||this[\x27fRY1\x27]<0x0)&&(this[\x27fRX1\x27]<0x0&&(_0x3bfe36=0x1*-this[\x27fRX1\x27])>_0x2d8073&&(_0x2d8073=_0x3bfe36),this[\x27fRX2\x27]>0x1&&(_0x3bfe36=0x1*(this[\x27fRX2\x27]-0x1))>_0x2d8073&&(_0x2d8073=_0x3bfe36),this[\x27fRY1\x27]<0x0&&(_0x3bfe36=-this[\x27fRY1\x27]*_0x52c2c4)>_0x2d8073&&(_0x2d8073=_0x3bfe36),this[\x27fRY2\x27]>0x1&&(_0x3bfe36=(this[\x27fRY2\x27]-0x1)*_0x52c2c4)>_0x2d8073&&(_0x2d8073=_0x3bfe36));var\x20_0x4de520,_0x92c330=_0x2d8073/_0x7c39e1,_0x1f56cc={};if(_0x1f56cc[\x27fX\x27]=0x0,_0x1f56cc[\x27fY\x27]=0x0,Math[\x27abs\x27](_0x28a00f-0.5)<_0x423dca&&Math[\x27abs\x27](_0x26de30-0.5)<_0x423dca)return\x20_0x388f7c;var\x20_0x1f6e8f={},_0x8ea4ff={};_0x1f6e8f[\x27fX\x27]=_0x28a00f-0.5,_0x1f6e8f[\x27fY\x27]=_0x26de30-0.5,_0x8ea4ff[\x27fX\x27]=-0.5*Math[\x27sin\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]),_0x8ea4ff[\x27fY\x27]=0.5*Math[\x27cos\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]);var\x20_0x2d4215=Math[\x27sqrt\x27](_0x1f6e8f[\x27fX\x27]*_0x1f6e8f[\x27fX\x27]+_0x1f6e8f[\x27fY\x27]*_0x1f6e8f[\x27fY\x27]),_0x3aa461=Math[\x27sqrt\x27](_0x8ea4ff[\x27fX\x27]*_0x8ea4ff[\x27fX\x27]+_0x8ea4ff[\x27fY\x27]*_0x8ea4ff[\x27fY\x27]);return\x20_0x4de520=Math[\x27acos\x27]((_0x1f6e8f[\x27fX\x27]*_0x8ea4ff[\x27fX\x27]+_0x1f6e8f[\x27fY\x27]*_0x8ea4ff[\x27fY\x27])/(_0x2d4215*_0x3aa461)),_0x1f6e8f[\x27fX\x27]*_0x8ea4ff[\x27fY\x27]-_0x1f6e8f[\x27fY\x27]*_0x8ea4ff[\x27fX\x27]>0x0&&(_0x4de520=6.2831852-_0x4de520),_0x1f56cc[\x27fX\x27]=_0x4de520/6.2831853,_0x1f56cc[\x27fY\x27]=(0x2*(0.5-_0x2d4215)-_0x92c330)/(0.8-_0x92c330),_0x1f56cc[\x27fY\x27]>=0x0&&_0x1f56cc[\x27fX\x27]>=0x0&&_0x1f56cc[\x27fY\x27]<=0x1&&_0x1f56cc[\x27fX\x27]<=0x1?(_0x2bad51[\x27fX\x27]=_0x1f56cc[\x27fX\x27],_0x2bad51[\x27fY\x27]=_0x1f56cc[\x27fY\x27],_0x26bcbc):_0x4a21f9;}},{\x27key\x27:\x27GetPointFish2PanoFloor\x27,\x27value\x27:function(_0x53a158,_0x461be4,_0x351c59){if(null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==_0x53a158)return\x20_0x4a21f9;var\x20_0x2fd8cc,_0xc67723;_0x2fd8cc=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0xc67723=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x34407f,_0x384676=0x0;(this[\x27fRX2\x27]>0x1||this[\x27fRY2\x27]>0x1||this[\x27fRX1\x27]<0x0||this[\x27fRY1\x27]<0x0)&&(this[\x27fRX1\x27]<0x0&&(_0x34407f=0x1*-this[\x27fRX1\x27])>_0x384676&&(_0x384676=_0x34407f),this[\x27fRX2\x27]>0x1&&(_0x34407f=0x1*(this[\x27fRX2\x27]-0x1))>_0x384676&&(_0x384676=_0x34407f),this[\x27fRY1\x27]<0x0&&(_0x34407f=-this[\x27fRY1\x27]*_0x2fd8cc)>_0x384676&&(_0x384676=_0x34407f),this[\x27fRY2\x27]>0x1&&(_0x34407f=(this[\x27fRY2\x27]-0x1)*_0x2fd8cc)>_0x384676&&(_0x384676=_0x34407f));var\x20_0x2394d8,_0x1c33c7=_0x384676/_0xc67723,_0x4c228e={\x27fX\x27:0x0,\x27fY\x27:0x0};if(Math[\x27abs\x27](_0x461be4-0.5)<_0x423dca&&Math[\x27abs\x27](_0x351c59-0.5)<_0x423dca)return\x20_0x388f7c;var\x20_0x3a95a0={},_0x1d08ba={};_0x3a95a0[\x27fX\x27]=_0x461be4-0.5,_0x3a95a0[\x27fY\x27]=_0x351c59-0.5,_0x1d08ba[\x27fX\x27]=-0.5*Math[\x27sin\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]),_0x1d08ba[\x27fY\x27]=0.5*Math[\x27cos\x27](this[\x27pRenderParam\x27][this[\x27nWndPort\x27]][\x27fAngle\x27]);var\x20_0x9b9a91=Math[\x27sqrt\x27](_0x3a95a0[\x27fX\x27]*_0x3a95a0[\x27fX\x27]+_0x3a95a0[\x27fY\x27]*_0x3a95a0[\x27fY\x27]),_0x3b4a4b=Math[\x27sqrt\x27](_0x1d08ba[\x27fX\x27]*_0x1d08ba[\x27fX\x27]+_0x1d08ba[\x27fY\x27]*_0x1d08ba[\x27fY\x27]);return\x20_0x2394d8=Math[\x27acos\x27]((_0x3a95a0[\x27fX\x27]*_0x1d08ba[\x27fX\x27]+_0x3a95a0[\x27fY\x27]*_0x1d08ba[\x27fY\x27])/(_0x9b9a91*_0x3b4a4b)),_0x3a95a0[\x27fX\x27]*_0x1d08ba[\x27fY\x27]-_0x3a95a0[\x27fY\x27]*_0x1d08ba[\x27fX\x27]>0x0&&(_0x2394d8=6.2831852-_0x2394d8),_0x4c228e[\x27fX\x27]=0x1-_0x2394d8/6.2831853,_0x4c228e[\x27fY\x27]=0x1-(0x2*(0.5-_0x9b9a91)-_0x1c33c7)/(0.8-_0x1c33c7),_0x4c228e[\x27fY\x27]>=0x0&&_0x4c228e[\x27fX\x27]>=0x0&&_0x4c228e[\x27fY\x27]<=0x1&&_0x4c228e[\x27fX\x27]<=0x1?(_0x53a158[\x27fX\x27]=_0x4c228e[\x27fX\x27],_0x53a158[\x27fY\x27]=_0x4c228e[\x27fY\x27],_0x26bcbc):_0x4a21f9;}},{\x27key\x27:\x27GetPointFish2PanoWall\x27,\x27value\x27:function(_0x18449d,_0x1e7689,_0x1d7d77){if(null==this[\x27pRenderParam\x27][this[\x27nWndPort\x27]])return\x20_0x127571;if(null==_0x18449d)return\x20_0x4a21f9;var\x20_0x119c45,_0x3945a9;_0x119c45=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/(this[\x27fRY2\x27]-this[\x27fRY1\x27]),_0x3945a9=(this[\x27fRX2\x27]-this[\x27fRX1\x27])/0x2*0x1;var\x20_0x685056,_0x4f664b,_0xb5476c,_0x2ac38b,_0x30cd9,_0x4fdd98=0x0,_0x196e9=0x1,_0x5ee48c=0.1,_0x4ee6f3=0.9;this[\x27fRX1\x27]<0x0&&(_0x685056=0x1*-this[\x27fRX1\x27],_0x4fdd98=_0x685056/=0x2*_0x3945a9),this[\x27fRX2\x27]>0x1&&(_0x4f664b=0x1*(this[\x27fRX2\x27]-0x1),_0x196e9=0x1-(_0x4f664b/=0x2*_0x3945a9)),this[\x27fRY1\x27]<0x0&&(_0xb5476c=-this[\x27fRY1\x27]*_0x119c45,_0x5ee48c=(_0xb5476c/=0x2*_0x3945a9)>0.1?_0xb5476c:0.1),this[\x27fRY2\x27]>0x1&&(_0x2ac38b=(this[\x27fRY2\x27]-0x1)*_0x119c45,_0x4ee6f3=(_0x2ac38b/=0x2*_0x3945a9)>0x1-0.9?0x1-_0x2ac38b:0.9);var\x20_0x157315={\x27fX\x27:0x0,\x27fY\x27:0x0},_0x3c870a=0x2*_0x1e7689*_0x3945a9,_0x282330=0x2*_0x1d7d77*_0x3945a9;return\x20_0x30cd9=Math[\x27sqrt\x27](_0x3945a9*_0x3945a9-(_0x282330-_0x3945a9)*(_0x282330-_0x3945a9)),Math[\x27abs\x27](_0x30cd9)<_0x423dca?SR_ERR_PARAM:(_0x1e7689=_0x3945a9*(_0x3c870a-_0x3945a9)/_0x30cd9+_0x3945a9,_0x1d7d77=_0x282330,_0x157315[\x27fX\x27]=(_0x1e7689-0x2*_0x4fdd98*_0x3945a9)/(0x2*(_0x196e9-_0x4fdd98)*_0x3945a9),_0x157315[\x27fY\x27]=(_0x1d7d77-0x2*_0x5ee48c*_0x3945a9)/(0x2*(_0x4ee6f3-_0x5ee48c)*_0x3945a9),_0x157315[\x27fY\x27]>=0x0&&_0x157315[\x27fX\x27]>=0x0&&_0x157315[\x27fY\x27]<=0x1&&_0x157315[\x27fX\x27]<=0x1?(_0x18449d[\x27fX\x27]=_0x157315[\x27fX\x27],_0x18449d[\x27fY\x27]=_0x157315[\x27fY\x27],_0x26bcbc):_0x4a21f9);}},{\x27key\x27:\x27UpdateRangeParam\x27,\x27value\x27:function(_0x38c635,_0x2a59f1){if(null==this[\x27pRenderParam\x27][_0x38c635])return\x20_0x127571;if(_0x2a59f1<0.00001||_0x2a59f1>0.6)return\x20_0x4a21f9;var\x20_0x17b73d=0x0;return\x20_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]!=this[\x27pRenderParam\x27][_0x38c635][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]!=this[\x27pRenderParam\x27][_0x38c635][\x27nDisplayEffect\x27]&&_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]!=this[\x27pRenderParam\x27][_0x38c635][\x27nDisplayEffect\x27]||(_0x17b73d=0x7*_0x2a59f1+0.8,this[\x27IsInImage\x27](this[\x27fRX1\x27],this[\x27fRX2\x27],this[\x27fRY1\x27],this[\x27fRY2\x27],this[\x27pRenderParam\x27][_0x38c635][\x27fCosH\x27],this[\x27pRenderParam\x27][_0x38c635][\x27fSinH\x27],this[\x27pRenderParam\x27][_0x38c635][\x27fCosV\x27],this[\x27pRenderParam\x27][_0x38c635][\x27fSinV\x27],_0x17b73d,this[\x27pRenderParam\x27][_0x38c635][\x27nDisplayEffect\x27]))?(this[\x27pRenderParam\x27][_0x38c635][\x27fZoom\x27]=_0x17b73d,_0x26bcbc):_0x4a21f9;}}]),_0x121bd5;}()),_0x57b7ee=0x20,_0x30844c=(function(){function\x20_0x593986(){_0x4b5b03(this,_0x593986),this[\x27renderEngine\x27]=\x27webgl\x27,this[\x27oVideoHandle\x27]=null,this[\x27mainCanvasID\x27]=null,this[\x27curTimestamp\x27]=0x0,this[\x27mainSubPort\x27]=0x0,this[\x27mainVaildSubPort\x27]=0x0,this[\x27mainFECCorrect\x27]=_0x3409b0[\x27SR_DE_NULL\x27],this[\x27FECErrorCode\x27]=0x0,this[\x27subPortNum\x27]=0x0,this[\x27FECShowMode\x27]=_0x2fdffc,this[\x27pFishParamManager\x27],this[\x27InitFECParam\x27](),this[\x27privateLinesInfo\x27]=[],this[\x27privateFontsInfo\x27]=[],this[\x27privateImagesInfo\x27]=[],this[\x27bSRCallBackFlag\x27]=!0x1,this[\x27curLinesInfo\x27]=null,this[\x27maxPrivateLineTimeStamp\x27]=0x0,this[\x27hasSetFECParamManager\x27]=!0x1,this[\x27curWaterMarkFontsInfo\x27]=null,this[\x27curWaterMarkImageInfo\x27]=null;}return\x20_0x4023a9(_0x593986,[{\x27key\x27:\x27InitDisplay\x27,\x27value\x27:function(_0x276d7a,_0x200080,_0x5976c0){return\x20this[\x27renderEngine\x27]=_0x200080,this[\x27mainCanvasID\x27]=_0x276d7a,\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(this[\x27oVideoHandle\x27]=new\x20_0xef2477(),console[\x27log\x27](\x272d\x5cx20render\x27)):(this[\x27oVideoHandle\x27]=new\x20_0x16641b(),this[\x27mainFECCorrect\x27]!=_0x3409b0[\x27SR_DE_NULL\x27]&&(null==this[\x27pFishParamManager\x27]&&(this[\x27pFishParamManager\x27]=new\x20_0x22aa88()),this[\x27oVideoHandle\x27][\x27SR_SetFishParamManager\x27](this[\x27pFishParamManager\x27]),this[\x27hasSetFECParamManager\x27]=!0x0),console[\x27log\x27](\x27webgl\x5cx20render\x27)),this[\x27oVideoHandle\x27][\x27SR_Init\x27](_0x276d7a,_0x5976c0),this[\x27mainVaildSubPort\x27]=this[\x27oVideoHandle\x27][\x27SR_AddSubPort\x27](this[\x27mainFECCorrect\x27]),-0x1==this[\x27mainVaildSubPort\x27]?(console[\x27info\x27](\x27%c\x5cx20InitDisplay\x5cx20SR_AddSubPort\x5cx20error\x5cx20subport:%d\x27,\x27color:\x5cx20red\x27,this[\x27mainVaildSubPort\x27]),0x0):(null==this[\x27stFishEyeManager\x27][0x0][\x27pRender\x27]&&this[\x27mainFECCorrect\x27]!==_0x3409b0[\x27SR_DE_NULL\x27]&&(this[\x27stFishEyeManager\x27][0x0][\x27pRender\x27]=this[\x27oVideoHandle\x27],this[\x27stFishEyeManager\x27][0x0][\x27nSubPort\x27]=0x0,this[\x27stFishEyeManager\x27][0x0][\x27sCanvasID\x27]=this[\x27mainCanvasID\x27],this[\x27stFishEyeManager\x27][0x0][\x27bUsed\x27]=0x1,this[\x27stFishEyeManager\x27][0x0][\x27bInited\x27]=0x1,this[\x27stFishEyeManager\x27][0x0][\x27nValidSubPort\x27]=this[\x27mainVaildSubPort\x27]),0x1);}},{\x27key\x27:\x27ReleaseDisplay\x27,\x27value\x27:function(){if(null!=this[\x27oVideoHandle\x27]&&(this[\x27oVideoHandle\x27][\x27SR_DelSubPort\x27](this[\x27mainVaildSubPort\x27]),this[\x27oVideoHandle\x27][\x27SR_Destroy\x27](),this[\x27oVideoHandle\x27]=null),this[\x27subPortNum\x27]>0x0){for(var\x20_0x4d0632=0x1;_0x4d0632<_0x57b7ee;_0x4d0632++)0x0!=this[\x27stFishEyeManager\x27][_0x4d0632][\x27nSubPort\x27]&&null!=this[\x27stFishEyeManager\x27][_0x4d0632][\x27sCanvasID\x27]&&0x0!=this[\x27stFishEyeManager\x27][_0x4d0632][\x27bInited\x27]&&(this[\x27FEC_Disable\x27](_0x4d0632),this[\x27FEC_DelPort\x27](_0x4d0632));}for(var\x20_0x3595bb=0x0;_0x3595bb<_0x57b7ee;_0x3595bb++)this[\x27stFishEyeManager\x27][_0x3595bb][\x27pRender\x27]=null;return\x20this[\x27stFishEyeManager\x27][\x27splice\x27](0x0,this[\x27stFishEyeManager\x27][\x27length\x27]),this[\x27stFishParam\x27][\x27splice\x27](0x0,this[\x27stFishParam\x27][\x27length\x27]),null!=this[\x27pFishParamManager\x27]&&(this[\x27pFishParamManager\x27][\x27DeInit\x27](),this[\x27pFishParamManager\x27]=null),this[\x27FECShowMode\x27]=_0x2fdffc,this[\x27DeInitPrivateParam\x27](),0x1;}},{\x27key\x27:\x27DeInitPrivateParam\x27,\x27value\x27:function(){this[\x27privateLinesInfo\x27][\x27splice\x27](0x0,this[\x27privateLinesInfo\x27][\x27length\x27]),this[\x27privateFontsInfo\x27][\x27splice\x27](0x0,this[\x27privateFontsInfo\x27][\x27length\x27]),this[\x27privateImagesInfo\x27][\x27splice\x27](0x0,this[\x27privateImagesInfo\x27][\x27length\x27]),this[\x27bSRCallBackFlag\x27]=!0x1,this[\x27curLinesInfo\x27]=null;}},{\x27key\x27:\x27DisplayFrame\x27,\x27value\x27:function(_0x2a9ab3,_0x4fa374,_0xa43ee7,_0x5c8e4a,_0x34e088,_0x198c40){var\x20_0xaf291d=this;return\x20new\x20Promise(function(_0x59342c){var\x20_0x60b46a=-0x1;if(null!=_0x2a9ab3&&(_0x60b46a=_0x5c8e4a),_0xaf291d[\x27bSRCallBackFlag\x27]||(null!=_0xaf291d[\x27oVideoHandle\x27]&&_0xaf291d[\x27oVideoHandle\x27][\x27SR_SetCallBack\x27](_0xaf291d[\x27WebGLDisplayCallBack\x27],_0xaf291d,_0x328161),_0xaf291d[\x27bSRCallBackFlag\x27]=!0x0),null!=_0x2a9ab3&&(0x0!=_0xaf291d[\x27privateLinesInfo\x27][\x27length\x27]&&(_0xaf291d[\x27curTimestamp\x27]=_0x60b46a,_0xaf291d[\x27FindIntelNodefromList\x27](_0xaf291d[\x27curTimestamp\x27])),null!=_0xaf291d[\x27oVideoHandle\x27]&&_0xaf291d[\x27oVideoHandle\x27][\x27SR_Draw\x27](_0x2a9ab3,_0x4fa374,_0xa43ee7,_0x34e088,_0x198c40),_0xaf291d[\x27subPortNum\x27]>0x0)){for(var\x20_0x467675=0x1;_0x467675<_0x57b7ee;_0x467675++)0x0!=_0xaf291d[\x27stFishEyeManager\x27][_0x467675][\x27nSubPort\x27]&&null!=_0xaf291d[\x27stFishEyeManager\x27][_0x467675][\x27sCanvasID\x27]&&0x0!=_0xaf291d[\x27stFishEyeManager\x27][_0x467675][\x27bInited\x27]&&null!=_0xaf291d[\x27stFishEyeManager\x27][_0x467675][\x27pRender\x27]&&_0xaf291d[\x27stFishEyeManager\x27][_0x467675][\x27pRender\x27][\x27SR_Draw\x27](_0x2a9ab3,_0x4fa374,_0xa43ee7,null,null);}_0x59342c(_0x60b46a);});}},{\x27key\x27:\x27SetDisplayRect\x27,\x27value\x27:function(_0x16a752,_0x40a6d5,_0x2f492a,_0x419749){return\x20null!=this[\x27oVideoHandle\x27]?this[\x27oVideoHandle\x27][\x27SR_SetDisplayRect\x27](_0x16a752,_0x40a6d5,_0x2f492a,_0x419749,_0x3ff926):0x0;}},{\x27key\x27:\x27SetCanvasSize\x27,\x27value\x27:function(_0x273b9c,_0x5a6764){return\x20null!=this[\x27curWaterMarkFontsInfo\x27]&&(this[\x27curWaterMarkFontsInfo\x27][\x27pstFontSize\x27][\x27nFontWidth\x27]=this[\x27curWaterMarkFontsInfo\x27][\x27pstFontSize\x27][\x27nFontWidth\x27]*_0x273b9c/this[\x27mainCanvasID\x27][\x27width\x27],this[\x27curWaterMarkFontsInfo\x27][\x27pstFontSize\x27][\x27nFontHeight\x27]=this[\x27curWaterMarkFontsInfo\x27][\x27pstFontSize\x27][\x27nFontHeight\x27]*_0x5a6764/this[\x27mainCanvasID\x27][\x27height\x27]),null!=this[\x27oVideoHandle\x27]?this[\x27oVideoHandle\x27][\x27SR_SetCanvasSize\x27](_0x273b9c,_0x5a6764):0x0;}},{\x27key\x27:\x27GetCanvasSize\x27,\x27value\x27:function(){return\x20null!=this[\x27oVideoHandle\x27]?this[\x27oVideoHandle\x27][\x27SR_GetCanvasSize\x27]():0x0;}},{\x27key\x27:\x27SetAntialias\x27,\x27value\x27:function(_0x1f8121){return\x20null!=this[\x27oVideoHandle\x27]?this[\x27oVideoHandle\x27][\x27SR_SetAntialias\x27](_0x1f8121):0x0;}},{\x27key\x27:\x27SetD3DPostProcess\x27,\x27value\x27:function(_0x577fe5,_0x1e44f4){return\x20null!=this[\x27oVideoHandle\x27]?this[\x27oVideoHandle\x27][\x27SR_SetImagePostProcess\x27](_0x577fe5,_0x1e44f4):0x0;}},{\x27key\x27:\x27InitFECParam\x27,\x27value\x27:function(){this[\x27stFishEyeManager\x27]=[];for(var\x20_0x3e9e0e=0x0;_0x3e9e0e<_0x57b7ee;_0x3e9e0e++)this[\x27stFishEyeManager\x27][_0x3e9e0e]={},this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27pRender\x27]=null,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27nSubPort\x27]=0x0,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27sCanvasID\x27]=null,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27bUsed\x27]=0x0,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27bInit\x27]=0x0,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27nValidSubPort\x27]=0x0,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27emPlaceType\x27]=_0x372248,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27emCorrectType\x27]=_0xf9176d,this[\x27stFishEyeManager\x27][_0x3e9e0e][\x27emEffect\x27]=_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27];this[\x27stFishParam\x27]=[];for(var\x20_0xedfeb7=0x0;_0xedfeb7<_0x57b7ee;_0xedfeb7++)this[\x27stFishParam\x27][_0xedfeb7]={},this[\x27stFishParam\x27][_0xedfeb7][\x27nUpDateType\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZParam\x27]={},this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZParam\x27][\x27fPTZPositionX\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZParam\x27][\x27fPTZPositionY\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stCycleParam\x27]={},this[\x27stFishParam\x27][_0xedfeb7][\x27stCycleParam\x27][\x27fRadiusLeft\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stCycleParam\x27][\x27fRadiusRight\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stCycleParam\x27][\x27fRadiusTop\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stCycleParam\x27][\x27fRadiusBottom\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27fZoom\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27fWideScanOffset\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZColor\x27]={},this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZColor\x27][\x27nR\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZColor\x27][\x27nG\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZColor\x27][\x27nB\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZColor\x27][\x27nAlpha\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZSelect\x27]={},this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZSelect\x27][\x27fTop\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZSelect\x27][\x27fBottom\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZSelect\x27][\x27fLeft\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27stPTZSelect\x27][\x27fRight\x27]=0x0,this[\x27stFishParam\x27][_0xedfeb7][\x27nCut\x27]=0x0;}},{\x27key\x27:\x27FEC_SetCanvasID\x27,\x27value\x27:function(_0x6ad1ad){return\x20this[\x27mainFECCorrect\x27]=_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27],0x1;}},{\x27key\x27:\x27FEC_ResetCorrectType\x27,\x27value\x27:function(_0xad0c07,_0x1cc36e,_0x560e39){if(!0x1===this[\x27hasSetFECParamManager\x27]&&(null==this[\x27pFishParamManager\x27]&&(this[\x27pFishParamManager\x27]=new\x20_0x22aa88()),this[\x27oVideoHandle\x27][\x27SR_SetFishParamManager\x27](this[\x27pFishParamManager\x27]),this[\x27hasSetFECParamManager\x27]=!0x0),_0x560e39!=_0xf9176d&&_0x560e39!=_0x5d10c0&&_0x560e39!=_0x5e8792&&_0x560e39!=_0x56dd9e&&_0x560e39!=_0x1b901e&&_0x560e39!=_0x2f6657&&_0x560e39!=_0x1b52b7)return\x20console[\x27log\x27](\x27%c\x5cx2020230627\x5cx20hardDecoder\x5cx20not\x5cx20support\x5cx20correctType:%d\x27,\x27color:red\x27,_0x560e39),this[\x27FECErrorCode\x27]=0x10,0x0;if(0x1!=this[\x27FECParamJudge\x27](_0xad0c07,_0x1cc36e,_0x560e39))return\x200x0;var\x20_0x1475c9;if(_0x1475c9=this[\x27_ConvertDisplayEffect\x27](_0x1cc36e,_0x560e39),0x0==_0xad0c07&&null==this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27]&&(this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27]=this[\x27oVideoHandle\x27],this[\x27stFishEyeManager\x27][_0xad0c07][\x27nSubPort\x27]=_0xad0c07,this[\x27stFishEyeManager\x27][_0xad0c07][\x27sCanvasID\x27]=this[\x27mainCanvasID\x27],this[\x27stFishEyeManager\x27][_0xad0c07][\x27bUsed\x27]=0x1,this[\x27stFishEyeManager\x27][_0xad0c07][\x27bInited\x27]=0x1,this[\x27stFishEyeManager\x27][_0xad0c07][\x27nValidSubPort\x27]=this[\x27mainVaildSubPort\x27],this[\x27stFishEyeManager\x27][_0xad0c07][\x27emPlaceType\x27]=_0x1cc36e,this[\x27stFishEyeManager\x27][_0xad0c07][\x27emCorrectType\x27]=_0x560e39,this[\x27stFishEyeManager\x27][_0xad0c07][\x27emEffect\x27]=_0x1475c9,this[\x27mainFECCorrect\x27]=_0x1475c9),null!=this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27]){this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27][\x27SR_DelSubPort\x27](this[\x27stFishEyeManager\x27][_0xad0c07][\x27nValidSubPort\x27]);var\x20_0x5bf1d0=this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27][\x27SR_AddSubPort\x27](_0x1475c9);if(-0x1==_0x5bf1d0)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_ResetCorrectType\x5cx20SR_AddSubPort\x5cx20error\x5cx20subport:%d\x27,\x27color:\x5cx20red\x27,_0x5bf1d0),0x0;if(this[\x27stFishEyeManager\x27][_0xad0c07][\x27nValidSubPort\x27]=_0x5bf1d0,this[\x27stFishEyeManager\x27][_0xad0c07][\x27emPlaceType\x27]=_0x1cc36e,this[\x27stFishEyeManager\x27][_0xad0c07][\x27emCorrectType\x27]=_0x560e39,this[\x27stFishEyeManager\x27][_0xad0c07][\x27emEffect\x27]=_0x1475c9,_0x56dd9e<=this[\x27stFishEyeManager\x27][_0xad0c07][\x27emCorrectType\x27]){var\x20_0x371f28=this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27][\x27SR_SetRenderState\x27](_0xa35613,0x0);_0x26bcbc!=_0x371f28&&console[\x27log\x27](\x27>>>VideoRender.js\x5cx20SR_SetRenderState\x5cx20failed\x5cx20ret：%08x\x5cx0a\x27,_0x371f28);}}return\x20this[\x27FECShowMode\x27]>0x0&&null!=this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27]&&this[\x27stFishEyeManager\x27][_0xad0c07][\x27pRender\x27][\x27SR_SetPTZDisplayMode\x27](this[\x27FECShowMode\x27]),0x0==_0xad0c07&&(this[\x27mainVaildSubPort\x27]=this[\x27stFishEyeManager\x27][_0xad0c07][\x27nValidSubPort\x27]),0x1;}},{\x27key\x27:\x27FEC_GetPort\x27,\x27value\x27:function(_0x1ecf65,_0x1e771e){if(_0x1e771e!=_0xf9176d&&_0x1e771e!=_0x5d10c0&&_0x1e771e!=_0x5e8792&&_0x1e771e!=_0x56dd9e&&_0x1e771e!=_0x1b901e&&_0x1e771e!=_0x2f6657&&_0x1e771e!=_0x1b52b7)return\x20console[\x27log\x27](\x27%c\x5cx2020230627\x5cx20hardDecoder\x5cx20not\x5cx20support\x5cx20emCorrectType:%d\x27,\x27color:red\x27,_0x1e771e),this[\x27FECErrorCode\x27]=0x10,-0x1;var\x20_0x223313;if(0x1!=this[\x27FECParamJudge\x27](-0x1,_0x1ecf65,_0x1e771e))return-0x1;var\x20_0x2e233c=0x0;for(_0x223313=0x1;_0x223313<_0x57b7ee;_0x223313++)if(0x0==this[\x27stFishEyeManager\x27][_0x223313][\x27nSubPort\x27]&&0x0==this[\x27stFishEyeManager\x27][_0x223313][\x27bUsed\x27]){this[\x27stFishEyeManager\x27][_0x223313][\x27nSubPort\x27]=_0x223313,this[\x27stFishEyeManager\x27][_0x223313][\x27nValidSubPort\x27]=-0x1,this[\x27stFishEyeManager\x27][_0x223313][\x27bUsed\x27]=0x1,this[\x27stFishEyeManager\x27][_0x223313][\x27emPlaceType\x27]=_0x1ecf65,this[\x27stFishEyeManager\x27][_0x223313][\x27emCorrectType\x27]=_0x1e771e,_0x2e233c=_0x223313;break;}if(_0x57b7ee==_0x223313)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-12\x5cx20fish\x5cx20subport\x5cx20max\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=0x504,-0x1;var\x20_0x31d17a;return\x20_0x31d17a=this[\x27_ConvertDisplayEffect\x27](this[\x27stFishEyeManager\x27][_0x2e233c][\x27emPlaceType\x27],this[\x27stFishEyeManager\x27][_0x2e233c][\x27emCorrectType\x27]),_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27]!=_0x31d17a?(0x0==this[\x27stFishEyeManager\x27][_0x2e233c][\x27bInited\x27]&&(this[\x27stFishEyeManager\x27][_0x2e233c][\x27emEffect\x27]=_0x31d17a,this[\x27stFishEyeManager\x27][_0x2e233c][\x27bInited\x27]=0x0,this[\x27stFishParam\x27][_0x2e233c][\x27fZoom\x27]=0.005,this[\x27stFishParam\x27][_0x2e233c][\x27stPTZParam\x27][\x27fPTZPositionX\x27]=0.5,this[\x27stFishParam\x27][_0x2e233c][\x27stPTZParam\x27][\x27fPTZPositionY\x27]=0.5,this[\x27stFishParam\x27][_0x2e233c][\x27fWideScanOffset\x27]=0x0),this[\x27FECErrorCode\x27]=0x0,this[\x27subPortNum\x27]++,_0x2e233c):_0x2e233c<_0x57b7ee&&0x0==this[\x27stFishEyeManager\x27][_0x2e233c][\x27bInited\x27]?(this[\x27stFishEyeManager\x27][_0x2e233c][\x27emEffect\x27]=_0x31d17a,this[\x27stFishEyeManager\x27][_0x2e233c][\x27bInited\x27]=0x0,this[\x27stFishParam\x27][_0x2e233c][\x27fZoom\x27]=0x0,this[\x27stFishParam\x27][_0x2e233c][\x27stPTZParam\x27][\x27fPTZPositionX\x27]=0x0,this[\x27stFishParam\x27][_0x2e233c][\x27stPTZParam\x27][\x27fPTZPositionY\x27]=0x0,this[\x27stFishParam\x27][_0x2e233c][\x27fWideScanOffset\x27]=0x0,this[\x27FECErrorCode\x27]=0x0,this[\x27subPortNum\x27]++,_0x2e233c):(this[\x27stFishEyeManager\x27][_0x223313][\x27pRender\x27]=null,this[\x27stFishEyeManager\x27][_0x223313][\x27nSubPort\x27]=0x0,this[\x27stFishEyeManager\x27][_0x223313][\x27sCanvasID\x27]=null,this[\x27stFishEyeManager\x27][_0x223313][\x27bUsed\x27]=0x0,this[\x27stFishEyeManager\x27][_0x223313][\x27bInited\x27]=0x0,this[\x27stFishEyeManager\x27][_0x223313][\x27nValidSubPort\x27]=0x0,this[\x27stFishEyeManager\x27][_0x223313][\x27emPlaceType\x27]=_0x372248,this[\x27stFishEyeManager\x27][_0x223313][\x27emCorrectType\x27]=_0xf9176d,this[\x27stFishEyeManager\x27][_0x223313][\x27emEffect\x27]=_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27],this[\x27FECErrorCode\x27]=_0x45ad56,-0x1);}},{\x27key\x27:\x27FECParamJudge\x27,\x27value\x27:function(_0x284e4e,_0x4b53be,_0x1fd74b){if((_0x53136e==_0x4b53be||_0x372248==_0x4b53be)&&_0x2f6657==_0x1fd74b)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-1\x5cx20floor\x5cx20and\x5cx20ceiling\x5cx20not\x5cx20support\x5cx20lat\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=_0x45ad56,0x0;if(_0x5b2e5d==_0x4b53be&&_0x1b52b7==_0x1fd74b)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-2\x5cx20wall\x5cx20not\x5cx20support\x5cx20cylinger\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=_0x45ad56,0x0;if(_0x5b2e5d==_0x4b53be&&_0x20b9af==_0x1fd74b)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-3\x5cx20wall\x5cx20not\x5cx20support\x5cx20split\x5cx20cylinger\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=_0x45ad56,0x0;if((_0x53136e==_0x4b53be||_0x372248==_0x4b53be)&&_0x569baa==_0x1fd74b)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-4\x5cx20floor\x5cx20and\x5cx20ceiling\x5cx20not\x5cx20support\x5cx20horizontal\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=_0x45ad56,0x0;if((_0x53136e==_0x4b53be||_0x372248==_0x4b53be)&&_0x705e63==_0x1fd74b)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-5\x5cx20floor\x5cx20and\x5cx20ceiling\x5cx20not\x5cx20support\x5cx20vertical\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=_0x45ad56,0x0;if(_0x5b2e5d!=_0x4b53be&&_0x53136e!=_0x4b53be&&_0x372248!=_0x4b53be)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-6\x5cx20emPlaceType\x5cx20only\x5cx20support\x5cx20floor,\x5cx20ceiling\x5cx20and\x5cx20wall\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=MP_E_SUPPORT,0x0;if(0x0!=_0x1fd74b&&_0x1fd74b!=_0x1b901e&&_0x1fd74b!=_0x5d10c0&&_0x1fd74b!=_0x5e8792&&_0x1fd74b!=_0x2f6657&&_0x1fd74b!=_0x56dd9e&&_0x1fd74b!=_0x1b52b7&&_0x1fd74b!=_0x20b9af&&_0x1fd74b!=_0x54261b&&_0x1fd74b!=_0x569baa&&_0x1fd74b!=_0x705e63)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-7\x5cx20emCorrectType\x5cx20error\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=MP_E_SUPPORT,0x0;for(var\x20_0x4e9046=0x0;_0x4e9046<_0x57b7ee;_0x4e9046++)if(_0x4e9046!=_0x284e4e){if(this[\x27stFishEyeManager\x27][_0x4e9046][\x27bUsed\x27]&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emPlaceType\x27]!=_0x4b53be)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-8\x5cx20emPlaceType\x5cx20changed\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=0x517,0x0;if(this[\x27stFishEyeManager\x27][_0x4e9046][\x27bUsed\x27]&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]!=_0x1b901e&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]!=_0x56dd9e&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]!=_0x1b52b7&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]!=_0x20b9af&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]!=_0x54261b&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]!=_0x569baa&&this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]!=_0x705e63&&_0x1fd74b!=_0x1b901e&&_0x1fd74b!=_0x56dd9e&&_0x1fd74b!=_0x1b52b7&&_0x1fd74b!=_0x20b9af&&_0x1fd74b!=_0x54261b&&_0x1fd74b!=_0x569baa&&_0x1fd74b!=_0x705e63)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-9\x5cx20origin/180/360/lat\x5cx20only\x5cx20display\x5cx20one\x5cx20port\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=0x518,0x0;if(this[\x27stFishEyeManager\x27][_0x4e9046][\x27bUsed\x27]&&(this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]==_0x1b901e&&_0x1fd74b==_0x5d10c0||this[\x27stFishEyeManager\x27][_0x4e9046][\x27emCorrectType\x27]==_0x5d10c0&&_0x1fd74b==_0x1b901e))return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-10\x5cx20180\x5cx20cannot\x5cx20support\x5cx20ptz\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=0x518,0x0;if(_0x705e63==_0x1fd74b&&(this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusLeft\x27]<=-0.5||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusLeft\x27]>0x0||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusRight\x27]<0x1||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusRight\x27]>=1.5||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusTop\x27]<=-0.5||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusTop\x27]>=0.4||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusBottom\x27]<=0.6||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusBottom\x27]>=1.5||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusLeft\x27]+this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusRight\x27]<=0.8||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusLeft\x27]+this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusRight\x27]>=1.2||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusTop\x27]+this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusBottom\x27]<=0.8||this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusTop\x27]+this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusBottom\x27]>=1.2))return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetPort-11\x5cx20veitical\x5cx20param\x5cx20error\x27,\x27color:\x5cx20red\x27),this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;}return\x200x1;}},{\x27key\x27:\x27FEC_Enable\x27,\x27value\x27:function(_0x4f4eb0){return\x20_0x4f4eb0<0x1||_0x4f4eb0>0x1f||null==_0x4f4eb0?(console[\x27info\x27](\x27%c\x5cx20FEC_Enable-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x4f4eb0),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0):null!==this[\x27stFishEyeManager\x27][_0x4f4eb0][\x27pRender\x27]?(console[\x27info\x27](\x27%c\x5cx20FEC_Enable-2\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x4f4eb0),this[\x27FECErrorCode\x27]=0x515,0x0):(null==this[\x27stFishEyeManager\x27][_0x4f4eb0][\x27pRender\x27]&&(this[\x27stFishEyeManager\x27][_0x4f4eb0][\x27pRender\x27]=new\x20_0x16641b(),null==this[\x27pFishParamManager\x27]&&(this[\x27pFishParamManager\x27]=new\x20_0x22aa88()),this[\x27stFishEyeManager\x27][_0x4f4eb0][\x27pRender\x27][\x27SR_SetFishParamManager\x27](this[\x27pFishParamManager\x27])),0x1);}},{\x27key\x27:\x27FEC_SetWnd\x27,\x27value\x27:function(_0xa73c2a,_0x283ab9){if(_0xa73c2a<0x1||_0xa73c2a>0x1f||null==_0xa73c2a)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetWnd-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0xa73c2a),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0;if(null==this[\x27stFishEyeManager\x27][_0xa73c2a][\x27pRender\x27])return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetWnd-2\x5cx20nSubPort:%d\x5cx20pRender\x5cx20is\x5cx20null\x27,\x27color:\x5cx20red\x27,_0xa73c2a),this[\x27FECErrorCode\x27]=_0xe627bc,0x0;if(0x0==this[\x27stFishEyeManager\x27][_0xa73c2a][\x27bUsed\x27])return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetWnd-3\x5cx20nSubPort:%d\x5cx20bUsed:%d\x27,\x27color:\x5cx20red\x27,_0xa73c2a,this[\x27stFishEyeManager\x27][_0xa73c2a][\x27bUsed\x27]),this[\x27FECErrorCode\x27]=_0x5487fc,0x0;if(null==_0x283ab9)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetWnd-4\x5cx20nSubPort:%d\x5cx20sCanvasID:%s\x27,\x27color:\x5cx20red\x27,_0xa73c2a,_0x283ab9),this[\x27FECErrorCode\x27]=0x519,0x0;if(0x0!=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27nSubPort\x27]&&0x0!=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27bUsed\x27]){if(0x0!=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27bInited\x27]&&null!=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27sCanvasID\x27])return\x20_0x283ab9!=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27sCanvasID\x27]?(console[\x27info\x27](\x27%c\x5cx20FEC_SetWnd-5\x5cx20nSubPort:%d\x5cx20sCanvasID:%s\x5cx20already\x5cx20init\x27,\x27color:\x5cx20red\x27,_0xa73c2a,_0x283ab9),this[\x27FECErrorCode\x27]=0x506,0x0):0x1;var\x20_0x4ad0ae;_0x4ad0ae=this[\x27_ConvertDisplayEffect\x27](this[\x27stFishEyeManager\x27][_0xa73c2a][\x27emPlaceType\x27],this[\x27stFishEyeManager\x27][_0xa73c2a][\x27emCorrectType\x27]);var\x20_0x39a0e9=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27pRender\x27][\x27SR_Init\x27](_0x283ab9,_0xa0f65c),_0x207405=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27pRender\x27][\x27SR_AddSubPort\x27](_0x4ad0ae);if(-0x1==_0x207405)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetWnd\x5cx20SR_AddSubPort\x5cx20error\x5cx20subport:%d\x27,\x27color:\x5cx20red\x27,_0xa73c2a),0x0;if(this[\x27stFishEyeManager\x27][_0xa73c2a][\x27nValidSubPort\x27]=_0x207405,_0x26bcbc!=_0x39a0e9)return\x20this[\x27stFishEyeManager\x27][_0xa73c2a][\x27bInited\x27]=0x0,this[\x27stFishEyeManager\x27][_0xa73c2a][\x27sCanvasID\x27]=null,this[\x27FECErrorCode\x27]=_0x5487fc,0x0;if(this[\x27stFishEyeManager\x27][_0xa73c2a][\x27bInited\x27]=0x1,this[\x27stFishEyeManager\x27][_0xa73c2a][\x27sCanvasID\x27]=_0x283ab9,_0x56dd9e<=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27emCorrectType\x27]){var\x20_0x49d79c=this[\x27stFishEyeManager\x27][_0xa73c2a][\x27pRender\x27][\x27SR_SetRenderState\x27](_0xa35613,0x0);_0x26bcbc!=_0x49d79c&&console[\x27log\x27](\x27>>>VideoRender.js\x5cx20SR_SetRenderState\x5cx20failed\x5cx20ret：%08x\x5cx0a\x27,_0x49d79c);}return\x20this[\x27FECShowMode\x27]>0x0&&this[\x27stFishEyeManager\x27][_0xa73c2a][\x27pRender\x27][\x27SR_SetPTZDisplayMode\x27](this[\x27FECShowMode\x27]),0x1;}return\x20this[\x27FECErrorCode\x27]=_0x5487fc,0x0;}},{\x27key\x27:\x27FEC_Disable\x27,\x27value\x27:function(_0x1ff033,_0x59252a,_0xd55d67){if(_0x1ff033<0x1||_0x1ff033>0x1f||null==_0x1ff033)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_Disable-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x1ff033),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0;if(0x1==this[\x27stFishEyeManager\x27][_0x1ff033][\x27bInited\x27]&&null!=this[\x27stFishEyeManager\x27][_0x1ff033][\x27pRender\x27]){if(_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x1ff033][\x27pRender\x27][\x27SR_DelSubPort\x27](this[\x27stFishEyeManager\x27][_0x1ff033][\x27nValidSubPort\x27]))return\x20console[\x27info\x27](\x27%c\x5cx20FEC_Disable-2\x5cx20SR_DelSubPort\x5cx20error\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x1ff033),0x0;this[\x27stFishEyeManager\x27][_0x1ff033][\x27bInited\x27]=0x0,this[\x27stFishEyeManager\x27][_0x1ff033][\x27nValidSubPort\x27]=-0x1,this[\x27stFishEyeManager\x27][_0x1ff033][\x27pRender\x27][\x27SR_Destroy\x27](),this[\x27stFishEyeManager\x27][_0x1ff033][\x27pRender\x27]=null;}return\x200x1;}},{\x27key\x27:\x27FEC_DelPort\x27,\x27value\x27:function(_0x4d7a70){return\x20_0x4d7a70<0x1||_0x4d7a70>0x1f||null==_0x4d7a70?(console[\x27info\x27](\x27%c\x5cx20FEC_DelPort-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x4d7a70),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0):0x0==this[\x27stFishEyeManager\x27][_0x4d7a70][\x27bUsed\x27]?(console[\x27info\x27](\x27%c\x5cx20FEC_DelPort-2\x5cx20nSubPort:%d\x5cx20bUsed：%d\x27,\x27color:\x5cx20red\x27,_0x4d7a70,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27bUsed\x27]),this[\x27FECErrorCode\x27]=_0x5487fc,0x0):(this[\x27stFishEyeManager\x27][_0x4d7a70][\x27nSubPort\x27]=0x0,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27sCanvasID\x27]=null,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27bUsed\x27]=0x0,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27bInited\x27]=0x0,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27nValidSubPort\x27]=0x0,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27emPlaceType\x27]=_0x372248,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27emCorrectType\x27]=_0xf9176d,this[\x27stFishEyeManager\x27][_0x4d7a70][\x27emEffect\x27]=_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27],this[\x27stFishParam\x27][_0x4d7a70][\x27stCycleParam\x27][\x27fRadiusLeft\x27]=0x0,this[\x27stFishParam\x27][_0x4d7a70][\x27stCycleParam\x27][\x27fRadiusRight\x27]=0x1,this[\x27stFishParam\x27][_0x4d7a70][\x27stCycleParam\x27][\x27fRadiusTop\x27]=0x0,this[\x27stFishParam\x27][_0x4d7a70][\x27stCycleParam\x27][\x27fRadiusBottom\x27]=0x1,this[\x27subPortNum\x27]>0x0&&this[\x27subPortNum\x27]--,0x1);}},{\x27key\x27:\x27FEC_SetParam\x27,\x27value\x27:function(_0x210e6e,_0x12e66a){if(this[\x27FECErrorCode\x27]=0x0,_0x210e6e<0x0||_0x210e6e>0x1f||null==_0x210e6e)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetParam-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x210e6e),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0;if(null==this[\x27stFishEyeManager\x27][_0x210e6e][\x27pRender\x27])return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetParam-2\x5cx20nSubPort:%d\x5cx20pRender:%d\x27,\x27color:\x5cx20red\x27,_0x210e6e,this[\x27stFishEyeManager\x27][_0x210e6e][\x27pRender\x27]),this[\x27FECErrorCode\x27]=_0xe627bc,0x0;if(0x0==this[\x27stFishEyeManager\x27][_0x210e6e][\x27bUsed\x27])return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetParam-3\x5cx20nSubPort:%d\x5cx20bUsed:%d\x27,\x27color:\x5cx20red\x27,_0x210e6e,this[\x27stFishEyeManager\x27][_0x210e6e][\x27bUsed\x27]),this[\x27FECErrorCode\x27]=_0x5487fc,0x0;if(this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27]>=_0x56dd9e&&this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27]<=_0x705e63&&0x1e&_0x12e66a[\x27upDateType\x27])return\x20console[\x27info\x27](\x27%c\x5cx20FEC_SetParam-4\x5cx20nSubPort:%d\x5cx20not\x5cx203D\x27,\x27color:\x5cx20red\x27,_0x210e6e),this[\x27FECErrorCode\x27]=_0x4da770,0x0;if(_0x15e32a&_0x12e66a[\x27upDateType\x27]){if(null==_0x12e66a[\x27stCycleParam\x27])return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;for(var\x20_0x18602c=0x1;_0x18602c<_0x57b7ee;_0x18602c++){if(this[\x27stFishEyeManager\x27][_0x18602c][\x27bUsed\x27]&&this[\x27stFishEyeManager\x27][_0x18602c][\x27nSubPort\x27]&&_0x569baa==this[\x27stFishEyeManager\x27][_0x18602c][\x27emCorrectType\x27]&&(_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]<=-0.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]>=0.4||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]<=0.6||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]>=1.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]<=-0.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]>0x0||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]<0x1||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]>=1.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]<=0.8||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]>=1.2||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]<=0.8||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]>=1.2))return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;if(this[\x27stFishEyeManager\x27][_0x18602c][\x27bUsed\x27]&&this[\x27stFishEyeManager\x27][_0x18602c][\x27nSubPort\x27]&&_0x705e63==this[\x27stFishEyeManager\x27][_0x18602c][\x27emCorrectType\x27]&&(_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]<=-0.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]>0x0||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]<0x1||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]>=1.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]<=-0.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]>=0.4||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]<=0.6||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]>=1.5||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]<=0.8||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27]>=1.2||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]<=0.8||_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27]+_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27]>=1.2))return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;}}if(0x0==this[\x27stFishEyeManager\x27][_0x210e6e][\x27bInited\x27]){if(_0x507306&_0x12e66a[\x27upDateType\x27]){if(_0x5d10c0!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27]&&_0x5e8792!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27]||_0x5b2e5d==this[\x27stFishEyeManager\x27][_0x210e6e][\x27emPlaceType\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;for(var\x20_0x4053d7=0x1;_0x4053d7<_0x57b7ee;_0x4053d7++)if(this[\x27stFishEyeManager\x27][_0x4053d7][\x27nSubPort\x27]&&this[\x27stFishEyeManager\x27][_0x4053d7][\x27bUsed\x27]&&this[\x27stFishEyeManager\x27][_0x4053d7][\x27emCorrectType\x27]==_0x1b901e)return\x20this[\x27FECErrorCode\x27]=_0x14bc99,0x0;this[\x27stFishParam\x27][_0x210e6e][\x27fWideScanOffset\x27]=_0x12e66a[\x27fValue\x27];}if(_0x41b06f&_0x12e66a[\x27upDateType\x27]){if(null==_0x12e66a[\x27stPTZColor\x27])return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;if(_0x12e66a[\x27stPTZColor\x27][\x27nR\x27]>0xff||_0x12e66a[\x27stPTZColor\x27][\x27nG\x27]>0xff||_0x12e66a[\x27stPTZColor\x27][\x27nB\x27]>0xff||_0x12e66a[\x27stPTZColor\x27][\x27nAlpha\x27]>0xff)return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nR\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nR\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nG\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nG\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nB\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nB\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nAlpha\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nAlpha\x27];}if(_0x3e4a1a&_0x12e66a[\x27upDateType\x27]){if(_0x1b901e!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;this[\x27stFishParam\x27][_0x210e6e][\x27stPTZParam\x27][\x27fPTZPositionX\x27]=_0x12e66a[\x27fPTZParam\x27][\x27fPTZPositionX\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZParam\x27][\x27fPTZPositionY\x27]=_0x12e66a[\x27fPTZParam\x27][\x27fPTZPositionY\x27];}if(_0x1f8dfc&_0x12e66a[\x27upDateType\x27]){if(_0x1b901e!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;this[\x27stFishParam\x27][_0x210e6e][\x27fZoom\x27]=_0x12e66a[\x27fPTZZoom\x27];}if(_0x44c1dc&_0x12e66a[\x27upDateType\x27]){if(null==this[\x27stFishParam\x27][\x27stPTZSelect\x27])return\x200x0;if(_0x1b901e!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;this[\x27stFishParam\x27][\x27stPTZSelect\x27][\x27fTop\x27]=_0x12e66a[\x27stPTZSelect\x27][\x27fTop\x27],this[\x27stFishParam\x27][\x27stPTZSelect\x27][\x27fBottom\x27]=_0x12e66a[\x27stPTZSelect\x27][\x27fBottom\x27],this[\x27stFishParam\x27][\x27stPTZSelect\x27][\x27fLeft\x27]=_0x12e66a[\x27stPTZSelect\x27][\x27fLeft\x27],this[\x27stFishParam\x27][\x27stPTZSelect\x27][\x27fRight\x27]=_0x12e66a[\x27stPTZSelect\x27][\x27fRight\x27];}if(_0x15e32a&_0x12e66a[\x27upDateType\x27]){if(null==_0x12e66a[\x27stCycleParam\x27])return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;if(0x0==this[\x27_IsValidRadiusParam\x27](_0x12e66a[\x27stCycleParam\x27]))return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusLeft\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27],this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusRight\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27],this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusTop\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27],this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusBottom\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27];}return\x200x1;}if(_0x507306&_0x12e66a[\x27upDateType\x27]){if(_0x5d10c0!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27]&&_0x5e8792!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27]||_0x5b2e5d==this[\x27stFishEyeManager\x27][_0x210e6e][\x27emPlaceType\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;for(var\x20_0x4f88d8=0x1;_0x4f88d8<_0x57b7ee;_0x4f88d8++)if(this[\x27stFishEyeManager\x27][_0x4f88d8][\x27nSubPort\x27]&&this[\x27stFishEyeManager\x27][_0x4f88d8][\x27bUsed\x27]&&this[\x27stFishEyeManager\x27][_0x4f88d8][\x27emCorrectType\x27]==_0x1b901e)return\x20this[\x27FECErrorCode\x27]=_0x14bc99,0x0;var\x20_0x42e405={};if(_0x42e405[\x27nFishParamType\x27]=_0x2948e8,_0x42e405[\x27bBlack\x27]=0x0,_0x42e405[\x27fAngle\x27]=_0x12e66a[\x27fValue\x27],_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27pRender\x27][\x27SR_SetFishParam\x27](_0x42e405))return\x20this[\x27FECErrorCode\x27]=_0x14bc99,0x0;this[\x27stFishParam\x27][_0x210e6e][\x27fWideScanOffset\x27]=_0x12e66a[\x27fValue\x27];}if(_0x41b06f&_0x12e66a[\x27upDateType\x27]){if(null==_0x12e66a[\x27stPTZColor\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;if(_0x12e66a[\x27stPTZColor\x27][\x27nR\x27]>0xff||_0x12e66a[\x27stPTZColor\x27][\x27nG\x27]>0xff||_0x12e66a[\x27stPTZColor\x27][\x27nB\x27]>0xff||_0x12e66a[\x27stPTZColor\x27][\x27nAlpha\x27]>0xff)return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;var\x20_0x17ab32={};_0x17ab32[\x27fR\x27]=float(_0x12e66a[\x27stPTZColor\x27][\x27nR\x27]/0xff),_0x17ab32[\x27fG\x27]=float(_0x12e66a[\x27stPTZColor\x27][\x27nG\x27]/0xff),_0x17ab32[\x27fB\x27]=float(_0x12e66a[\x27stPTZColor\x27][\x27nB\x27]/0xff),_0x17ab32[\x27fA\x27]=float(_0x12e66a[\x27stPTZColor\x27][\x27nAlpha\x27]/0xff),this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nR\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nR\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nG\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nG\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nB\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nB\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZColor\x27][\x27nAlpha\x27]=_0x12e66a[\x27stPTZColor\x27][\x27nAlpha\x27];}if(_0x3e4a1a&_0x12e66a[\x27upDateType\x27]){if(_0x1b901e!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;var\x20_0xeacbeb={};if(_0xeacbeb[\x27nFishParamType\x27]=_0x5a3c33,_0xeacbeb[\x27bBlack\x27]=0x0,_0xeacbeb[\x27fPTZX\x27]=_0x12e66a[\x27fPTZParam\x27][\x27fPTZPositionX\x27],_0xeacbeb[\x27fPTZY\x27]=_0x12e66a[\x27fPTZParam\x27][\x27fPTZPositionY\x27],_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27pRender\x27][\x27SR_SetFishParam\x27](_0xeacbeb))return\x20this[\x27FECErrorCode\x27]=_0x14bc99,0x0;this[\x27stFishParam\x27][_0x210e6e][\x27stPTZParam\x27][\x27fPTZPositionX\x27]=_0x12e66a[\x27fPTZParam\x27][\x27fPTZPositionX\x27],this[\x27stFishParam\x27][_0x210e6e][\x27stPTZParam\x27][\x27fPTZPositionY\x27]=_0x12e66a[\x27fPTZParam\x27][\x27fPTZPositionY\x27];}if(_0x1f8dfc&_0x12e66a[\x27upDateType\x27]){if(_0x1b901e!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27])return\x20this[\x27FECErrorCode\x27]=_0x4da770,0x0;var\x20_0x40aa12={};if(_0x40aa12[\x27nFishParamType\x27]=_0x1ac653,_0x40aa12[\x27bBlack\x27]=0x0,_0x40aa12[\x27fZoom\x27]=_0x12e66a[\x27fPTZZoom\x27],_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27pRender\x27][\x27SR_SetFishParam\x27](_0x40aa12))return\x20this[\x27FECErrorCode\x27]=_0x14bc99,0x0;this[\x27stFishParam\x27][_0x210e6e][\x27fZoom\x27]=_0x12e66a[\x27fPTZZoom\x27];}if(_0x15e32a&_0x12e66a[\x27upDateType\x27]){if(0x0==this[\x27_IsValidRadiusParam\x27](_0x12e66a[\x27stCycleParam\x27]))return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;var\x20_0x2eebc3={};if(_0x2eebc3[\x27nFishParamType\x27]=_0x3b72f0,_0x2eebc3[\x27bBlack\x27]=0x1,_0x2eebc3[\x27fRXLeft\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27],_0x2eebc3[\x27fRXRight\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27],_0x2eebc3[\x27fRYTop\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27],_0x2eebc3[\x27fRYBottom\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27],_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27pRender\x27][\x27SR_SetFishParam\x27](this[\x27stFishEyeManager\x27][_0x210e6e][\x27nValidSubPort\x27],_0x2eebc3))return\x20this[\x27FECErrorCode\x27]=_0x6d4fc5,0x0;this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusLeft\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusLeft\x27],this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusRight\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusRight\x27],this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusTop\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusTop\x27],this[\x27stFishParam\x27][0x0][\x27stCycleParam\x27][\x27fRadiusBottom\x27]=_0x12e66a[\x27stCycleParam\x27][\x27fRadiusBottom\x27];}return\x20_0x44c1dc&_0x12e66a[\x27upDateType\x27]&&_0x1b901e==this[\x27stFishEyeManager\x27][_0x210e6e][\x27emCorrectType\x27]&&_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x210e6e][\x27pRender\x27][\x27SR_SetFishParam\x27](this[\x27stFishEyeManager\x27][_0x210e6e][\x27stPTZSelect\x27])?(this[\x27FECErrorCode\x27]=0x513,0x0):0x1;}},{\x27key\x27:\x27FEC_GetParam\x27,\x27value\x27:function(_0x197b6a,_0xe35dca){return\x20_0x197b6a<0x0||_0x197b6a>0x1f||null==_0x197b6a?(console[\x27info\x27](\x27%c\x5cx20FEC_GetParam-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x197b6a),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0):null==this[\x27stFishEyeManager\x27][_0x197b6a][\x27pRender\x27]?(console[\x27info\x27](\x27%c\x5cx20FEC_GetParam-2\x5cx20pRender:%d\x27,\x27color:\x5cx20red\x27,this[\x27stFishEyeManager\x27][_0x197b6a][\x27pRender\x27]),this[\x27FECErrorCode\x27]=_0xe627bc,0x0):(this[\x27stFishEyeManager\x27][_0x197b6a][\x27pRender\x27][\x27SR_GetFishParam\x27](_0xe35dca),_0xe35dca[\x27emCorrectType\x27]=this[\x27stFishEyeManager\x27][_0x197b6a][\x27emCorrectType\x27],0x1);}},{\x27key\x27:\x27_IsValidRadiusParam\x27,\x27value\x27:function(_0x32277d){return\x20_0x32277d[\x27fRadiusBottom\x27]<=_0x32277d[\x27fRadiusTop\x27]||_0x32277d[\x27fRadiusRight\x27]<=_0x32277d[\x27fRadiusLeft\x27]?0x0:0x1;}},{\x27key\x27:\x27FEC_SetViewParam\x27,\x27value\x27:function(_0x421259,_0xf996e0,_0x508875){return\x20_0x421259<0x0||_0x421259>0x1f||null==_0x421259?(console[\x27info\x27](\x27%c\x5cx20FEC_SetViewParam-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x421259),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0):null==this[\x27stFishEyeManager\x27][_0x421259][\x27pRender\x27]?(console[\x27info\x27](\x27%c\x5cx20FEC_SetViewParam-2\x5cx20pRender:%d\x27,\x27color:\x5cx20red\x27,this[\x27stFishEyeManager\x27][_0x421259][\x27pRender\x27]),this[\x27FECErrorCode\x27]=_0xe627bc,0x0):_0xf996e0<_0x33678f||_0xf996e0>_0x263bcd?(this[\x27FECErrorCode\x27]=_0xa6211e,0x0):(this[\x27FECErrorCode\x27]=0x0,0x0==this[\x27stFishEyeManager\x27][_0x421259][\x27bInited\x27]?(this[\x27FECErrorCode\x27]=_0x5487fc,0x0):_0x56dd9e<=this[\x27stFishEyeManager\x27][_0x421259][\x27emCorrectType\x27]?_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x421259][\x27pRender\x27][\x27SR_SetViewParam\x27](_0xf996e0,_0x508875)?(this[\x27FECErrorCode\x27]=_0xa6211e,0x0):0x1:(this[\x27FECErrorCode\x27]=_0x4da770,0x0));}},{\x27key\x27:\x27FEC_GetViewParam\x27,\x27value\x27:function(_0xacc4fd,_0x4e39ce,_0x1784ef){if(_0x1784ef[\x27fValue\x27]=-0x1,_0xacc4fd<0x0||_0xacc4fd>0x1f||null==_0xacc4fd)return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetViewParam-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0xacc4fd),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0;if(null==this[\x27stFishEyeManager\x27][_0xacc4fd][\x27pRender\x27])return\x20console[\x27info\x27](\x27%c\x5cx20FEC_GetViewParam-2\x5cx20pRender:%d\x27,\x27color:\x5cx20red\x27,this[\x27stFishEyeManager\x27][_0xacc4fd][\x27pRender\x27]),this[\x27FECErrorCode\x27]=_0xe627bc,0x0;if(_0x4e39ce<0x1||_0x4e39ce>0x3||0x0==this[\x27stFishEyeManager\x27][_0xacc4fd][\x27bInited\x27])return\x200x0;if(_0x56dd9e<=this[\x27stFishEyeManager\x27][_0xacc4fd][\x27emCorrectType\x27])this[\x27stFishEyeManager\x27][_0xacc4fd][\x27pRender\x27][\x27SR_GetViewParam\x27](_0x4e39ce,_0x1784ef);return\x200x1;}},{\x27key\x27:\x27FEC_SetDisplayRegion\x27,\x27value\x27:function(_0x3681fe,_0x41ad68,_0x510ee0,_0x4cd4d1,_0x409d72,_0xdf71fd,_0x574cce){return\x20_0x3681fe<0x0||_0x3681fe>0x1f||null==_0x3681fe?(console[\x27info\x27](\x27%c\x5cx20FEC_SetDisplayRegion-1\x5cx20nSubPort:%d\x27,\x27color:\x5cx20red\x27,_0x3681fe),this[\x27FECErrorCode\x27]=_0x26b7a2,0x0):null==this[\x27stFishEyeManager\x27][_0x3681fe][\x27pRender\x27]?(console[\x27info\x27](\x27%c\x5cx20FEC_SetDisplayRegion-2\x5cx20pRender:%d\x27,\x27color:\x5cx20red\x27,this[\x27stFishEyeManager\x27][_0x3681fe][\x27pRender\x27]),this[\x27FECErrorCode\x27]=_0xe627bc,0x0):0x0!=_0x41ad68||0x0!=_0x510ee0?(this[\x27FECErrorCode\x27]=_0xa6211e,0x0):this[\x27stFishEyeManager\x27][_0x3681fe][\x27emCorrectType\x27]!=_0xf9176d&&this[\x27stFishEyeManager\x27][_0x3681fe][\x27emCorrectType\x27]!=_0x5d10c0&&this[\x27stFishEyeManager\x27][_0x3681fe][\x27emCorrectType\x27]!=_0x5e8792&&this[\x27stFishEyeManager\x27][_0x3681fe][\x27emCorrectType\x27]!=_0x2f6657?(this[\x27FECErrorCode\x27]=_0x45ad56,0x0):0x0==this[\x27stFishEyeManager\x27][_0x3681fe][\x27bInited\x27]?(this[\x27FECErrorCode\x27]=_0x5487fc,0x0):_0x4cd4d1<0x0||_0x409d72<0x0||_0xdf71fd<0x0||_0x574cce<0x0?(this[\x27FECErrorCode\x27]=_0xa6211e,0x0):_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x3681fe][\x27pRender\x27][\x27SR_SetDisplayRect\x27](_0x4cd4d1,_0x409d72,_0xdf71fd,_0x574cce,_0x3ff926)?(this[\x27FECErrorCode\x27]=0x511,0x0):0x1;}},{\x27key\x27:\x27FEC_SetBackCilling\x27,\x27value\x27:function(_0x33fef3,_0xbec285){return\x20_0x33fef3<0x0||_0x33fef3>0x1f||null==_0x33fef3?(this[\x27FECErrorCode\x27]=_0x26b7a2,0x0):null==this[\x27stFishEyeManager\x27][_0x33fef3][\x27pRender\x27]?(this[\x27FECErrorCode\x27]=_0xe627bc,0x0):0x0==this[\x27stFishEyeManager\x27][_0x33fef3][\x27bInited\x27]?(this[\x27FECErrorCode\x27]=_0x5487fc,0x0):_0x26bcbc!=this[\x27stFishEyeManager\x27][_0x33fef3][\x27pRender\x27][\x27SR_SetRenderState\x27](_0xa35613,_0xbec285)?(this[\x27FECErrorCode\x27]=0x511,0x0):0x1;}},{\x27key\x27:\x27FEC_GetPTZPort\x27,\x27value\x27:function(_0x169ee0,_0x302e3f,_0x45451b){if(null!=this[\x27stFishEyeManager\x27][_0x169ee0][\x27pRender\x27]){var\x20_0x13c3ef={\x27nPTZPort\x27:-0x1};if(this[\x27stFishEyeManager\x27][_0x169ee0][\x27pRender\x27][\x27SR_GetPTZPort\x27](_0x302e3f,_0x45451b,_0x13c3ef)==_0x26bcbc)return\x20_0x13c3ef[\x27nPTZPort\x27];}return-0x1;}},{\x27key\x27:\x27FEC_SetPTZDisplayMode\x27,\x27value\x27:function(_0x2dd395){return\x20_0x2dd395>=0x0&&_0x2dd395<=0x2?(null!=this[\x27stFishEyeManager\x27][0x0][\x27pRender\x27]&&this[\x27stFishEyeManager\x27][0x0][\x27pRender\x27][\x27SR_SetPTZDisplayMode\x27](_0x2dd395),this[\x27FECShowMode\x27]=_0x2dd395,0x1):(console[\x27info\x27](\x27%c\x5cx20FEC_SetPTZDisplayMode\x5cx20ptzMode:%d\x27,\x27color:\x5cx20red\x27,_0x2dd395),0x0);}},{\x27key\x27:\x27SetWaterMarkFont\x27,\x27value\x27:function(_0x5bfd91){return\x20this[\x27curWaterMarkFontsInfo\x27]=_0x5bfd91,0x1;}},{\x27key\x27:\x27SetWaterMarkImage\x27,\x27value\x27:function(_0x3b7c8a){var\x20_0x26f592=this,_0x121c6d=new\x20ImageDecoder({\x27data\x27:_0x3b7c8a[\x27pImageData\x27],\x27type\x27:\x27image/\x27+_0x3b7c8a[\x27pImageType\x27]});return\x20null!=_0x3b7c8a[\x27pImageData\x27]&&_0x121c6d[\x27decode\x27](_0x3b7c8a[\x27pImageData\x27])[\x27then\x27](function(_0x2a8dd7){_0x26f592[\x27curWaterMarkImageInfo\x27]={},_0x26f592[\x27curWaterMarkImageInfo\x27][\x27videoStream\x27]=_0x2a8dd7[\x27image\x27],_0x26f592[\x27curWaterMarkImageInfo\x27][\x27nImageWidth\x27]=_0x2a8dd7[\x27image\x27][\x27displayWidth\x27],_0x26f592[\x27curWaterMarkImageInfo\x27][\x27nImageHeight\x27]=_0x2a8dd7[\x27image\x27][\x27displayHeight\x27],null!=_0x3b7c8a[\x27pstRectPos\x27]?_0x26f592[\x27curWaterMarkImageInfo\x27][\x27pstRectPos\x27]=_0x3b7c8a[\x27pstRectPos\x27]:_0x26f592[\x27curWaterMarkImageInfo\x27][\x27pstRectPos\x27]={\x27fLeft\x27:0x0,\x27fRight\x27:0.1,\x27fTop\x27:0x0,\x27fBottom\x27:0.1},null!=_0x3b7c8a[\x27fAlpha\x27]&&_0x3b7c8a[\x27fAlpha\x27]<=0x1&&_0x3b7c8a[\x27fAlpha\x27]>=0x0?_0x26f592[\x27curWaterMarkImageInfo\x27][\x27fAlpha\x27]=_0x3b7c8a[\x27fAlpha\x27]:_0x26f592[\x27curWaterMarkImageInfo\x27][\x27fAlpha\x27]=0x1;}),0x1;}},{\x27key\x27:\x27_ConvertDisplayEffect\x27,\x27value\x27:function(_0x5f7398,_0x1a6cf1){switch(_0x5f7398){case\x20_0x5b2e5d:return\x20_0x1b901e==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PTZ_WALL\x27]:_0x5e8792==_0x1a6cf1||_0x2f6657==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:_0x56dd9e==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:_0x54261b==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PLANET\x27]:_0x569baa==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL\x27]:_0x705e63==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_ARCSPHERE_VERTICAL_WALL\x27]:_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27];case\x20_0x53136e:return\x20_0x1b901e==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PTZ_FLOOR\x27]:_0x5e8792==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_360\x27]:_0x5d10c0==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PANORAMA_FLOOR_180\x27]:_0x2f6657==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:_0x56dd9e==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:_0x1b52b7==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_CYLINDER_FLOOR\x27]:_0x20b9af==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_FLOOR\x27]:_0x54261b==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PLANET\x27]:_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27];case\x20_0x372248:return\x20_0x1b901e==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PTZ_CEILING\x27]:_0x5e8792==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_360\x27]:_0x5d10c0==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PANORAMA_CEILING_180\x27]:_0x2f6657==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PANORAMA_WALL\x27]:_0x56dd9e==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_SEMISPHERE\x27]:_0x1b52b7==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_CYLINDER_CEILING\x27]:_0x20b9af==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_CYLINDER_SPLIT_CEILING\x27]:_0x54261b==_0x1a6cf1?_0x3409b0[\x27SR_DE_FISH_PLANET\x27]:_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27];default:return\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27];}return\x20_0x3409b0[\x27SR_DE_FISH_ORIGINAL\x27];}},{\x27key\x27:\x27GetCanvasData\x27,\x27value\x27:function(_0x12bfa0){var\x20_0x5bbd7c={\x27nWidth\x27:0x0,\x27nHeight\x27:0x0,\x27nBufferLen\x27:0x0},_0x5a47ea=this[\x27oVideoHandle\x27][\x27SR_GetCaptureSize\x27](_0x5bbd7c);(_0x26bcbc!=_0x5a47ea||_0x5bbd7c[\x27nBufferLen\x27]<=0x0)&&_0x12bfa0(null);var\x20_0x19b130=new\x20Uint8Array(_0x5bbd7c[\x27nBufferLen\x27]);null==_0x19b130&&_0x12bfa0(null);var\x20_0x38d233={};_0x38d233[\x27pBuffer\x27]=_0x19b130,this[\x27oVideoHandle\x27][\x27SR_CaptureScreen\x27](_0x38d233),_0x12bfa0(_0x19b130,_0x5bbd7c[\x27nWidth\x27],_0x5bbd7c[\x27nHeight\x27]);}},{\x27key\x27:\x27FindIntelNodefromList\x27,\x27value\x27:function(_0xe5f11a){if(0x0!=this[\x27privateLinesInfo\x27][\x27length\x27]){var\x20_0x55f6e=this[\x27privateLinesInfo\x27][0x0][\x27absTimeStamp\x27];if(_0x55f6e<=_0xe5f11a+0x64&&_0x55f6e>_0xe5f11a-0x64)this[\x27curLinesInfo\x27]=this[\x27privateLinesInfo\x27][\x27shift\x27]();else{if(_0x55f6e>_0xe5f11a+0x7d0||_0x55f6e<_0xe5f11a-0x7d0)for(this[\x27curLinesInfo\x27]=this[\x27privateLinesInfo\x27][\x27shift\x27]();this[\x27privateLinesInfo\x27][\x27length\x27]>0x0;){var\x20_0x4c13d9=this[\x27privateLinesInfo\x27][0x0][\x27absTimeStamp\x27];if(!(_0x4c13d9>_0xe5f11a+0x7d0||_0x4c13d9<_0xe5f11a-0x7d0))break;this[\x27curLinesInfo\x27]=this[\x27privateLinesInfo\x27][\x27shift\x27]();}}}}},{\x27key\x27:\x27RenderPrivateData\x27,\x27value\x27:function(_0x40885b){return\x200x0==this[\x27privateLinesInfo\x27][\x27length\x27]&&_0x40885b&&(this[\x27curLinesInfo\x27]=null),0x1;}},{\x27key\x27:\x27InputPrivateInfo\x27,\x27value\x27:function(_0x6b1e48,_0x2560fc,_0x4f7661){var\x20_0x5d6592=!0x1,_0x336883=0x0;if(_0x6b1e48[\x27linesNum\x27]>0x0){if(_0x6b1e48[\x27absTimeStamp\x27]<=this[\x27maxPrivateLineTimeStamp\x27]){var\x20_0x3531ba=0x0;for(_0x3531ba=0x0;_0x3531ba<this[\x27privateLinesInfo\x27][\x27length\x27];_0x3531ba++)if(this[\x27privateLinesInfo\x27][_0x3531ba][\x27absTimeStamp\x27]==_0x6b1e48[\x27absTimeStamp\x27]){_0x5d6592=!0x0,_0x336883=_0x3531ba;break;}}if(_0x5d6592){var\x20_0x43cd94=this[\x27privateLinesInfo\x27][_0x336883][\x27linesNum\x27];this[\x27privateLinesInfo\x27][_0x336883][\x27linesNum\x27]=_0x43cd94+_0x6b1e48[\x27linesNum\x27];for(var\x20_0x51289d=0x0;_0x51289d<_0x6b1e48[\x27linesNum\x27];_0x51289d++){this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94]={},this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27vertex_num\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27vertex_num\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27lineWidth\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27lineWidth\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27bFill\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27bFill\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27bLoop\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27bLoop\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27color\x27]={},this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27color\x27][\x27R\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27color\x27][\x27R\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27color\x27][\x27G\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27color\x27][\x27G\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27color\x27][\x27B\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27color\x27][\x27B\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27color\x27][\x27A\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27color\x27][\x27A\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27stPoint\x27]=[];for(var\x20_0x1e6138=0x0;_0x1e6138<_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27vertex_num\x27];_0x1e6138++)this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27stPoint\x27][_0x1e6138]={},this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27stPoint\x27][_0x1e6138][\x27x\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27stPoint\x27][_0x1e6138][\x27x\x27],this[\x27privateLinesInfo\x27][_0x336883][\x27stDrawLinesArray\x27][_0x51289d+_0x43cd94][\x27stPoint\x27][_0x1e6138][\x27y\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x51289d][\x27stPoint\x27][_0x1e6138][\x27y\x27];}}else{this[\x27maxPrivateLineTimeStamp\x27]<_0x6b1e48[\x27absTimeStamp\x27]&&(this[\x27maxPrivateLineTimeStamp\x27]=_0x6b1e48[\x27absTimeStamp\x27]);var\x20_0x403852={};_0x403852[\x27linesNum\x27]=_0x6b1e48[\x27linesNum\x27],_0x403852[\x27absTimeStamp\x27]=_0x6b1e48[\x27absTimeStamp\x27],_0x403852[\x27stDrawLinesArray\x27]=[];for(var\x20_0x5f489b=0x0;_0x5f489b<_0x6b1e48[\x27linesNum\x27];_0x5f489b++){_0x403852[\x27stDrawLinesArray\x27][_0x5f489b]={},_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27vertex_num\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27vertex_num\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27lineWidth\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27lineWidth\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27bFill\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27bFill\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27bLoop\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27bLoop\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27]={},_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27R\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27R\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27G\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27G\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27B\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27B\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27A\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27color\x27][\x27A\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27stPoint\x27]=[];for(var\x20_0x159faa=0x0;_0x159faa<_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27vertex_num\x27];_0x159faa++)_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27stPoint\x27][_0x159faa]={},_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27stPoint\x27][_0x159faa][\x27x\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27stPoint\x27][_0x159faa][\x27x\x27],_0x403852[\x27stDrawLinesArray\x27][_0x5f489b][\x27stPoint\x27][_0x159faa][\x27y\x27]=_0x6b1e48[\x27stDrawLinesArray\x27][_0x5f489b][\x27stPoint\x27][_0x159faa][\x27y\x27];}this[\x27privateLinesInfo\x27][\x27push\x27](_0x403852);}}return\x200x1;}},{\x27key\x27:\x27WebGLDisplayCallBack\x27,\x27value\x27:function(_0x57109a){if(0x0!=_0x57109a[\x27privateLinesInfo\x27][\x27length\x27]||null!=_0x57109a[\x27curLinesInfo\x27]||null!=_0x57109a[\x27curWaterMarkFontsInfo\x27]||null!==_0x57109a[\x27curWaterMarkImageInfo\x27]){if(null!=_0x57109a[\x27curLinesInfo\x27]){for(var\x20_0x487d36=[],_0xaceefb=0x0,_0x4a9c3e=0x1,_0x5eee1c=0x0;_0x5eee1c<_0x57109a[\x27curLinesInfo\x27][\x27linesNum\x27];_0x5eee1c++){_0x487d36[_0x5eee1c]={},_0x487d36[_0x5eee1c][\x27nPointNum\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27vertex_num\x27],_0x487d36[_0x5eee1c][\x27nLineWidth\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27lineWidth\x27],_0x4a9c3e=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27bFill\x27],_0x487d36[_0x5eee1c][\x27bLoop\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27bLoop\x27],_0x487d36[_0x5eee1c][\x27pstColor\x27]={},_0x487d36[_0x5eee1c][\x27pstColor\x27][\x27fR\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27color\x27][\x27R\x27],_0x487d36[_0x5eee1c][\x27pstColor\x27][\x27fG\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27color\x27][\x27G\x27],_0x487d36[_0x5eee1c][\x27pstColor\x27][\x27fB\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27color\x27][\x27B\x27],_0x487d36[_0x5eee1c][\x27pstColor\x27][\x27fA\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27color\x27][\x27A\x27],_0x487d36[_0x5eee1c][\x27pstPoints\x27]=[];for(var\x20_0x2474c9=0x0;_0x2474c9<_0x487d36[_0x5eee1c][\x27nPointNum\x27];_0x2474c9++)_0x487d36[_0x5eee1c][\x27pstPoints\x27][_0x2474c9]={},_0x487d36[_0x5eee1c][\x27pstPoints\x27][_0x2474c9][\x27fX\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27stPoint\x27][_0x2474c9][\x27x\x27],_0x487d36[_0x5eee1c][\x27pstPoints\x27][_0x2474c9][\x27fY\x27]=_0x57109a[\x27curLinesInfo\x27][\x27stDrawLinesArray\x27][_0x5eee1c][\x27stPoint\x27][_0x2474c9][\x27y\x27];_0xaceefb+=_0x487d36[_0x5eee1c][\x27nPointNum\x27];}_0x57109a[\x27oVideoHandle\x27][\x27SR_DrawLinesEx\x27](_0x487d36,_0x57109a[\x27curLinesInfo\x27][\x27linesNum\x27],_0xaceefb,_0x4a9c3e);}if(null!=_0x57109a[\x27curWaterMarkFontsInfo\x27]){if(_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pstFontRotate\x27][\x27fFillFullScreen\x27]){var\x20_0x5816a4=[],_0xfef5d4=[];_0xfef5d4[0x0]=0.05,_0xfef5d4[0x1]=0.35,_0xfef5d4[0x2]=0.75;for(var\x20_0x28cd21=0x0;_0x28cd21<0x9;++_0x28cd21){_0x5816a4[_0x28cd21]={},_0x5816a4[_0x28cd21][\x27pString\x27]=_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pFontString\x27],_0x5816a4[_0x28cd21][\x27nFontWidth\x27]=_0x57109a[\x27mainCanvasID\x27][\x27width\x27]/0x1e,_0x5816a4[_0x28cd21][\x27nFontHeight\x27]=_0x57109a[\x27mainCanvasID\x27][\x27height\x27]/0x1e,_0x5816a4[_0x28cd21][\x27pstStartPos\x27]={};var\x20_0x13134d=_0x28cd21%0x3,_0x523e94=Math[\x27floor\x27](_0x28cd21/0x3);_0x5816a4[_0x28cd21][\x27pstStartPos\x27][\x27fX\x27]=_0xfef5d4[_0x13134d],_0x5816a4[_0x28cd21][\x27pstStartPos\x27][\x27fY\x27]=_0xfef5d4[_0x523e94],_0x5816a4[_0x28cd21][\x27pstFontColor\x27]=_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pstFontColor\x27],_0x5816a4[_0x28cd21][\x27bBackGround\x27]=!0x1,_0x5816a4[_0x28cd21][\x27pstBGColor\x27]=null,_0x5816a4[_0x28cd21][\x27fRotateAngle\x27]=0x1e,_0x5816a4[_0x28cd21][\x27pFontFamily\x27]=_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pFontFamily\x27];}_0x57109a[\x27oVideoHandle\x27][\x27SR_DrawFontEx\x27](_0x5816a4,0x9);}else\x20_0x57109a[\x27oVideoHandle\x27][\x27SR_DrawFont\x27](_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pFontString\x27],_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pstStartPos\x27],_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pstFontColor\x27],_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pstFontSize\x27][\x27nFontWidth\x27],_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pstFontSize\x27][\x27nFontHeight\x27],!0x1,null,_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pstFontRotate\x27][\x27fRotateAngle\x27],_0x57109a[\x27curWaterMarkFontsInfo\x27][\x27pFontFamily\x27]);}null!==_0x57109a[\x27curWaterMarkImageInfo\x27]&&_0x57109a[\x27oVideoHandle\x27][\x27SR_DrawImage\x27](_0x57109a[\x27curWaterMarkImageInfo\x27][\x27videoStream\x27],_0x57109a[\x27curWaterMarkImageInfo\x27][\x27nImageWidth\x27],_0x57109a[\x27curWaterMarkImageInfo\x27][\x27nImageHeight\x27],_0x57109a[\x27curWaterMarkImageInfo\x27][\x27pstRectPos\x27],_0xa0f65c,_0x57109a[\x27curWaterMarkImageInfo\x27][\x27fAlpha\x27]);}}}]),_0x593986;}()),_0x4f3ed5=(function(){function\x20_0x3b1ea2(){_0x4b5b03(this,_0x3b1ea2),this[\x27startTime\x27]=0x0,this[\x27curTime\x27]=0x0,this[\x27timeWalk\x27]=0x0,this[\x27lastDate\x27]=0x0,this[\x27preTimerStamp\x27]=0x0;}return\x20_0x4023a9(_0x3b1ea2,[{\x27key\x27:\x27Init\x27,\x27value\x27:function(){this[\x27startTime\x27]=this[\x27GetCurTime\x27]();}},{\x27key\x27:\x27GetCurTime\x27,\x27value\x27:function(){return\x20this[\x27curTime\x27]=0x3c*new\x20Date()[\x27getHours\x27]()*0x3c*0x3e8+0x3c*new\x20Date()[\x27getMinutes\x27]()*0x3e8+0x3e8*new\x20Date()[\x27getSeconds\x27]()+new\x20Date()[\x27getMilliseconds\x27](),this[\x27lastDate\x27]=new\x20Date()[\x27getDate\x27](),this[\x27curTime\x27];}},{\x27key\x27:\x27GetTimerWalk\x27,\x27value\x27:function(){var\x20_0x2fb482=this[\x27GetCurTime\x27]()-this[\x27startTime\x27];return\x20this[\x27lastDate\x27]!==new\x20Date()[\x27getDate\x27]()&&(_0x2fb482+=0x18*(new\x20Date()[\x27getDate\x27]()-this[\x27lastDate\x27])*0x3c*0x3c*0x3e8),_0x2fb482;}},{\x27key\x27:\x27timerReset\x27,\x27value\x27:function(){this[\x27startTime\x27]=0x0,this[\x27curTime\x27]=0x0,this[\x27timeWalk\x27]=0x0,this[\x27lastDate\x27]=0x0,this[\x27preTimerStamp\x27]=0x0;}}]),_0x3b1ea2;}()),_0x47d8a1=(function(){function\x20_0x4f2f67(){var\x20_0x5149cc=arguments[\x27length\x27]>0x0&&void\x200x0!==arguments[0x0]?arguments[0x0]:null;_0x4b5b03(this,_0x4f2f67),this[\x27canvas\x27]=null,this[\x27streamOpenMode\x27]=0x0,this[\x27context\x27]=null,this[\x27oVideoDecoder\x27]=null,this[\x27frameBuffers\x27]=[],this[\x27initTimer\x27]=!0x1,this[\x27preTimeStamp\x27]=0x0,this[\x27baseTimeStamp\x27]=0x0,this[\x27resetTimer\x27]=!0x0,this[\x27RenderFrame\x27]=this[\x27RenderFrame\x27][\x27bind\x27](this),this[\x27renderCurStatus\x27]=0x2,this[\x27playSpeed\x27]=0x1,this[\x27nplaySpeed\x27]=0x1,this[\x27displayBuf\x27]=0xe,this[\x27needForward\x27]=!0x1,this[\x27firstFrame\x27]=!0x0,this[\x27LatcyTime\x27]=0x0,this[\x27displayFrameInfoCB\x27]=null,this[\x27displayFrameInfo\x27]=[],this[\x27curFrameInfo\x27]={},this[\x27curFrameInfo\x27][\x27timeStamp\x27]=0x0,this[\x27sx\x27]=0x0,this[\x27sy\x27]=0x0,this[\x27sw\x27]=0x0,this[\x27sh\x27]=0x0,this[\x27displayRunning\x27]=!0x1,this[\x27oRenderTimer\x27]=null,this[\x27waitIFrameTimestamp\x27]=0x0,this[\x27curFrame\x27]=null,this[\x27player\x27]=null,null!=_0x5149cc&&(this[\x27player\x27]=_0x5149cc),this[\x27renderEngine\x27]=\x27webgl\x27,this[\x27oVideoRender\x27]=null,this[\x27FECCanvasID\x27]=\x27\x27,this[\x27oVideoRender\x27]=new\x20_0x30844c();}return\x20_0x4023a9(_0x4f2f67,[{\x27key\x27:\x27init\x27,\x27value\x27:function(_0x12698e,_0x59013b,_0x537d1b,_0x1d368e){this[\x27canvas\x27]=_0x12698e,this[\x27streamOpenMode\x27]=_0x59013b,this[\x27renderEngine\x27]=_0x1d368e,this[\x27SetCurStatus\x27](0x2),null==this[\x27oVideoDecoder\x27]&&(this[\x27oVideoDecoder\x27]=new\x20_0x2b8214(_0x537d1b,this,this[\x27player\x27]),null!==this[\x27oVideoDecoder\x27]&&this[\x27oVideoDecoder\x27][\x27initDecoder\x27]()),this[\x27frameBuffers\x27]=this[\x27oVideoDecoder\x27][\x27ready_frames\x27],null!=this[\x27oVideoRender\x27]&&this[\x27oVideoRender\x27][\x27InitDisplay\x27](this[\x27canvas\x27],this[\x27renderEngine\x27],0x100),null==this[\x27oRenderTimer\x27]&&(this[\x27oRenderTimer\x27]=new\x20_0x4f3ed5());}},{\x27key\x27:\x27HardDecodeError\x27,\x27value\x27:function(){return\x20this[\x27player\x27][\x27_switchHardToSoft\x27](),0x1;}},{\x27key\x27:\x27inputData\x27,\x27value\x27:function(_0xcb49d7,_0x3a6c52){var\x20_0x54c079={};_0x54c079[\x27port\x27]=_0x3a6c52[\x27port\x27],_0x54c079[\x27codecType\x27]=_0x3a6c52[\x27codecType\x27],_0x54c079[\x27frameType\x27]=_0x3a6c52[\x27frameType\x27],_0x54c079[\x27frameSize\x27]=_0x3a6c52[\x27frameSize\x27],_0x54c079[\x27width\x27]=_0x3a6c52[\x27width\x27],_0x54c079[\x27height\x27]=_0x3a6c52[\x27height\x27],_0x54c079[\x27timeStamp\x27]=_0x3a6c52[\x27timeStamp\x27],_0x54c079[\x27frameRate\x27]=_0x3a6c52[\x27frameRate\x27],_0x54c079[\x27frameNum\x27]=_0x3a6c52[\x27frameNum\x27],_0x54c079[\x27interlace\x27]=_0x3a6c52[\x27interlace\x27],_0x54c079[\x27streamEnd\x27]=_0x3a6c52[\x27streamEnd\x27],_0x54c079[\x27cropLeft\x27]=_0x3a6c52[\x27cropLeft\x27],_0x54c079[\x27cropRight\x27]=_0x3a6c52[\x27cropRight\x27],_0x54c079[\x27cropTop\x27]=_0x3a6c52[\x27cropTop\x27],_0x54c079[\x27cropBottom\x27]=_0x3a6c52[\x27cropBottom\x27],_0x54c079[\x27year\x27]=_0x3a6c52[\x27year\x27],_0x54c079[\x27month\x27]=_0x3a6c52[\x27month\x27],_0x54c079[\x27week\x27]=_0x3a6c52[\x27week\x27],_0x54c079[\x27day\x27]=_0x3a6c52[\x27day\x27],_0x54c079[\x27hour\x27]=_0x3a6c52[\x27hour\x27],_0x54c079[\x27minute\x27]=_0x3a6c52[\x27minute\x27],_0x54c079[\x27second\x27]=_0x3a6c52[\x27second\x27],_0x54c079[\x27milliseconds\x27]=_0x3a6c52[\x27milliseconds\x27],this[\x27displayFrameInfo\x27][\x27push\x27](_0x54c079),this[\x27oVideoDecoder\x27][\x27inputData\x27](_0xcb49d7,_0x3a6c52);}},{\x27key\x27:\x27_resetDecoder\x27,\x27value\x27:function(){var\x20_0x1e6893=this;return\x20new\x20Promise(function(_0x3fa202,_0x5c9bcb){_0x1e6893[\x27oVideoDecoder\x27][\x27resetDecoder\x27]()[\x27then\x27](function(){_0x1e6893[\x27displayFrameInfo\x27][\x27splice\x27](0x0,_0x1e6893[\x27displayFrameInfo\x27][\x27length\x27]),_0x1e6893[\x27curFrameInfo\x27]={},_0x1e6893[\x27oVideoRender\x27][\x27DeInitPrivateParam\x27](),_0x1e6893[\x27renderCurStatus\x27]=0x2,_0x1e6893[\x27player\x27]?_0x1e6893[\x27player\x27][\x27JSPlayM4_ResetEnd\x27]():postMessage({\x27function\x27:\x27resetEnd\x27}),_0x3fa202();},function(){_0x5c9bcb();});});}},{\x27key\x27:\x27_resetRenderTimer\x27,\x27value\x27:function(){this[\x27initTimer\x27]=!0x1,this[\x27preTimeStamp\x27]=0x0,this[\x27baseTimeStamp\x27]=0x0,this[\x27resetTimer\x27]=!0x0,null!=this[\x27oRenderTimer\x27]&&this[\x27oRenderTimer\x27][\x27timerReset\x27](),this[\x27RenderFrame\x27]=this[\x27RenderFrame\x27][\x27bind\x27](this),this[\x27renderCurStatus\x27]=0x2,this[\x27curTimeStamp\x27]=0x0,this[\x27getImageJPEG\x27]=!0x1,this[\x27getImageBMP\x27]=!0x1,this[\x27getCropImageJPEG\x27]=!0x1,this[\x27getCropImageBMP\x27]=!0x1,this[\x27displayFrameInfoCB\x27]=null,this[\x27displayFrameInfo\x27][\x27splice\x27](0x0,this[\x27displayFrameInfo\x27][\x27length\x27]),this[\x27curFrameInfo\x27]={};}},{\x27key\x27:\x27_destroyPlayCtrl\x27,\x27value\x27:function(){var\x20_0x712056=this;this[\x27oVideoDecoder\x27][\x27destroyDecoder\x27]()[\x27then\x27](function(){_0x712056[\x27oVideoDecoder\x27]=null,null!=_0x712056[\x27oVideoRender\x27]&&(_0x712056[\x27oVideoRender\x27][\x27ReleaseDisplay\x27](),_0x712056[\x27oVideoRender\x27]=null),_0x712056[\x27_resetRenderTimer\x27](),_0x712056[\x27oRenderTimer\x27]=null,console[\x27log\x27](\x27>>>JS\x5cx2002\x5cx20destroy\x5cx20oVideoDecoder/oVideoRender\x27),_0x712056[\x27displayRunning\x27]=!0x1;},function(){console[\x27log\x27](\x27stop\x5cx20failed\x5cx20\x27);});}},{\x27key\x27:\x27RenderFrame\x27,\x27value\x27:function(){var\x20_0x242f35=this;switch(this[\x27renderCurStatus\x27]){case\x200x0:this[\x27_resetRenderTimer\x27](),this[\x27_resetDecoder\x27]()[\x27then\x27](function(){var\x20_0x22b861=setTimeout(function(){_0x242f35[\x27RenderFrame\x27](),clearTimeout(_0x22b861);},0x1);},function(){});break;case\x200x2:if(this[\x27displayRunning\x27])this[\x27chooseFrame\x27]()[\x27then\x27](function(_0x4f466d){if(_0x242f35[\x27curFrame\x27]=_0x4f466d,-0x1==_0x242f35[\x27displayBuf\x27]||0x0==_0x242f35[\x27streamOpenMode\x27]&&0x0==_0x242f35[\x27LatcyTime\x27])null!=_0x242f35[\x27curFrame\x27]&&(_0x242f35[\x27curTimeStamp\x27]=_0x242f35[\x27curFrame\x27][\x27timestamp\x27],_0x242f35[\x27paint\x27](_0x242f35[\x27curFrame\x27])),requestAnimationFrame(_0x242f35[\x27RenderFrame\x27]);else{if(null!=_0x242f35[\x27curFrame\x27]){_0x242f35[\x27initTimer\x27]&&!_0x242f35[\x27resetTimer\x27]||(_0x242f35[\x27oRenderTimer\x27][\x27Init\x27](),_0x242f35[\x27initTimer\x27]=!0x0,_0x242f35[\x27resetTimer\x27]=!0x1,_0x242f35[\x27preTimeStamp\x27]=_0x242f35[\x27curFrame\x27][\x27timestamp\x27],_0x242f35[\x27baseTimeStamp\x27]=_0x242f35[\x27curFrame\x27][\x27timestamp\x27],0x1==_0x242f35[\x27streamOpenMode\x27]&&(_0x242f35[\x27LatcyTime\x27]=0x0)),_0x242f35[\x27curTimeStamp\x27]=_0x242f35[\x27curFrame\x27][\x27timestamp\x27];var\x20_0x5e3685=_0x242f35[\x27curTimeStamp\x27]-_0x242f35[\x27preTimeStamp\x27],_0x35666a=_0x242f35[\x27curTimeStamp\x27]-_0x242f35[\x27baseTimeStamp\x27];(_0x5e3685>0x1388||_0x5e3685<0x0||_0x35666a<0x0)&&(_0x242f35[\x27oRenderTimer\x27][\x27Init\x27](),_0x242f35[\x27preTimeStamp\x27]=_0x242f35[\x27curFrame\x27][\x27timestamp\x27],_0x242f35[\x27baseTimeStamp\x27]=_0x242f35[\x27curTimeStamp\x27]);var\x20_0x4d7472=(_0x242f35[\x27curTimeStamp\x27]-_0x242f35[\x27baseTimeStamp\x27]+_0x242f35[\x27LatcyTime\x27])/_0x242f35[\x27playSpeed\x27]-_0x242f35[\x27oRenderTimer\x27][\x27GetTimerWalk\x27]();if(_0x4d7472<0xf&&_0x4d7472>-0xf)_0x242f35[\x27paint\x27](_0x242f35[\x27curFrame\x27]),_0x242f35[\x27preTimeStamp\x27]=_0x242f35[\x27curTimeStamp\x27],_0x242f35[\x27RenderFrame\x27]();else{if(_0x4d7472<0x0)_0x242f35[\x27paint\x27](_0x242f35[\x27curFrame\x27]),_0x242f35[\x27preTimeStamp\x27]=_0x242f35[\x27curTimeStamp\x27],_0x242f35[\x27RenderFrame\x27]();else\x20var\x20_0x250a08=setTimeout(function(){0x2==_0x242f35[\x27renderCurStatus\x27]?(_0x242f35[\x27paint\x27](_0x242f35[\x27curFrame\x27]),_0x242f35[\x27preTimeStamp\x27]=_0x242f35[\x27curTimeStamp\x27],_0x242f35[\x27RenderFrame\x27]()):_0x242f35[\x27RenderFrame\x27](),clearTimeout(_0x250a08);},_0x4d7472-0x5);}}else{_0x242f35[\x27playSpeed\x27]>0x2&&0x1;var\x20_0x451c47=setTimeout(function(){_0x242f35[\x27RenderFrame\x27](),clearTimeout(_0x451c47);},0x0);}}});else\x20var\x20_0x312cc4=setTimeout(function(){_0x242f35[\x27RenderFrame\x27](),clearTimeout(_0x312cc4);},0x5);break;case\x200x3:var\x20_0x1bbf31=setTimeout(function(){_0x242f35[\x27_refresh\x27](),_0x242f35[\x27RenderFrame\x27](),clearTimeout(_0x1bbf31);},0x5);break;case\x200x5:if(this[\x27needForward\x27])this[\x27chooseFrame\x27]()[\x27then\x27](function(_0x1642df){_0x242f35[\x27curFrame\x27]=_0x1642df;var\x20_0x463477=setTimeout(function(){null!=_0x242f35[\x27curFrame\x27]&&(_0x242f35[\x27paint\x27](_0x242f35[\x27curFrame\x27]),_0x242f35[\x27needForward\x27]=!0x1),_0x242f35[\x27RenderFrame\x27](),clearTimeout(_0x463477);},0x1);});else\x20var\x20_0xa59ee5=setTimeout(function(){_0x242f35[\x27_refresh\x27](),_0x242f35[\x27RenderFrame\x27](),clearTimeout(_0xa59ee5);},0x5);break;case\x200x4:return\x20void\x20this[\x27_destroyPlayCtrl\x27]();default:return;}}},{\x27key\x27:\x27paint\x27,\x27value\x27:function(_0x4fcc2d){var\x20_0x38eaec=this;return\x20new\x20Promise(function(_0x2d2a64,_0x1a10f3){if(0x4==_0x38eaec[\x27curstatus\x27]||null==_0x4fcc2d||null==_0x38eaec[\x27oVideoRender\x27])_0x2d2a64();else{_0x38eaec[\x27waitIFrameTimestamp\x27]===_0x4fcc2d[\x27timestamp\x27]&&(_0x38eaec[\x27resetTimer\x27]=!0x0);var\x20_0x3810c6={\x27nCropLeft\x27:0x0,\x27nCropRight\x27:0x0,\x27nCropTop\x27:0x0,\x27nCropBottom\x27:0x0};_0x3810c6[\x27nCodeWidth\x27]=_0x4fcc2d[\x27displayWidth\x27],_0x3810c6[\x27nCodeHeight\x27]=_0x4fcc2d[\x27displayHeight\x27];var\x20_0x5dd0b9={\x27x\x27:0x0,\x27y\x27:0x0};_0x5dd0b9[\x27width\x27]=_0x4fcc2d[\x27displayWidth\x27],_0x5dd0b9[\x27height\x27]=_0x4fcc2d[\x27displayHeight\x27],_0x38eaec[\x27oVideoRender\x27][\x27DisplayFrame\x27](_0x4fcc2d,_0x4fcc2d[\x27displayWidth\x27],_0x4fcc2d[\x27displayHeight\x27],_0x4fcc2d[\x27timestamp\x27],_0x3810c6,null)[\x27then\x27](function(_0x59bbe7){null!==_0x38eaec[\x27displayFrameInfoCB\x27]&&_0x38eaec[\x27respondFrameInfoCB\x27](_0x59bbe7),_0x38eaec[\x27firstFrame\x27]&&(null!=_0x38eaec[\x27player\x27]?null!=_0x38eaec[\x27player\x27][\x27FFCallBackFun\x27]&&_0x38eaec[\x27player\x27][\x27FFCallBackFun\x27]():postMessage({\x27function\x27:\x27firstFrameCB\x27,\x27value\x27:!0x0}),_0x38eaec[\x27firstFrame\x27]=!0x1),_0x2d2a64();});}});}},{\x27key\x27:\x27respondFrameInfoCB\x27,\x27value\x27:function(_0x8d3671){if(0x0!=this[\x27displayFrameInfo\x27][\x27length\x27]&&this[\x27curFrameInfo\x27][\x27timeStamp\x27]!==_0x8d3671){for(var\x20_0x3d05ea={},_0x284272=0x0;_0x284272<this[\x27displayFrameInfo\x27][\x27length\x27]&&(_0x3d05ea=this[\x27displayFrameInfo\x27][\x27shift\x27]())[\x27timeStamp\x27]!=_0x8d3671;_0x284272++);this[\x27curFrameInfo\x27][\x27port\x27]=_0x3d05ea[\x27port\x27],this[\x27curFrameInfo\x27][\x27codecType\x27]=_0x3d05ea[\x27codecType\x27],this[\x27curFrameInfo\x27][\x27frameType\x27]=_0x3d05ea[\x27frameType\x27],this[\x27curFrameInfo\x27][\x27frameSize\x27]=_0x3d05ea[\x27frameSize\x27],this[\x27curFrameInfo\x27][\x27width\x27]=_0x3d05ea[\x27width\x27],this[\x27curFrameInfo\x27][\x27height\x27]=_0x3d05ea[\x27height\x27],this[\x27curFrameInfo\x27][\x27timeStamp\x27]=_0x3d05ea[\x27timeStamp\x27],this[\x27curFrameInfo\x27][\x27frameRate\x27]=_0x3d05ea[\x27frameRate\x27],this[\x27curFrameInfo\x27][\x27frameNum\x27]=_0x3d05ea[\x27frameNum\x27],this[\x27curFrameInfo\x27][\x27interlace\x27]=_0x3d05ea[\x27interlace\x27],this[\x27curFrameInfo\x27][\x27streamEnd\x27]=_0x3d05ea[\x27streamEnd\x27],this[\x27curFrameInfo\x27][\x27cropLeft\x27]=_0x3d05ea[\x27cropLeft\x27],this[\x27curFrameInfo\x27][\x27cropRight\x27]=_0x3d05ea[\x27cropRight\x27],this[\x27curFrameInfo\x27][\x27cropTop\x27]=_0x3d05ea[\x27cropTop\x27],this[\x27curFrameInfo\x27][\x27cropBottom\x27]=_0x3d05ea[\x27cropBottom\x27],this[\x27curFrameInfo\x27][\x27year\x27]=_0x3d05ea[\x27year\x27],this[\x27curFrameInfo\x27][\x27month\x27]=_0x3d05ea[\x27month\x27],this[\x27curFrameInfo\x27][\x27week\x27]=_0x3d05ea[\x27week\x27],this[\x27curFrameInfo\x27][\x27day\x27]=_0x3d05ea[\x27day\x27],this[\x27curFrameInfo\x27][\x27hour\x27]=_0x3d05ea[\x27hour\x27],this[\x27curFrameInfo\x27][\x27minute\x27]=_0x3d05ea[\x27minute\x27],this[\x27curFrameInfo\x27][\x27second\x27]=_0x3d05ea[\x27second\x27],this[\x27curFrameInfo\x27][\x27milliseconds\x27]=_0x3d05ea[\x27milliseconds\x27],this[\x27displayFrameInfoCB\x27](this[\x27curFrameInfo\x27]);}}},{\x27key\x27:\x27postImageData\x27,\x27value\x27:function(_0x380f64,_0x1ad14b,_0x1a1022,_0x1a6b85,_0x30f068){this[\x27player\x27]?(this[\x27getImageJPEG\x27]&&(this[\x27getImageJPEG\x27]=!0x1,this[\x27player\x27][\x27_GetImage2\x27](_0x380f64,_0x1ad14b,_0x1a1022,_0x1a6b85,\x27jpeg\x27,_0x30f068,0x0,0x0,0x0,0x0)),this[\x27getImageBMP\x27]&&(this[\x27getImageBMP\x27]=!0x1,this[\x27player\x27][\x27_GetImage2\x27](_0x380f64,_0x1ad14b,_0x1a1022,_0x1a6b85,\x27bmp\x27,_0x30f068,0x0,0x0,0x0,0x0)),this[\x27getCropImageJPEG\x27]&&(this[\x27getCropImageJPEG\x27]=!0x1,this[\x27player\x27][\x27_GetImage2\x27](_0x380f64,_0x1ad14b,_0x1a1022,_0x1a6b85,\x27jpeg\x27,_0x30f068,this[\x27sx\x27],this[\x27sy\x27],this[\x27sw\x27],this[\x27sh\x27])),this[\x27getCropImageBMP\x27]&&(this[\x27getCropImageBMP\x27]=!0x1,this[\x27player\x27][\x27_GetImage2\x27](_0x380f64,_0x1ad14b,_0x1a1022,_0x1a6b85,\x27bmp\x27,_0x30f068,this[\x27sx\x27],this[\x27sy\x27],this[\x27sw\x27],this[\x27sh\x27]))):(this[\x27getImageJPEG\x27]&&(this[\x27getImageJPEG\x27]=!0x1,postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x380f64[\x27buffer\x27],\x27size\x27:_0x1ad14b,\x27width\x27:_0x1a1022,\x27height\x27:_0x1a6b85,\x27type\x27:\x27jpeg\x27,\x27yuvType\x27:_0x30f068,\x27sx\x27:0x0,\x27sy\x27:0x0,\x27sw\x27:0x0,\x27sh\x27:0x0},[_0x380f64[\x27buffer\x27]])),this[\x27getImageBMP\x27]&&(this[\x27getImageBMP\x27]=!0x1,postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x380f64[\x27buffer\x27],\x27size\x27:_0x1ad14b,\x27width\x27:_0x1a1022,\x27height\x27:_0x1a6b85,\x27type\x27:\x27bmp\x27,\x27yuvType\x27:_0x30f068,\x27sx\x27:0x0,\x27sy\x27:0x0,\x27sw\x27:0x0,\x27sh\x27:0x0},[_0x380f64[\x27buffer\x27]])),this[\x27getCropImageJPEG\x27]&&(this[\x27getCropImageJPEG\x27]=!0x1,postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x380f64[\x27buffer\x27],\x27size\x27:_0x1ad14b,\x27width\x27:_0x1a1022,\x27height\x27:_0x1a6b85,\x27type\x27:\x27jpeg\x27,\x27yuvType\x27:_0x30f068,\x27sx\x27:this[\x27sx\x27],\x27sy\x27:this[\x27sy\x27],\x27sw\x27:this[\x27sw\x27],\x27sh\x27:this[\x27sh\x27]},[_0x380f64[\x27buffer\x27]])),this[\x27getCropImageBMP\x27]&&(this[\x27getCropImageBMP\x27]=!0x1,postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x380f64[\x27buffer\x27],\x27size\x27:_0x1ad14b,\x27width\x27:_0x1a1022,\x27height\x27:_0x1a6b85,\x27type\x27:\x27bmp\x27,\x27yuvType\x27:_0x30f068,\x27sx\x27:this[\x27sx\x27],\x27sy\x27:this[\x27sy\x27],\x27sw\x27:this[\x27sw\x27],\x27sh\x27:this[\x27sh\x27]},[_0x380f64[\x27buffer\x27]])));}},{\x27key\x27:\x27chooseFrame\x27,\x27value\x27:function(){var\x20_0x41e3bc=this;return\x20new\x20Promise(function(_0x25a893,_0x351a1a){if(null==_0x41e3bc[\x27oVideoRender\x27]||null==_0x41e3bc[\x27oVideoDecoder\x27])_0x25a893(null);else{if(_0x41e3bc[\x27oVideoDecoder\x27][\x27decoderObjNeedReset\x27])_0x41e3bc[\x27oVideoDecoder\x27][\x27resetDecoder\x27]()[\x27then\x27](function(){_0x41e3bc[\x27oVideoDecoder\x27][\x27decoderObjNeedReset\x27]=!0x1,_0x25a893(null);},function(){_0x351a1a();});else{var\x20_0x4d4ceb=_0x41e3bc[\x27oVideoDecoder\x27][\x27GetFrameBufferLength\x27]();0x1==_0x41e3bc[\x27streamOpenMode\x27]&&_0x4d4ceb<0x3?_0x25a893(null):_0x41e3bc[\x27oVideoDecoder\x27][\x27GetFrame\x27]()[\x27then\x27](function(_0x12bdf4){_0x25a893(_0x12bdf4);},function(){});}}});}},{\x27key\x27:\x27SetDisplayRegion\x27,\x27value\x27:function(_0xc75baa,_0xf63d85,_0x562e8c,_0x3d94a9){return\x20null==this[\x27oVideoRender\x27]?0x0:(this[\x27sx\x27]=_0xc75baa,this[\x27sy\x27]=_0xf63d85,this[\x27sw\x27]=_0x562e8c,this[\x27sh\x27]=_0x3d94a9,this[\x27oVideoRender\x27][\x27SetDisplayRect\x27](_0xc75baa,_0xf63d85,_0x562e8c,_0x3d94a9));}},{\x27key\x27:\x27SetCurStatus\x27,\x27value\x27:function(_0x362037){return\x20this[\x27renderCurStatus\x27]=_0x362037,0x1;}},{\x27key\x27:\x27fast\x27,\x27value\x27:function(){var\x20_0x18122d=this[\x27_GetFastSpeed\x27](this[\x27nplaySpeed\x27]);return\x20this[\x27_SetPlaySpeed\x27](_0x18122d);}},{\x27key\x27:\x27slow\x27,\x27value\x27:function(){var\x20_0x1ad617=this[\x27_GetSlowSpeed\x27](this[\x27nplaySpeed\x27]);return\x20this[\x27_SetPlaySpeed\x27](_0x1ad617);}},{\x27key\x27:\x27Pause\x27,\x27value\x27:function(_0x2035f7){if(_0x2035f7)this[\x27SetCurStatus\x27](0x3);else{if(0x3!==this[\x27renderCurStatus\x27])return-0x1;this[\x27SetCurStatus\x27](0x2),this[\x27resetTimer\x27]=!0x0;}return\x200x1;}},{\x27key\x27:\x27_refresh\x27,\x27value\x27:function(){0x0!=this[\x27frameBuffers\x27][\x27length\x27]&&this[\x27paint\x27](this[\x27frameBuffers\x27][0x0]);}},{\x27key\x27:\x27OneByOne\x27,\x27value\x27:function(_0x5b9c9d){if(_0x5b9c9d)this[\x27SetCurStatus\x27](0x5),this[\x27needForward\x27]=!0x0;else{if(0x5!==this[\x27renderCurStatus\x27])return-0x1;this[\x27SetCurStatus\x27](0x2),this[\x27resetTimer\x27]=!0x0,this[\x27needForward\x27]=!0x1,this[\x27_SetPlaySpeed\x27](0x1);}return\x200x1;}},{\x27key\x27:\x27SetCanvasSize\x27,\x27value\x27:function(_0x54e2c4,_0xc795d5){return\x20null!=this[\x27oVideoRender\x27]&&this[\x27oVideoRender\x27][\x27SetCanvasSize\x27](_0x54e2c4,_0xc795d5);}},{\x27key\x27:\x27GetCanvasSize\x27,\x27value\x27:function(){return\x20null!=this[\x27oVideoRender\x27]&&this[\x27oVideoRender\x27][\x27GetCanvasSize\x27]();}},{\x27key\x27:\x27GetPlayedTime\x27,\x27value\x27:function(){return\x20this[\x27curTimeStamp\x27];}},{\x27key\x27:\x27_SetPlaySpeed\x27,\x27value\x27:function(_0x2b5893){switch(_0x2b5893){case-0x10:case-0x8:case-0x4:case-0x2:case\x200x1:case\x200x2:case\x200x4:case\x200x8:case\x200x10:case\x200x20:case\x200x40:break;default:return-0x1;}return\x20_0x2b5893===this[\x27nplaySpeed\x27]||(this[\x27nplaySpeed\x27]=_0x2b5893,this[\x27playSpeed\x27]=_0x2b5893>0x0?_0x2b5893:-0x1/_0x2b5893,console[\x27log\x27](\x27playSpeed:\x27+this[\x27playSpeed\x27]),this[\x27resetTimer\x27]=!0x0,this[\x27needForward\x27]=!0x1,0x2!=this[\x27renderCurStatus\x27]&&this[\x27SetCurStatus\x27](0x2)),0x1;}},{\x27key\x27:\x27_GetFastSpeed\x27,\x27value\x27:function(_0x45cfe1){var\x20_0x3563fc=0x0;switch(_0x45cfe1){case-0x10:_0x3563fc=-0x8;break;case-0x8:_0x3563fc=-0x4;break;case-0x4:_0x3563fc=-0x2;break;case-0x2:_0x3563fc=0x1;break;case\x200x1:_0x3563fc=0x2;break;case\x200x2:_0x3563fc=0x4;break;case\x200x4:_0x3563fc=0x8;break;case\x200x8:_0x3563fc=0x10;break;case\x200x10:_0x3563fc=0x20;break;case\x200x20:_0x3563fc=0x40;break;default:_0x3563fc=0x0;}return\x20_0x3563fc;}},{\x27key\x27:\x27_GetSlowSpeed\x27,\x27value\x27:function(_0x42387d){var\x20_0x428bec=0x0;switch(_0x42387d){case-0x8:_0x428bec=-0x10;break;case-0x4:_0x428bec=-0x8;break;case-0x2:_0x428bec=-0x4;break;case\x200x1:_0x428bec=-0x2;break;case\x200x2:_0x428bec=0x1;break;case\x200x4:_0x428bec=0x2;break;case\x200x8:_0x428bec=0x4;break;case\x200x10:_0x428bec=0x8;break;case\x200x20:_0x428bec=0x10;break;case\x200x40:_0x428bec=0x20;break;default:_0x428bec=0x0;}return\x20_0x428bec;}},{\x27key\x27:\x27SetDisplayBuf\x27,\x27value\x27:function(_0x4219ef){return\x20this[\x27displayBuf\x27]=_0x4219ef,this[\x27LatcyTime\x27]=0x1==_0x4219ef?0x0:0xf==_0x4219ef?0x2bc:0x2d==_0x4219ef?0x76c:_0x4219ef>0x6&&_0x4219ef<0x2d?0x28*_0x4219ef+0x64:-0x1==_0x4219ef?0x0:0x32,0x1;}},{\x27key\x27:\x27GetJPEG\x27,\x27value\x27:function(){var\x20_0x184359=this;console[\x27log\x27](\x27>>>30\x5cx20this.oVideoDecoder.GetImageYUV\x27),this[\x27oVideoDecoder\x27][\x27GetImageYUV\x27]()[\x27then\x27](function(_0x26e2d0){var\x20_0x1f1034=_0x26e2d0[\x27yuvFrameBuffer\x27],_0x408845=_0x26e2d0[\x27yuvLength\x27],_0x548292=_0x26e2d0[\x27displayWidth\x27],_0x2018b4=_0x26e2d0[\x27displayHeight\x27],_0x31c285=_0x26e2d0[\x27yuvType\x27];console[\x27log\x27](\x27>>>31\x5cx20this.oVideoDecoder.GetImageYUV\x5cx20yuvLength:\x27+_0x408845),-0x1!=_0x1f1034&&(_0x184359[\x27player\x27]?_0x184359[\x27player\x27][\x27_GetImage2\x27](_0x1f1034,_0x408845,_0x548292,_0x2018b4,\x27jpeg\x27,_0x31c285,0x0,0x0,0x0,0x0):postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x1f1034[\x27buffer\x27],\x27size\x27:_0x408845,\x27width\x27:_0x548292,\x27height\x27:_0x2018b4,\x27type\x27:\x27jpeg\x27,\x27yuvType\x27:_0x31c285,\x27sx\x27:0x0,\x27sy\x27:0x0,\x27sw\x27:0x0,\x27sh\x27:0x0},[_0x1f1034[\x27buffer\x27]]));},function(){});}},{\x27key\x27:\x27GetBMP\x27,\x27value\x27:function(){var\x20_0x2c2b81=this;this[\x27oVideoDecoder\x27][\x27GetImageYUV\x27]()[\x27then\x27](function(_0x97437b){var\x20_0x61e0c=_0x97437b[\x27yuvFrameBuffer\x27],_0x43541d=_0x97437b[\x27yuvLength\x27],_0x5c8cfc=_0x97437b[\x27displayWidth\x27],_0x3913d1=_0x97437b[\x27displayHeight\x27],_0x365b78=_0x97437b[\x27yuvType\x27];-0x1!=_0x61e0c&&(_0x2c2b81[\x27player\x27]?_0x2c2b81[\x27player\x27][\x27_GetImage2\x27](_0x61e0c,_0x43541d,_0x5c8cfc,_0x3913d1,\x27bmp\x27,_0x365b78,0x0,0x0,0x0,0x0):postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x61e0c[\x27buffer\x27],\x27size\x27:_0x43541d,\x27width\x27:_0x5c8cfc,\x27height\x27:_0x3913d1,\x27type\x27:\x27bmp\x27,\x27yuvType\x27:_0x365b78,\x27sx\x27:0x0,\x27sy\x27:0x0,\x27sw\x27:0x0,\x27sh\x27:0x0},[_0x61e0c[\x27buffer\x27]]));},function(){});}},{\x27key\x27:\x27GetCropJPEG\x27,\x27value\x27:function(){var\x20_0x39d331=this;this[\x27oVideoDecoder\x27][\x27GetImageYUV\x27]()[\x27then\x27](function(_0x4412e8){var\x20_0x2af4f4=_0x4412e8[\x27yuvFrameBuffer\x27],_0x31256c=_0x4412e8[\x27yuvLength\x27],_0x13b638=_0x4412e8[\x27displayWidth\x27],_0x308264=_0x4412e8[\x27displayHeight\x27],_0x273a7a=_0x4412e8[\x27yuvType\x27];-0x1!=_0x2af4f4&&(_0x39d331[\x27player\x27]?_0x39d331[\x27player\x27][\x27_GetImage2\x27](_0x2af4f4,_0x31256c,_0x13b638,_0x308264,\x27jpeg\x27,_0x273a7a,_0x39d331[\x27sx\x27],_0x39d331[\x27sy\x27],_0x39d331[\x27sw\x27],_0x39d331[\x27sh\x27]):postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x2af4f4[\x27buffer\x27],\x27size\x27:_0x31256c,\x27width\x27:_0x13b638,\x27height\x27:_0x308264,\x27type\x27:\x27jpeg\x27,\x27yuvType\x27:_0x273a7a,\x27sx\x27:_0x39d331[\x27sx\x27],\x27sy\x27:_0x39d331[\x27sy\x27],\x27sw\x27:_0x39d331[\x27sw\x27],\x27sh\x27:_0x39d331[\x27sh\x27]},[_0x2af4f4[\x27buffer\x27]]));},function(){});}},{\x27key\x27:\x27GetCropBMP\x27,\x27value\x27:function(){var\x20_0x1517fc=this;this[\x27oVideoDecoder\x27][\x27GetImageYUV\x27]()[\x27then\x27](function(_0x36c2eb){var\x20_0x192842=_0x36c2eb[\x27yuvFrameBuffer\x27],_0x2b6073=_0x36c2eb[\x27yuvLength\x27],_0xbb8d1c=_0x36c2eb[\x27displayWidth\x27],_0x37046e=_0x36c2eb[\x27displayHeight\x27],_0xe6ab0e=_0x36c2eb[\x27yuvType\x27];-0x1!=_0x192842&&(_0x1517fc[\x27player\x27]?_0x1517fc[\x27player\x27][\x27_GetImage2\x27](_0x192842,_0x2b6073,_0xbb8d1c,_0x37046e,\x27bmp\x27,_0xe6ab0e,_0x1517fc[\x27sx\x27],_0x1517fc[\x27sy\x27],_0x1517fc[\x27sw\x27],_0x1517fc[\x27sh\x27]):postMessage({\x27function\x27:\x27imageYUV\x27,\x27value\x27:_0x192842[\x27buffer\x27],\x27size\x27:_0x2b6073,\x27width\x27:_0xbb8d1c,\x27height\x27:_0x37046e,\x27type\x27:\x27bmp\x27,\x27yuvType\x27:_0xe6ab0e,\x27sx\x27:_0x1517fc[\x27sx\x27],\x27sy\x27:_0x1517fc[\x27sy\x27],\x27sw\x27:_0x1517fc[\x27sw\x27],\x27sh\x27:_0x1517fc[\x27sh\x27]},[_0x192842[\x27buffer\x27]]));},function(){});}},{\x27key\x27:\x27GetCanvasCapture\x27,\x27value\x27:function(_0x4307e6){return\x20this[\x27oVideoRender\x27][\x27GetCanvasData\x27](_0x4307e6),0x1;}},{\x27key\x27:\x27SetDecodeFrameType\x27,\x27value\x27:function(_0x5c7a52){return\x20this[\x27waitIFrameTimestamp\x27]=_0x5c7a52,0x1;}},{\x27key\x27:\x27SetStreamEnd\x27,\x27value\x27:function(){return\x20this[\x27oVideoDecoder\x27][\x27SetStreamEnd\x27](),0x1;}},{\x27key\x27:\x27SetAntialias\x27,\x27value\x27:function(_0x3381f5){return\x20null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27SetAntialias\x27](_0x3381f5):0x0;}},{\x27key\x27:\x27SetFrameInfoCallBack\x27,\x27value\x27:function(_0x38b7d9,_0x4401c3){return\x20this[\x27displayFrameInfoCB\x27]=_0x4401c3?_0x38b7d9:null,0x1;}},{\x27key\x27:\x27FEC_SetCanvasID\x27,\x27value\x27:function(_0x54b77b){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_SetCanvasID\x27](_0x54b77b):(this[\x27FECCanvasID\x27]=_0x54b77b,0x0);}},{\x27key\x27:\x27FEC_ResetCorrectType\x27,\x27value\x27:function(_0x22624a,_0x5bb26b,_0x42d1c3){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_ResetCorrectType\x27](_0x22624a,_0x5bb26b,_0x42d1c3):0x0;}},{\x27key\x27:\x27FEC_GetPort\x27,\x27value\x27:function(_0x990741,_0x2a6a37){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),-0x1):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_GetPort\x27](_0x990741,_0x2a6a37):-0x1;}},{\x27key\x27:\x27FEC_Enable\x27,\x27value\x27:function(_0x192031){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_Enable\x27](_0x192031):0x0;}},{\x27key\x27:\x27FEC_SetParam\x27,\x27value\x27:function(_0x4f7e52,_0x1ad925){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_SetParam\x27](_0x4f7e52,_0x1ad925):0x0;}},{\x27key\x27:\x27FEC_GetParam\x27,\x27value\x27:function(_0x33f204,_0x34b22f){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_GetParam\x27](_0x33f204,_0x34b22f):0x0;}},{\x27key\x27:\x27FEC_SetViewParam\x27,\x27value\x27:function(_0x329592,_0x2ea2fb,_0x4d858c){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_SetViewParam\x27](_0x329592,_0x2ea2fb,_0x4d858c):0x0;}},{\x27key\x27:\x27FEC_GetViewParam\x27,\x27value\x27:function(_0x3d20b5,_0x17fedf,_0x3dd96c){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_GetViewParam\x27](_0x3d20b5,_0x17fedf,_0x3dd96c):0x0;}},{\x27key\x27:\x27FEC_SetWnd\x27,\x27value\x27:function(_0x39f916,_0x561f34){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_SetWnd\x27](_0x39f916,_0x561f34):0x0;}},{\x27key\x27:\x27FEC_Disable\x27,\x27value\x27:function(_0x2739e6,_0x374b3f,_0x21707d){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_Disable\x27](_0x2739e6,_0x374b3f,_0x21707d):0x0;}},{\x27key\x27:\x27FEC_DelPort\x27,\x27value\x27:function(_0x180cbd){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_DelPort\x27](_0x180cbd):0x0;}},{\x27key\x27:\x27FEC_SetDisplayRegion\x27,\x27value\x27:function(_0x55a405,_0x43759e,_0x1fbaef,_0x53f9ef,_0x1565b9,_0x47769e,_0x2874fb){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_SetDisplayRegion\x27](_0x55a405,_0x43759e,_0x1fbaef,_0x53f9ef,_0x1565b9,_0x47769e,_0x2874fb):0x0;}},{\x27key\x27:\x27FEC_SetBackCilling\x27,\x27value\x27:function(_0x47ae63,_0x416cd3){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_SetBackCilling\x27](_0x47ae63,_0x416cd3):0x0;}},{\x27key\x27:\x27FEC_GetPTZPort\x27,\x27value\x27:function(_0x1c1282,_0x3f675e,_0x48c14c){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),-0x1):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_GetPTZPort\x27](_0x1c1282,_0x3f675e,_0x48c14c):-0x1;}},{\x27key\x27:\x27FEC_SetPTZDisplayMode\x27,\x27value\x27:function(_0x52585f){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20FEC\x5cx20correct\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27FEC_SetPTZDisplayMode\x27](_0x52585f):0x0;}},{\x27key\x27:\x27InputPrivateInfo\x27,\x27value\x27:function(_0x3899e5,_0x5afc7a,_0x2036dd){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20PrivateInfo\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27InputPrivateInfo\x27](_0x3899e5,_0x5afc7a,_0x2036dd):0x1;}},{\x27key\x27:\x27RenderPrivateData\x27,\x27value\x27:function(_0x4c94cd){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20PrivateInfo\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27RenderPrivateData\x27](_0x4c94cd):0x1;}},{\x27key\x27:\x27SetWaterMarkFont\x27,\x27value\x27:function(_0x44d3d9){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20PrivateInfo\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27SetWaterMarkFont\x27](_0x44d3d9):0x1;}},{\x27key\x27:\x27SetWaterMarkImage\x27,\x27value\x27:function(_0x2ae787){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20PrivateInfo\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27SetWaterMarkImage\x27](_0x2ae787):0x1;}},{\x27key\x27:\x27SetD3DPostProcess\x27,\x27value\x27:function(_0x2066e0,_0x3bf600){return\x272d\x27===this[\x27renderEngine\x27]||\x272D\x27===this[\x27renderEngine\x27]?(console[\x27log\x27](\x27%c\x5cx202D\x5cx20render\x5cx20not\x5cx20support\x5cx20PrivateInfo\x27,\x27color:red\x27),0x0):null!=this[\x27oVideoRender\x27]?this[\x27oVideoRender\x27][\x27SetD3DPostProcess\x27](_0x2066e0,_0x3bf600):0x1;}}]),_0x4f2f67;}());_0xfa5873=new\x20_0x47d8a1(),self[\x27onmessage\x27]=function(_0x3e07a0){var\x20_0x4013d3=_0x3e07a0[\x27data\x27];switch(_0x4013d3[\x27command\x27]){case\x27init\x27:_0xfa5873[\x27init\x27](_0x4013d3[\x27canvas\x27],_0x4013d3[\x27streamOpenMode\x27],_0x4013d3[\x27sab\x27],_0x4013d3[\x27renderEngine\x27]);break;case\x27inputData\x27:var\x20_0x3aa44e=new\x20Uint8Array(_0x4013d3[\x27rawData\x27]),_0x2f396e=_0x4013d3[\x27rawDataFrameInfo\x27];_0xfa5873[\x27inputData\x27](_0x3aa44e,_0x2f396e),_0x3aa44e=null;break;case\x27SetDisplayRegion\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),_0xfa5873[\x27SetDisplayRegion\x27](_0x4013d3[\x27sx\x27],_0x4013d3[\x27sy\x27],_0x4013d3[\x27sw\x27],_0x4013d3[\x27sh\x27]);break;case\x27stop\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),_0xfa5873[\x27SetCurStatus\x27](0x4);var\x20_0x254540=setInterval(function(){_0xfa5873[\x27displayRunning\x27]||(_0xfa5873=null,self[\x27postMessage\x27]({\x27function\x27:\x27stop\x27}),clearInterval(_0x254540),_0x254540=null,self[\x27close\x27](),console[\x27log\x27](\x27>>>JS\x5cx2003\x5cx20destroy\x5cx20oVideoPlayCtrl\x5cx20and\x5cx20worker\x27));},0x2);break;case\x27fast\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),0x1!==_0xfa5873[\x27fast\x27]()&&self[\x27postMessage\x27]({\x27function\x27:\x27paraError\x27});break;case\x27slow\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),0x1!==_0xfa5873[\x27slow\x27]()&&self[\x27postMessage\x27]({\x27function\x27:\x27paraError\x27});break;case\x27SetDisplayBuf\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),0x1!==_0xfa5873[\x27SetDisplayBuf\x27](_0x4013d3[\x27value\x27])&&self[\x27postMessage\x27]({\x27function\x27:\x27paraError\x27});break;case\x27Pause\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),0x1!==_0xfa5873[\x27Pause\x27](_0x4013d3[\x27value\x27])&&self[\x27postMessage\x27]({\x27function\x27:\x27paraError\x27});break;case\x27OneByOne\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),0x1!==_0xfa5873[\x27OneByOne\x27](_0x4013d3[\x27value\x27])&&self[\x27postMessage\x27]({\x27function\x27:\x27paraError\x27});break;case\x27SetCanvasSize\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),0x1!==_0xfa5873[\x27SetCanvasSize\x27](_0x4013d3[\x27width\x27],_0x4013d3[\x27height\x27])&&self[\x27postMessage\x27]({\x27function\x27:\x27paraError\x27});break;case\x27GetCanvasSize\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27}),0x1!==_0xfa5873[\x27GetCanvasSize\x27]()&&self[\x27postMessage\x27]({\x27function\x27:\x27paraError\x27});break;case\x27GetPlayedTime\x27:null===_0xfa5873&&self[\x27postMessage\x27]({\x27function\x27:\x27OrderError\x27});var\x20_0x70f4e=_0xfa5873[\x27GetPlayedTime\x27]();0x0!==_0x70f4e&&self[\x27postMessage\x27]({\x27function\x27:\x27GetPlayedTime\x27,\x27value\x27:_0x70f4e});break;case\x27needReset\x27:_0xfa5873[\x27SetCurStatus\x27](0x0);break;case\x27GetJPEG\x27:_0xfa5873[\x27GetJPEG\x27]();break;case\x27GetBMP\x27:_0xfa5873[\x27GetBMP\x27]();break;case\x27GetCropJPEG\x27:_0xfa5873[\x27GetCropJPEG\x27]();break;case\x27GetCropBMP\x27:_0xfa5873[\x27GetCropBMP\x27]();break;case\x27SetDecodeFrameType\x27:_0xfa5873[\x27SetDecodeFrameType\x27](_0x4013d3[\x27timestamp\x27]);break;case\x27streamEnd\x27:_0xfa5873[\x27SetStreamEnd\x27]();break;case\x27SetAntialias\x27:_0xfa5873[\x27SetAntialias\x27](_0x4013d3[\x27value\x27]);break;case\x27SetFrameInfoCallBack\x27:_0xfa5873[\x27SetFrameInfoCallBack\x27](function(_0x164711){self[\x27postMessage\x27]({\x27function\x27:\x27SetFrameInfoCallBack\x27,\x27curFrameInfo\x27:_0x164711});},_0x4013d3[\x27value\x27]);break;case\x27FEC_SetCanvasID\x27:_0xfa5873[\x27FEC_SetCanvasID\x27](_0x4013d3[\x27canvasID\x27]);break;case\x27FECResetCorrectType\x27:_0xfa5873[\x27FEC_ResetCorrectType\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27placeType\x27],_0x4013d3[\x27correctType\x27]);break;case\x27FECGetPort\x27:var\x20_0x44dce2=_0xfa5873[\x27FEC_GetPort\x27](_0x4013d3[\x27placeType\x27],_0x4013d3[\x27correctType\x27]);(_0x44dce2<0x1||_0x44dce2>0x1f||null==_0x44dce2)&&(_0x44dce2=-0x1),self[\x27postMessage\x27]({\x27function\x27:\x27FECGetPort\x27,\x27fishSubPort\x27:_0x44dce2});break;case\x27FECEnable\x27:_0xfa5873[\x27FEC_Enable\x27](_0x4013d3[\x27fishSubPort\x27]);break;case\x27FECSetParam\x27:_0xfa5873[\x27FEC_SetParam\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27param2d\x27]);break;case\x27FECGetParam\x27:var\x20_0x2cb048={};_0xfa5873[\x27FEC_GetParam\x27](_0x4013d3[\x27fishSubPort\x27],_0x2cb048),self[\x27postMessage\x27]({\x27function\x27:\x27FECGetParam\x27,\x27param2d\x27:_0x2cb048});break;case\x27FECSetViewParam\x27:_0xfa5873[\x27FEC_SetViewParam\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27upDateType\x27],_0x4013d3[\x27fValue\x27]);break;case\x27FECGetViewParam\x27:_0xfa5873[\x27FEC_GetViewParam\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27upDateType\x27],{}),self[\x27postMessage\x27]({\x27function\x27:\x27FECGetViewParam\x27,\x27Param3D\x27:Param});break;case\x27FECSetWnd\x27:_0xfa5873[\x27FEC_SetWnd\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27offscrrenCnv\x27]);break;case\x27FECDisable\x27:_0xfa5873[\x27FEC_Disable\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27clearFECCanvas\x27],_0x4013d3[\x27clearContext\x27]);break;case\x27FECDelPort\x27:_0xfa5873[\x27FEC_DelPort\x27](_0x4013d3[\x27fishSubPort\x27]);break;case\x27FECSetDisplayRegion\x27:_0xfa5873[\x27FEC_SetDisplayRegion\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27type\x27],_0x4013d3[\x27regionNum\x27],_0x4013d3[\x27sx\x27],_0x4013d3[\x27sy\x27],_0x4013d3[\x27sw\x27],_0x4013d3[\x27sh\x27]);break;case\x27FECSetBackCilling\x27:_0xfa5873[\x27FEC_SetBackCilling\x27](_0x4013d3[\x27fishSubPort\x27],_0x4013d3[\x27bValue\x27]);break;case\x27FECGetPTZPort\x27:var\x20_0x4a7085=_0xfa5873[\x27FEC_GetPTZPort\x27](_0x4013d3[\x27fPositionX\x27],_0x4013d3[\x27fPositionY\x27]);(_0x4a7085<0x1||_0x4a7085>0x1f||null==_0x4a7085)&&(_0x4a7085=-0x1,console[\x27info\x27](\x27%c\x5cx20hardDecoderWorker\x5cx20FECGetPTZPort\x5cx20error\x5cx20\x27,\x27color:\x5cx20red\x27)),self[\x27postMessage\x27]({\x27function\x27:\x27FECGetPTZPort\x27,\x27fishSubPort\x27:_0x4a7085});break;case\x27FECSetPTZDisplayMode\x27:_0xfa5873[\x27FEC_SetPTZDisplayMode\x27](_0x4013d3[\x27ptzMode\x27]);break;case\x27RenderPrivateData\x27:_0xfa5873[\x27RenderPrivateData\x27](_0x4013d3[\x27bTrue\x27]);break;case\x27InputPrivateInfo\x27:_0xfa5873[\x27InputPrivateInfo\x27](_0x4013d3[\x27linesInfo\x27],_0x4013d3[\x27fontInfo\x27],_0x4013d3[\x27ImageInfo\x27]);break;case\x27GetCanvasCapture\x27:_0xfa5873[\x27GetCanvasCapture\x27](_0x4013d3[\x27cbFun\x27]);break;case\x27SetWaterMarkFont\x27:_0xfa5873[\x27SetWaterMarkFont\x27](_0x4013d3[\x27fontParam\x27]);break;case\x27SetWaterMarkImage\x27:_0xfa5873[\x27SetWaterMarkImage\x27](_0x4013d3[\x27imageParam\x27]);break;case\x27SetD3DPostProcess\x27:_0xfa5873[\x27SetD3DPostProcess\x27](_0x4013d3[\x27ProcessType\x27],_0x4013d3[\x27ProcessValue\x27]);}};})());','Worker',void 0x0,void 0x0);}var _0x413030=function(){function _0x419341(_0x2385b1,_0x583425,_0x495437){_0xa7bfb2(this,_0x419341),this['width']=0x0,this['height']=0x0,this['decoderObj']=null,this['FirstFrame']=!0x0,this['ready_frames']=[],this['underflow']=!0x0,this['sab']=_0x2385b1,this['frameRate']=0x1e,this['needSetPreSoft']=!0x1,this['decoderCurStatus']=0x2,this['decoderOutSuccess']=!0x1,this['decoderObjNeedReset']=!0x1,this['oVideoRenderHandle']=_0x583425,this['output']=this['output']['bind'](this),this['reportError']=this['reportError']['bind'](this),this['player']=null,null!=_0x495437&&(this['player']=_0x495437),this['curFrame']=null;}return _0x3e0d7c(_0x419341,[{'key':'initDecoder','value':function value(){if(null==this['decoderObj']){var _0x5f225c={'output':this['output'],'error':this['reportError']};this['decoderObj']=new VideoDecoder(_0x5f225c);}this['underflow']&&(this['underflow']=!0x1,setTimeout(this['oVideoRenderHandle']['RenderFrame'](),0x0),this['oVideoRenderHandle']['displayRunning']=!0x0),this['decoderCurStatus']=0x2,this['FirstFrame']=!0x0;}},{'key':'inputData','value':function value(_0x1901b9,_0x4f3664){null!=this['decoderObj']&&('configured'==this['decoderObj']['state']||this['FirstFrame'])&&this['decodeProcess'](_0x1901b9,_0x4f3664),_0x4f3664['nStreamEnd']&&this['SetStreamEnd']();}},{'key':'concatenate','value':function value(_0x2e0227){for(var _0x56a1e8=0x0,_0x10fb2d=arguments['length'],_0x4cc212=new Array(_0x10fb2d>0x1?_0x10fb2d-0x1:0x0),_0x15cd4a=0x1;_0x15cd4a<_0x10fb2d;_0x15cd4a++)_0x4cc212[_0x15cd4a-0x1]=arguments[_0x15cd4a];for(var _0xcfbee1=0x0,_0x5b5b30=_0x4cc212;_0xcfbee1<_0x5b5b30['length'];_0xcfbee1++){var _0x3e52f6=_0x5b5b30[_0xcfbee1];_0x56a1e8+=_0x3e52f6['length'];}for(var _0x9cbd43=new _0x2e0227(_0x56a1e8),_0x131b00=0x0,_0x35653a=0x0,_0x3261e2=_0x4cc212;_0x35653a<_0x3261e2['length'];_0x35653a++){var _0x495d0e=_0x3261e2[_0x35653a];_0x9cbd43['set'](_0x495d0e,_0x131b00),_0x131b00+=_0x495d0e['length'];}return _0x9cbd43;}},{'key':'processData','value':function value(_0x5c553b){for(var _0x1331b5=null,_0x39f415=null,_0xee1bf5=null,_0x158a48=!0x1,_0xa2317f=!0x1,_0x43e72e=0x0,_0x333c54=0x0;_0x333c54<_0x5c553b['length']-0x4;_0x333c54++){if(0x0!=_0x5c553b[_0x333c54]||0x0!=_0x5c553b[_0x333c54+0x1]||0x0!=_0x5c553b[_0x333c54+0x2]||0x1!=_0x5c553b[_0x333c54+0x3]||0x67!=_0x5c553b[_0x333c54+0x4]&&0x27!=_0x5c553b[_0x333c54+0x4]||(0x0!=_0x333c54?(_0xa2317f=!0x0,_0x1331b5=_0x5c553b['slice'](_0x333c54),_0x43e72e=_0x333c54):_0x1331b5=_0x5c553b),0x0==_0x5c553b[_0x333c54]&&0x0==_0x5c553b[_0x333c54+0x1]&&0x0==_0x5c553b[_0x333c54+0x2]&&0x1==_0x5c553b[_0x333c54+0x3]&&(0x9==_0x5c553b[_0x333c54+0x4]||0x6==_0x5c553b[_0x333c54+0x4])){if(null==_0x1331b5)continue;null==_0x39f415&&(_0x39f415=_0x5c553b['slice'](_0x43e72e,_0x333c54),_0x158a48=!0x0);}if(0x0==_0x5c553b[_0x333c54]&&0x0==_0x5c553b[_0x333c54+0x1]&&0x0==_0x5c553b[_0x333c54+0x2]&&0x1==_0x5c553b[_0x333c54+0x3]&&(0x65==_0x5c553b[_0x333c54+0x4]||0x25==_0x5c553b[_0x333c54+0x4])){_0x158a48&&(_0xee1bf5=_0x5c553b['slice'](_0x333c54));break;}}return _0x158a48?this['concatenate'](Uint8Array,_0x39f415,_0xee1bf5):_0xa2317f?_0x1331b5:_0x5c553b;}},{'key':'processData1','value':function value(_0x4fe0a6){return 0x0!=_0x4fe0a6[0x0]||0x0!=_0x4fe0a6[0x1]||0x0!=_0x4fe0a6[0x2]||0x1!=_0x4fe0a6[0x3]||0x9!=_0x4fe0a6[0x4]&&0x6!=_0x4fe0a6[0x4]?_0x4fe0a6:_0x4fe0a6['slice'](0x5);}},{'key':'formatVideoDecoderConfigure','value':function value(_0x5d5c54,_0x53440a,_0x773fb2,_0x250cee){var _0x37d9d3='';if(0x5==_0x53440a)_0x37d9d3='hvc1.1.6.L123.00',console['log']('265\x20hard\x20decoder');else {if(0x100==_0x53440a){for(var _0x44737c=0x0;_0x44737c<_0x5d5c54['length'];_0x44737c++)if(0x67===_0x5d5c54[_0x44737c]||0x27===_0x5d5c54[_0x44737c]){var _0x4a4b3d=_0x5d5c54['subarray'](_0x44737c+0x1,_0x44737c+0x4);_0x37d9d3='avc1.';for(var _0x23a6d5=0x0;_0x23a6d5<0x3;_0x23a6d5++){var _0x266ce4=_0x4a4b3d[_0x23a6d5]['toString'](0x10);_0x266ce4['length']<0x2&&(_0x266ce4='0'+_0x266ce4),_0x37d9d3+=_0x266ce4;}break;}console['log']('264\x20hard\x20decoder');}else console['log']('Support\x20Error:\x20hard\x20decoder\x20only\x20support\x20264\x20and\x20265\x20!!!');}var _0x95e727={'codec':_0x37d9d3,'hardwareAcceleration':'prefer-hardware','optimizeForLatency':0x1};return 0x5!=_0x53440a&&this['needSetPreSoft']&&(_0x95e727['hardwareAcceleration']='prefer-software'),_0x95e727;}},{'key':'decodeProcess','value':function value(_0x5d6eb8,_0x32650f){var _0x27a17b=this;this['frameRate']!=_0x32650f['frameRate']&&(this['frameRate']=_0x32650f['frameRate']),this['width']!=_0x32650f['width']&&(this['width']=_0x32650f['width']),this['height']!=_0x32650f['height']&&(this['height']=_0x32650f['height']),_0x32650f['needSetPreSoft']&&(this['needSetPreSoft']=_0x32650f['needSetPreSoft']);var _0x6c581f=_0x5d6eb8;if(0x4!=this['decoderCurStatus']&&null!=this['decoderObj']){if('configured'==this['decoderObj']['state']){var _0x10d0ff=new EncodedVideoChunk({'data':_0x6c581f,'timestamp':_0x32650f['timeStamp'],'type':_0x32650f['isKeyFrame']?'key':'delta'});this['decoderObj']['decode'](_0x10d0ff),_0x6c581f=null,_0x5d6eb8=null,_0x10d0ff=null,_0x32650f['frameType'];}else {if(_0x32650f['isKeyFrame']&&'unconfigured'==this['decoderObj']['state']){var _0x22edee=this['formatVideoDecoderConfigure'](_0x5d6eb8,_0x32650f['codecType'],_0x32650f['width'],_0x32650f['height']);if(''==_0x22edee['codec'])return -0x1;VideoDecoder['isConfigSupported'](_0x22edee)['then'](function(_0xabac28){if(_0xabac28['supported']){_0x27a17b['decoderObj']['configure'](_0x22edee),_0x6c581f=_0x27a17b['processData'](_0x5d6eb8),_0x27a17b['FirstFrame']=!0x1;var _0x5d8311=new EncodedVideoChunk({'data':_0x6c581f,'timestamp':_0x32650f['timeStamp'],'type':_0x32650f['isKeyFrame']?'key':'delta'});_0x27a17b['decoderObj']['decode'](_0x5d8311),_0x22edee=null,_0x6c581f=null,_0x5d6eb8=null;}else console['log']('%c4>HardDecoder\x20ConfigSupported\x20error,switch\x20hard\x20to\x20soft','color:\x20red'),_0x27a17b['oVideoRenderHandle']['HardDecodeError']();})['catch'](function(){console['log']('VideoDecoder.js\x20isConfigSupported\x20error\x20switch\x20hard\x20to\x20soft\x20'),_0x27a17b['oVideoRenderHandle']['HardDecodeError']();});}}}}},{'key':'output','value':function value(_0x548b44){if('configured'==this['decoderObj']['state'])_0x548b44['format'],_0x548b44['codedWidth'],_0x548b44['codedHeight'],_0x548b44['displayWidth'],_0x548b44['displayHeight'],_0x548b44['duration'],_0x548b44['timestamp'],(this['ready_frames']['push'](_0x548b44),this['decoderOutSuccess']||(this['decoderOutSuccess']=!0x0),this['decoderObj']['decodeQueueSize']<=0x1&&(this['player']?this['player']['JSPlayM4_GetRawData']():postMessage({'function':'GetRawData'})));else _0x548b44['close']();}},{'key':'output2','value':function value(_0x2f00af){var _0x49dfae=this;_0x2f00af['timestamp'],createImageBitmap(_0x2f00af)['then'](function(_0x4c3589){_0x2f00af['close'](),_0x49dfae['ready_frames']['push'](_0x4c3589);});}},{'key':'reportError','value':function value(_0x307950){console['log']('hardDecode\x20reportError:'+_0x307950['message']+',state:'+this['decoderObj']['state']+',frameRate:'+this['frameRate']),this['decoderOutSuccess']?this['decoderObjNeedReset']=!0x0:(this['oVideoRenderHandle']['HardDecodeError'](),console['log']('%cswitch\x20hardVideoDecoder\x20to\x20softVideoDecoder','color:\x20red'));}},{'key':'destroyDecoder','value':function value(){var _0x584514=this;return new Promise(function(_0xeab8ae,_0x7b5b91){_0x584514['clearDecoderObjBuffer']()['then'](function(){null!=_0x584514['decoderObj']&&('closed'!=_0x584514['decoderObj']['state']&&_0x584514['decoderObj']['close'](),console['log']('>>>JS\x2001\x20destroy\x20decoderObj'),_0x584514['decoderObj']=null),_0x584514['decoderCurStatus']=0x4,_0x584514['decoderOutSuccess']=!0x1,_0x584514['FirstFrame']=!0x0,_0x584514['underflow']=!0x0,_0x584514['needSetPreSoft']=!0x1,_0x584514['decoderObjNeedReset']=!0x1,_0xeab8ae();},function(){_0x7b5b91();});});}},{'key':'resetDecoder','value':function value(){var _0xe1c999=this;return new Promise(function(_0x5c0cef,_0x378970){_0xe1c999['destroyDecoder']()['then'](function(){_0xe1c999['initDecoder'](),console['log']('%c\x20reset\x20hard\x20decoder','color:red'),_0x5c0cef();},function(){_0x378970();});});}},{'key':'clearDecoderObjBuffer','value':function value(){var _0x29b437=this;return new Promise(function(_0x12ac3c,_0x3b44c3){for(var _0x491fd1=_0x29b437['ready_frames']['length'],_0x5e2f2d=0x0;_0x5e2f2d<_0x491fd1;_0x5e2f2d++){_0x29b437['ready_frames']['shift']()['close']();}_0x29b437['ready_frames']['splice'](0x0,_0x29b437['ready_frames']['length']),null!=_0x29b437['decoderObj']&&'configured'==_0x29b437['decoderObj']['state']&&_0x29b437['decoderObj']['reset'](),_0x12ac3c();});}},{'key':'SetStreamEnd','value':function value(){return 0x0==this['decoderObj']['decodeQueueSize']&&0x0==this['ready_frames']['length']&&(this['decoderObj']['flush'](),console['log']('flush')),0x1;}},{'key':'GetFrame','value':function value(){var _0x21686b=this;return new Promise(function(_0x2be891,_0x2e62fa){if(null!=_0x21686b['curFrame']){var _0x225316=_0x21686b['ready_frames']['shift']();_0x225316['close'](),_0x225316=null,_0x21686b['curFrame']=null;}0x0!=_0x21686b['ready_frames']['length']?(_0x21686b['curFrame']=_0x21686b['ready_frames'][0x0],_0x2be891(_0x21686b['curFrame'])):(_0x21686b['curFrame']=null,_0x2be891(null));});}},{'key':'GetFrameBufferLength','value':function value(){return this['ready_frames']['length'];}},{'key':'GetImageYUV','value':function value(){var _0x2e24dd=this;return new Promise(function(_0x4a42b4,_0x178ad9){var _0x32832d=null;if(console['log']('>>>3000\x20GetImageYUV\x20this.curFrame:'+_0x2e24dd['curFrame']),null!=_0x2e24dd['curFrame']?_0x32832d=_0x2e24dd['curFrame']:0x0!=_0x2e24dd['ready_frames']['length']&&(_0x32832d=_0x2e24dd['ready_frames'][0x0]),console['log']('>>>3001\x20GetImageYUV\x20imageFrame:'+_0x32832d),null!=_0x32832d){var _0x53523f=_0x32832d['displayWidth'],_0x1755ba=_0x32832d['displayHeight'],_0x23f629=_0x53523f*_0x1755ba*0x3/0x2,_0x276360=new Uint8Array(_0x23f629),_0x16fb8c=_0x32832d['format'];console['log']('>>>3002\x20GetImageYUV\x20imageFrame:'+_0x32832d),_0x32832d['copyTo'](_0x276360)['then'](function(){console['log']('2\x20yuvLength:'+_0x23f629+',displayWidth:'+_0x53523f),_0x4a42b4({'yuvFrameBuffer':_0x276360,'yuvLength':_0x23f629,'displayWidth':_0x53523f,'displayHeight':_0x1755ba,'yuvType':_0x16fb8c});});}else _0x4a42b4({'yuvFrameBuffer':-0x1,'yuvLength':-0x1,'displayWidth':-0x1,'displayHeight':-0x1,'yuvType':-0x1});});}}]),_0x419341;}(),_0x4e01e5=0x1,_0xbd5163=0x80000001,_0x4a1abe=0x80000002,_0x4887c6=0x80000003,_0x39e372=0x80000004,_0x554921=0x80000005,_0x29fd5e=0x8000000a,_0x39309a=0x8000000d,_0x556e6b=0x8000000e,_0x39748a=0x1,_0x40bb88=0x2,_0x58af5b={'SR_DE_NULL':0x0,'SR_DE_FISH_ORIGINAL':0x1,'SR_DE_FISH_PTZ_CEILING':0x2,'SR_DE_FISH_PTZ_FLOOR':0x3,'SR_DE_FISH_PTZ_WALL':0x4,'SR_DE_FISH_PANORAMA_CEILING_360':0x5,'SR_DE_FISH_PANORAMA_CEILING_180':0x6,'SR_DE_FISH_PANORAMA_FLOOR_360':0x7,'SR_DE_FISH_PANORAMA_FLOOR_180':0x8,'SR_DE_FISH_PANORAMA_WALL':0x9,'SR_DE_FISH_SEMISPHERE':0xa,'SR_DE_EAGLEEYE_SEMISPHERE':0xb,'SR_DE_EAGLEEYE_PLANE':0xc,'SR_DE_FISH_CYLINDER_CEILING':0xd,'SR_DE_FISH_CYLINDER_FLOOR':0xe,'SR_DE_FISH_CYLINDER_SPLIT_CEILING':0xf,'SR_DE_FISH_CYLINDER_SPLIT_FLOOR':0x10,'SR_DE_FISH_PLANET':0x11,'SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL':0x12,'SR_DE_FISH_ARCSPHERE_VERTICAL_WALL':0x13,'SR_DE_FISH_ANIMATION_SWITCH_CEILING':0x14,'SR_DE_FISH_ANIMATION_SWITCH_FLOOR':0x15,'SR_DE_PANORAMA_SPHERE':0x16,'SR_DE_PANORAMA_PLANET':0x17},_0x20ddaa=0x0,_0x23c6a3=0x1,_0x2a4ed4=0x2,_0x4add73=0x3,_0x54cd9d=0x4,_0x48134e=0x5,_0x3c3237=0x6,_0x3a627d=0x100,_0x43d66b=0x0,_0x1a235b=0x1,_0x15dbff=0x2,_0x16f8a2=0x3,_0x33e182=0x4,_0x508d32=0x0,_0x438e64=0x1,_0x55f7ec=0x2,_0x60b800=0x1,_0x1d8773=0x2,_0x139d52=0x3,_0x3db7f1=0x0,_0x551f0c=0x1,_0x54d43a=0x1,_0x2fc046=0x2,_0x479edd=0x1,_0x1fc2e3=0x2,_0xa0476a=0x3,_0x17b4b1=0x4,_0x28aa58=0x5,_0x2f09aa='\x0aattribute\x20vec3\x20xy;\x0aattribute\x20vec2\x20uv;\x0auniform\x20int\x20bCapture;\x20\x0a\x0avarying\x20highp\x20vec2\x20v_uv;\x0a\x0avoid\x20main(void)\x20{\x0a\x20\x20if(bCapture\x20==\x201)\x0a\x20\x20{\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(xy.x,\x20-xy.y,\x20xy.z,\x201.0);\x0a\x20\x20}\x0a\x20\x20else\x0a\x20\x20{\x0a\x20\x20\x20\x20gl_Position\x20=\x20vec4(xy,\x201.0);\x0a\x20\x20}\x0a\x20\x20v_uv\x20=\x20uv;\x0a}\x0a',_0x45c072='\x0a\x20\x20\x20\x20attribute\x20vec3\x20position;\x0a\x20\x20\x20\x20attribute\x20vec4\x20\x20\x20color;\x0a\x20\x20\x20\x20varying\x20\x20\x20float\x20\x20pp;\x0a\x20\x20\x20\x20varying\x20\x20\x20vec4\x20\x20colorOut;\x0a\x20\x20\x20\x20uniform\x20int\x20bCapture;\x20\x0a\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(bCapture\x20==\x201)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20vec4(position.x,\x20-position.y,\x200.0,\x201.0);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20else\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20vec4(position.x,\x20position.y,\x200.0,\x201.0);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20pp\x20=\x20position.z;\x0a\x20\x20\x20\x20\x20\x20\x20\x20colorOut\x20=\x20color;\x0a\x20\x20\x20\x20}\x0a',_0x1a302f='\x0a\x20\x20\x20\x20varying\x20\x20mediump\x20float\x20pp;\x0a\x20\x20\x20\x20varying\x20\x20lowp\x20vec4\x20\x20colorOut;\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20colorOut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20mediump\x20float\x20fx\x20=\x20abs(pp);\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fx\x20>\x200.2)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor.a\x20=\x20colorOut.a*(1.25\x20-\x201.25*fx);\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20\x0a\x20\x20\x20\x20}\x20\x0a',_0x50fc47='\x0a\x20\x20\x20\x20attribute\x20vec4\x20position;\x20\x0a\x20\x20\x20\x20attribute\x20vec4\x20texCoord;\x20\x0a\x20\x20\x20\x20uniform\x20\x20\x20mat4\x20\x20\x20matRotate;\x20\x0a\x20\x20\x20\x20varying\x20vec4\x20pp;\x20\x0a\x20\x20\x20\x20uniform\x20int\x20bCapture;\x0a\x0a\x20\x20\x20\x20void\x20main()\x20\x0a\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20position;\x20//*\x20matRotate;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(bCapture\x20==\x201)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gl_Position.y\x20=\x20\x20-position.y;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20pp\x20=\x20texCoord;\x20\x0a\x20\x20\x20\x20}\x20\x0a',_0x294d0c='\x0a\x20\x20\x20\x20precision\x20mediump\x20float;\x20\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x20\x20\x20\x20varying\x20lowp\x20vec4\x20pp;\x20\x0a\x20\x20\x20\x20uniform\x20float\x20fAlpha;\x0a\x20\x20\x20\x20void\x20main(void)\x20\x0a\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(texture,\x20pp.st);\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor.a\x20*=\x20fAlpha;\x20\x0a\x20\x20\x20\x20}\x20\x0a',_0x56c4f4=0x20,_0x3682dd=0x400,_0x51992d=0.05,_0x58bec0=0.000001,_0x49f762=3.1415926,_0x252a1b=0.02,_0x3741de=0x3e8,_0x3c5cf8=0.78539815,_0x20b1ea=0x28,_0x108024=-0x1,_0x4560c7=0.000001,_0x25498e='undefined'!=typeof Float32Array?Float32Array:Array;Math['hypot']||(Math['hypot']=function(){for(var _0x28d3f1=0x0,_0x70775b=arguments['length'];_0x70775b--;)_0x28d3f1+=arguments[_0x70775b]*arguments[_0x70775b];return Math['sqrt'](_0x28d3f1);});function _0x5ff064(){var _0x511c38=new _0x25498e(0x10);return _0x25498e!=Float32Array&&(_0x511c38[0x1]=0x0,_0x511c38[0x2]=0x0,_0x511c38[0x3]=0x0,_0x511c38[0x4]=0x0,_0x511c38[0x6]=0x0,_0x511c38[0x7]=0x0,_0x511c38[0x8]=0x0,_0x511c38[0x9]=0x0,_0x511c38[0xb]=0x0,_0x511c38[0xc]=0x0,_0x511c38[0xd]=0x0,_0x511c38[0xe]=0x0),_0x511c38[0x0]=0x1,_0x511c38[0x5]=0x1,_0x511c38[0xa]=0x1,_0x511c38[0xf]=0x1,_0x511c38;}function _0x174ab2(_0x33c27c,_0x353d58,_0x963c46){var _0x3d6ffd=_0x353d58[0x0],_0x1ef452=_0x353d58[0x1],_0x4fa5eb=_0x353d58[0x2],_0x39830b=_0x353d58[0x3],_0x5c2ebc=_0x353d58[0x4],_0x481a68=_0x353d58[0x5],_0x370537=_0x353d58[0x6],_0x572f49=_0x353d58[0x7],_0xca9a7e=_0x353d58[0x8],_0x5c135b=_0x353d58[0x9],_0x25ec53=_0x353d58[0xa],_0x5043af=_0x353d58[0xb],_0x2acb2a=_0x353d58[0xc],_0x3042b0=_0x353d58[0xd],_0x4d2229=_0x353d58[0xe],_0x75e75f=_0x353d58[0xf],_0x3d29ad=_0x963c46[0x0],_0x461568=_0x963c46[0x1],_0x35fd4c=_0x963c46[0x2],_0x421ba7=_0x963c46[0x3];return _0x33c27c[0x0]=_0x3d29ad*_0x3d6ffd+_0x461568*_0x5c2ebc+_0x35fd4c*_0xca9a7e+_0x421ba7*_0x2acb2a,_0x33c27c[0x1]=_0x3d29ad*_0x1ef452+_0x461568*_0x481a68+_0x35fd4c*_0x5c135b+_0x421ba7*_0x3042b0,_0x33c27c[0x2]=_0x3d29ad*_0x4fa5eb+_0x461568*_0x370537+_0x35fd4c*_0x25ec53+_0x421ba7*_0x4d2229,_0x33c27c[0x3]=_0x3d29ad*_0x39830b+_0x461568*_0x572f49+_0x35fd4c*_0x5043af+_0x421ba7*_0x75e75f,_0x3d29ad=_0x963c46[0x4],_0x461568=_0x963c46[0x5],_0x35fd4c=_0x963c46[0x6],_0x421ba7=_0x963c46[0x7],_0x33c27c[0x4]=_0x3d29ad*_0x3d6ffd+_0x461568*_0x5c2ebc+_0x35fd4c*_0xca9a7e+_0x421ba7*_0x2acb2a,_0x33c27c[0x5]=_0x3d29ad*_0x1ef452+_0x461568*_0x481a68+_0x35fd4c*_0x5c135b+_0x421ba7*_0x3042b0,_0x33c27c[0x6]=_0x3d29ad*_0x4fa5eb+_0x461568*_0x370537+_0x35fd4c*_0x25ec53+_0x421ba7*_0x4d2229,_0x33c27c[0x7]=_0x3d29ad*_0x39830b+_0x461568*_0x572f49+_0x35fd4c*_0x5043af+_0x421ba7*_0x75e75f,_0x3d29ad=_0x963c46[0x8],_0x461568=_0x963c46[0x9],_0x35fd4c=_0x963c46[0xa],_0x421ba7=_0x963c46[0xb],_0x33c27c[0x8]=_0x3d29ad*_0x3d6ffd+_0x461568*_0x5c2ebc+_0x35fd4c*_0xca9a7e+_0x421ba7*_0x2acb2a,_0x33c27c[0x9]=_0x3d29ad*_0x1ef452+_0x461568*_0x481a68+_0x35fd4c*_0x5c135b+_0x421ba7*_0x3042b0,_0x33c27c[0xa]=_0x3d29ad*_0x4fa5eb+_0x461568*_0x370537+_0x35fd4c*_0x25ec53+_0x421ba7*_0x4d2229,_0x33c27c[0xb]=_0x3d29ad*_0x39830b+_0x461568*_0x572f49+_0x35fd4c*_0x5043af+_0x421ba7*_0x75e75f,_0x3d29ad=_0x963c46[0xc],_0x461568=_0x963c46[0xd],_0x35fd4c=_0x963c46[0xe],_0x421ba7=_0x963c46[0xf],_0x33c27c[0xc]=_0x3d29ad*_0x3d6ffd+_0x461568*_0x5c2ebc+_0x35fd4c*_0xca9a7e+_0x421ba7*_0x2acb2a,_0x33c27c[0xd]=_0x3d29ad*_0x1ef452+_0x461568*_0x481a68+_0x35fd4c*_0x5c135b+_0x421ba7*_0x3042b0,_0x33c27c[0xe]=_0x3d29ad*_0x4fa5eb+_0x461568*_0x370537+_0x35fd4c*_0x25ec53+_0x421ba7*_0x4d2229,_0x33c27c[0xf]=_0x3d29ad*_0x39830b+_0x461568*_0x572f49+_0x35fd4c*_0x5043af+_0x421ba7*_0x75e75f,_0x33c27c;}function _0x34da30(_0x21c943,_0x5647be,_0x2e48c4,_0x180cfb){var _0x5585df,_0x6c5e2d,_0x39ef6e,_0xb886bd,_0x107320,_0x574379,_0x599bed,_0x165ef4,_0x533f02,_0x2dd5b9,_0x2ce995,_0x1743c6,_0x5cd119,_0x50f00f,_0x35abb6,_0x1317fe,_0x21de55,_0x2d2702,_0x569beb,_0x157771,_0x3bcff1,_0x1b1012,_0x47333d,_0x52ed61,_0xf4baa2=_0x180cfb[0x0],_0x32aef9=_0x180cfb[0x1],_0x3ec77e=_0x180cfb[0x2],_0x3c9ffa=Math['hypot'](_0xf4baa2,_0x32aef9,_0x3ec77e);return _0x3c9ffa<_0x4560c7?null:(_0xf4baa2*=_0x3c9ffa=0x1/_0x3c9ffa,_0x32aef9*=_0x3c9ffa,_0x3ec77e*=_0x3c9ffa,_0x5585df=Math['sin'](_0x2e48c4),_0x39ef6e=0x1-(_0x6c5e2d=Math['cos'](_0x2e48c4)),_0xb886bd=_0x5647be[0x0],_0x107320=_0x5647be[0x1],_0x574379=_0x5647be[0x2],_0x599bed=_0x5647be[0x3],_0x165ef4=_0x5647be[0x4],_0x533f02=_0x5647be[0x5],_0x2dd5b9=_0x5647be[0x6],_0x2ce995=_0x5647be[0x7],_0x1743c6=_0x5647be[0x8],_0x5cd119=_0x5647be[0x9],_0x50f00f=_0x5647be[0xa],_0x35abb6=_0x5647be[0xb],_0x1317fe=_0xf4baa2*_0xf4baa2*_0x39ef6e+_0x6c5e2d,_0x21de55=_0x32aef9*_0xf4baa2*_0x39ef6e+_0x3ec77e*_0x5585df,_0x2d2702=_0x3ec77e*_0xf4baa2*_0x39ef6e-_0x32aef9*_0x5585df,_0x569beb=_0xf4baa2*_0x32aef9*_0x39ef6e-_0x3ec77e*_0x5585df,_0x157771=_0x32aef9*_0x32aef9*_0x39ef6e+_0x6c5e2d,_0x3bcff1=_0x3ec77e*_0x32aef9*_0x39ef6e+_0xf4baa2*_0x5585df,_0x1b1012=_0xf4baa2*_0x3ec77e*_0x39ef6e+_0x32aef9*_0x5585df,_0x47333d=_0x32aef9*_0x3ec77e*_0x39ef6e-_0xf4baa2*_0x5585df,_0x52ed61=_0x3ec77e*_0x3ec77e*_0x39ef6e+_0x6c5e2d,_0x21c943[0x0]=_0xb886bd*_0x1317fe+_0x165ef4*_0x21de55+_0x1743c6*_0x2d2702,_0x21c943[0x1]=_0x107320*_0x1317fe+_0x533f02*_0x21de55+_0x5cd119*_0x2d2702,_0x21c943[0x2]=_0x574379*_0x1317fe+_0x2dd5b9*_0x21de55+_0x50f00f*_0x2d2702,_0x21c943[0x3]=_0x599bed*_0x1317fe+_0x2ce995*_0x21de55+_0x35abb6*_0x2d2702,_0x21c943[0x4]=_0xb886bd*_0x569beb+_0x165ef4*_0x157771+_0x1743c6*_0x3bcff1,_0x21c943[0x5]=_0x107320*_0x569beb+_0x533f02*_0x157771+_0x5cd119*_0x3bcff1,_0x21c943[0x6]=_0x574379*_0x569beb+_0x2dd5b9*_0x157771+_0x50f00f*_0x3bcff1,_0x21c943[0x7]=_0x599bed*_0x569beb+_0x2ce995*_0x157771+_0x35abb6*_0x3bcff1,_0x21c943[0x8]=_0xb886bd*_0x1b1012+_0x165ef4*_0x47333d+_0x1743c6*_0x52ed61,_0x21c943[0x9]=_0x107320*_0x1b1012+_0x533f02*_0x47333d+_0x5cd119*_0x52ed61,_0x21c943[0xa]=_0x574379*_0x1b1012+_0x2dd5b9*_0x47333d+_0x50f00f*_0x52ed61,_0x21c943[0xb]=_0x599bed*_0x1b1012+_0x2ce995*_0x47333d+_0x35abb6*_0x52ed61,_0x5647be!==_0x21c943&&(_0x21c943[0xc]=_0x5647be[0xc],_0x21c943[0xd]=_0x5647be[0xd],_0x21c943[0xe]=_0x5647be[0xe],_0x21c943[0xf]=_0x5647be[0xf]),_0x21c943);}var _0x49c519=function _0x49c519(_0x340416,_0x4e0963,_0x582fcf,_0x421f49,_0x18124b){var _0x555156=0x1/Math['tan'](_0x4e0963/0x2);if(_0x340416[0x0]=_0x555156/_0x582fcf,_0x340416[0x1]=0x0,_0x340416[0x2]=0x0,_0x340416[0x3]=0x0,_0x340416[0x4]=0x0,_0x340416[0x5]=_0x555156,_0x340416[0x6]=0x0,_0x340416[0x7]=0x0,_0x340416[0x8]=0x0,_0x340416[0x9]=0x0,_0x340416[0xb]=-0x1,_0x340416[0xc]=0x0,_0x340416[0xd]=0x0,_0x340416[0xf]=0x0,null!=_0x18124b&&_0x18124b!==0x1/0x0){var _0x45aaed=0x1/(_0x421f49-_0x18124b);_0x340416[0xa]=(_0x18124b+_0x421f49)*_0x45aaed,_0x340416[0xe]=0x2*_0x18124b*_0x421f49*_0x45aaed;}else _0x340416[0xa]=-0x1,_0x340416[0xe]=-0x2*_0x421f49;return _0x340416;},_0x5165c0=function _0x5165c0(_0x51b13e,_0x4a76f6,_0x1ab195,_0x385a2d,_0x65b1d6,_0x1f5df5,_0x527054){var _0x41ab72=0x1/(_0x4a76f6-_0x1ab195),_0x1f561b=0x1/(_0x385a2d-_0x65b1d6),_0x205dfa=0x1/(_0x1f5df5-_0x527054);return _0x51b13e[0x0]=-0x2*_0x41ab72,_0x51b13e[0x1]=0x0,_0x51b13e[0x2]=0x0,_0x51b13e[0x3]=0x0,_0x51b13e[0x4]=0x0,_0x51b13e[0x5]=-0x2*_0x1f561b,_0x51b13e[0x6]=0x0,_0x51b13e[0x7]=0x0,_0x51b13e[0x8]=0x0,_0x51b13e[0x9]=0x0,_0x51b13e[0xa]=0x2*_0x205dfa,_0x51b13e[0xb]=0x0,_0x51b13e[0xc]=(_0x4a76f6+_0x1ab195)*_0x41ab72,_0x51b13e[0xd]=(_0x65b1d6+_0x385a2d)*_0x1f561b,_0x51b13e[0xe]=(_0x527054+_0x1f5df5)*_0x205dfa,_0x51b13e[0xf]=0x1,_0x51b13e;};function _0x38b00d(){var _0x4b3f2c=new _0x25498e(0x3);return _0x25498e!=Float32Array&&(_0x4b3f2c[0x0]=0x0,_0x4b3f2c[0x1]=0x0,_0x4b3f2c[0x2]=0x0),_0x4b3f2c;}function _0x1d25e5(_0x31b726,_0x34500b,_0x4c005c){var _0x5f2a82=new _0x25498e(0x3);return _0x5f2a82[0x0]=_0x31b726,_0x5f2a82[0x1]=_0x34500b,_0x5f2a82[0x2]=_0x4c005c,_0x5f2a82;}_0x38b00d(),!function(){var _0x3c02ff;_0x3c02ff=new _0x25498e(0x4),_0x25498e!=Float32Array&&(_0x3c02ff[0x0]=0x0,_0x3c02ff[0x1]=0x0,_0x3c02ff[0x2]=0x0,_0x3c02ff[0x3]=0x0);}();function _0x32a1b5(){var _0x250591=new _0x25498e(0x4);return _0x25498e!=Float32Array&&(_0x250591[0x0]=0x0,_0x250591[0x1]=0x0,_0x250591[0x2]=0x0),_0x250591[0x3]=0x1,_0x250591;}var _0x456e52;_0x38b00d(),_0x1d25e5(0x1,0x0,0x0),_0x1d25e5(0x0,0x1,0x0),_0x32a1b5(),_0x32a1b5(),_0x456e52=new _0x25498e(0x9),_0x25498e!=Float32Array&&(_0x456e52[0x1]=0x0,_0x456e52[0x2]=0x0,_0x456e52[0x3]=0x0,_0x456e52[0x5]=0x0,_0x456e52[0x6]=0x0,_0x456e52[0x7]=0x0),_0x456e52[0x0]=0x1,_0x456e52[0x4]=0x1,_0x456e52[0x8]=0x1,!function(){(function(){var _0x53fee3=new _0x25498e(0x2);return _0x25498e!=Float32Array&&(_0x53fee3[0x0]=0x0,_0x53fee3[0x1]=0x0),_0x53fee3;})();}();var _0x635dc4=function(){function _0x19d059(){_0xa7bfb2(this,_0x19d059),this['fFov']=0.785,this['fAspect']=0x1,this['fNear']=0.02,this['fFar']=0x3e8,this['fTheta']=0x0,this['fAlpha']=0x0,this['fBeta']=0x0,this['fScale']=0x1,this['bOrtho']=!0x1,this['matView']=_0x5ff064(),this['matProj']=_0x5ff064(),this['vecEye']=_0x1d25e5(0x0,0x0,0x0),this['vecCenter']=_0x1d25e5(0x0,0x0,0x64),this['vecUp']=_0x1d25e5(0x0,0x1,0x0);}return _0x3e0d7c(_0x19d059,[{'key':'SetYaw','value':function value(_0x29a556){this['fTheta']=_0x29a556;}},{'key':'GetYaw','value':function value(){return this['fTheta'];}},{'key':'SetPitch','value':function value(_0x8025eb){this['fAlpha']=_0x8025eb;}},{'key':'GetPitch','value':function value(){return this['fAlpha'];}},{'key':'SetRoll','value':function value(_0x526aed){this['fBeta']=_0x526aed;}},{'key':'GetRoll','value':function value(){return this['fBeta'];}},{'key':'SetScale','value':function value(_0xcd39a1){this['fScale']=_0xcd39a1;}},{'key':'GetScale','value':function value(){return this['fScale'];}},{'key':'SetFov','value':function value(_0x1f5f5f){this['fFov']=_0x1f5f5f;}},{'key':'SetAspect','value':function value(_0x222148){this['fAspect']=_0x222148;}},{'key':'SetNear','value':function value(_0x27b801){this['fNear']=_0x27b801;}},{'key':'SetFar','value':function value(_0xedb998){this['fFar']=_0xedb998;}},{'key':'SetOrtho','value':function value(_0x53d72a){this['bOrtho']=_0x53d72a;}},{'key':'UpdateCamera','value':function value(_0x278e0b,_0x1c4c2f){if(!(_0x278e0b<=0x0||_0x1c4c2f<=0x0)){if(0x1==this['bOrtho'])_0x5165c0(this['matProj'],0x0,_0x278e0b,_0x1c4c2f,0x0,this['fNear'],this['fFar']);else {var _0x1c292c=this['fFov']/_0x49f762*0xb4;_0x49c519(this['matProj'],_0x1c292c,_0x278e0b/_0x1c4c2f,this['fNear'],this['fFar']);}this['vecEye']=_0x1d25e5(0x0,0x0,this['fScale']),this['vecCenter']=_0x1d25e5(0x0,0x0,0x0),this['vecUp']=_0x1d25e5(0x0,0x1,0x0);var _0x1a663a=_0x1d25e5(0x1,0x0,0x0),_0x1a2e23=_0x1d25e5(0x0,0x1,0x0),_0x3ff37e=_0x1d25e5(0x0,0x0,0x1),_0x3d95d0=_0x5ff064();!function(_0x11992d,_0x139a98,_0x18b1cc,_0x136d00){var _0x36af0d,_0x31dda2,_0x95c117,_0x45e348,_0x416852,_0x52b1d1,_0x4f6580,_0x13e56f,_0x40be64,_0x214de1,_0x1fef49=_0x139a98[0x0],_0x521fb7=_0x139a98[0x1],_0x32132b=_0x139a98[0x2],_0x333203=_0x136d00[0x0],_0x4d90ae=_0x136d00[0x1],_0x4ae158=_0x136d00[0x2],_0x2b474b=_0x18b1cc[0x0],_0x2f2ad0=_0x18b1cc[0x1],_0x46093c=_0x18b1cc[0x2];Math['abs'](_0x1fef49-_0x2b474b)<_0x4560c7&&Math['abs'](_0x521fb7-_0x2f2ad0)<_0x4560c7&&Math['abs'](_0x32132b-_0x46093c)<_0x4560c7?function(_0x1892c8){_0x1892c8[0x0]=0x1,_0x1892c8[0x1]=0x0,_0x1892c8[0x2]=0x0,_0x1892c8[0x3]=0x0,_0x1892c8[0x4]=0x0,_0x1892c8[0x5]=0x1,_0x1892c8[0x6]=0x0,_0x1892c8[0x7]=0x0,_0x1892c8[0x8]=0x0,_0x1892c8[0x9]=0x0,_0x1892c8[0xa]=0x1,_0x1892c8[0xb]=0x0,_0x1892c8[0xc]=0x0,_0x1892c8[0xd]=0x0,_0x1892c8[0xe]=0x0,_0x1892c8[0xf]=0x1;}(_0x11992d):(_0x4f6580=_0x1fef49-_0x2b474b,_0x13e56f=_0x521fb7-_0x2f2ad0,_0x40be64=_0x32132b-_0x46093c,_0x36af0d=_0x4d90ae*(_0x40be64*=_0x214de1=0x1/Math['hypot'](_0x4f6580,_0x13e56f,_0x40be64))-_0x4ae158*(_0x13e56f*=_0x214de1),_0x31dda2=_0x4ae158*(_0x4f6580*=_0x214de1)-_0x333203*_0x40be64,_0x95c117=_0x333203*_0x13e56f-_0x4d90ae*_0x4f6580,(_0x214de1=Math['hypot'](_0x36af0d,_0x31dda2,_0x95c117))?(_0x36af0d*=_0x214de1=0x1/_0x214de1,_0x31dda2*=_0x214de1,_0x95c117*=_0x214de1):(_0x36af0d=0x0,_0x31dda2=0x0,_0x95c117=0x0),_0x45e348=_0x13e56f*_0x95c117-_0x40be64*_0x31dda2,_0x416852=_0x40be64*_0x36af0d-_0x4f6580*_0x95c117,_0x52b1d1=_0x4f6580*_0x31dda2-_0x13e56f*_0x36af0d,(_0x214de1=Math['hypot'](_0x45e348,_0x416852,_0x52b1d1))?(_0x45e348*=_0x214de1=0x1/_0x214de1,_0x416852*=_0x214de1,_0x52b1d1*=_0x214de1):(_0x45e348=0x0,_0x416852=0x0,_0x52b1d1=0x0),_0x11992d[0x0]=_0x36af0d,_0x11992d[0x1]=_0x45e348,_0x11992d[0x2]=_0x4f6580,_0x11992d[0x3]=0x0,_0x11992d[0x4]=_0x31dda2,_0x11992d[0x5]=_0x416852,_0x11992d[0x6]=_0x13e56f,_0x11992d[0x7]=0x0,_0x11992d[0x8]=_0x95c117,_0x11992d[0x9]=_0x52b1d1,_0x11992d[0xa]=_0x40be64,_0x11992d[0xb]=0x0,_0x11992d[0xc]=-(_0x36af0d*_0x1fef49+_0x31dda2*_0x521fb7+_0x95c117*_0x32132b),_0x11992d[0xd]=-(_0x45e348*_0x1fef49+_0x416852*_0x521fb7+_0x52b1d1*_0x32132b),_0x11992d[0xe]=-(_0x4f6580*_0x1fef49+_0x13e56f*_0x521fb7+_0x40be64*_0x32132b),_0x11992d[0xf]=0x1);}(_0x3d95d0,this['vecEye'],this['vecCenter'],this['vecUp']);var _0x38c7d8=_0x5ff064(),_0x3b5893=_0x5ff064(),_0x149237=_0x5ff064(),_0x2f8dd0=_0x5ff064();_0x34da30(_0x3b5893,_0x38c7d8,-this['fAlpha'],_0x1a663a),_0x34da30(_0x149237,_0x3b5893,-this['fTheta'],_0x1a2e23),_0x34da30(_0x2f8dd0,_0x149237,-this['fBeta'],_0x3ff37e),_0x174ab2(this['matView'],_0x3d95d0,_0x2f8dd0);}}},{'key':'GetView','value':function value(){return this['matView'];}},{'key':'GetProj','value':function value(){return this['matProj'];}}]),_0x19d059;}(),_0x5e29b6=function(){function _0x159158(){_0xa7bfb2(this,_0x159158),this['canvas']=null,this['ctx']=null,this['videoShaderProgram']=0x0,this['vertexPosBuffer']=0x0,this['texturePosBuffer']=0x0,this['pFrameData']=null,this['frameDisplayWidth']=0x0,this['frameDisplayHeight']=0x0,this['onlySupportedWebGL1']=!0x1,this['bAntialias']=!0x1,this['bRecreateTex']=!0x0,this['nSurfaceTexture']=[],this['nMaxPointNum']=0x0,this['pLinePosVertices']=null,this['pLineClrVertices']=null,this['glLinePosBuffer']=0x0,this['glLineClrBuffer']=0x0,this['nLineTriangleNum']=0x0,this['nLineShaderProgram']=0x0,this['pFillBlockPosVertices']=null,this['pFillBlockClrVertices']=null,this['nMaxFillBlockTriNum']=0x0,this['glBlockPosBuffer']=0x0,this['glBlockClrBuffer']=0x0,this['nBlockShaderProgram']=0x0,this['nDrawFontWidth']=0x0,this['nDrawFontHeight']=0x0,this['nFontColorTexture']=0x0,this['pFontColorBuffer']=0x0,this['nFontShaderProgram']=0x0,this['nFontBGNum']=0x0,this['pstFontBGLines']=[],this['nImageShaderProgram']=0x0,this['pImagePosVertices']=null,this['pImageClrVertices']=null,this['glImagePosBuffer']=0x0,this['glImageClrBuffer']=0x0,this['nImageColorTexture']=null,this['nDrawImageWidth']=0x0,this['nDrawImageHeight']=0x0,this['nImageColorTextures']=[],this['pFishParamManager']=null,this['enDisplayEffect']=_0x58af5b['SR_DE_NULL'],this['nFECPort']=_0x108024,this['bIsCapturing']=!0x1,this['pSemiSpherePos']=null,this['pSemiSphereTex']=null,this['nSemiSpherePosNum']=0x0,this['nSemiSpherePosSize']=0x0,this['nSemiSphereTexSize']=0x0,this['pCylinderPos']=null,this['pCylinderTex']=null,this['nCylinderPosNum']=0x0,this['nCylinderPosSize']=0x0,this['nCylinderTexSize']=0x0,this['fCylinderHeight']=0x0,this['fCylinderRadius']=0x0,this['b3DPort']=!0x1,this['pCamera']=null,this['fRotateX']=0x0,this['fRotateY']=0x0,this['fScale']=0x0,this['pfuncCBIn']=null,this['pfuncCBOut']=null,this['pUserIn']=null,this['pUserOut']=null,this['bCullBack']=!0x1,this['fSrcUseLeft']=0x0,this['fSrcUseRight']=0x1,this['fSrcUseTop']=0x0,this['fSrcUseBottom']=0x1,this['fDstUseLeft']=0x0,this['fDstUseRight']=0x1,this['fDstUseTop']=0x0,this['fDstUseBottom']=0x1,this['enPixelFormat']=_0x20ddaa,this['nTextureNum']=0x0,this['textCanvas']=null,this['textCanvasCtx']=null,this['nCaptureWidth']=0x0,this['nCaptureHeight']=0x0,this['nCaptureRTTex']=0x0,this['nCaptureFBO']=0x0,this['nCaptureFBOWidth']=0x0,this['nCaptureFBOHeight']=0x0,this['nCaptureDepthbuffer']=0x0,this['bCaptureResInit']=!0x1,this['fBrightness']=0x0,this['fHue']=0x0,this['fSaturation']=0x0,this['fContrast']=0x0,this['fSharpness']=0x0,this['nPostProc']=0x0;}return _0x3e0d7c(_0x159158,[{'key':'CompileProgram','value':function value(_0x2aaa66,_0xc3bc3a){var _0x59ef86=this['ctx'];if(null==_0x59ef86||null==_0x2aaa66||null==_0xc3bc3a)return -0x1;var _0x26ebe9=_0x59ef86['createShader'](_0x59ef86['VERTEX_SHADER']);if(_0x59ef86['shaderSource'](_0x26ebe9,_0x2aaa66),_0x59ef86['compileShader'](_0x26ebe9),!_0x59ef86['getShaderParameter'](_0x26ebe9,_0x59ef86['COMPILE_STATUS']))return console['log']('Vertex\x20shader\x20failed\x20to\x20compile:\x20'+_0x59ef86['getShaderInfoLog'](_0x26ebe9)),-0x1;var _0x5ec76e=_0x59ef86['createShader'](_0x59ef86['FRAGMENT_SHADER']);if(_0x59ef86['shaderSource'](_0x5ec76e,_0xc3bc3a),_0x59ef86['compileShader'](_0x5ec76e),!_0x59ef86['getShaderParameter'](_0x5ec76e,_0x59ef86['COMPILE_STATUS']))return console['log']('Fragment\x20shader\x20failed\x20to\x20compile:\x20'+_0x59ef86['getShaderInfoLog'](_0x5ec76e)),-0x1;var _0x2dc639=_0x59ef86['createProgram']();return _0x59ef86['attachShader'](_0x2dc639,_0x26ebe9),_0x59ef86['attachShader'](_0x2dc639,_0x5ec76e),_0x59ef86['linkProgram'](_0x2dc639),_0x59ef86['getProgramParameter'](_0x2dc639,_0x59ef86['LINK_STATUS'])?(_0x59ef86['deleteShader'](_0x26ebe9),_0x59ef86['deleteShader'](_0x5ec76e),_0x2dc639):(console['log']('Program\x20failed\x20to\x20compile:\x20'+_0x59ef86['getProgramInfoLog'](_0x2dc639)),-0x1);}},{'key':'SR_Init','value':function value(_0x5f3caf,_0x1717d0){if(null==_0x5f3caf)return _0x554921;if(this['canvas']=_0x5f3caf,this['ctx']=this['canvas']['getContext']('webgl2'),this['ctx']||(this['ctx']=this['canvas']['getContext']('webgl')||this['canvas']['getContext']('experimental-webgl'),this['onlySupportedWebGL1']=!0x0,console['log']('only\x20support\x20webgl1')),!this['ctx'])return console['log']('your\x20browser\x20does\x20not\x20support\x20WebGL'),_0x556e6b;if(_0x1717d0==_0x2a4ed4||_0x1717d0==_0x3c3237)return _0xbd5163;switch(_0x1717d0){case _0x23c6a3:case _0x4add73:this['nTextureNum']=0x3;break;case _0x2a4ed4:case _0x3c3237:this['nTextureNum']=0x2;break;case _0x3a627d:this['nTextureNum']=0x1;break;default:return _0xbd5163;}return this['enPixelFormat']=_0x1717d0,_0x4e01e5;}},{'key':'SR_Draw','value':function value(_0x49e383,_0x1f8e68,_0x4c02ab,_0x46b951,_0x428b53){if(null==this['ctx'])return _0x39e372;var _0x611e2e=this['nTextureNum'];if(null==_0x49e383||_0x1f8e68<=0x0||_0x4c02ab<=0x0)return _0x554921;if(0x0==this['videoShaderProgram']||0x0==this['vertexPosBuffer']||0x0==this['texturePosBuffer'])return _0x39e372;var _0x4a169a=_0x4e01e5;if(_0x3a627d==this['enPixelFormat'])this['frameDisplayWidth']=_0x1f8e68,this['frameDisplayHeight']=_0x4c02ab;else {if(_0x4a169a=this['_ResizeFrameData'](_0x49e383,_0x1f8e68,_0x4c02ab,_0x46b951),_0x4e01e5!=_0x4a169a)return _0x4a169a;}if(this['ctx']['useProgram'](this['videoShaderProgram']),0x1==this['bRecreateTex']){if(this['enPixelFormat']==_0x3a627d){if(0x0!=this['nSurfaceTexture'][0x0]){var _0x460a1e=this['nSurfaceTexture'][0x0];this['ctx']['deleteTexture'](_0x460a1e),this['nSurfaceTexture'][0x0]=0x0;}var _0x3592be=this['ctx']['createTexture']();if(_0x3592be<=0x0)return _0x39309a;this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],_0x3592be),0x1==this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']):this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),this['nSurfaceTexture'][0x0]=_0x3592be;}else {if(this['enPixelFormat']==_0x23c6a3||this['enPixelFormat']==_0x4add73)for(var _0x4fb168=0x0;_0x4fb168<_0x611e2e;_0x4fb168++){if(0x0!=this['nSurfaceTexture'][_0x4fb168]){var _0x31e464=this['nSurfaceTexture'][_0x4fb168];this['ctx']['deleteTexture'](_0x31e464),this['nSurfaceTexture'][_0x4fb168]=0x0;}var _0x3f8475=this['ctx']['createTexture']();if(_0x3f8475<=0x0)return _0x39309a;if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],_0x3f8475),0x1==this['bAntialias']?this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR_MIPMAP_NEAREST']):this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),0x0==_0x4fb168){var _0x555414=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Ytexture');this['ctx']['uniform1i'](_0x555414,0x0);}else {if(0x1==_0x4fb168){var _0x27ee79=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Utexture');this['ctx']['uniform1i'](_0x27ee79,0x1);}else {if(0x2==_0x4fb168){var _0x7b7535=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'Vtexture');this['ctx']['uniform1i'](_0x7b7535,0x2);}}}this['nSurfaceTexture'][_0x4fb168]=_0x3f8475,this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],null);}}this['bRecreateTex']=!0x1;}this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0x2d99e6=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'xy');if(_0x2d99e6<0x0)return _0x39309a;this['ctx']['vertexAttribPointer'](_0x2d99e6,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x2d99e6),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x23ecb7=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'uv');if(_0x23ecb7<0x0)return _0x39309a;this['ctx']['vertexAttribPointer'](_0x23ecb7,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x23ecb7),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null);var _0x23aebc=this['enDisplayEffect'],_0x194cfd=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCapture');if(_0x194cfd<=0x0)return _0x39309a;this['ctx']['uniform1i'](_0x194cfd,0x0);var _0x1a99c5=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'nPostProc');switch(this['ctx']['uniform1i'](_0x1a99c5,this['nPostProc']),0x1==this['nPostProc']&&(_0x4a169a=this['_SetImagePostProcess']()),_0x23aebc){case _0x58af5b['SR_DE_NULL']:break;case _0x58af5b['SR_DE_FISH_ORIGINAL']:case _0x58af5b['SR_DE_FISH_PTZ_CEILING']:case _0x58af5b['SR_DE_FISH_PTZ_FLOOR']:case _0x58af5b['SR_DE_FISH_PTZ_WALL']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:if(null==this['pFishParamManager'])return _0x39e372;var _0x1bf70c={};if(_0x4a169a=this['pFishParamManager']['GetRenderParam'](this['nFECPort'],_0x1bf70c),_0x4e01e5!=_0x4a169a)return _0x4a169a;if(_0x58af5b['SR_DE_FISH_ORIGINAL']==_0x23aebc){var _0x596847=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bBlack');if(_0x596847<=0x0)return _0x39309a;this['ctx']['uniform1i'](_0x596847,_0x1bf70c['bBlack']);var _0x25924e=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCut');if(_0x25924e<=0x0)return _0x39309a;this['ctx']['uniform1i'](_0x25924e,_0x1bf70c['bCut']);}if(_0x58af5b['SR_DE_FISH_PTZ_CEILING']==_0x23aebc||_0x58af5b['SR_DE_FISH_PTZ_FLOOR']==_0x23aebc||_0x58af5b['SR_DE_FISH_PTZ_WALL']==_0x23aebc){var _0x2bb4e1=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleCos');if(_0x2bb4e1<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x2bb4e1,_0x1bf70c['fCosH']);var _0x35f1f4=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleSin');if(_0x35f1f4<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x35f1f4,_0x1bf70c['fSinH']);var _0x4e0d7f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleCos');if(_0x4e0d7f<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x4e0d7f,_0x1bf70c['fCosV']);var _0xe34650=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleSin');if(_0xe34650<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0xe34650,_0x1bf70c['fSinV']);var _0x4f78fa=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fZoom');if(_0x4f78fa<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x4f78fa,_0x1bf70c['fZoom']);}if(_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']==_0x23aebc||_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']==_0x23aebc||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']==_0x23aebc||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']==_0x23aebc){var _0x223aa8=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fAngle');if(_0x223aa8<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x223aa8,_0x1bf70c['fAngle']);}var _0x3a12a3=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX1');if(_0x3a12a3<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x3a12a3,_0x1bf70c['fRXLeft']);var _0x1f854b=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX2');if(_0x1f854b<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x1f854b,_0x1bf70c['fRXRight']);var _0x202eb1=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY1');if(_0x202eb1<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x202eb1,_0x1bf70c['fRYTop']);var _0x13b71a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY2');if(_0x13b71a<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x13b71a,_0x1bf70c['fRYBottom']);break;case _0x58af5b['SR_DE_FISH_SEMISPHERE']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['canvas']['width'],this['canvas']['height']);var _0x10fa59=this['pCamera']['GetView'](),_0x34f17f=this['pCamera']['GetProj'](),_0x42ec8f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x42ec8f<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x42ec8f,!0x1,_0x10fa59);var _0x50cd5f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x50cd5f<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x50cd5f,!0x1,_0x34f17f);break;case _0x58af5b['SR_DE_FISH_CYLINDER_CEILING']:case _0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['canvas']['width'],this['canvas']['height']);var _0x4b0674=this['pCamera']['GetView'](),_0x5b9506=this['pCamera']['GetProj'](),_0x4d5207=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x4d5207<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x4d5207,!0x1,_0x4b0674);var _0x396a59=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x396a59<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x396a59,!0x1,_0x5b9506);}if(this['canvas']['width']<=0x0||this['canvas']['height']<=0x0)return _0x556e6b;if(null!=_0x428b53&&(_0x4a169a=this['SR_SetDisplayRect'](_0x428b53['fx'],_0x428b53['fy'],_0x428b53['width'],_0x428b53['height'],_0x40bb88))!=_0x4e01e5)return _0x4a169a;if(null!=_0x428b53?this['ctx']['viewport'](this['canvas']['width']*this['fDstUseLeft'],this['canvas']['height']*this['fDstUseTop'],this['canvas']['width']*this['fDstUseRight'],this['canvas']['height']*this['fDstUseBottom']):(this['ctx']['viewport'](0x0,0x0,this['canvas']['width'],this['canvas']['height']),this['ctx']['clearColor'](0x0,0x0,0x0,0x1),this['ctx']['clear'](this['ctx']['COLOR_BUFFER_BIT']|this['ctx']['DEPTH_BUFFER_BIT'])),this['b3DPort']&&(this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0),0x1==this['bCullBack']?this['ctx']['enable'](this['ctx']['CULL_FACE']):this['ctx']['disable'](this['ctx']['CULL_FACE'])),this['enPixelFormat']==_0x3a627d)this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],_0x1f8e68,_0x4c02ab,0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x49e383),0x1==this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']);else {if(this['enPixelFormat']==_0x23c6a3){var _0x3ecc3b=this['pFrameData']['subarray'](0x0,_0x1f8e68*_0x4c02ab);this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x1f8e68,_0x4c02ab,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x3ecc3b);var _0x442df4=this['pFrameData']['subarray'](_0x1f8e68*_0x4c02ab+_0x1f8e68/0x2*_0x4c02ab/0x2,_0x1f8e68*_0x4c02ab+_0x1f8e68/0x2*_0x4c02ab/0x2+_0x1f8e68/0x2*_0x4c02ab/0x2);this['ctx']['activeTexture'](this['ctx']['TEXTURE1']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x1]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x1f8e68/0x2,_0x4c02ab/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x442df4);var _0x321f3b=this['pFrameData']['subarray'](_0x1f8e68*_0x4c02ab,_0x1f8e68*_0x4c02ab+_0x1f8e68/0x2*_0x4c02ab/0x2);this['ctx']['activeTexture'](this['ctx']['TEXTURE2']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x2]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x1f8e68/0x2,_0x4c02ab/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x321f3b),0x1==this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']),_0x3ecc3b=null,_0x442df4=null,_0x321f3b=null;}else this['enPixelFormat']==_0x4add73&&(_0x3ecc3b=this['pFrameData']['subarray'](0x0,_0x1f8e68*_0x4c02ab),(this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x1f8e68,_0x4c02ab,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x3ecc3b)),_0x442df4=this['pFrameData']['subarray'](_0x1f8e68*_0x4c02ab,_0x1f8e68*_0x4c02ab+_0x1f8e68/0x2*_0x4c02ab/0x2),(this['ctx']['activeTexture'](this['ctx']['TEXTURE1']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x1]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x1f8e68/0x2,_0x4c02ab/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x442df4)),_0x321f3b=this['pFrameData']['subarray'](_0x1f8e68*_0x4c02ab+_0x1f8e68/0x2*_0x4c02ab/0x2,_0x1f8e68*_0x4c02ab+_0x1f8e68/0x2*_0x4c02ab/0x2+_0x1f8e68/0x2*_0x4c02ab/0x2),(this['ctx']['activeTexture'](this['ctx']['TEXTURE2']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x2]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],_0x1f8e68/0x2,_0x4c02ab/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x321f3b),0x1==this['bAntialias']&&this['ctx']['generateMipmap'](this['ctx']['TEXTURE_2D']),_0x3ecc3b=null,_0x442df4=null,_0x321f3b=null));}if(this['onlySupportedWebGL1']||this['ctx']['clearBufferfi'](this['ctx']['DEPTH_STENCIL'],0x0,0x1,0x0),0x0==this['b3DPort'])this['ctx']['drawArrays'](this['ctx']['TRIANGLE_FAN'],0x0,0x4);else {if(this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_SEMISPHERE']){if(this['nSemiSpherePosNum']<=0x0)return _0x39e372;this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nSemiSpherePosNum']);}else {if(this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_CYLINDER_CEILING']||this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']){if(this['nCylinderPosNum']<=0x0)return _0x39e372;this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nCylinderPosNum']);}}}if(this['ctx']['useProgram'](null),null!=this['pFishParamManager']){var _0x2ae113=this['pFishParamManager']['GetWndPort']();_0x2ae113!=_0x108024&&_0x2ae113==this['nFECPort']&&this['DrawPTZLines']();}return null!=this['pfuncCBIn']&&this['pfuncCBIn'](this['pUserIn']),null!=this['pfuncCBOut']&&this['pfuncCBOut'](this['pUserOut']),_0x4e01e5;}},{'key':'DrawPTZLines','value':function value(){if(null==this['pFishParamManager'])return _0x39e372;var _0x4c5ff5=this['pFishParamManager']['GetPTZDisplayMode']();if(_0x4c5ff5==_0x55f7ec||_0x4c5ff5==_0x438e64){for(var _0x18b142=0x0,_0x2e41bc={'fR':0x0,'fG':0x0,'fB':0x0,'fA':0x0},_0xbe16a2=_0x4e01e5,_0x58a433=0x0;_0x58a433<_0x56c4f4;++_0x58a433)if(0x0!=this['pFishParamManager']['IsPortAllocated'](_0x58a433)&&(_0x18b142=0x2,_0xbe16a2=this['pFishParamManager']['GetPTZColor'](_0x58a433,_0x2e41bc),_0x4e01e5==_0xbe16a2)){0x1==this['pFishParamManager']['IsPTZSelected'](_0x58a433)&&(_0x18b142+=0x1);var _0x3e7862=this['pFishParamManager']['GetWndPort']();if(_0x58a433!=_0x3e7862&&_0x55f7ec==_0x4c5ff5){if(_0x58af5b['SR_DE_FISH_ORIGINAL']==this['pFishParamManager']['GetDisplayEffect'](_0x3e7862)){var _0x429dbe={};if(_0xbe16a2=this['pFishParamManager']['GetPTZPoints'](_0x58a433,_0x429dbe,_0x55f7ec),_0x4e01e5!=_0xbe16a2)continue;if(null!=_0x429dbe['pstPoints']&&0x0!=_0x429dbe['nPointNum']&&(_0xbe16a2=this['SR_DrawLines'](_0x429dbe['pstPoints'],_0x429dbe['nPointNum'],!0x0,_0x2e41bc,_0x18b142,!0x1),_0x4e01e5!=_0xbe16a2))continue;}else {var _0x3304f3;if((_0x3304f3=this['pFishParamManager']['GetPTZFragmentNum'](_0x58a433))<=0x0)continue;for(var _0x50aca4=0x0;_0x50aca4<_0x3304f3;_0x50aca4++){var _0x37aedf={};this['pFishParamManager']['GetPTZFragmentPoints'](_0x58a433,_0x37aedf,_0x50aca4),null!=_0x37aedf['pstPoints']&&0x0!=_0x37aedf['nPointNum']&&this['SR_DrawLines'](_0x37aedf['pstPoints'],_0x37aedf['nPointNum'],!0x1,_0x2e41bc,_0x18b142,!0x1);}}}else {if(_0x58a433!=_0x3e7862&&_0x438e64==_0x4c5ff5){var _0x52baef={};if(_0xbe16a2=this['pFishParamManager']['GetPTZPoints'](_0x58a433,_0x52baef,_0x438e64),_0x4e01e5!=_0xbe16a2)continue;if(null!=_0x52baef['pstPoints']&&0x0!=_0x52baef['nPointNum']&&(_0xbe16a2=this['SR_DrawLines'](_0x52baef['pstPoints'],_0x52baef['nPointNum'],!0x0,_0x2e41bc,_0x18b142,!0x1),_0x4e01e5!=_0xbe16a2))continue;}}}}return _0x4e01e5;}},{'key':'DrawFillBlock','value':function value(_0xee5ab,_0x274445,_0x3d99a8){if(null==this['ctx'])return _0x39e372;if(null==_0xee5ab||_0x274445<0x1||_0x3d99a8<0x2)return _0x554921;for(var _0x4f5c3a=0x0,_0xe099ad=0x0;_0xe099ad<_0x274445;++_0xe099ad){if(null==_0xee5ab[_0xe099ad]['pstPoints']||_0xee5ab[_0xe099ad]['nPointNum']<0x3||!0x0!==_0xee5ab[_0xe099ad]['bLoop']||null==_0xee5ab[_0xe099ad]['pstColor'])return _0x554921;_0x4f5c3a+=_0xee5ab[_0xe099ad]['nPointNum'];}if(_0x4f5c3a!==_0x3d99a8)return _0x554921;var _0xfcaec7=_0x3d99a8-0x2*_0x274445;if(_0xfcaec7>this['nMaxFillBlockTriNum']&&(this['pFillBlockPosVertices']=null,this['pFillBlockClrVertices']=null,this['nMaxFillBlockTriNum']=_0xfcaec7),0x0==this['glBlockPosBuffer']&&(this['glBlockPosBuffer']=this['ctx']['createBuffer'](),0x0==this['glBlockPosBuffer']))return _0x39309a;if(0x0==this['glBlockClrBuffer']&&(this['glBlockClrBuffer']=this['ctx']['createBuffer'](),0x0==this['glBlockClrBuffer']))return _0x39309a;if(null==this['pFillBlockPosVertices']){var _0x2620df=this['nMaxFillBlockTriNum'];if(this['pFillBlockPosVertices']=new Float32Array(0x3*_0x2620df*0x3),null==this['pFillBlockPosVertices'])return _0x4887c6;}if(this['pFillBlockPosVertices']['fill'](0x0),null==this['pFillBlockClrVertices']){var _0x2364e7=this['nMaxFillBlockTriNum'];if(this['pFillBlockClrVertices']=new Float32Array(0x4*_0x2364e7*0x3),null==this['pFillBlockClrVertices'])return _0x4887c6;}this['pFillBlockClrVertices']['fill'](0x0);for(var _0x1a10c8=0x0,_0x39c21f=0x0,_0x34e09f=0x0,_0x4776a7=null,_0x1ff904=null,_0x2db7ad={},_0x4a58e7={},_0x12bdfe={},_0xea7b45=0x0;_0xea7b45<_0x274445;++_0xea7b45){_0x34e09f=_0xee5ab[_0xea7b45]['nPointNum'],_0x4776a7=_0xee5ab[_0xea7b45]['pstPoints'],_0x1ff904=_0xee5ab[_0xea7b45]['pstColor'],_0x2db7ad['fX']=(_0x4776a7[0x0]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x2db7ad['fX']=this['fDstUseLeft']+_0x2db7ad['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x2db7ad['fX']=0x2*_0x2db7ad['fX']-0x1,_0x2db7ad['fY']=(_0x4776a7[0x0]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x2db7ad['fY']=this['fDstUseTop']+_0x2db7ad['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x2db7ad['fY']=0x1-0x2*_0x2db7ad['fY'];for(var _0x786f04=0x1;_0x786f04<_0x34e09f-0x1;_0x786f04++)_0x4a58e7['fX']=(_0x4776a7[_0x786f04]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x4a58e7['fX']=this['fDstUseLeft']+_0x4a58e7['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x4a58e7['fX']=0x2*_0x4a58e7['fX']-0x1,_0x4a58e7['fY']=(_0x4776a7[_0x786f04]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x4a58e7['fY']=this['fDstUseTop']+_0x4a58e7['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x4a58e7['fY']=0x1-0x2*_0x4a58e7['fY'],_0x12bdfe['fX']=(_0x4776a7[_0x786f04+0x1]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x12bdfe['fX']=this['fDstUseLeft']+_0x12bdfe['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x12bdfe['fX']=0x2*_0x12bdfe['fX']-0x1,_0x12bdfe['fY']=(_0x4776a7[_0x786f04+0x1]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x12bdfe['fY']=this['fDstUseTop']+_0x12bdfe['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x12bdfe['fY']=0x1-0x2*_0x12bdfe['fY'],this['pFillBlockPosVertices'][_0x1a10c8++]=_0x2db7ad['fX'],this['pFillBlockPosVertices'][_0x1a10c8++]=_0x2db7ad['fY'],this['pFillBlockPosVertices'][_0x1a10c8++]=0x0,this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fR'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fG'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fB'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fA'],this['pFillBlockPosVertices'][_0x1a10c8++]=_0x4a58e7['fX'],this['pFillBlockPosVertices'][_0x1a10c8++]=_0x4a58e7['fY'],this['pFillBlockPosVertices'][_0x1a10c8++]=0x0,this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fR'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fG'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fB'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fA'],this['pFillBlockPosVertices'][_0x1a10c8++]=_0x12bdfe['fX'],this['pFillBlockPosVertices'][_0x1a10c8++]=_0x12bdfe['fY'],this['pFillBlockPosVertices'][_0x1a10c8++]=0x0,this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fR'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fG'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fB'],this['pFillBlockClrVertices'][_0x39c21f++]=_0x1ff904['fA'];}if(0x0==this['nBlockShaderProgram']&&(this['nBlockShaderProgram']=this['CompileProgram'](_0x45c072,_0x1a302f),this['nBlockShaderProgram']<=0x0))return _0x39309a;this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFunc'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockPosBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pFillBlockPosVertices'],this['ctx']['STATIC_DRAW']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockClrBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pFillBlockClrVertices'],this['ctx']['STATIC_DRAW']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['useProgram'](this['nBlockShaderProgram']);var _0x4b04fd=this['ctx']['getUniformLocation'](this['nLineShaderProgram'],'bCapture');if(_0x4b04fd<=0x0)return _0x39309a;0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x4b04fd,0x1):this['ctx']['uniform1i'](_0x4b04fd,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockPosBuffer']);var _0x23bca1=this['ctx']['getAttribLocation'](this['nBlockShaderProgram'],'position');this['ctx']['enableVertexAttribArray'](_0x23bca1),this['ctx']['vertexAttribPointer'](_0x23bca1,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glBlockClrBuffer']);var _0x50f85f=this['ctx']['getAttribLocation'](this['nBlockShaderProgram'],'color');return this['ctx']['enableVertexAttribArray'](_0x50f85f),this['ctx']['vertexAttribPointer'](_0x50f85f,0x4,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x3*_0xfcaec7),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),_0x4e01e5;}},{'key':'ComputeLinePoint','value':function value(_0x228c29,_0x5351ca){if(null==_0x228c29||_0x5351ca<0x1)return _0x554921;if(null==this['pLinePosVertices']||null==this['pLineClrVertices'])return _0x39e372;var _0x2a6426=0x0,_0x545ace=0x0;0x1==this['bIsCapturing']?(_0x2a6426=(this['fDstUseRight']-this['fDstUseLeft'])*this['nCaptureWidth'],_0x545ace=(this['fDstUseBottom']-this['fDstUseTop'])*this['nCaptureHeight']):(_0x2a6426=(this['fDstUseRight']-this['fDstUseLeft'])*this['canvas']['width'],_0x545ace=(this['fDstUseBottom']-this['fDstUseTop'])*this['canvas']['height']);for(var _0xa5235a=0x0,_0x4791b6=0x0,_0x51623d=0x0,_0x205a50=0x0,_0x40d446=0x0,_0x3e5bd1=0x0,_0x3c0ad8=0x0,_0x459462=0x0,_0x1835fe=0x0,_0x155a52=0x0,_0x2a8d3d=0x0,_0x2b4b54=0x0;_0x2b4b54<_0x5351ca;++_0x2b4b54){var _0x19ce05=[];if(!((_0x2a8d3d=_0x228c29[_0x2b4b54]['nPointNum'])<=0x0)){for(var _0x85c57c=0x0;_0x85c57c<_0x2a8d3d;++_0x85c57c){var _0x2c2544={};_0x2c2544['fX']=(_0x228c29[_0x2b4b54]['pstPoints'][_0x85c57c]['fX']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x2c2544['fX']=this['fDstUseLeft']+_0x2c2544['fX']*(this['fDstUseRight']-this['fDstUseLeft']),_0x2c2544['fX']=0x2*_0x2c2544['fX']-0x1,_0x2c2544['fY']=(_0x228c29[_0x2b4b54]['pstPoints'][_0x85c57c]['fY']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x2c2544['fY']=this['fDstUseTop']+_0x2c2544['fY']*(this['fDstUseBottom']-this['fDstUseTop']),_0x2c2544['fY']=0x1-0x2*_0x2c2544['fY'],_0x19ce05['push'](_0x2c2544);}if(this['canvas']['width']<=0x0||this['canvas']['height']<=0x0)return _0x556e6b;if(_0x3e5bd1=3.5*_0x228c29[_0x2b4b54]['nLineWidth']/_0x2a6426,_0x3c0ad8=3.5*_0x228c29[_0x2b4b54]['nLineWidth']/_0x545ace,_0x3e5bd1<=0x0||_0x3c0ad8<=0x0)return _0x554921;var _0x3f87c9=_0x228c29[_0x2b4b54]['pstColor'];if(null==_0x3f87c9||null==_0x3f87c9)return _0x554921;for(var _0x3bad21=0x0;_0x3bad21<_0x2a8d3d-0x1;++_0x3bad21)_0x4791b6=_0x19ce05[_0x3bad21+0x1]['fX']-_0x19ce05[_0x3bad21]['fX'],_0x51623d=_0x19ce05[_0x3bad21+0x1]['fY']-_0x19ce05[_0x3bad21]['fY'],_0xa5235a=Math['sqrt'](_0x4791b6*_0x4791b6+_0x51623d*_0x51623d),Math['abs'](_0xa5235a-0x0)<0.000001||(_0x205a50=-_0x3e5bd1*_0x51623d/_0xa5235a/0x2,_0x40d446=_0x3c0ad8*_0x4791b6/_0xa5235a/0x2,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21]['fX']+_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21]['fY']+_0x40d446,this['pLinePosVertices'][_0x1835fe++]=-0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21+0x1]['fX']-_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21+0x1]['fY']-_0x40d446,this['pLinePosVertices'][_0x1835fe++]=0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21]['fX']-_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21]['fY']-_0x40d446,this['pLinePosVertices'][_0x1835fe++]=0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21]['fX']+_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21]['fY']+_0x40d446,this['pLinePosVertices'][_0x1835fe++]=-0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21+0x1]['fX']+_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21+0x1]['fY']+_0x40d446,this['pLinePosVertices'][_0x1835fe++]=-0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21+0x1]['fX']-_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x3bad21+0x1]['fY']-_0x40d446,this['pLinePosVertices'][_0x1835fe++]=0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],_0x459462+=0x2);0x1==_0x228c29[_0x2b4b54]['bLoop']&&0x2<_0x2a8d3d&&(_0x4791b6=_0x19ce05[_0x2a8d3d-0x1]['fX']-_0x19ce05[0x0]['fX'],_0x51623d=_0x19ce05[_0x2a8d3d-0x1]['fY']-_0x19ce05[0x0]['fY'],_0xa5235a=Math['sqrt'](_0x4791b6*_0x4791b6+_0x51623d*_0x51623d),Math['abs'](_0xa5235a-0x0)>0.000001&&(_0x205a50=-_0x3e5bd1*_0x51623d/_0xa5235a/0x2,_0x40d446=_0x3c0ad8*_0x4791b6/_0xa5235a/0x2,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[0x0]['fX']+_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[0x0]['fY']+_0x40d446,this['pLinePosVertices'][_0x1835fe++]=-0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x2a8d3d-0x1]['fX']-_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x2a8d3d-0x1]['fY']-_0x40d446,this['pLinePosVertices'][_0x1835fe++]=0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[0x0]['fX']-_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[0x0]['fY']-_0x40d446,this['pLinePosVertices'][_0x1835fe++]=0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[0x0]['fX']+_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[0x0]['fY']+_0x40d446,this['pLinePosVertices'][_0x1835fe++]=-0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x2a8d3d-0x1]['fX']+_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x2a8d3d-0x1]['fY']+_0x40d446,this['pLinePosVertices'][_0x1835fe++]=-0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x2a8d3d-0x1]['fX']-_0x205a50,this['pLinePosVertices'][_0x1835fe++]=_0x19ce05[_0x2a8d3d-0x1]['fY']-_0x40d446,this['pLinePosVertices'][_0x1835fe++]=0x1,this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fR'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fG'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fB'],this['pLineClrVertices'][_0x155a52++]=_0x3f87c9['fA'],_0x459462+=0x2));}}return 0x0==_0x459462?_0x554921:(this['nLineTriangleNum']=_0x459462,_0x4e01e5);}},{'key':'SR_DrawLines','value':function value(_0x4ca36f,_0x54a2df,_0x4977d8,_0x3af9ed,_0x4ccf5c,_0x10257d){var _0xa4cace=[],_0x4b65bd={};return _0x4b65bd['pstPoints']=_0x4ca36f,_0x4b65bd['nPointNum']=_0x54a2df,_0x4b65bd['bLoop']=_0x4977d8,_0x4b65bd['pstColor']=_0x3af9ed,_0x4b65bd['nLineWidth']=_0x4ccf5c,_0xa4cace['push'](_0x4b65bd),this['SR_DrawLinesEx'](_0xa4cace,0x1,_0x54a2df,_0x10257d);}},{'key':'SR_DrawLinesEx','value':function value(_0x51e7d4,_0x3d3909,_0xe50d18,_0x2ed053){if(null==this['ctx'])return _0x39e372;if(null==_0x51e7d4||_0x3d3909<0x1||_0xe50d18<0x2)return _0x554921;if(0x0==this['nLineShaderProgram']){var _0x40fa23=this['CompileProgram'](_0x45c072,_0x1a302f);if(_0x40fa23<=0x0)return _0x39309a;this['nLineShaderProgram']=_0x40fa23;}if(0x1==_0x2ed053)return this['DrawFillBlock'](_0x51e7d4,_0x3d3909,_0xe50d18);for(var _0x285fae=0x0,_0x2704b6=0x0;_0x2704b6<_0x3d3909;++_0x2704b6){if(null==_0x51e7d4[_0x2704b6]['pstPoints']||_0x51e7d4[_0x2704b6]['nPointNum']<=0x1||_0x51e7d4[_0x2704b6]['nPointNum']>=0x400||_0x51e7d4[_0x2704b6]['nLineWidth']<=0x0||null==_0x51e7d4[_0x2704b6]['pstColor'])return _0x554921;_0x285fae+=_0x51e7d4[_0x2704b6]['nPointNum'];}if(_0x285fae!=_0xe50d18)return _0x554921;if((_0x285fae+=_0x3d3909)>this['nMaxPointNum']&&(this['nMaxPointNum']=_0x285fae,this['pLinePosVertices']=null,this['pLineClrVertices']=null),null==this['pLinePosVertices']&&(this['pLinePosVertices']=new Float32Array(0x6*this['nMaxPointNum']*0x3),null==this['pLinePosVertices']))return _0x4887c6;if(this['pLinePosVertices']['fill'](0x0),null==this['pLineClrVertices']&&(this['pLineClrVertices']=new Float32Array(0x6*this['nMaxPointNum']*0x4),null==this['pLineClrVertices']))return _0x4887c6;if(this['pLineClrVertices']['fill'](0x0),0x0==this['glLinePosBuffer']&&(this['glLinePosBuffer']=this['ctx']['createBuffer'](),0x0==this['glLinePosBuffer']))return _0x39309a;if(0x0==this['glLineClrBuffer']&&(this['glLineClrBuffer']=this['ctx']['createBuffer'](),0x0==this['glLineClrBuffer']))return _0x39309a;var _0x1ee9a4=this['ComputeLinePoint'](_0x51e7d4,_0x3d3909);if(_0x4e01e5!=_0x1ee9a4)return _0x1ee9a4;this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFunc'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA']);var _0x2a543c=this['nLineShaderProgram'];this['ctx']['useProgram'](_0x2a543c);var _0x461e0f=this['ctx']['getUniformLocation'](this['nLineShaderProgram'],'bCapture');if(_0x461e0f<=0x0)return _0x39309a;0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x461e0f,0x1):this['ctx']['uniform1i'](_0x461e0f,0x0);var _0x1f9756=this['glLinePosBuffer'],_0x2d5fba=this['glLineClrBuffer'],_0x48e90f=this['nLineTriangleNum'],_0x2b6f0c=this['pLinePosVertices'],_0x3f67b3=this['pLineClrVertices'];this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x1f9756),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x2b6f0c,this['ctx']['STATIC_DRAW']);var _0x1c59ff=this['ctx']['getAttribLocation'](_0x2a543c,'position');this['ctx']['enableVertexAttribArray'](_0x1c59ff),this['ctx']['vertexAttribPointer'](_0x1c59ff,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x2d5fba),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x3f67b3,this['ctx']['STATIC_DRAW']);var _0x3496ce=this['ctx']['getAttribLocation'](_0x2a543c,'color');return this['ctx']['enableVertexAttribArray'](_0x3496ce),this['ctx']['vertexAttribPointer'](_0x3496ce,0x4,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),0x1==this['bIsCapturing']?this['ctx']['viewport'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight']):this['ctx']['viewport'](0x0,0x0,this['canvas']['width'],this['canvas']['height']),this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x3*_0x48e90f),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),_0x4e01e5;}},{'key':'SR_DrawFont','value':function value(_0x386ee7,_0x338ae5,_0x20d0a3,_0x118fcf,_0x296fea,_0x2a6a3a,_0x2da36b,_0x3a00d9,_0x480e6c){if(null==_0x386ee7||null==_0x338ae5||null==_0x20d0a3||_0x118fcf<=0x1||_0x296fea<=0x1)return _0x554921;if(0x1==_0x2a6a3a&&null==_0x2da36b)return _0x554921;var _0x3d009f=[],_0xd1d3a7={};return _0xd1d3a7['bBackground']=_0x2a6a3a,_0xd1d3a7['nFontWidth']=_0x118fcf,_0xd1d3a7['nFontHeight']=_0x296fea,_0xd1d3a7['pstBGColor']=_0x2da36b,_0xd1d3a7['pstFontColor']=_0x20d0a3,_0xd1d3a7['pString']=_0x386ee7,_0xd1d3a7['pstStartPos']=_0x338ae5,_0xd1d3a7['fRotateAngle']=_0x3a00d9,_0xd1d3a7['pFontFamily']=_0x480e6c,_0x3d009f['push'](_0xd1d3a7),this['SR_DrawFontEx'](_0x3d009f,0x1);}},{'key':'SR_DrawFontEx','value':function value(_0xa7f4f,_0x57abbe){if(null==this['ctx'])return _0x39e372;if(0x0>_0x57abbe||null==_0xa7f4f)return _0x554921;var _0xaa5e68,_0x1d280d,_0x2a0495=0x0,_0x3600d0=0x0;if(0x1==this['bIsCapturing']){if(0x0==this['nCaptureWidth']||0x0==this['nCaptureHeight'])return _0x39e372;_0x2a0495=Math['round']((this['fDstUseRight']-this['fDstUseLeft'])*this['nCaptureWidth']),_0x3600d0=Math['round']((this['fDstUseBottom']-this['fDstUseTop'])*this['nCaptureHeight']);}else _0x2a0495=Math['round']((this['fDstUseRight']-this['fDstUseLeft'])*this['canvas']['width']),_0x3600d0=Math['round']((this['fDstUseBottom']-this['fDstUseTop'])*this['canvas']['height']);if(_0x2a0495=_0x2a0495+0x4-_0x2a0495%0x4,_0x3600d0=_0x3600d0+0x4-_0x3600d0%0x4,this['nDrawFontWidth']==_0x2a0495&&this['nDrawFontHeight']==_0x3600d0||(this['pFontColorBuffer']=null,this['nFontColorTexture']=0x0,this['nDrawFontWidth']=_0x2a0495,this['nDrawFontHeight']=_0x3600d0,null!=this['textCanvas']&&(this['textCanvas']['remove'](),this['textCanvas']=null,this['textCanvasCtx']=null)),0x0==this['nFontColorTexture']){if(this['nFontColorTexture']=this['ctx']['createTexture'](),0x0==this['nFontColorTexture'])return _0x39309a;this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nFontColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}if(null==this['textCanvas']){if(this['textCanvas']=document['createElement']('canvas'),null==this['textCanvas'])return _0x29fd5e;if(this['textCanvasCtx']=this['textCanvas']['getContext']('2d'),null==this['textCanvasCtx'])return _0x29fd5e;this['textCanvasCtx']['canvas']['width']=this['nDrawFontWidth'],this['textCanvasCtx']['canvas']['height']=this['nDrawFontHeight'];}this['textCanvasCtx']['clearRect'](0x0,0x0,this['nDrawFontWidth'],this['nDrawFontHeight']);for(var _0x3fef95=0x0;_0x3fef95<_0x57abbe;++_0x3fef95){var _0x2516ef=_0xa7f4f[_0x3fef95]['nFontWidth'],_0x5d4c69=_0xa7f4f[_0x3fef95]['nFontHeight'];0x1==this['bIsCapturing']&&(_0x2516ef=Math['round'](0.7*this['nCaptureWidth']/this['canvas']['width']*_0x2516ef),_0x5d4c69=Math['round'](0.7*this['nCaptureHeight']/this['canvas']['height']*_0x5d4c69));var _0x4b5cef=_0x2516ef<_0x5d4c69?_0x2516ef:_0x5d4c69;this['textCanvasCtx']['font']=_0x4b5cef['toString']()+'px\x20'+_0xa7f4f[_0x3fef95]['pFontFamily'],this['textCanvasCtx']['textAlign']='left',this['textCanvasCtx']['textBaseline']='top';var _0x469fac=parseInt(0xff*_0xa7f4f[_0x3fef95]['pstFontColor']['fR']),_0x245ced=parseInt(0xff*_0xa7f4f[_0x3fef95]['pstFontColor']['fG']),_0x20d8d=parseInt(0xff*_0xa7f4f[_0x3fef95]['pstFontColor']['fB']),_0x224c0c=_0x469fac<0x10?'0'+_0x469fac['toString'](0x10):_0x469fac['toString'](0x10),_0x505ff1=_0x245ced<0x10?'0'+_0x245ced['toString'](0x10):_0x245ced['toString'](0x10),_0x17fcca=_0x20d8d<0x10?'0'+_0x20d8d['toString'](0x10):_0x20d8d['toString'](0x10);this['textCanvasCtx']['fillStyle']='#'+_0x224c0c+_0x505ff1+_0x17fcca,this['textCanvasCtx']['globalAlpha']=_0xa7f4f[_0x3fef95]['pstFontColor']['fA'];var _0x2a6cf0=_0xa7f4f[_0x3fef95]['pstStartPos']['fX']*this['nDrawFontWidth'],_0x479591=_0xa7f4f[_0x3fef95]['pstStartPos']['fY']*this['nDrawFontHeight'];this['textCanvasCtx']['save'](),this['textCanvasCtx']['translate'](_0x2a6cf0,_0x479591),this['textCanvasCtx']['rotate'](_0xa7f4f[_0x3fef95]['fRotateAngle']*Math['PI']/0xb4),this['textCanvasCtx']['fillText'](_0xa7f4f[_0x3fef95]['pString'],0x0,0x0),this['textCanvasCtx']['restore']();}if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nFontColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],this['textCanvasCtx']['canvas']),0x0==this['nFontShaderProgram']&&(this['nFontShaderProgram']=this['CompileProgram']('\x0a\x20\x20\x20\x20attribute\x20vec4\x20\x20position;\x0a\x20\x20\x20\x20attribute\x20vec4\x20\x20texCoord;\x0a\x20\x20\x20\x20varying\x20vec4\x20\x20pp;\x20\x0a\x20\x20\x20\x20uniform\x20int\x20bCapture;\x0a\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position.x\x20\x20=\x20position.x;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position.y\x20\x20=\x20position.y;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(bCapture\x20==\x201)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gl_Position.y\x20=\x20-position.y;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position.z\x20\x20=\x200.1;\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position.w\x20\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20pp\x20=\x20texCoord;\x20\x0a\x20\x20\x20\x20}\x0a','\x0a\x20\x20\x20\x20varying\x20lowp\x20vec4\x20pp;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x0a\x20\x20\x20\x20void\x20main(void)\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(texture,\x20pp.st);\x0a\x20\x20\x20\x20}\x0a'),this['nFontShaderProgram']<=0x0))return _0x39309a;0x1==this['bIsCapturing']?(_0xaa5e68=this['nCaptureWidth']+0x4-this['nCaptureWidth']%0x4,_0x1d280d=this['nCaptureHeight']+0x4-this['nCaptureHeight']%0x4):(_0xaa5e68=this['canvas']['width']+0x4-this['canvas']['width']%0x4,_0x1d280d=this['canvas']['height']+0x4-this['canvas']['height']%0x4),this['ctx']['viewport'](0x0,0x0,_0xaa5e68,_0x1d280d),this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFunc'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA']),this['ctx']['useProgram'](this['nFontShaderProgram']);var _0x56d0ef=this['ctx']['getUniformLocation'](this['nFontShaderProgram'],'bCapture');if(_0x56d0ef<=0x0)return _0x39309a;0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x56d0ef,0x1):this['ctx']['uniform1i'](_0x56d0ef,0x0),this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nFontColorTexture']);var _0x2e0193=this['ctx']['getUniformLocation'](this['nFontShaderProgram'],'texture');this['ctx']['uniform1i'](_0x2e0193,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0x42b21f=this['ctx']['getAttribLocation'](this['nFontShaderProgram'],'position');this['ctx']['enableVertexAttribArray'](_0x42b21f),this['ctx']['vertexAttribPointer'](_0x42b21f,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x53bff9=this['ctx']['getAttribLocation'](this['nFontShaderProgram'],'texCoord');return this['ctx']['enableVertexAttribArray'](_0x53bff9),this['ctx']['vertexAttribPointer'](_0x53bff9,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['drawArrays'](this['ctx']['TRIANGLE_FAN'],0x0,0x4),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],null),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),_0x4e01e5;}},{'key':'SR_DrawImage','value':function value(_0x481af9,_0x36dd61,_0x17545a,_0x199c34,_0x339d2a,_0x340b23){if(null==this['ctx'])return _0x39e372;if(null==_0x481af9||_0x36dd61<=0x0||_0x17545a<=0x0||null==_0x199c34||_0x340b23<0x0||_0x340b23>0x1)return _0x554921;if(this['nDrawImageWidth']=_0x36dd61,this['nDrawImageHeight']=_0x17545a,0x0==this['glImagePosBuffer']&&(this['glImagePosBuffer']=this['ctx']['createBuffer'](),0x0==this['glImagePosBuffer']))return _0x39309a;if(0x0==this['glImageClrBuffer']&&(this['glImageClrBuffer']=this['ctx']['createBuffer'](),0x0==this['glImageClrBuffer']))return _0x39309a;if(null==this['pImageClrVertices']){if(this['pImageClrVertices']=new Float32Array(0xc),null==this['pImageClrVertices'])return _0x4887c6;this['pImageClrVertices'][0x0]=0x0,this['pImageClrVertices'][0x1]=0x0,this['pImageClrVertices'][0x2]=0x0,this['pImageClrVertices'][0x3]=0x1,this['pImageClrVertices'][0x4]=0x1,this['pImageClrVertices'][0x5]=0x0,this['pImageClrVertices'][0x6]=0x1,this['pImageClrVertices'][0x7]=0x0,this['pImageClrVertices'][0x8]=0x0,this['pImageClrVertices'][0x9]=0x1,this['pImageClrVertices'][0xa]=0x1,this['pImageClrVertices'][0xb]=0x1;}var _0x23b4aa={},_0x5a22e9={};if(_0x23b4aa['fLeft']=(_0x199c34['fLeft']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x23b4aa['fRight']=(_0x199c34['fRight']-this['fSrcUseLeft'])/(this['fSrcUseRight']-this['fSrcUseLeft']),_0x23b4aa['fTop']=(_0x199c34['fTop']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x23b4aa['fBottom']=(_0x199c34['fBottom']-this['fSrcUseTop'])/(this['fSrcUseBottom']-this['fSrcUseTop']),_0x5a22e9['fLeft']=this['fDstUseLeft']+_0x23b4aa['fLeft']*(this['fDstUseRight']-this['fDstUseLeft']),_0x5a22e9['fRight']=this['fDstUseLeft']+_0x23b4aa['fRight']*(this['fDstUseRight']-this['fDstUseLeft']),_0x5a22e9['fTop']=this['fDstUseTop']+_0x23b4aa['fTop']*(this['fDstUseBottom']-this['fDstUseTop']),_0x5a22e9['fBottom']=this['fDstUseTop']+_0x23b4aa['fBottom']*(this['fDstUseBottom']-this['fDstUseTop']),null==this['pImagePosVertices']&&(this['pImagePosVertices']=new Float32Array(0xc),null==this['pImagePosVertices']))return _0x4887c6;switch(this['pImagePosVertices']['fill'](0x0),this['pImagePosVertices'][0x0]=0x2*_0x5a22e9['fLeft']-0x1,this['pImagePosVertices'][0x1]=0x1-0x2*_0x5a22e9['fTop'],this['pImagePosVertices'][0x2]=0x2*_0x5a22e9['fLeft']-0x1,this['pImagePosVertices'][0x3]=0x1-0x2*_0x5a22e9['fBottom'],this['pImagePosVertices'][0x4]=0x2*_0x5a22e9['fRight']-0x1,this['pImagePosVertices'][0x5]=0x1-0x2*_0x5a22e9['fTop'],this['pImagePosVertices'][0x6]=0x2*_0x5a22e9['fRight']-0x1,this['pImagePosVertices'][0x7]=0x1-0x2*_0x5a22e9['fTop'],this['pImagePosVertices'][0x8]=0x2*_0x5a22e9['fLeft']-0x1,this['pImagePosVertices'][0x9]=0x1-0x2*_0x5a22e9['fBottom'],this['pImagePosVertices'][0xa]=0x2*_0x5a22e9['fRight']-0x1,this['pImagePosVertices'][0xb]=0x1-0x2*_0x5a22e9['fBottom'],0x1==this['bIsCapturing']?this['ctx']['viewport'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight']):this['ctx']['viewport'](0x0,0x0,this['canvas']['width'],this['canvas']['height']),this['ctx']['enable'](this['ctx']['BLEND']),this['ctx']['blendFunc'](this['ctx']['SRC_ALPHA'],this['ctx']['ONE_MINUS_SRC_ALPHA']),_0x339d2a){case _0x48134e:if(null==this['nImageColorTexture']){if(this['nImageColorTexture']=this['ctx']['createTexture'](),0x0==this['nImageColorTexture'])return _0x39309a;this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['nDrawImageWidth'],this['nDrawImageHeight'],0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x481af9),0x0==this['nImageShaderProgram']){var _0x24abff=this['CompileProgram'](_0x50fc47,_0x294d0c);if(_0x24abff<=0x0)return _0x39309a;this['nImageShaderProgram']=_0x24abff;}break;case _0x54cd9d:if(null==this['nImageColorTexture']){if(this['nImageColorTexture']=this['ctx']['createTexture'](),0x0==this['nImageColorTexture'])return _0x39309a;this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGB'],this['nDrawImageWidth'],this['nDrawImageHeight'],0x0,this['ctx']['RGB'],this['ctx']['UNSIGNED_SHORT_5_6_5'],_0x481af9),0x0==this['nImageShaderProgram']){var _0x46d092=this['CompileProgram'](_0x50fc47,'\x0a\x20\x20\x20\x20precision\x20mediump\x20float;\x20\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x20\x0a\x20\x20\x20\x20varying\x20lowp\x20vec4\x20pp;\x0a\x20\x20\x20\x20uniform\x20float\x20fAlpha;\x0a\x20\x20\x20\x20void\x20main(void)\x20\x0a\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(texture,\x20pp.st);\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor.a\x20*=\x20fAlpha;\x20\x0a\x20\x20\x20\x20}\x20\x0a');if(_0x46d092<=0x0)return _0x39309a;this['nImageShaderProgram']=_0x46d092;}break;case _0x23c6a3:for(var _0x265cf5=0x0;_0x265cf5<0x3;_0x265cf5++){if(this['nImageColorTextures'][_0x265cf5]=this['ctx']['createTexture'](),0x0==this['nImageColorTextures'][_0x265cf5])return _0x39309a;this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTextures'][_0x265cf5]),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTextures'][0x0]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],this['nDrawImageWidth'],this['nDrawImageHeight'],0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x481af9),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTextures'][0x1]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],this['nDrawImageWidth']/0x2,this['nDrawImageHeight']/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x481af9+this['nDrawImageWidth']*this['nDrawImageHeight']*0x5/0x4),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTextures'][0x2]),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['LUMINANCE'],this['nDrawImageWidth']/0x2,this['nDrawImageHeight']/0x2,0x0,this['ctx']['LUMINANCE'],this['ctx']['UNSIGNED_BYTE'],_0x481af9+this['nDrawImageWidth']*this['nDrawImageHeight']),0x0==this['nImageShaderProgram']){var _0x23199b=this['CompileProgram'](_0x50fc47,'\x0a\x20\x20\x20\x20precision\x20mediump\x20float;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20Ytexture;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20Utexture;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20Vtexture;\x0a\x20\x20\x20\x20uniform\x20float\x20fAlpha;\x0a\x20\x20\x20\x20varying\x20lowp\x20vec4\x20pp;\x0a\x0a\x20\x20\x20\x20void\x20main(void)\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20r,\x20g,\x20b,\x20y,\x20u,\x20v;\x20\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20y\x20=\x20texture2D(Ytexture,\x20pp.st).r;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20u\x20=\x20texture2D(Utexture,\x20pp.st).r;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20v\x20=\x20texture2D(Vtexture,\x20pp.st).r;\x20\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20y\x20=\x201.1643\x20*\x20(y\x20-\x200.0625);\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20u\x20=\x20u\x20-\x200.5;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20v\x20=\x20v\x20-\x200.5;\x20\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x20y\x20+\x201.5958\x20*\x20v;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x20y\x20-\x200.39173\x20*\x20u\x20-\x200.81290\x20*\x20v;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x20y\x20+\x202.017\x20*\x20u;\x20\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r,\x20g,\x20b,\x20fAlpha);\x20\x0a\x20\x20\x20\x20}\x0a');if(_0x23199b<=0x0)return _0x39309a;this['nImageShaderProgram']=_0x23199b;}break;case _0x3a627d:if(null==this['nImageColorTexture']){if(this['nImageColorTexture']=this['ctx']['createTexture'](),0x0==this['nImageColorTexture'])return _0x39309a;this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']);}this['ctx']['useProgram'](this['videoShaderProgram']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0xdfca77=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'xy');if(_0xdfca77<0x0)return _0x39309a;this['ctx']['vertexAttribPointer'](_0xdfca77,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0xdfca77),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x4a9415=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'uv');if(_0x4a9415<0x0)return _0x39309a;if(this['ctx']['vertexAttribPointer'](_0x4a9415,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x4a9415),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['useProgram'](null),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['nDrawImageWidth'],this['nDrawImageHeight'],0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x481af9),0x0==this['nImageShaderProgram']){var _0x32b49c=this['CompileProgram'](_0x50fc47,_0x294d0c);if(_0x32b49c<=0x0)return _0x39309a;this['nImageShaderProgram']=_0x32b49c;}}var _0x418191=this['nImageShaderProgram'];this['ctx']['useProgram'](_0x418191);var _0x25cd1a=this['ctx']['getUniformLocation'](this['nImageShaderProgram'],'bCapture');if(_0x25cd1a<=0x0)return _0x39309a;0x1==this['bIsCapturing']?this['ctx']['uniform1i'](_0x25cd1a,0x1):this['ctx']['uniform1i'](_0x25cd1a,0x0),this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nImageColorTexture']);var _0x5b57ca=this['ctx']['getUniformLocation'](this['nImageShaderProgram'],'texture');this['ctx']['uniform1i'](_0x5b57ca,0x0),_0x5b57ca=this['ctx']['getUniformLocation'](this['nImageShaderProgram'],'fAlpha'),this['ctx']['uniform1f'](_0x5b57ca,_0x340b23),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glImagePosBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pImagePosVertices'],this['ctx']['STATIC_DRAW']);var _0x1fcf97=this['ctx']['getAttribLocation'](this['nImageShaderProgram'],'position');this['ctx']['enableVertexAttribArray'](_0x1fcf97),this['ctx']['vertexAttribPointer'](_0x1fcf97,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['glImageClrBuffer']),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],this['pImageClrVertices'],this['ctx']['STATIC_DRAW']);var _0x5d8930=this['ctx']['getAttribLocation'](this['nImageShaderProgram'],'texCoord');return this['ctx']['enableVertexAttribArray'](_0x5d8930),this['ctx']['vertexAttribPointer'](_0x5d8930,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,0x6),this['ctx']['useProgram'](null),this['ctx']['disable'](this['ctx']['BLEND']),_0x4e01e5;}},{'key':'SR_AddSubPort','value':function value(_0x94e4fc){var _0x564ccb,_0x256a9f,_0x330ced=_0x108024;if(null==this['ctx'])return _0x330ced;if(null!=this['pFishParamManager']?_0x330ced=this['pFishParamManager']['GetFECPort'](_0x94e4fc):_0x94e4fc==_0x58af5b['SR_DE_NULL']&&(_0x330ced=0x0),_0x330ced==_0x108024)return _0x108024;switch(this['nFECPort']=_0x330ced,_0x94e4fc){case _0x58af5b['SR_DE_NULL']:_0x564ccb=_0x2f09aa,this['enPixelFormat']==_0x3a627d?_0x256a9f='\x0aprecision\x20mediump\x20float;\x0avarying\x20highp\x20vec2\x20v_uv;\x0auniform\x20sampler2D\x20texture;\x0auniform\x20float\x20fWndWidth;\x0auniform\x20float\x20fWndHeight;\x0auniform\x20float\x20fBrightness;\x0auniform\x20float\x20fHue;\x0auniform\x20float\x20fSaturation;\x0auniform\x20float\x20fContrast;\x0auniform\x20float\x20fSharpness;\x0auniform\x20int\x20nPostProc;\x0avec3\x20rgb2hsv(vec3\x20c)\x20\x0a{\x20\x0a\x20\x20\x20\x20vec4\x20K\x20=\x20vec4(0.0,\x20-1.0\x20/\x203.0,\x202.0\x20/\x203.0,\x20-1.0);\x20\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20c.g\x20<\x20c.b\x20?\x20vec4(c.bg,\x20K.wz)\x20:\x20vec4(c.gb,\x20K.xy);\x20\x0a\x20\x20\x20\x20vec4\x20q\x20=\x20c.r\x20<\x20p.x\x20?\x20vec4(p.xyw,\x20c.r)\x20:\x20vec4(c.r,\x20p.yzx);\x20\x0a\x20\x20\x20\x20float\x20d\x20=\x20q.x\x20-\x20min(q.w,\x20q.y);\x20\x0a\x20\x20\x20\x20float\x20e\x20=\x201.0e-10;\x20\x0a\x20\x20\x20\x20return\x20vec3(abs(q.z\x20+\x20(q.w\x20-\x20q.y)\x20/\x20(6.0\x20*\x20d\x20+\x20e)),\x20d\x20/\x20(q.x\x20+\x20e),\x20q.x);\x20\x0a}\x20\x0avec3\x20hsv2rgb(vec3\x20c)\x20\x0a{\x20\x0a\x20\x20\x20\x20vec4\x20K\x20=\x20vec4(1.0,\x202.0\x20/\x203.0,\x201.0\x20/\x203.0,\x203.0);\x20\x0a\x20\x20\x20\x20vec3\x20p\x20=\x20abs(fract(c.xxx\x20+\x20K.xyz)\x20*\x206.0\x20-\x20K.www);\x20\x0a\x20\x20\x20\x20return\x20c.z\x20*\x20mix(K.xxx,\x20clamp(p\x20-\x20K.xxx,\x200.0,\x201.0),\x20c.y);\x20\x0a}\x20\x0avec3\x20sharpen()\x20\x0a{\x20\x0a\x20\x20\x20\x20vec3\x20sharpenColor;\x20\x0a\x20\x20\x20\x20float\x20offWidth\x20=\x201.0\x20/\x20fWndWidth;\x20\x0a\x20\x20\x20\x20float\x20offHeight\x20=\x201.0\x20/\x20fWndHeight;\x20\x0a\x20\x20\x20\x20float\x20tempSharpness\x20=\x20fSharpness\x20*\x20100.0;\x20\x0a\x20\x20\x20\x20vec2\x20uv\x20\x20\x20\x20\x20=\x20v_uv;\x20\x0a\x20\x20\x20\x20sharpenColor\x20\x20=\x20(1.0\x20+\x204.0\x20*\x20tempSharpness)\x20*\x20texture2D(texture,\x20uv).rgb;\x20\x0a\x0a\x20\x20\x20\x20uv\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(offWidth,\x200);\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20texture2D(texture,\x20uv).rgb;\x20\x0a\x0a\x20\x20\x20\x20uv\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(-offWidth,\x200);\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20texture2D(texture,\x20uv).rgb;\x20\x0a\x0a\x20\x20\x20\x20uv\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(0,\x20offHeight);\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20texture2D(texture,\x20uv).rgb;\x20\x0a\x0a\x20\x20\x20\x20uv\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(0,\x20-offHeight);\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20texture2D(texture,\x20uv).rgb;\x20\x0a\x0a\x20\x20\x20\x20return\x20sharpenColor;\x20\x0a}\x20\x0avoid\x20main(void)\x20\x0a{\x0a\x20\x20\x20\x20if(1\x20==\x20nPostProc)\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20fragRGB\x20=\x20sharpen();\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//sharpen\x20锐度\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20fragHSV\x20=\x20rgb2hsv(fragRGB);\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragHSV.x\x20=\x20fragHSV.x\x20+\x20fHue;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//hue\x20色度\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragHSV.y\x20=\x20fragHSV.y\x20*\x20(fSaturation\x20+\x201.0);\x20\x20\x20\x20//saturation\x20饱和度\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20hsv2rgb(fragHSV);\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fBrightness\x20>\x200.0)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//brightness\x20亮度\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20fragRGB\x20+\x20(1.0\x20-\x20fragRGB)\x20*\x20fBrightness;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20else\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20fragRGB\x20+\x20fragRGB\x20*\x20fBrightness;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20tempContrast\x20=\x20fContrast\x20>\x200.0\x20?\x20fContrast\x20*\x2010.0\x20:\x20fContrast;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20((fragRGB\x20-\x200.5)\x20*\x20max(tempContrast\x20+\x201.0,\x200.0))\x20+\x200.5;\x20\x20\x20\x20\x20\x20//contrast\x20对比度\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(fragRGB,\x201.0);\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20else\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(texture,\x20v_uv);\x0a\x20\x20\x20\x20}\x0a}\x0a':this['enPixelFormat']!=_0x23c6a3&&this['enPixelFormat']!=_0x4add73||(_0x256a9f='\x0aprecision\x20mediump\x20float;\x0avarying\x20highp\x20vec2\x20v_uv;\x0auniform\x20sampler2D\x20Ytexture;\x0auniform\x20sampler2D\x20Utexture;\x0auniform\x20sampler2D\x20Vtexture;\x0auniform\x20float\x20fWndWidth;\x0auniform\x20float\x20fWndHeight;\x0auniform\x20float\x20fBrightness;\x0auniform\x20float\x20fHue;\x0auniform\x20float\x20fSaturation;\x0auniform\x20float\x20fContrast;\x0auniform\x20float\x20fSharpness;\x0auniform\x20int\x20nPostProc;\x0avec3\x20rgb;\x0avec3\x20yuv2rgb(float\x20y,\x20float\x20u,\x20float\x20v)\x0a{\x0a\x20\x20\x20\x20float\x20r,g,b;\x20\x0a\x20\x20\x20\x20y\x20=\x201.1643\x20*\x20(y\x20-\x200.0625);\x20\x0a\x20\x20\x20\x20u\x20=\x20u\x20-\x200.5;\x20\x0a\x20\x20\x20\x20v\x20=\x20v\x20-\x200.5;\x20\x0a\x20\x20\x20\x20r\x20=\x20y\x20+\x201.5958\x20*\x20v;\x20\x0a\x20\x20\x20\x20g\x20=\x20y\x20-\x200.39173\x20*\x20u\x20-\x200.81290\x20*\x20v;\x20\x0a\x20\x20\x20\x20b\x20=\x20y\x20+\x202.017\x20*\x20u;\x20\x0a\x20\x20\x20\x20return\x20vec3(r,\x20g,\x20b);\x0a}\x0avec3\x20rgb2hsv(vec3\x20c)\x20\x0a{\x20\x0a\x20\x20\x20\x20vec4\x20K\x20=\x20vec4(0.0,\x20-1.0\x20/\x203.0,\x202.0\x20/\x203.0,\x20-1.0);\x20\x0a\x20\x20\x20\x20vec4\x20p\x20=\x20c.g\x20<\x20c.b\x20?\x20vec4(c.bg,\x20K.wz)\x20:\x20vec4(c.gb,\x20K.xy);\x20\x0a\x20\x20\x20\x20vec4\x20q\x20=\x20c.r\x20<\x20p.x\x20?\x20vec4(p.xyw,\x20c.r)\x20:\x20vec4(c.r,\x20p.yzx);\x20\x0a\x0a\x20\x20\x20\x20float\x20d\x20=\x20q.x\x20-\x20min(q.w,\x20q.y);\x20\x0a\x20\x20\x20\x20float\x20e\x20=\x201.0e-10;\x20\x0a\x20\x20\x20\x20return\x20vec3(abs(q.z\x20+\x20(q.w\x20-\x20q.y)\x20/\x20(6.0\x20*\x20d\x20+\x20e)),\x20d\x20/\x20(q.x\x20+\x20e),\x20q.x);\x20\x0a}\x20\x0a\x0avec3\x20hsv2rgb(vec3\x20c)\x20\x0a{\x20\x0a\x20\x20\x20\x20vec4\x20K\x20=\x20vec4(1.0,\x202.0\x20/\x203.0,\x201.0\x20/\x203.0,\x203.0);\x20\x0a\x20\x20\x20\x20vec3\x20p\x20=\x20abs(fract(c.xxx\x20+\x20K.xyz)\x20*\x206.0\x20-\x20K.www);\x20\x0a\x20\x20\x20\x20return\x20c.z\x20*\x20mix(K.xxx,\x20clamp(p\x20-\x20K.xxx,\x200.0,\x201.0),\x20c.y);\x20\x0a}\x20\x0a\x0avec3\x20sharpen(vec3\x20c)\x20\x0a{\x20\x0a\x20\x20\x20\x20vec3\x20sharpenColor;\x20\x0a\x20\x20\x20\x20float\x20sharpenColorY;\x0a\x20\x20\x20\x20float\x20sharpenColorU;\x0a\x20\x20\x20\x20float\x20sharpenColorV;\x0a\x20\x20\x20\x20float\x20offWidth\x20\x20=\x201.0\x20/\x20fWndWidth;\x20\x0a\x20\x20\x20\x20float\x20offHeight\x20=\x201.0\x20/\x20fWndHeight;\x20\x0a\x20\x20\x20\x20float\x20tempSharpness\x20=\x20fSharpness\x20*\x20100.0;\x20\x0a\x0a\x20\x20\x20\x20sharpenColor\x20=\x20(1.0\x20+\x204.0\x20*\x20tempSharpness)\x20*\x20c;\x0a\x0a\x20\x20\x20\x20vec2\x20uv\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(offWidth,\x200);\x20\x0a\x20\x20\x20\x20sharpenColorY\x20=\x20texture2D(Ytexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColorU\x20=\x20texture2D(Utexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColorV\x20=\x20texture2D(Vtexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20\x20yuv2rgb(sharpenColorY,\x20sharpenColorU,\x20sharpenColorV);\x0a\x0a\x20\x20\x20\x20uv\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(-offWidth,\x200);\x20\x0a\x20\x20\x20\x20sharpenColorY\x20=\x20texture2D(Ytexture,\x20uv).r;\x0a\x20\x20\x20\x20sharpenColorU\x20=\x20texture2D(Utexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColorV\x20=\x20texture2D(Vtexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20\x20yuv2rgb(sharpenColorY,\x20sharpenColorU,\x20sharpenColorV);\x0a\x0a\x20\x20\x20\x20uv\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(0,\x20offHeight);\x0a\x20\x20\x20\x20sharpenColorY\x20=\x20texture2D(Ytexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColorU\x20=\x20texture2D(Utexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColorV\x20=\x20texture2D(Vtexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20yuv2rgb(sharpenColorY,\x20sharpenColorU,\x20sharpenColorV);\x0a\x0a\x20\x20\x20\x20uv\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20=\x20v_uv\x20+\x20vec2(0,\x20-offHeight);\x20\x0a\x20\x20\x20\x20sharpenColorY\x20=\x20texture2D(Ytexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColorU\x20=\x20texture2D(Utexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColorV\x20=\x20texture2D(Vtexture,\x20uv).r;\x20\x0a\x20\x20\x20\x20sharpenColor\x20-=\x20tempSharpness\x20*\x20\x20yuv2rgb(sharpenColorY,\x20sharpenColorU,\x20sharpenColorV);\x0a\x0a\x20\x20\x20\x20return\x20sharpenColor;\x20\x0a}\x20\x0avoid\x20main(void)\x0a{\x0a\x20\x20\x20\x20float\x20y,\x20u,\x20v;\x0a\x20\x20\x20\x20y\x20=\x20texture2D(Ytexture,\x20v_uv).r;\x0a\x20\x20\x20\x20u\x20=\x20texture2D(Utexture,\x20v_uv).r;\x0a\x20\x20\x20\x20v\x20=\x20texture2D(Vtexture,\x20v_uv).r;\x0a\x20\x20\x20\x20rgb\x20=\x20yuv2rgb(y,\x20u,\x20v);\x0a\x20\x20\x20\x20if(1\x20==\x20nPostProc)\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20fragRGB\x20=\x20sharpen(rgb);\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//sharpen\x20锐度\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec3\x20fragHSV\x20=\x20rgb2hsv(fragRGB);\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragHSV.x\x20=\x20fragHSV.x\x20+\x20fHue;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//hue\x20色度\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragHSV.y\x20=\x20fragHSV.y\x20*\x20(fSaturation\x20+\x201.0);\x20\x20\x20\x20//saturation\x20饱和度\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20hsv2rgb(fragHSV);\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(fBrightness\x20>\x200.0)\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20//brightness\x20亮度\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20fragRGB\x20+\x20(1.0\x20-\x20fragRGB)\x20*\x20fBrightness;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20else\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20fragRGB\x20+\x20fragRGB\x20*\x20fBrightness;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x20\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20tempContrast\x20=\x20fContrast\x20>\x200.0\x20?\x20fContrast\x20*\x2010.0\x20:\x20fContrast;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20fragRGB\x20=\x20((fragRGB\x20-\x200.5)\x20*\x20max(tempContrast\x20+\x201.0,\x200.0))\x20+\x200.5;\x20\x20\x20\x20\x20\x20//contrast\x20对比度\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(fragRGB,\x201.0);\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20else\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(rgb,\x201.0);\x0a\x20\x20\x20\x20}\x0a}\x0a'),this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_ORIGINAL']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0aprecision\x20mediump\x20float;\x0avarying\x20vec2\x20v_uv;\x0auniform\x20sampler2D\x20texture;\x0auniform\x20float\x20fRX1;\x0auniform\x20float\x20fRX2;\x0auniform\x20float\x20fRY1;\x0auniform\x20float\x20fRY2;\x0auniform\x20int\x20bBlack;\x20\x0auniform\x20int\x20bCut;\x0a\x0avoid\x20main()\x0a{\x20\x0a\x09float\x20r,g,b;\x0a\x09vec4\x20origin;\x0a\x0a\x09float\x20\x20w;\x0a\x09float\x20\x20h;\x0a\x09float\x20\x20fCenterX;\x0a\x09float\x20\x20fCenterY;\x0a\x09float\x20\x20fRadius;\x0a\x09w\x20=\x201.0;\x0a\x09h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x09fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<圆心实际坐标\x0a\x09fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x09fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<半径实际长度\x0a\x09float\x20\x20leftCut\x20=\x200.0;\x0a\x09float\x20\x20rightCut\x20=\x201.0;\x0a\x09float\x20\x20topCut\x20=\x200.0;\x0a\x09float\x20\x20bottomCut\x20=\x201.0;\x0a\x09if(bCut\x20==\x201)\x0a\x09{\x0a\x09\x09if(fRX1\x20>\x200.0)\x0a\x09\x09{\x0a\x09\x09\x09leftCut\x20=\x20fRX1;\x0a\x09\x09}\x0a\x09\x09if(fRX2\x20<\x201.0)\x0a\x09\x09{\x0a\x09\x09\x09rightCut\x20=\x20fRX2;\x0a\x09\x09}\x0a\x09\x09if(fRY1\x20>\x200.0)\x0a\x09\x09{\x0a\x09\x09\x09topCut\x20=\x20fRY1;\x0a\x09\x09}\x0a\x09\x09if(fRY2\x20<\x201.0)\x0a\x09\x09{\x0a\x09\x09\x09bottomCut\x20=\x20fRY2;\x0a\x09\x09}\x0a\x09}\x0a\x09origin.s\x20=\x20v_uv.s\x20*\x20(rightCut-leftCut)\x20+\x20leftCut;\x0a\x09origin.t\x20=\x20v_uv.t\x20*\x20(bottomCut-topCut)\x20+\x20topCut;\x0a\x0a\x09r\x20=\x20texture2D(texture,\x20origin.st).r;\x20\x0a\x09g\x20=\x20texture2D(texture,\x20origin.st).g;\x20\x0a\x09b\x20=\x20texture2D(texture,\x20origin.st).b;\x20\x0a\x0a\x09if(bBlack\x20==\x201)\x0a\x09{\x0a\x09\x09float\x20tmpX,\x20tmpY;\x0a\x09\x09tmpX\x20=\x20origin.s\x20*\x20w;\x20\x0a\x09\x09tmpY\x20=\x20origin.t\x20*\x20h;\x20\x0a\x09\x09float\x20d2\x20=\x20(tmpX-fCenterX)*(tmpX-fCenterX)\x20+\x20(tmpY-fCenterY)*(tmpY-fCenterY);\x0a\x09\x09if(d2\x20>\x20fRadius*fRadius)\x0a\x09\x09{\x0a\x09\x09\x09r\x20=\x200.0;\x20\x0a\x09\x09\x09g\x20=\x200.0;\x20\x0a\x09\x09\x09b\x20=\x200.0;\x20\x0a\x09\x09}\x0a\x09}\x0a\x0a\x09gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a}\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PTZ_CEILING']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0aprecision\x20mediump\x20float;\x0avarying\x20vec2\x20v_uv;\x0auniform\x20sampler2D\x20texture;\x0auniform\x20float\x20fHAngleCos;\x0auniform\x20float\x20fHAngleSin;\x0auniform\x20float\x20fVAngleCos;\x0auniform\x20float\x20fVAngleSin;\x0auniform\x20float\x20fZoom;\x0a\x0auniform\x20float\x20fRX1;\x20\x0auniform\x20float\x20fRX2;\x20\x0auniform\x20float\x20fRY1;\x20\x0auniform\x20float\x20fRY2;\x20\x0a\x0avoid\x20main()\x0a{\x0a\x20\x20\x20\x20float\x20r,g,b;\x20\x20\x0a\x0a\x20\x20\x20\x20vec4\x20origin1;\x0a\x20\x20\x20\x20vec4\x20origin2;\x0a\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20float\x20\x20z1;\x0a\x20\x20\x20\x20float\x20\x20z2;\x0a\x20\x20\x20\x20float\x20\x20dnew;\x0a\x0a\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x0a\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x0a\x0a\x20\x20\x20\x20origin1.s\x20=\x20v_uv.s\x20-\x200.5;\x0a\x20\x20\x20\x20origin1.t\x20=\x200.5\x20-\x20v_uv.t;\x0a\x20\x20\x20\x20z1\x20=\x20fZoom\x20;\x0a\x0a\x20\x20\x20\x20origin2.s\x20=\x20origin1.s\x20;\x0a\x20\x20\x20\x20origin2.t\x20=\x20(origin1.t*fVAngleCos\x20+\x20z1*fVAngleSin);\x0a\x20\x20\x20\x20z2\x20=\x20z1*fVAngleCos\x20-\x20origin1.t*fVAngleSin;\x0a\x0a\x20\x20\x20\x20dnew\x20=\x20sqrt(origin2.s*origin2.s\x20+\x20origin2.t*origin2.t)\x20;\x0a\x20\x20\x20\x20float\x20d\x20=\x20sqrt(origin2.s*origin2.s\x20+\x20origin2.t*origin2.t\x20+\x20z2*z2);\x0a\x20\x20\x20\x20float\x20theta\x20=\x20asin(dnew/d);\x0a\x20\x20\x20\x20float\x20tmp\x20=\x20theta\x20/\x201.5707963\x20*\x200.5;\x0a\x20\x20\x20\x20origin2.s\x20=\x20tmp*origin2.s\x20/\x20dnew\x20;\x0a\x20\x20\x20\x20origin2.t\x20=\x20tmp*origin2.t\x20/\x20dnew\x20;\x0a\x0a\x20\x20\x20\x20result.s\x20=\x20((origin2.s*fHAngleCos\x20-\x20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\x0a\x20\x20\x20\x20result.t\x20=\x20(-(origin2.s*fHAngleSin\x20+\x20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\x0a\x0a\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x20\x0a\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x20\x0a\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x20\x0a\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a}\x20\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PTZ_FLOOR']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0aprecision\x20mediump\x20float;\x0avarying\x20vec2\x20v_uv;\x0auniform\x20sampler2D\x20texture;\x20\x20\x0auniform\x20float\x20fHAngleCos;\x20\x20\x0auniform\x20float\x20fHAngleSin;\x20\x0auniform\x20float\x20fVAngleCos;\x20\x20\x0auniform\x20float\x20fVAngleSin;\x20\x20\x0auniform\x20float\x20fZoom;\x0a\x0auniform\x20float\x20fRX1;\x20\x0auniform\x20float\x20fRX2;\x20\x0auniform\x20float\x20fRY1;\x20\x0auniform\x20float\x20fRY2;\x20\x0a\x0avoid\x20main()\x0a{\x0a\x20\x20\x20\x20float\x20r,g,b;\x0a\x0a\x20\x20\x20\x20vec4\x20origin1;\x0a\x20\x20\x20\x20vec4\x20origin2;\x0a\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20float\x20\x20z1;\x0a\x20\x20\x20\x20float\x20\x20z2;\x0a\x20\x20\x20\x20float\x20\x20dnew;\x0a\x0a\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<Բ��ʵ������\x0a\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<�뾶ʵ�ʳ���\x0a\x20\x20\x20\x20origin1.s\x20=\x20v_uv.s\x20-\x200.5;\x0a\x20\x20\x20\x20origin1.t\x20=\x20v_uv.t\x20-\x200.5;\x0a\x20\x20\x20\x20z1\x20=\x20fZoom\x20;\x0a\x0a\x20\x20\x20\x20origin2.s\x20=\x20origin1.s\x20;\x0a\x20\x20\x20\x20origin2.t\x20=\x20(origin1.t*fVAngleCos\x20+\x20z1*fVAngleSin);\x0a\x20\x20\x20\x20z2\x20=\x20z1*fVAngleCos\x20-\x20origin1.t*fVAngleSin;\x0a\x0a\x20\x20\x20\x20dnew\x20=\x20sqrt(origin2.s*origin2.s\x20+\x20origin2.t*origin2.t)\x20;\x0a\x20\x20\x20\x20float\x20d\x20=\x20sqrt(origin2.s*origin2.s\x20+\x20origin2.t*origin2.t\x20+\x20z2*z2);\x0a\x20\x20\x20\x20float\x20theta\x20=\x20asin(dnew/d);\x0a\x20\x20\x20\x20float\x20tmp\x20=\x20theta\x20/\x201.5707963\x20*\x200.5;\x0a\x20\x20\x20\x20origin2.s\x20=\x20tmp*origin2.s\x20/\x20dnew\x20;\x0a\x20\x20\x20\x20origin2.t\x20=\x20tmp*origin2.t\x20/\x20dnew\x20;\x0a\x0a\x20\x20\x20\x20result.s\x20=\x20((origin2.s*fHAngleCos\x20-\x20origin2.t*fHAngleSin)*fRadius*2.0+fCenterX)/w;\x0a\x20\x20\x20\x20result.t\x20=\x20((origin2.s*fHAngleSin\x20+\x20origin2.t*fHAngleCos)*fRadius*2.0+fCenterY)/h;\x0a\x0a\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x20\x0a\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x20\x0a\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x20\x0a\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a}\x20\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PTZ_WALL']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0aprecision\x20mediump\x20float;\x0avarying\x20vec2\x20v_uv;\x0auniform\x20sampler2D\x20texture;\x0auniform\x20float\x20fHAngleCos;\x0auniform\x20float\x20fHAngleSin;\x20\x20\x0auniform\x20float\x20fVAngleCos;\x20\x20\x0auniform\x20float\x20fVAngleSin;\x20\x20\x0auniform\x20float\x20fZoom;\x0a\x0auniform\x20float\x20fRX1;\x20\x0auniform\x20float\x20fRX2;\x20\x0auniform\x20float\x20fRY1;\x20\x0auniform\x20float\x20fRY2;\x20\x0a\x0avoid\x20main()\x0a{\x0a\x20\x20\x20\x20float\x20r,g,b;\x20\x20\x0a\x0a\x20\x20\x20\x20vec4\x20origin1;\x0a\x20\x20\x20\x20vec4\x20origin2;\x0a\x20\x20\x20\x20vec4\x20origin3;\x0a\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20float\x20\x20z1;\x0a\x20\x20\x20\x20float\x20\x20z2;\x0a\x20\x20\x20\x20float\x20\x20z3;\x0a\x20\x20\x20\x20float\x20\x20dnew;\x0a\x0a\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<Բ��ʵ������\x0a\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<�뾶ʵ�ʳ���\x0a\x0a\x20\x20\x20\x20origin1.s\x20=\x20v_uv.s\x20-\x200.5;\x0a\x20\x20\x20\x20origin1.t\x20=\x20v_uv.t\x20-\x200.5;\x0a\x20\x20\x20\x20z1\x20=\x20fZoom\x20;\x0a\x0a\x20\x20\x20\x20origin2.s\x20=\x20origin1.s\x20;\x0a\x20\x20\x20\x20origin2.t\x20=\x20(origin1.t*fVAngleCos\x20+\x20z1*fVAngleSin);\x0a\x20\x20\x20\x20z2\x20=\x20z1*fVAngleCos\x20-\x20origin1.t*fVAngleSin;\x0a\x0a\x20\x20\x20\x20origin3.s\x20=\x20origin2.s*fHAngleCos\x20+\x20z2*fHAngleSin\x20;\x0a\x20\x20\x20\x20origin3.t\x20=\x20origin2.y;\x0a\x20\x20\x20\x20z3\x20=\x20z2*fHAngleCos\x20-\x20origin2.x*fHAngleSin;\x0a\x0a\x20\x20\x20\x20dnew\x20=\x20sqrt(origin3.s*origin3.s\x20+\x20origin3.t*origin3.t)\x20;\x0a\x20\x20\x20\x20float\x20d\x20=\x20sqrt(origin3.s*origin3.s\x20+\x20origin3.t*origin3.t\x20+\x20z3*z3);\x0a\x20\x20\x20\x20float\x20theta\x20=\x20asin(dnew/d);\x0a\x20\x20\x20\x20float\x20tmp\x20=\x20theta\x20/\x201.5707963\x20*\x200.5;\x0a\x20\x20\x20\x20result.s\x20=\x20(tmp*origin3.s\x20/\x20dnew\x20*\x20fRadius\x20*\x202.0\x20+\x20fCenterX)/w;\x0a\x20\x20\x20\x20result.t\x20=\x20(tmp*origin3.t\x20/\x20dnew\x20*\x20fRadius\x20*\x202.0\x20+\x20fCenterY)/h;\x0a\x0a\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x20\x0a\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x20\x0a\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x20\x0a\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x20\x0a\x20\x20\x20\x20}\x0a\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a}\x20\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0a\x20\x20\x20\x20precision\x20highp\x20float;\x0a\x20\x20\x20\x20varying\x20vec2\x20v_uv;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x20\x20\x20\x20uniform\x20float\x20fAngle;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX1;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX2;\x0a\x20\x20\x20\x20uniform\x20float\x20fRY1;\x0a\x20\x20\x20\x20uniform\x20float\x20fRY2;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20r,g,b;\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20origin;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20thetabase;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20d;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<圆心实际坐标\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<半径实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20fMax\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0\x20||\x20fRY2\x20>\x201.0\x20||\x20fRX1\x20<\x200.0\x20||\x20fRY1\x20<\x200.0)\x20///<如果不是一个完整的圆\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRX1\x20*\x20w;\x20///<左边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRX2\x20-\x201.0)\x20*\x20w;\x20///<右边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRY1\x20*\x20h;\x20///<上边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRY2\x20-\x201.0)\x20*\x20h;\x20///<下边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20topCut\x20=\x20fMax\x20/\x20fRadius;\x20\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20bottomCut\x20=\x200.8;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20///<为矫正效果,最终矫正图固定切掉下面一部分\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.s\x20=\x20v_uv.s;\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.t\x20=\x20(bottomCut\x20-\x20topCut)\x20*\x20v_uv.t\x20+\x20topCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20thetabase\x20=\x206.2831853\x20*\x20origin.s\x20+\x20fAngle;\x0a\x20\x20\x20\x20\x20\x20\x20\x20d\x20=\x20fRadius\x20*\x20(1.0\x20-\x20origin.t);\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.s\x20=\x20(fCenterX\x20-\x20d*sin(thetabase))\x20/\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.t\x20=\x20(fCenterY\x20+\x20d*cos(thetabase))\x20/\x20h;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r,\x20g,\x20b,\x201.0);\x0a\x20\x20\x20\x20}\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0a\x20\x20\x20\x20precision\x20highp\x20float;\x0a\x20\x20\x20\x20varying\x20vec2\x20v_uv;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x20\x20\x20\x20uniform\x20float\x20fAngle;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX1;\x20\x0a\x20\x20\x20\x20uniform\x20float\x20fRX2;\x20\x0a\x20\x20\x20\x20uniform\x20float\x20fRY1;\x20\x0a\x20\x20\x20\x20uniform\x20float\x20fRY2;\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20r,g,b;\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20origin;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20thetabase;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20d;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20newpp;\x20\x20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(v_uv.t\x20\x20<=\x200.5)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.s\x20=\x20\x20v_uv.s\x20/\x202.0\x20+\x200.5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.t\x20=\x20\x20v_uv.t\x20*\x202.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20else\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.s\x20=\x20\x20v_uv.s\x20/\x202.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.t\x20=\x20\x20(v_uv.t\x20-\x200.5)\x20*\x202.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<圆心实际坐标\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<半径实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20fMax\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0\x20||\x20fRY2\x20>\x201.0\x20||\x20fRX1\x20<\x200.0\x20||\x20fRY1\x20<\x200.0)\x20///<如果不是一个完整的圆\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRX1\x20*\x20w;\x20///<左边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRX2\x20-\x201.0)\x20*\x20w;\x20///<右边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRY1\x20*\x20h;\x20///<上边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRY2\x20-\x201.0)\x20*\x20h;\x20///<下边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20topCut\x20=\x20fMax\x20/\x20fRadius;\x20\x20\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20bottomCut\x20=\x200.8;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20///<为矫正效果,最终矫正图固定切掉下面一部分\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.s\x20=\x20newpp.s;\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.t\x20=\x20(bottomCut\x20-\x20topCut)\x20*\x20newpp.t\x20+\x20topCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20thetabase\x20=\x206.2831853\x20*\x20origin.s\x20+\x20fAngle;\x0a\x20\x20\x20\x20\x20\x20\x20\x20d\x20=\x20fRadius\x20*\x20(1.0\x20-\x20origin.t);\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.s\x20=\x20(fCenterX\x20-\x20d*sin(thetabase))\x20/\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.t\x20=\x20(fCenterY\x20+\x20d*cos(thetabase))\x20/\x20h;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a\x20\x20\x20\x20}\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0a\x20\x20\x20\x20precision\x20highp\x20float;\x0a\x20\x20\x20\x20varying\x20vec2\x20v_uv;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x20\x20\x20\x20uniform\x20float\x20fAngle;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX1;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX2;\x0a\x20\x20\x20\x20uniform\x20float\x20fRY1;\x0a\x20\x20\x20\x20uniform\x20float\x20fRY2;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20r,g,b;\x20\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20origin;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20thetabase;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20d;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<圆心实际坐标\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<半径实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20fMax\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0\x20||\x20fRY2\x20>\x201.0\x20||\x20fRX1\x20<\x200.0\x20||\x20fRY1\x20<\x200.0)\x20///<如果不是一个完整的圆\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRX1\x20*\x20w;\x20///<左边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRX2\x20-\x201.0)\x20*\x20w;\x20///<右边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRY1\x20*\x20h;\x20///<上边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRY2\x20-\x201.0)\x20*\x20h;\x20///<下边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20topCut\x20=\x20fMax\x20/\x20fRadius;\x20\x20\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20bottomCut\x20=\x200.8;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20///<为矫正效果,最终矫正图固定切掉下面一部分\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.s\x20=\x201.0\x20-\x20v_uv.s;\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.t\x20=\x20(bottomCut\x20-\x20topCut)\x20*\x20(1.0\x20-\x20v_uv.t)\x20+\x20topCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20thetabase\x20=\x206.2831853\x20*\x20origin.s\x20+\x20fAngle;\x0a\x20\x20\x20\x20\x20\x20\x20\x20d\x20=\x20fRadius\x20*\x20(1.0\x20-\x20origin.t);\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.s\x20=\x20(fCenterX\x20-\x20d*sin(thetabase))\x20/\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.t\x20=\x20(fCenterY\x20+\x20d*cos(thetabase))\x20/\x20h;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a\x20\x20\x20\x20}\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0a\x20\x20\x20\x20precision\x20highp\x20float;\x0a\x20\x20\x20\x20varying\x20vec2\x20v_uv;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x20\x20\x20\x20uniform\x20float\x20fAngle;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX1;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX2;\x0a\x20\x20\x20\x20uniform\x20float\x20fRY1;\x0a\x20\x20\x20\x20uniform\x20float\x20fRY2;\x0a\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20r,g,b;\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20origin;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20thetabase;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20d;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20newpp;\x20\x20///<180矫正pp纹理坐标的点对应360矫正newpp纹理坐标对应的点\x0a\x20\x20\x20\x20\x20\x20\x20\x20if\x20(v_uv.t\x20\x20<=\x200.5)\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.s\x20=\x20\x20v_uv.s\x20/\x202.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.t\x20=\x20\x20v_uv.t\x20*\x202.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20else\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.s\x20=\x20\x20v_uv.s\x20/\x202.0\x20+\x200.5;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20newpp.t\x20=\x20\x20(v_uv.t\x20-\x200.5)\x20*\x202.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20///<圆心实际坐标\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<半径实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20fMax\x20=\x200.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0\x20||\x20fRY2\x20>\x201.0\x20||\x20fRX1\x20<\x200.0\x20||\x20fRY1\x20<\x200.0)\x20///<如果不是一个完整的圆\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRX1\x20*\x20w;\x20///<左边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRX2\x20-\x201.0)\x20*\x20w;\x20///<右边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRY1\x20*\x20h;\x20///<上边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(fRY2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRY2\x20-\x201.0)\x20*\x20h;\x20///<下边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20fMax)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20fMax\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20topCut\x20=\x20fMax\x20/\x20fRadius;\x20\x20\x20///<如果不是一个完整的圆,最终矫正图需要切掉上面无图像部分,否则无需切\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20bottomCut\x20=\x200.8;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20///<为矫正效果,最终矫正图固定切掉下面一部分\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.s\x20=\x201.0\x20-\x20newpp.s;\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.t\x20=\x20(bottomCut\x20-\x20topCut)\x20*\x20(1.0\x20-\x20newpp.t)\x20+\x20topCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20thetabase\x20=\x206.2831853\x20*\x20origin.s\x20+\x20fAngle;\x0a\x20\x20\x20\x20\x20\x20\x20\x20d\x20=\x20fRadius\x20*\x20(1.0\x20-\x20origin.t);\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.s\x20=\x20(fCenterX\x20-\x20d*sin(thetabase))\x20/\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.t\x20=\x20(fCenterY\x20+\x20d*cos(thetabase))\x20/\x20h;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a\x20\x20\x20\x20}\x20\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:_0x564ccb=_0x2f09aa,_0x256a9f='\x0a\x20\x20\x20\x20precision\x20highp\x20float;\x0a\x20\x20\x20\x20varying\x20vec2\x20v_uv;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX1;\x0a\x20\x20\x20\x20uniform\x20float\x20fRX2;\x0a\x20\x20\x20\x20uniform\x20float\x20fRY1;\x20\x0a\x20\x20\x20\x20uniform\x20float\x20fRY2;\x20\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20void\x20main()\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20r,g,b;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20origin;\x0a\x20\x20\x20\x20\x20\x20\x20\x20vec4\x20result;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20d;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterX;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fCenterY;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20fRadius;\x0a\x20\x20\x20\x20\x20\x20\x20\x20w\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20h\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x20(fRY2\x20-\x20fRY1);\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterX\x20=\x20(fRX1\x20+\x20fRX2)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<圆心实际坐标\x0a\x20\x20\x20\x20\x20\x20\x20\x20fCenterY\x20=\x20(fRY1\x20+\x20fRY2)\x20/\x202.0\x20*\x20h;\x0a\x20\x20\x20\x20\x20\x20\x20\x20fRadius\x20=\x20(fRX2\x20-\x20fRX1)\x20/\x202.0\x20*\x20w;\x20\x20\x20\x20\x20///<半径实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20defaultTopCut\x20=\x200.1;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20defaultBottomCut\x20=\x200.9;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20leftCut\x20=\x200.0;\x20\x20\x20\x20///<当图像中圆不完整时需要切掉无图像部分,即使图像完整,为了效果,也要切掉上下固定的一部分\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20rightCut\x20=\x201.0;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20topCut\x20=\x20defaultTopCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20\x20bottomCut\x20=\x20defaultBottomCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRX1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRX1\x20*\x20w;\x20///<左边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20tmp\x20/\x20(2.0*fRadius);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20leftCut\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRX2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRX2\x20-\x201.0)\x20*\x20w;\x20///<右边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20tmp\x20/\x20(2.0*fRadius);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20rightCut\x20=\x201.0\x20-\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRY1\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20-fRY1\x20*\x20h;\x20///<上边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20tmp\x20/\x20(2.0*fRadius);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x20defaultTopCut)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20topCut\x20=\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20else\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20topCut\x20=\x20defaultTopCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(fRY2\x20>\x201.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20(fRY2\x20-\x201.0)\x20*\x20h;\x20///<下边超出图像部分最大实际长度\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tmp\x20=\x20tmp\x20/\x20(2.0*fRadius);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if(tmp\x20>\x201.0\x20-\x20defaultBottomCut)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottomCut\x20=\x201.0\x20-\x20tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20else\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20bottomCut\x20=\x20defaultBottomCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.s\x20=\x20v_uv.s\x20*\x20(rightCut-leftCut)\x20+\x20leftCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20origin.t\x20=\x20v_uv.t\x20*\x20(bottomCut-topCut)\x20+\x20topCut;\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmpx\x20=\x20origin.s\x20*\x202.0\x20*\x20fRadius\x20+\x20fCenterX\x20-\x20fRadius;\x20///<纹理坐标转化为原图上的实际坐标\x0a\x20\x20\x20\x20\x20\x20\x20\x20float\x20tmpy\x20=\x20origin.t\x20*\x202.0\x20*\x20fRadius\x20+\x20fCenterY\x20-\x20fRadius;\x0a\x20\x20\x20\x20\x20\x20\x20\x20d\x20=\x20sqrt(fRadius*fRadius\x20-\x20(tmpy-fCenterY)*(tmpy-fCenterY));\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.s\x20=\x20((tmpx-fCenterX)\x20*\x20d\x20/\x20fRadius\x20+\x20fCenterX)\x20/\x20w;\x0a\x20\x20\x20\x20\x20\x20\x20\x20result.t\x20=\x20tmpy\x20/\x20h;\x0a\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x20texture2D(texture,\x20result.st).r;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x20texture2D(texture,\x20result.st).g;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x20texture2D(texture,\x20result.st).b;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(result.s\x20>\x201.0\x20||\x20result.t\x20>\x201.0\x20||\x20result.s\x20<\x200.0\x20||\x20result.t\x20<\x200.0)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20r\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20g\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20b\x20=\x200.0;\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20vec4(r\x20,g\x20,b\x20,\x201.0);\x0a\x20\x20\x20\x20}\x0a',this['b3DPort']=!0x1;break;case _0x58af5b['SR_DE_FISH_SEMISPHERE']:case _0x58af5b['SR_DE_FISH_CYLINDER_CEILING']:case _0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']:_0x94e4fc==_0x58af5b['SR_DE_FISH_SEMISPHERE']&&(this['bCullBack']=!0x0),_0x564ccb='\x0a\x20\x20\x20\x20attribute\x20vec4\x20xy;\x0a\x20\x20\x20\x20attribute\x20vec2\x20uv;\x0a\x20\x20\x20\x20varying\x20highp\x20vec2\x20v_uv;\x0a\x20\x20\x20\x20uniform\x20int\x20bCapture;\x0a\x0a\x20\x20\x20\x20uniform\x20mat4\x20matProj;\x0a\x20\x20\x20\x20uniform\x20mat4\x20matView;\x0a\x20\x20\x20\x20void\x20main(void)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_Position\x20=\x20matProj\x20*\x20matView\x20*\x20xy;\x0a\x20\x20\x20\x20\x20\x20\x20\x20v_uv\x20=\x20uv;\x0a\x20\x20\x20\x20\x20\x20\x20\x20if(bCapture\x20==\x201)\x0a\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20v_uv.y\x20=\x201.0\x20-\x20uv.y;\x0a\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a',_0x256a9f='\x0a\x20\x20\x20\x20varying\x20highp\x20vec2\x20v_uv;\x0a\x20\x20\x20\x20uniform\x20sampler2D\x20texture;\x0a\x20\x20\x20\x20void\x20main(void)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20gl_FragColor\x20=\x20texture2D(texture,\x20v_uv);\x0a\x20\x20\x20\x20}\x0a',this['b3DPort']=!0x0;}var _0x4d76f6=this['CompileProgram'](_0x564ccb,_0x256a9f);if(_0x4d76f6<=0x0)return _0x39309a;this['videoShaderProgram']=_0x4d76f6;var _0x176aed=null,_0x295bc2=null;0x0==this['b3DPort']?(_0x176aed=new Float32Array([-0x1,-0x1,0x0,-0x1,0x1,0x0,0x1,0x1,0x0,0x1,-0x1,0x0]),_0x295bc2=new Float32Array([0x0,0x1,0x0,0x0,0x1,0x0,0x1,0x1])):_0x94e4fc==_0x58af5b['SR_DE_FISH_SEMISPHERE']?(this['CreateSemiSphere'](0x0,0x1,0x0,0x1),_0x176aed=this['pSemiSpherePos'],_0x295bc2=this['pSemiSphereTex']):_0x94e4fc!=_0x58af5b['SR_DE_FISH_CYLINDER_CEILING']&&_0x94e4fc!=_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']||(this['CreateCylinder'](_0x94e4fc,0x0,0x1,0x0,0x1,0x2,0x2),_0x176aed=this['pCylinderPos'],_0x295bc2=this['pCylinderTex']);var _0x12001a=this['ctx']['createBuffer']();this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x12001a),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x176aed,this['ctx']['STATIC_DRAW']),this['vertexPosBuffer']=_0x12001a;var _0x3df780=this['ctx']['createBuffer']();this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],_0x3df780),this['ctx']['bufferData'](this['ctx']['ARRAY_BUFFER'],_0x295bc2,this['ctx']['STATIC_DRAW']),this['texturePosBuffer']=_0x3df780,this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),0x0==this['b3DPort']&&(_0x176aed=null,_0x295bc2=null);var _0x37ed5b=this['InitCamera'](_0x94e4fc);return _0x4e01e5!=_0x37ed5b?_0x108024:(this['enDisplayEffect']=_0x94e4fc,this['nFECPort']);}},{'key':'SR_DelSubPort','value':function value(_0x43c156){return null==this['ctx']?_0x39e372:(null!=this['pFishParamManager']&&this['nFECPort']==_0x43c156&&this['pFishParamManager']['FreeFECPort'](this['nFECPort']),this['enDisplayEffect']=_0x58af5b['SR_DE_NULL'],0x0!=this['videoShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['videoShaderProgram']),this['videoShaderProgram']=0x0),0x0!=this['vertexPosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['vertexPosBuffer']),this['vertexPosBuffer']=0x0),0x0!=this['texturePosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['texturePosBuffer']),this['texturePosBuffer']=0x0),this['nMaxPointNum']=0x0,this['pLinePosVertices']=null,this['pLineClrVertices']=null,0x0!=this['glLinePosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glLinePosBuffer']),this['glLinePosBuffer']=0x0),0x0!=this['glLineTexBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glLineTexBuffer']),this['glLineTexBuffer']=0x0),this['nLineTriangleNum']=0x0,0x0!=this['nLineShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['nLineShaderProgram']),this['nLineShaderProgram']=0x0),this['pFillBlockPosVertices']=null,this['pFillBlockClrVertices']=null,this['nMaxFillBlockTriNum']=0x0,0x0!=this['glBlockPosBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glBlockPosBuffer']),this['glBlockPosBuffer']=0x0),0x0!=this['glBlockClrBuffer']&&null!=this['ctx']&&(this['ctx']['deleteBuffer'](this['glBlockClrBuffer']),this['glBlockClrBuffer']=0x0),0x0!=this['nBlockShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['nBlockShaderProgram']),this['nBlockShaderProgram']=0x0),this['nDrawFontWidth']=0x0,this['nDrawFontHeight']=0x0,0x0!=this['nFontColorTexture']&&null!=this['ctx']&&(this['ctx']['deleteTexture'](this['nFontColorTexture']),this['nFontColorTexture']=0x0),this['pFontColorBuffer']=0x0,0x0!=this['nFontShaderProgram']&&null!=this['ctx']&&(this['ctx']['deleteProgram'](this['nFontShaderProgram']),this['nFontShaderProgram']=0x0),0x0!=this['nCaptureRTTex']&&(this['ctx']['deleteTexture'](this['nCaptureRTTex']),this['nCaptureRTTex']=0x0),0x0!=this['nCaptureFBO']&&(this['ctx']['deleteFramebuffer'](this['nCaptureFBO']),this['nCaptureFBO']=0x0),0x0!=this['nCaptureDepthbuffer']&&(this['ctx']['deleteRenderbuffer'](this['nCaptureDepthbuffer']),this['nCaptureDepthbuffer']=0x0),this['pSemiSpherePos']=null,this['pSemiSphereTex']=null,this['nSemiSpherePosNum']=0x0,this['nSemiSpherePosSize']=0x0,this['nSemiSphereTexSize']=0x0,this['pCylinderPos']=null,this['pCylinderTex']=null,this['nCylinderPosNum']=0x0,this['nCylinderPosSize']=0x0,this['nCylinderTexSize']=0x0,this['fCylinderHeight']=0x0,this['fCylinderRadius']=0x0,this['b3DPort']=!0x1,this['pCamera']=null,this['fRotateX']=0x0,this['fRotateY']=0x0,this['fScale']=0x0,this['pfuncCBIn']=null,this['pfuncCBOut']=null,this['pUserIn']=null,this['pUserOut']=null,this['ctx']['disable'](this['ctx']['CULL_FACE']),this['ctx']['disable'](this['ctx']['DEPTH_TEST']),_0x4e01e5);}},{'key':'SR_GetFishParam','value':function value(_0x122fff){return null==_0x122fff?_0x554921:null==this['pFishParamManager']?_0x39e372:this['pFishParamManager']['GetFishParam'](this['nFECPort'],_0x122fff);}},{'key':'SR_SetFishParam','value':function value(_0x493b32){return null==_0x493b32?_0x554921:null==this['pFishParamManager']?_0x39e372:this['pFishParamManager']['SetFishParam'](this['nFECPort'],_0x493b32);}},{'key':'SR_SetDisplayRect','value':function value(_0x8ae653,_0xc9ab89,_0x5db37a,_0x54b032,_0x37ed40){if(null==this['ctx'])return _0x39e372;var _0x227a5=_0x8ae653,_0x2a0e78=_0xc9ab89,_0xeea027=_0x8ae653+_0x5db37a,_0xe8f7ab=_0xc9ab89+_0x54b032,_0x496378=null,_0x14fb0d=null;switch(_0x37ed40){case _0x39748a:if(this['frameDisplayWidth']>0x0&&this['frameDisplayHeight']>0x0){if(this['fSrcUseLeft']=_0x227a5/this['frameDisplayWidth'],this['fSrcUseLeft']<0x0?this['fSrcUseLeft']=0x0:this['fSrcUseLeft']>0x1&&(this['fSrcUseLeft']=0x1),this['fSrcUseTop']=_0x2a0e78/this['frameDisplayHeight'],this['fSrcUseTop']<0x0?this['fSrcUseTop']=0x0:this['fSrcUseTop']>0x1&&(this['fSrcUseTop']=0x1),this['fSrcUseRight']=_0xeea027/this['frameDisplayWidth'],this['fSrcUseRight']<0x0?this['fSrcUseRight']=0x0:this['fSrcUseRight']>0x1&&(this['fSrcUseRight']=0x1),this['fSrcUseBottom']=_0xe8f7ab/this['frameDisplayHeight'],this['fSrcUseBottom']<0x0?this['fSrcUseBottom']=0x0:this['fSrcUseBottom']>0x1&&(this['fSrcUseBottom']=0x1),this['fSrcUseLeft']>=this['fSrcUseRight']||this['fSrcUseTop']>=this['fSrcUseBottom'])return _0x554921;_0x496378=new Float32Array([this['fSrcUseLeft'],this['fSrcUseBottom'],this['fSrcUseLeft'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseTop'],this['fSrcUseRight'],this['fSrcUseBottom']]);}else _0x496378=new Float32Array([0x0,0x1,0x0,0x0,0x1,0x0,0x1,0x1]);this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']),this['ctx']['bufferSubData'](this['ctx']['ARRAY_BUFFER'],0x0,_0x496378),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),_0x496378=null;break;case _0x40bb88:if(this['frameDisplayWidth']>0x0&&this['frameDisplayHeight']>0x0){if(this['fDstUseLeft']=_0x227a5/this['frameDisplayWidth'],this['fDstUseLeft']<0x0?this['fDstUseLeft']=0x0:this['fDstUseLeft']>0x1&&(this['fDstUseLeft']=0x1),this['fDstUseTop']=_0x2a0e78/this['frameDisplayHeight'],this['fDstUseTop']<0x0?this['fDstUseTop']=0x0:this['fDstUseTop']>0x1&&(this['fDstUseTop']=0x1),this['fDstUseRight']=_0xeea027/this['frameDisplayWidth'],this['fDstUseRight']<0x0?this['fDstUseRight']=0x0:this['fDstUseRight']>0x1&&(this['fDstUseRight']=0x1),this['fDstUseBottom']=_0xe8f7ab/this['frameDisplayHeight'],this['fDstUseBottom']<0x0?this['fDstUseBottom']=0x0:this['fDstUseBottom']>0x1&&(this['fDstUseBottom']=0x1),this['fDstUseLeft']>=this['fDstUseRight']||this['fDstUseTop']>=this['fDstUseBottom'])return _0x554921;(_0x14fb0d=new Float32Array(0xc))[0x0]=0x2*this['fDstUseLeft']-0x1,_0x14fb0d[0x1]=0x1-0x2*this['fDstUseBottom'],_0x14fb0d[0x2]=0x0,_0x14fb0d[0x3]=0x2*this['fDstUseLeft']-0x1,_0x14fb0d[0x4]=0x1-0x2*this['fDstUseTop'],_0x14fb0d[0x5]=0x0,_0x14fb0d[0x6]=0x2*this['fDstUseRight']-0x1,_0x14fb0d[0x7]=0x1-0x2*this['fDstUseTop'],_0x14fb0d[0x8]=0x0,_0x14fb0d[0x9]=0x2*this['fDstUseRight']-0x1,_0x14fb0d[0xa]=0x1-0x2*this['fDstUseBottom'],_0x14fb0d[0xb]=0x0,this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']),this['ctx']['bufferSubData'](this['ctx']['ARRAY_BUFFER'],0x0,_0x14fb0d),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null),_0x14fb0d=null;}}return _0x4e01e5;}},{'key':'SR_Destroy','value':function value(){if(null==this['ctx'])return _0x39e372;this['frameDisplayWidth']=0x0,this['frameDisplayHeight']=0x0,this['pFrameData']=null;for(var _0x4b4324=0x0;_0x4b4324<this['nTextureNum'];_0x4b4324++)0x0!=this['nSurfaceTexture'][_0x4b4324]&&null!=this['ctx']&&(this['ctx']['deleteTexture'](this['nSurfaceTexture'][_0x4b4324]),this['nSurfaceTexture'][_0x4b4324]=0x0);return this['SR_DelSubPort'](this['nFECPort']),this['onlySupportedWebGL1']=!0x1,this['bAntialias']=!0x1,this['bRecreateTex']=!0x0,this['pFishParamManager']=null,this['canvas']=null,this['ctx']['getExtension']('WEBGL_lose_context')['loseContext'](),this['ctx']=null,_0x4e01e5;}},{'key':'SR_SetCanvasSize','value':function value(_0x4ef1a1,_0x5f0590){return this['canvas']['width']=_0x4ef1a1,this['canvas']['height']=_0x5f0590,_0x4e01e5;}},{'key':'SR_GetCanvasSize','value':function value(){return console['log']('canvas\x20width:'+this['canvas']['width']+',height:'+this['canvas']['height']),_0x4e01e5;}},{'key':'SR_SetAntialias','value':function value(_0x1cc653){return 0x1==this['onlySupportedWebGL1']?_0xbd5163:(this['bAntialias']!=_0x1cc653&&(this['bRecreateTex']=!0x0,this['bAntialias']=_0x1cc653),_0x4e01e5);}},{'key':'SR_SetPTZDisplayMode','value':function value(_0x50076b){return null==this['pFishParamManager']?_0x39e372:this['pFishParamManager']['SetPTZDisplayMode'](_0x50076b);}},{'key':'SR_SetFishParamManager','value':function value(_0xea2ae3){return null!=this['pFishParamManager']?_0xbd5163:(this['pFishParamManager']=_0xea2ae3,_0x4e01e5);}},{'key':'CreateSemiSphere','value':function value(_0x5387d2,_0x4cb858,_0x4db567,_0x4f80ed){if(null!=this['pSemiSpherePos']||null!=this['pSemiSphereTex'])return _0x39e372;this['pSemiSpherePos']=new Float32Array(0xa8c0),this['pSemiSphereTex']=new Float32Array(0x7080);for(var _0x2dc4ff=(_0x4cb858-_0x5387d2)/(_0x4f80ed-_0x4db567),_0x1c0a9a=(_0x4cb858-_0x5387d2)/0x2*0x1,_0x434201=6.2831852/0x3c,_0x2d59d7=0.0392699075,_0x16bdb7=0x0,_0x55ec28=0x0,_0x3e2be6=0x0,_0x2b0050=0x0;_0x2b0050<0x3c;++_0x2b0050)for(var _0x559792=0x0;_0x559792<0x28;++_0x559792){var _0x3355c5=_0x2b0050*_0x434201;0x0==_0x2b0050&&(_0x16bdb7=_0x3355c5);var _0x43f0a3=0x3b==_0x2b0050?_0x16bdb7:(_0x2b0050+0x1)*_0x434201,_0x2efa26=-_0x559792*_0x2d59d7,_0x5bd0cb=-(_0x559792+0x1)*_0x2d59d7,_0x129ba5=void 0x0,_0x172c59=void 0x0;this['pSemiSpherePos'][_0x55ec28]=-0x1*Math['cos'](_0x2efa26)*Math['cos'](_0x3355c5),this['pSemiSpherePos'][_0x55ec28+0x1]=0x1*Math['sin'](_0x2efa26),this['pSemiSpherePos'][_0x55ec28+0x2]=-0x1*Math['cos'](_0x2efa26)*Math['sin'](_0x3355c5),_0x172c59=0.5-0.5*(0x1+_0x2efa26/1.5707963)*Math['sin'](_0x3355c5),_0x129ba5=0.5-0.5*(0x1+_0x2efa26/1.5707963)*Math['cos'](_0x3355c5),this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x129ba5*_0x1c0a9a+0x1*_0x5387d2)/0x1,this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x172c59*_0x1c0a9a+_0x4db567*_0x2dc4ff)/_0x2dc4ff,_0x55ec28+=0x3,this['pSemiSpherePos'][_0x55ec28]=-0x1*Math['cos'](_0x5bd0cb)*Math['cos'](_0x3355c5),this['pSemiSpherePos'][_0x55ec28+0x1]=0x1*Math['sin'](_0x5bd0cb),this['pSemiSpherePos'][_0x55ec28+0x2]=-0x1*Math['cos'](_0x5bd0cb)*Math['sin'](_0x3355c5),_0x172c59=0.5-0.5*(0x1+_0x5bd0cb/1.5707963)*Math['sin'](_0x3355c5),_0x129ba5=0.5-0.5*(0x1+_0x5bd0cb/1.5707963)*Math['cos'](_0x3355c5),this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x129ba5*_0x1c0a9a+0x1*_0x5387d2)/0x1,this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x172c59*_0x1c0a9a+_0x4db567*_0x2dc4ff)/_0x2dc4ff,_0x55ec28+=0x3,this['pSemiSpherePos'][_0x55ec28]=-0x1*Math['cos'](_0x2efa26)*Math['cos'](_0x43f0a3),this['pSemiSpherePos'][_0x55ec28+0x1]=0x1*Math['sin'](_0x2efa26),this['pSemiSpherePos'][_0x55ec28+0x2]=-0x1*Math['cos'](_0x2efa26)*Math['sin'](_0x43f0a3),_0x172c59=0.5-0.5*(0x1+_0x2efa26/1.5707963)*Math['sin'](_0x43f0a3),_0x129ba5=0.5-0.5*(0x1+_0x2efa26/1.5707963)*Math['cos'](_0x43f0a3),this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x129ba5*_0x1c0a9a+0x1*_0x5387d2)/0x1,this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x172c59*_0x1c0a9a+_0x4db567*_0x2dc4ff)/_0x2dc4ff,_0x55ec28+=0x3,this['pSemiSpherePos'][_0x55ec28]=-0x1*Math['cos'](_0x2efa26)*Math['cos'](_0x43f0a3),this['pSemiSpherePos'][_0x55ec28+0x1]=0x1*Math['sin'](_0x2efa26),this['pSemiSpherePos'][_0x55ec28+0x2]=-0x1*Math['cos'](_0x2efa26)*Math['sin'](_0x43f0a3),_0x172c59=0.5-0.5*(0x1+_0x2efa26/1.5707963)*Math['sin'](_0x43f0a3),_0x129ba5=0.5-0.5*(0x1+_0x2efa26/1.5707963)*Math['cos'](_0x43f0a3),this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x129ba5*_0x1c0a9a+0x1*_0x5387d2)/0x1,this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x172c59*_0x1c0a9a+_0x4db567*_0x2dc4ff)/_0x2dc4ff,_0x55ec28+=0x3,this['pSemiSpherePos'][_0x55ec28]=-0x1*Math['cos'](_0x5bd0cb)*Math['cos'](_0x3355c5),this['pSemiSpherePos'][_0x55ec28+0x1]=0x1*Math['sin'](_0x5bd0cb),this['pSemiSpherePos'][_0x55ec28+0x2]=-0x1*Math['cos'](_0x5bd0cb)*Math['sin'](_0x3355c5),_0x172c59=0.5-0.5*(0x1+_0x5bd0cb/1.5707963)*Math['sin'](_0x3355c5),_0x129ba5=0.5-0.5*(0x1+_0x5bd0cb/1.5707963)*Math['cos'](_0x3355c5),this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x129ba5*_0x1c0a9a+0x1*_0x5387d2)/0x1,this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x172c59*_0x1c0a9a+_0x4db567*_0x2dc4ff)/_0x2dc4ff,_0x55ec28+=0x3,this['pSemiSpherePos'][_0x55ec28]=-0x1*Math['cos'](_0x5bd0cb)*Math['cos'](_0x43f0a3),this['pSemiSpherePos'][_0x55ec28+0x1]=0x1*Math['sin'](_0x5bd0cb),this['pSemiSpherePos'][_0x55ec28+0x2]=-0x1*Math['cos'](_0x5bd0cb)*Math['sin'](_0x43f0a3),_0x172c59=0.5-0.5*(0x1+_0x5bd0cb/1.5707963)*Math['sin'](_0x43f0a3),_0x129ba5=0.5-0.5*(0x1+_0x5bd0cb/1.5707963)*Math['cos'](_0x43f0a3),this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x129ba5*_0x1c0a9a+0x1*_0x5387d2)/0x1,this['pSemiSphereTex'][_0x3e2be6++]=(0x2*_0x172c59*_0x1c0a9a+_0x4db567*_0x2dc4ff)/_0x2dc4ff,_0x55ec28+=0x3;}return this['nSemiSpherePosNum']=_0x55ec28/0x3,this['nSemiSpherePosSize']=0x3,this['nSemiSphereTexSize']=0x2,_0x4e01e5;}},{'key':'CreateCylinder','value':function value(_0x2aad6d,_0x54cf09,_0x1462e8,_0x28ed9c,_0x5c6cef,_0x46f796,_0x44b412){if(null!=this['pCylinderPos']||null!=this['pCylinderTex'])return _0x39e372;if(Math['abs'](_0x46f796-0x0)<_0x58bec0)this['fCylinderHeight']=0x2;else {if(_0x46f796<0.5||_0x46f796>0x6)return _0x554921;this['fCylinderHeight']=_0x46f796;}if(Math['abs'](_0x44b412-0x0)<_0x58bec0)this['fCylinderRadius']=_0x2aad6d==_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']||_0x2aad6d==_0x58af5b['SR_DE_FISH_CYLINDER_CEILING']?0x2:0x1;else {if(_0x44b412<0.5||_0x44b412>0x4)return _0x554921;this['fCylinderRadius']=_0x44b412;}if(this['pCylinderPos']=new Float32Array(0xa8c0),this['pCylinderTex']=new Float32Array(0x7080),null==this['pCylinderPos']||null==this['pCylinderTex'])return this['pCylinderPos']=null,this['pCylinderTex']=null,_0x4887c6;for(var _0x45363a=(_0x1462e8-_0x54cf09)/(_0x5c6cef-_0x28ed9c),_0x75e3a0=(_0x1462e8-_0x54cf09)/0x2*0x1,_0xa086=6.2831852/0x3c,_0x4da9c3=this['fCylinderHeight']/_0x20b1ea,_0x3e5e3f=0x0,_0x2dfc7e=0x0,_0x35e11f=0x0;_0x35e11f<0x3c;++_0x35e11f)for(var _0x281674=0x0;_0x281674<_0x20b1ea;++_0x281674){var _0x37ddd1=_0x35e11f*_0xa086,_0x3c5a72=(_0x35e11f+0x1)*_0xa086,_0x72a5d4=void 0x0,_0x55283e=void 0x0;this['pCylinderPos'][_0x3e5e3f]=-this['fCylinderRadius']*Math['sin'](_0x37ddd1),this['pCylinderPos'][_0x3e5e3f+0x1]=this['fCylinderHeight']/0x2-_0x281674*_0x4da9c3,this['pCylinderPos'][_0x3e5e3f+0x2]=-this['fCylinderRadius']*Math['cos'](_0x37ddd1),_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']==_0x2aad6d||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x2aad6d?(_0x72a5d4=0.5+(0.1+0.01*_0x281674)*Math['sin'](_0x37ddd1),_0x55283e=0.5+(0.1+0.01*_0x281674)*Math['cos'](_0x37ddd1)):(_0x72a5d4=0.5-(0.5-0.01*_0x281674)*Math['sin'](_0x37ddd1),_0x55283e=0.5+(0.5-0.01*_0x281674)*Math['cos'](_0x37ddd1)),this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x72a5d4*_0x75e3a0+0x1*_0x54cf09)/0x1,this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x55283e*_0x75e3a0+_0x28ed9c*_0x45363a)/_0x45363a,_0x3e5e3f+=0x3,this['pCylinderPos'][_0x3e5e3f]=-this['fCylinderRadius']*Math['sin'](_0x37ddd1),this['pCylinderPos'][_0x3e5e3f+0x1]=this['fCylinderHeight']/0x2-(_0x281674+0x1)*_0x4da9c3,this['pCylinderPos'][_0x3e5e3f+0x2]=-this['fCylinderRadius']*Math['cos'](_0x37ddd1),_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']==_0x2aad6d||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x2aad6d?(_0x72a5d4=0.5+(0.1+0.01*(_0x281674+0x1))*Math['sin'](_0x37ddd1),_0x55283e=0.5+(0.1+0.01*(_0x281674+0x1))*Math['cos'](_0x37ddd1)):(_0x72a5d4=0.5-(0.5-0.01*(_0x281674+0x1))*Math['sin'](_0x37ddd1),_0x55283e=0.5+(0.5-0.01*(_0x281674+0x1))*Math['cos'](_0x37ddd1)),this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x72a5d4*_0x75e3a0+0x1*_0x54cf09)/0x1,this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x55283e*_0x75e3a0+_0x28ed9c*_0x45363a)/_0x45363a,_0x3e5e3f+=0x3,this['pCylinderPos'][_0x3e5e3f]=-this['fCylinderRadius']*Math['sin'](_0x3c5a72),this['pCylinderPos'][_0x3e5e3f+0x1]=this['fCylinderHeight']/0x2-_0x281674*_0x4da9c3,this['pCylinderPos'][_0x3e5e3f+0x2]=-this['fCylinderRadius']*Math['cos'](_0x3c5a72),_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']==_0x2aad6d||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x2aad6d?(_0x72a5d4=0.5+(0.1+0.01*_0x281674)*Math['sin'](_0x3c5a72),_0x55283e=0.5+(0.1+0.01*_0x281674)*Math['cos'](_0x3c5a72)):(_0x72a5d4=0.5-(0.5-0.01*_0x281674)*Math['sin'](_0x3c5a72),_0x55283e=0.5+(0.5-0.01*_0x281674)*Math['cos'](_0x3c5a72)),this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x72a5d4*_0x75e3a0+0x1*_0x54cf09)/0x1,this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x55283e*_0x75e3a0+_0x28ed9c*_0x45363a)/_0x45363a,_0x3e5e3f+=0x3,this['pCylinderPos'][_0x3e5e3f]=-this['fCylinderRadius']*Math['sin'](_0x3c5a72),this['pCylinderPos'][_0x3e5e3f+0x1]=this['fCylinderHeight']/0x2-_0x281674*_0x4da9c3,this['pCylinderPos'][_0x3e5e3f+0x2]=-this['fCylinderRadius']*Math['cos'](_0x3c5a72),_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']==_0x2aad6d||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x2aad6d?(_0x72a5d4=0.5+(0.1+0.01*_0x281674)*Math['sin'](_0x3c5a72),_0x55283e=0.5+(0.1+0.01*_0x281674)*Math['cos'](_0x3c5a72)):(_0x72a5d4=0.5-(0.5-0.01*_0x281674)*Math['sin'](_0x3c5a72),_0x55283e=0.5+(0.5-0.01*_0x281674)*Math['cos'](_0x3c5a72)),this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x72a5d4*_0x75e3a0+0x1*_0x54cf09)/0x1,this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x55283e*_0x75e3a0+_0x28ed9c*_0x45363a)/_0x45363a,_0x3e5e3f+=0x3,this['pCylinderPos'][_0x3e5e3f]=-this['fCylinderRadius']*Math['sin'](_0x37ddd1),this['pCylinderPos'][_0x3e5e3f+0x1]=this['fCylinderHeight']/0x2-(_0x281674+0x1)*_0x4da9c3,this['pCylinderPos'][_0x3e5e3f+0x2]=-this['fCylinderRadius']*Math['cos'](_0x37ddd1),_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']==_0x2aad6d||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x2aad6d?(_0x72a5d4=0.5+(0.1+0.01*(_0x281674+0x1))*Math['sin'](_0x37ddd1),_0x55283e=0.5+(0.1+0.01*(_0x281674+0x1))*Math['cos'](_0x37ddd1)):(_0x72a5d4=0.5-(0.5-0.01*(_0x281674+0x1))*Math['sin'](_0x37ddd1),_0x55283e=0.5+(0.5-0.01*(_0x281674+0x1))*Math['cos'](_0x37ddd1)),this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x72a5d4*_0x75e3a0+0x1*_0x54cf09)/0x1,this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x55283e*_0x75e3a0+_0x28ed9c*_0x45363a)/_0x45363a,_0x3e5e3f+=0x3,this['pCylinderPos'][_0x3e5e3f]=-this['fCylinderRadius']*Math['sin'](_0x3c5a72),this['pCylinderPos'][_0x3e5e3f+0x1]=this['fCylinderHeight']/0x2-(_0x281674+0x1)*_0x4da9c3,this['pCylinderPos'][_0x3e5e3f+0x2]=-this['fCylinderRadius']*Math['cos'](_0x3c5a72),_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']==_0x2aad6d||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==_0x2aad6d?(_0x72a5d4=0.5+(0.1+0.01*(_0x281674+0x1))*Math['sin'](_0x3c5a72),_0x55283e=0.5+(0.1+0.01*(_0x281674+0x1))*Math['cos'](_0x3c5a72)):(_0x72a5d4=0.5-(0.5-0.01*(_0x281674+0x1))*Math['sin'](_0x3c5a72),_0x55283e=0.5+(0.5-0.01*(_0x281674+0x1))*Math['cos'](_0x3c5a72)),this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x72a5d4*_0x75e3a0+0x1*_0x54cf09)/0x1,this['pCylinderTex'][_0x2dfc7e++]=(0x2*_0x55283e*_0x75e3a0+_0x28ed9c*_0x45363a)/_0x45363a,_0x3e5e3f+=0x3;}this['nCylinderPosNum']=_0x3e5e3f/0x3,this['nCylinderPosSize']=0x3,this['nCylinderTexSize']=0x2;}},{'key':'InitCamera','value':function value(_0x3e090d){if(null!=this['pCamera'])return SR_ERR_CALL_ORDER;switch(_0x3e090d){case _0x58af5b['SR_DE_NULL']:case _0x58af5b['SR_DE_FISH_ORIGINAL']:case _0x58af5b['SR_DE_FISH_PTZ_CEILING']:case _0x58af5b['SR_DE_FISH_PTZ_FLOOR']:case _0x58af5b['SR_DE_FISH_PTZ_WALL']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:return _0x4e01e5;case _0x58af5b['SR_DE_FISH_SEMISPHERE']:if(this['pCamera']=new _0x635dc4(),null==this['pCamera'])return _0x4887c6;this['pCamera']['SetFov'](_0x3c5cf8),this['pCamera']['SetNear'](_0x252a1b),this['pCamera']['SetFar'](_0x3741de),this['fRotateX']=1.57,this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['fScale']=0x3,this['pCamera']['SetScale'](this['fScale']);break;case _0x58af5b['SR_DE_FISH_CYLINDER_CEILING']:case _0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']:if(this['pCamera']=new _0x635dc4(),null==this['pCamera'])return _0x4887c6;this['pCamera']['SetFov'](_0x3c5cf8),this['pCamera']['SetNear'](_0x252a1b),this['pCamera']['SetFar'](_0x3741de),this['fRotateX']=0.785,this['pCamera']['SetPitch'](-this['fRotateX']),this['fScale']=0x6,this['pCamera']['SetScale'](this['fScale']);break;case _0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:case _0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:if(this['pCamera']=new _0x635dc4(),null==this['pCamera'])return _0x4887c6;this['pCamera']['SetOrtho'](!0x0),this['pCamera']['SetNear'](_0x252a1b),this['pCamera']['SetFar'](_0x3741de),this['fScale']=0x3,this['pCamera']['SetScale'](this['fScale']);break;default:return _0xbd5163;}return _0x4e01e5;}},{'key':'SR_SetViewParam','value':function value(_0x95f1c5,_0x42d9ee){if(!this['b3DPort'])return _0xbd5163;switch(_0x95f1c5){case _0x60b800:this['fRotateX']=_0x42d9ee;break;case _0x1d8773:this['fRotateY']=_0x42d9ee;break;case _0x139d52:if(this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_SEMISPHERE']){if(_0x42d9ee<-0.8||_0x42d9ee>0x384)return _0x554921;}else {if((this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']||this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_CYLINDER_CEILING'])&&(_0x42d9ee<0x0||_0x42d9ee>0x384))return _0x554921;}this['fScale']=_0x42d9ee;break;default:return _0xbd5163;}return _0x4e01e5;}},{'key':'SR_GetViewParam','value':function value(_0x4c9fc9,_0x210d34){if(!this['b3DPort'])return _0x39e372;var _0x3508bf=0x0;switch(_0x4c9fc9){case _0x60b800:_0x3508bf=this['fRotateX'];break;case _0x1d8773:_0x3508bf=this['fRotateY'];break;case _0x139d52:_0x3508bf=this['fScale'];}return _0x210d34['fValue']=_0x3508bf,_0x4e01e5;}},{'key':'SR_SetCallBack','value':function value(_0x214b93,_0xbac82a,_0x2906c1){switch(_0x2906c1){case _0x3db7f1:this['pfuncCBIn']=_0x214b93,this['pUserIn']=_0xbac82a;break;case _0x551f0c:this['pfuncCBOut']=_0x214b93,this['pUserOut']=_0xbac82a;break;default:return _0xbd5163;}return _0x4e01e5;}},{'key':'SR_SetRenderState','value':function value(_0x186258,_0x3379a8){switch(_0x186258){case _0x54d43a:if(this['b3DPort'])return _0xbd5163;break;case _0x2fc046:if(!this['b3DPort'])return _0xbd5163;Math['abs'](_0x3379a8-0x0)<_0x58bec0?this['bCullBack']=!0x1:this['bCullBack']=!0x0;break;default:return _0xbd5163;}return _0x4e01e5;}},{'key':'SR_SetPTZColor','value':function value(_0x9c607d,_0xf76427){return null==this['pFishParamManager']?_0x39e372:this['pFishParamManager']['SetPTZColor'](_0x9c607d,_0xf76427);}},{'key':'SR_GetPTZColor','value':function value(_0x116f13,_0x21fce8){return null==this['pFishParamManager']?_0x39e372:this['pFishParamManager']['GetPTZColor'](_0x116f13,_0x21fce8);}},{'key':'SR_SetPTZPort','value':function value(_0xbb5ba){return null==this['pFishParamManager']?_0x39e372:this['pFishParamManager']['SetPTZPort'](_0xbb5ba);}},{'key':'SR_GetPTZPort','value':function value(_0x1f13a2,_0xd69383,_0x838e55){return null==this['pFishParamManager']?_0x39e372:null==_0x838e55?_0x554921:this['pFishParamManager']['GetPTZPort'](_0x1f13a2,_0xd69383,_0x838e55);}},{'key':'SR_GetCaptureSize','value':function value(_0x466b28){if(null==_0x466b28)return _0x554921;if(null==this['ctx'])return _0x39e372;if(null==_0x466b28['nWidth']||null==_0x466b28['nWidth']||null==_0x466b28['nHeight']||null==_0x466b28['nHeight'])return _0x554921;var _0x5877dc=0x0,_0x4178e5=0x0;if(0x0==_0x466b28['nWidth']&&0x0==_0x466b28['nHeight'])switch(this['enDisplayEffect']){case _0x58af5b['SR_DE_FISH_PTZ_WALL']:case _0x58af5b['SR_DE_FISH_PTZ_CEILING']:case _0x58af5b['SR_DE_FISH_PTZ_FLOOR']:_0x5877dc=Math['round'](0x5*this['frameDisplayHeight']/0x8),_0x4178e5=Math['round'](0x3*_0x5877dc/0x4);break;case _0x58af5b['SR_DE_NULL']:_0x5877dc=Math['round']((this['fSrcUseRight']-this['fSrcUseLeft'])*this['frameDisplayWidth']),_0x4178e5=Math['round']((this['fSrcUseBottom']-this['fSrcUseTop'])*this['frameDisplayHeight']);break;case _0x58af5b['SR_DE_FISH_ORIGINAL']:case _0x58af5b['SR_DE_FISH_SEMISPHERE']:case _0x58af5b['SR_DE_FISH_CYLINDER_CEILING']:case _0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']:case _0x58af5b['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x58af5b['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:_0x5877dc=Math['round'](this['frameDisplayWidth']),_0x4178e5=Math['round'](this['frameDisplayHeight']);break;case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:this['frameDisplayHeight']>=0x800?(_0x5877dc=0x1800,_0x4178e5=0x360):this['frameDisplayHeight']>=0x600&&0x800>this['frameDisplayHeight']?(_0x5877dc=0x1000,_0x4178e5=0x240):(_0x5877dc=Math['round'](3.14*this['frameDisplayHeight']/1.6),_0x4178e5=Math['round'](0x9*this['frameDisplayWidth']/0x10),_0x5877dc=Math['round'](0x2*_0x5877dc),_0x4178e5=Math['round'](_0x4178e5/0x2));break;case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']:this['frameDisplayHeight']>=0xc00?(_0x5877dc=0x1000,_0x4178e5=0x900):this['frameDisplayHeight']>=0x800&&0xc00>this['frameDisplayHeight']?(_0x5877dc=0xc00,_0x4178e5=0x6c0):this['frameDisplayHeight']>=0x600&&0x800>this['frameDisplayHeight']?(_0x5877dc=0x800,_0x4178e5=0x480):(_0x5877dc=Math['round'](3.14*this['frameDisplayHeight']/1.6),_0x4178e5=Math['round'](0x9*_0x5877dc/0x10));break;case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:_0x5877dc=Math['round'](this['frameDisplayHeight']),_0x4178e5=Math['round'](0x9*_0x5877dc/0x10);break;default:return _0x554921;}else _0x5877dc=Math['round'](_0x466b28['nWidth']),_0x4178e5=Math['round'](_0x466b28['nHeight']);return _0x5877dc<0x10||_0x4178e5<0x10?_0x554921:(this['nCaptureWidth']=0x4*Math['round'](_0x5877dc/0x4),this['nCaptureHeight']=Math['round'](_0x4178e5),_0x466b28['nWidth']=this['nCaptureWidth'],_0x466b28['nHeight']=this['nCaptureHeight'],_0x466b28['nBufferLen']=this['nCaptureWidth']*this['nCaptureHeight']*0x4,_0x4e01e5);}},{'key':'SR_CaptureScreen','value':function value(_0x585355){var _0x1053a7=_0x4e01e5;if(_0x1053a7=this['_BeginCapture'](),_0x4e01e5!=_0x1053a7)return _0x1053a7;if(0x0==this['videoShaderProgram']||0x0==this['vertexPosBuffer']||0x0==this['texturePosBuffer'])return _0x39e372;this['ctx']['useProgram'](this['videoShaderProgram']),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['vertexPosBuffer']);var _0x4975d3=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'xy');if(_0x4975d3<0x0)return _0x39309a;this['ctx']['vertexAttribPointer'](_0x4975d3,0x3,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x4975d3),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],this['texturePosBuffer']);var _0x31f598=this['ctx']['getAttribLocation'](this['videoShaderProgram'],'uv');if(_0x31f598<0x0)return _0x39309a;this['ctx']['vertexAttribPointer'](_0x31f598,0x2,this['ctx']['FLOAT'],!0x1,0x0,0x0),this['ctx']['enableVertexAttribArray'](_0x31f598),this['ctx']['bindBuffer'](this['ctx']['ARRAY_BUFFER'],null);var _0x4a1969=this['enDisplayEffect'],_0x1234d1=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCapture');if(_0x1234d1<=0x0)return _0x39309a;switch(this['ctx']['uniform1i'](_0x1234d1,0x1),_0x4a1969){case _0x58af5b['SR_DE_NULL']:break;case _0x58af5b['SR_DE_FISH_ORIGINAL']:case _0x58af5b['SR_DE_FISH_PTZ_CEILING']:case _0x58af5b['SR_DE_FISH_PTZ_FLOOR']:case _0x58af5b['SR_DE_FISH_PTZ_WALL']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']:case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:if(null==this['pFishParamManager'])return _0x39e372;var _0x4d38b7={};if(_0x1053a7=this['pFishParamManager']['GetRenderParam'](this['nFECPort'],_0x4d38b7),_0x4e01e5!=_0x1053a7)return _0x1053a7;if(_0x58af5b['SR_DE_FISH_ORIGINAL']==_0x4a1969){var _0x5e3b2f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bBlack');if(_0x5e3b2f<=0x0)return _0x39309a;this['ctx']['uniform1i'](_0x5e3b2f,_0x4d38b7['bBlack']);var _0x2971e2=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'bCut');if(_0x2971e2<=0x0)return _0x39309a;this['ctx']['uniform1i'](_0x2971e2,_0x4d38b7['bCut']);}if(_0x58af5b['SR_DE_FISH_PTZ_CEILING']==_0x4a1969||_0x58af5b['SR_DE_FISH_PTZ_FLOOR']==_0x4a1969||_0x58af5b['SR_DE_FISH_PTZ_WALL']==_0x4a1969){var _0x20e934=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleCos');if(_0x20e934<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x20e934,_0x4d38b7['fCosH']);var _0x404082=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHAngleSin');if(_0x404082<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x404082,_0x4d38b7['fSinH']);var _0x35b54c=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleCos');if(_0x35b54c<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x35b54c,_0x4d38b7['fCosV']);var _0x241858=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fVAngleSin');if(_0x241858<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x241858,_0x4d38b7['fSinV']);var _0x4baea1=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fZoom');if(_0x4baea1<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x4baea1,_0x4d38b7['fZoom']);}if(_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']==_0x4a1969||_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']==_0x4a1969||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']==_0x4a1969||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']==_0x4a1969){var _0x1b961a=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fAngle');if(_0x1b961a<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x1b961a,_0x4d38b7['fAngle']);}var _0x558195=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX1');if(_0x558195<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x558195,_0x4d38b7['fRXLeft']);var _0x12227c=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRX2');if(_0x12227c<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x12227c,_0x4d38b7['fRXRight']);var _0x26c3f0=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY1');if(_0x26c3f0<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x26c3f0,_0x4d38b7['fRYTop']);var _0x287b7e=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fRY2');if(_0x287b7e<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x287b7e,_0x4d38b7['fRYBottom']);break;case _0x58af5b['SR_DE_FISH_SEMISPHERE']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](3.14-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['canvas']['width'],this['canvas']['height']);var _0x17dbb3=this['pCamera']['GetView'](),_0x2f97bc=this['pCamera']['GetProj'](),_0x1bb394=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x1bb394<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x1bb394,!0x1,_0x17dbb3);var _0x5509e1=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x5509e1<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x5509e1,!0x1,_0x2f97bc);break;case _0x58af5b['SR_DE_FISH_CYLINDER_CEILING']:case _0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']:this['pCamera']['SetScale'](this['fScale']),this['pCamera']['SetPitch'](-this['fRotateX']),this['pCamera']['SetYaw'](-this['fRotateY']),this['pCamera']['UpdateCamera'](this['canvas']['width'],this['canvas']['height']);var _0x3d6d20=this['pCamera']['GetView'](),_0x11dc89=this['pCamera']['GetProj'](),_0x3f51d9=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matView');if(_0x3f51d9<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x3f51d9,!0x1,_0x3d6d20);var _0x58cff9=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'matProj');if(_0x58cff9<=0x0)return _0x39309a;this['ctx']['uniformMatrix4fv'](_0x58cff9,!0x1,_0x11dc89);}if(this['nCaptureWidth']<=0x0||this['nCaptureHeight']<=0x0)return _0x556e6b;if(this['ctx']['viewport'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight']),this['ctx']['clearColor'](0x0,0x0,0x0,0x1),this['ctx']['clear'](this['ctx']['COLOR_BUFFER_BIT']|this['ctx']['DEPTH_BUFFER_BIT']),this['b3DPort']&&(this['ctx']['enable'](this['ctx']['DEPTH_TEST']),this['ctx']['depthFunc'](this['ctx']['LESS']),this['ctx']['depthMask'](!0x0),0x1==this['bCullBack']?this['ctx']['enable'](this['ctx']['CULL_FACE']):this['ctx']['disable'](this['ctx']['CULL_FACE'])),this['enPixelFormat']==_0x3a627d?this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]):(this['enPixelFormat']==_0x23c6a3||this['enPixelFormat']==_0x4add73)&&(this['ctx']['activeTexture'](this['ctx']['TEXTURE0']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x0]),this['ctx']['activeTexture'](this['ctx']['TEXTURE1']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x1]),this['ctx']['activeTexture'](this['ctx']['TEXTURE2']),this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nSurfaceTexture'][0x2])),this['onlySupportedWebGL1']||this['ctx']['clearBufferfi'](this['ctx']['DEPTH_STENCIL'],0x0,0x1,0x0),0x0==this['b3DPort'])this['ctx']['drawArrays'](this['ctx']['TRIANGLE_FAN'],0x0,0x4);else {if(this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_SEMISPHERE']){if(this['nSemiSpherePosNum']<=0x0)return _0x39e372;this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nSemiSpherePosNum']);}else {if(this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_CYLINDER_CEILING']||this['enDisplayEffect']==_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']){if(this['nCylinderPosNum']<=0x0)return _0x39e372;this['ctx']['drawArrays'](this['ctx']['TRIANGLES'],0x0,this['nCylinderPosNum']);}}}return this['ctx']['useProgram'](null),null!=this['pfuncCBIn']&&this['pfuncCBIn'](this['pUserIn']),null!=this['pfuncCBOut']&&this['pfuncCBOut'](this['pUserOut']),_0x1053a7=this['_EndCapture'](_0x585355),_0x4e01e5!=_0x1053a7?_0x1053a7:_0x4e01e5;}},{'key':'SR_SetImagePostProcess','value':function value(_0x39b258,_0x57f876){if(null==this['ctx'])return _0x39e372;if(_0x28aa58==_0x39b258||_0x1fc2e3==_0x39b258){if(0x0-_0x57f876>_0x58bec0||_0x57f876-0x1>_0x58bec0)return _0x554921;}else {if((_0x479edd==_0x39b258||_0xa0476a==_0x39b258||_0x17b4b1==_0x39b258)&&(-0x1-_0x57f876>_0x58bec0||_0x57f876-0x1>_0x58bec0))return _0x554921;}switch(_0x39b258){case _0x479edd:this['fBrightness']=_0x57f876;break;case _0x1fc2e3:this['fHue']=_0x57f876;break;case _0xa0476a:this['fSaturation']=_0x57f876;break;case _0x17b4b1:this['fContrast']=_0x57f876;break;case _0x28aa58:this['fSharpness']=_0x57f876;break;default:return _0x4a1abe;}return Math['abs'](this['fBrightness']-0x0)<_0x58bec0&&Math['abs'](this['fHue']-0x0)<_0x58bec0&&Math['abs'](this['fSaturation']-0x0)<_0x58bec0&&Math['abs'](this['fContrast']-0x0)<_0x58bec0&&Math['abs'](this['fSharpness']-0x0)<_0x58bec0?this['nPostProc']=0x0:this['nPostProc']=0x1,_0x4e01e5;}},{'key':'_BeginCapture','value':function value(){var _0x44416e=_0x4e01e5;return 0x0==this['bCaptureResInit']&&(_0x44416e=this['_InitRenderTarget'](this['nCaptureWidth'],this['nCaptureHeight'],!0x1,!0x0),_0x4e01e5!=_0x44416e)?_0x44416e:(_0x44416e=this['_Resize'](this['nCaptureWidth'],this['nCaptureHeight'],!0x1,!0x0),_0x4e01e5!=_0x44416e?_0x44416e:(this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],this['nCaptureFBO']),this['bIsCapturing']=!0x0,_0x4e01e5));}},{'key':'_InitRenderTarget','value':function value(_0x22e69f,_0x459a81,_0x48e963,_0x4bf842){if(0x0!=this['nCaptureRTTex']||0x0!=this['nCaptureFBO'])return _0x39e372;if(_0x22e69f<=0x0||_0x459a81<=0x0)return _0x554921;if(this['nCaptureRTTex']=this['ctx']['createTexture'](),this['nCaptureRTTex']<=0x0)return _0x39309a;if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nCaptureRTTex']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],_0x22e69f,_0x459a81,0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],null),0x0==this['nCaptureFBO']&&(this['nCaptureFBO']=this['ctx']['createFramebuffer'](),this['nCaptureFBO']<=0x0))return _0x39309a;if(this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],this['nCaptureFBO']),this['ctx']['framebufferTexture2D'](this['ctx']['FRAMEBUFFER'],this['ctx']['COLOR_ATTACHMENT0'],this['ctx']['TEXTURE_2D'],this['nCaptureRTTex'],0x0),0x1==_0x4bf842&&0x0==this['nCaptureDepthbuffer']){if(this['nCaptureDepthbuffer']=this['ctx']['createRenderbuffer'](),this['nCaptureDepthbuffer']<=0x0)return _0x39309a;this['ctx']['bindRenderbuffer'](this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']),this['ctx']['renderbufferStorage'](this['ctx']['RENDERBUFFER'],this['ctx']['DEPTH_COMPONENT16'],_0x22e69f,_0x459a81),this['ctx']['framebufferRenderbuffer'](this['ctx']['FRAMEBUFFER'],this['ctx']['DEPTH_ATTACHMENT'],this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']);}return this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),this['nCaptureFBOWidth']=_0x22e69f,this['nCaptureFBOHeight']=_0x459a81,this['bCaptureResInit']=!0x0,_0x4e01e5;}},{'key':'_Resize','value':function value(_0x4d5128,_0xc93fab,_0xc4b2b0,_0x5827a3){if(this['nCaptureFBOWidth']!=_0x4d5128||this['nCaptureFBOHeight']!=_0xc93fab){if(this['nCaptureFBOWidth']=_0x4d5128,this['nCaptureFBOHeight']=_0xc93fab,0x0!=this['nCaptureRTTex']&&(this['ctx']['deleteTexture'](this['nCaptureRTTex']),this['nCaptureRTTex']=0x0),0x0!=this['nCaptureDepthbuffer']&&(this['ctx']['deleteRenderbuffer'](this['nCaptureDepthbuffer']),this['nCaptureDepthbuffer']=0x0),0x0==this['nCaptureRTTex']&&(this['nCaptureRTTex']=this['ctx']['createTexture'](),this['nCaptureRTTex']<=0x0))return _0x39309a;if(this['ctx']['bindTexture'](this['ctx']['TEXTURE_2D'],this['nCaptureRTTex']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MAG_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_MIN_FILTER'],this['ctx']['LINEAR']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_S'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texParameteri'](this['ctx']['TEXTURE_2D'],this['ctx']['TEXTURE_WRAP_T'],this['ctx']['CLAMP_TO_EDGE']),this['ctx']['texImage2D'](this['ctx']['TEXTURE_2D'],0x0,this['ctx']['RGBA'],this['nCaptureFBOWidth'],this['nCaptureFBOHeight'],0x0,this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],null),this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],this['nCaptureFBO']),this['ctx']['framebufferTexture2D'](this['ctx']['FRAMEBUFFER'],this['ctx']['COLOR_ATTACHMENT0'],this['ctx']['TEXTURE_2D'],this['nCaptureRTTex'],0x0),0x1==_0x5827a3&&0x0==this['nCaptureDepthbuffer']){if(this['nCaptureDepthbuffer']=this['ctx']['createRenderbuffer'](),this['nCaptureDepthbuffer']<=0x0)return _0x39309a;this['ctx']['bindRenderbuffer'](this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']),this['ctx']['renderbufferStorage'](this['ctx']['RENDERBUFFER'],this['ctx']['DEPTH_COMPONENT16'],_0x4d5128,_0xc93fab),this['ctx']['framebufferRenderbuffer'](this['ctx']['FRAMEBUFFER'],this['ctx']['DEPTH_ATTACHMENT'],this['ctx']['RENDERBUFFER'],this['nCaptureDepthbuffer']);}this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null);}return _0x4e01e5;}},{'key':'_EndCapture','value':function value(_0x2295cc){return null==this['ctx']?_0x39e372:null==_0x2295cc['pBuffer']||null==_0x2295cc['pBuffer']?_0x554921:(this['ctx']['readPixels'](0x0,0x0,this['nCaptureWidth'],this['nCaptureHeight'],this['ctx']['RGBA'],this['ctx']['UNSIGNED_BYTE'],_0x2295cc['pBuffer']),this['ctx']['bindFramebuffer'](this['ctx']['FRAMEBUFFER'],null),this['bIsCapturing']=!0x1,_0x4e01e5);}},{'key':'_ResizeFrameData','value':function value(_0x94a12c,_0x481ff8,_0x14380c,_0x501f90){if(0x0==_0x481ff8%0x8&&null==_0x501f90)return this['frameDisplayWidth']=Math['round'](_0x481ff8),this['frameDisplayHeight']=Math['round'](_0x14380c),this['pFrameData']=_0x94a12c,_0x4e01e5;if(null!=_0x501f90&&0x0==_0x501f90['nCropBottom']&&0x0==_0x501f90['nCropLeft']&&0x0==_0x501f90['nCropRight']&&0x0==_0x501f90['nCropTop']&&0x0==_0x481ff8%0x8)return this['frameDisplayWidth']=Math['round'](_0x481ff8),this['frameDisplayHeight']=Math['round'](_0x14380c),this['pFrameData']=_0x94a12c,_0x4e01e5;if((null==this['pFrameData']||this['frameDisplayWidth']!=_0x481ff8/0x8*0x8||this['frameDisplayHeight']!=_0x14380c)&&(this['frameDisplayWidth']=0x8*Math['round'](_0x481ff8/0x8),this['frameDisplayHeight']=Math['round'](_0x14380c),this['pFrameData']=null,this['pFrameData']=new Uint8Array(this['frameDisplayWidth']*this['frameDisplayHeight']*0x3/0x2),null==this['pFrameData']))return _0x4887c6;var _0x27178=0x0,_0x38a52d=0x0,_0x3241b0=Math['round'](_0x501f90['nCodeWidth']),_0x4a0b63=Math['round'](_0x501f90['nCodeHeight']),_0x12e6ee=0x0;if(_0x23c6a3==this['enPixelFormat']||_0x4add73==this['enPixelFormat']){var _0x40e418,_0x5228ef,_0x3f7afd;null!=_0x501f90?(_0x27178=Math['round'](_0x501f90['nCropLeft']),_0x38a52d=Math['round'](_0x501f90['nCropTop']),_0x40e418=_0x94a12c['subarray'](_0x27178*_0x3241b0+_0x38a52d,_0x3241b0*_0x4a0b63),_0x5228ef=_0x94a12c['subarray'](_0x3241b0*_0x4a0b63+_0x38a52d*_0x3241b0/0x4+_0x27178/0x2,_0x3241b0*_0x4a0b63*0x5/0x4),_0x3f7afd=_0x94a12c['subarray'](_0x3241b0*_0x4a0b63*0x5/0x4+_0x38a52d*_0x3241b0/0x4+_0x27178/0x2,_0x3241b0*_0x4a0b63*0x3/0x2),_0x12e6ee=_0x3241b0):(_0x40e418=_0x94a12c['subarray'](0x0,_0x481ff8*_0x14380c),_0x5228ef=_0x94a12c['subarray'](_0x481ff8*_0x14380c,_0x481ff8*_0x14380c*0x5/0x4),_0x3f7afd=_0x94a12c['subarray'](_0x481ff8*_0x14380c*0x5/0x4,_0x481ff8*_0x14380c*0x3/0x2),_0x12e6ee=this['frameDisplayWidth']);for(var _0x111da1=null,_0x2e306b=0x0;_0x2e306b<this['frameDisplayHeight'];++_0x2e306b){var _0x3be92f=Math['round'](_0x2e306b*_0x12e6ee),_0x519a2c=Math['round'](_0x2e306b*_0x12e6ee+this['frameDisplayWidth']);_0x111da1=_0x40e418['slice'](_0x3be92f,_0x519a2c);var _0xea71bd=Math['round'](_0x2e306b*this['frameDisplayWidth']);this['pFrameData']['set'](_0x111da1,_0xea71bd);}for(var _0x17d5c4=0x0;_0x17d5c4<this['frameDisplayHeight']/0x2;++_0x17d5c4){var _0x196059=Math['round'](_0x17d5c4*_0x12e6ee/0x2),_0x564815=Math['round'](_0x17d5c4*_0x12e6ee/0x2+this['frameDisplayWidth']/0x2);_0x111da1=_0x5228ef['slice'](_0x196059,_0x564815);var _0x470a59=Math['round'](this['frameDisplayWidth']*this['frameDisplayHeight']+_0x17d5c4*this['frameDisplayWidth']/0x2);this['pFrameData']['set'](_0x111da1,_0x470a59);}for(var _0x21014c=0x0;_0x21014c<this['frameDisplayHeight']/0x2;++_0x21014c){var _0x1404d0=Math['round'](_0x21014c*_0x12e6ee/0x2),_0x4aa501=Math['round'](_0x21014c*_0x12e6ee/0x2+this['frameDisplayWidth']/0x2);_0x111da1=_0x3f7afd['slice'](_0x1404d0,_0x4aa501);var _0x4e0b94=Math['round'](this['frameDisplayWidth']*this['frameDisplayHeight']*0x5/0x4+_0x21014c*this['frameDisplayWidth']/0x2);this['pFrameData']['set'](_0x111da1,_0x4e0b94);}_0x40e418=null,_0x5228ef=null,_0x3f7afd=null,_0x111da1=null;}else {if(_0x2a4ed4==this['enPixelFormat']){var _0x522852,_0x4f9543,_0x57b3b9;null!=_0x501f90?(_0x27178=Math['round'](_0x501f90['nCropLeft']),_0x38a52d=Math['round'](_0x501f90['nCropTop']),_0x522852=_0x94a12c['subarray'](_0x38a52d*_0x3241b0+_0x27178,_0x3241b0*_0x4a0b63),_0x4f9543=_0x94a12c['subarray'](_0x3241b0*_0x4a0b63+_0x38a52d*_0x3241b0/0x4+_0x27178/0x2,_0x3241b0*_0x4a0b63*0x3/0x2),_0x12e6ee=Math['round'](_0x501f90['nCodeWidth'])):(_0x522852=_0x94a12c['subarray'](0x0,_0x3241b0*_0x4a0b63),_0x4f9543=_0x94a12c['subarray'](_0x3241b0*_0x4a0b63,_0x3241b0*_0x4a0b63*0x3/0x2),_0x12e6ee=this['frameDisplayWidth']);for(var _0xe6c13c=0x0;_0xe6c13c<this['frameDisplayHeight'];++_0xe6c13c){var _0x558bef=Math['round'](_0xe6c13c*_0x12e6ee),_0x1f176c=Math['round'](_0xe6c13c*_0x12e6ee+this['frameDisplayWidth']);_0x57b3b9=_0x522852['slice'](_0x558bef,_0x1f176c);var _0x4d8078=Math['round'](_0xe6c13c*this['frameDisplayWidth']);this['pFrameData']['set'](_0x57b3b9,_0x4d8078);}for(var _0x3ac733=0x0;_0x3ac733<this['frameDisplayHeight']/0x2;++_0x3ac733){var _0x1bc95b=Math['round'](_0x3ac733*_0x12e6ee),_0x29417f=Math['round'](_0x3ac733*_0x12e6ee+this['frameDisplayWidth']);_0x57b3b9=_0x4f9543['slice'](_0x1bc95b,_0x29417f);var _0x507cd6=Math['round'](this['frameDisplayWidth']*this['frameDisplayHeight']+_0x3ac733*this['frameDisplayWidth']);this['pFrameData']['set'](_0x57b3b9,_0x507cd6);}_0x522852=null,_0x4f9543=null,_0x57b3b9=null;}}return _0x4e01e5;}},{'key':'_SetImagePostProcess','value':function value(){var _0x20c8b2=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fBrightness');if(_0x20c8b2<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x20c8b2,this['fBrightness']);var _0x2caca8=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fHue');if(_0x2caca8<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x2caca8,this['fHue']);var _0x14f9a5=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fSaturation');if(_0x14f9a5<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x14f9a5,this['fSaturation']);var _0x382141=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fContrast');if(_0x382141<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x382141,this['fContrast']);var _0x4e00f=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fSharpness');if(_0x4e00f<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x4e00f,this['fSharpness']);var _0x23fabb=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fWndWidth');if(_0x23fabb<=0x0)return _0x39309a;this['ctx']['uniform1f'](_0x23fabb,this['frameDisplayWidth']);var _0x2c9d6d=this['ctx']['getUniformLocation'](this['videoShaderProgram'],'fWndHeight');return _0x2c9d6d<=0x0?_0x39309a:(this['ctx']['uniform1f'](_0x2c9d6d,this['frameDisplayHeight']),_0x4e01e5);}}]),_0x159158;}(),_0x243f6b=function(){function _0x19d50f(){_0xa7bfb2(this,_0x19d50f),this['canvas']=null,this['ctx']=null,this['regionSx']=0x0,this['regionSy']=0x0,this['regionSw']=0x0,this['regionSh']=0x0,this['needRect']=!0x1,this['bAntialias']=!0x1,this['bRecreateAntia']=!0x1;}return _0x3e0d7c(_0x19d50f,[{'key':'SR_Init','value':function value(_0x5a3f5a){this['canvas']=_0x5a3f5a,this['ctx']=this['canvas']['getContext']('2d'),this['ctx']||console['log']('your\x20browser\x20does\x20not\x20support\x202d\x20render');}},{'key':'SR_Draw','value':function value(_0x2b1d9c){return this['needRect']?this['ctx']['drawImage'](_0x2b1d9c,this['regionSx'],this['regionSy'],this['regionSw'],this['regionSh'],0x0,0x0,this['canvas']['width'],this['canvas']['height']):this['ctx']['drawImage'](_0x2b1d9c,0x0,0x0,_0x2b1d9c['displayWidth'],_0x2b1d9c['displayHeight'],0x0,0x0,this['canvas']['width'],this['canvas']['height']),0x1;}},{'key':'GetCanvasData','value':function value(_0x492c1b){console['log']('%c\x20start\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\x20blue');var _0x379348=this['ctx']['getImageData'](0x0,0x0,this['canvas']['width'],this['canvas']['height']);console['log']('%c\x202\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\x20blue');var _0x5bdd30='jpeg',_0x5cef68='image/jpeg',_0x193774=document['createElement']('canvas'),_0x5b4e1d=_0x193774['getContext']('2d');_0x193774['width']=this['canvas']['width'],_0x193774['height']=this['canvas']['height'],_0x5b4e1d['putImageData'](_0x379348,0x0,0x0);var _0x1e19a2=_0x193774['toDataURL'](),_0x25410e=document['createElement']('a');_0x25410e['download']=new Date()['getTime']()+'.'+_0x5bdd30,_0x25410e['href']=_0x1e19a2,_0x25410e['dataset']['downloadurl']=[_0x5cef68,_0x25410e['download'],_0x25410e['href']]['join'](':'),document['body']['appendChild'](_0x25410e),_0x25410e['click'](),document['body']['removeChild'](_0x25410e),console['log']('%c\x20end\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\x20blue');}},{'key':'SR_DelSubPort','value':function value(_0x1cb279){return 0x0;}},{'key':'SR_AddSubPort','value':function value(_0x4e478d){return 0x0;}},{'key':'SR_SetDisplayRect','value':function value(_0x1af668,_0xae8aba,_0x55b74e,_0x3dd5dd){this['regionSx']=_0x1af668,this['regionSy']=_0xae8aba,this['regionSw']=_0x55b74e,this['regionSh']=_0x3dd5dd,this['needRect']=!0x0;}},{'key':'SR_Destroy','value':function value(){this['canvas']=null,this['ctx']=null,this['regionSx']=0x0,this['regionSy']=0x0,this['regionSw']=0x0,this['regionSh']=0x0,this['needRect']=!0x1;}},{'key':'SR_SetCanvasSize','value':function value(_0x1ec3b2,_0x43e1f9){this['canvas']['width']=_0x1ec3b2,this['canvas']['height']=_0x43e1f9;}},{'key':'SR_GetCanvasSize','value':function value(){console['log']('canvas\x20width:'+this['canvas']['width']+',height:'+this['canvas']['height']);}},{'key':'SR_SetAntialias','value':function value(_0x4b864f){return _0x4b864f!=this['bAntialias']?(this['bAntialias']=_0x4b864f,this['bRecreateAntia']=!0x0):this['bRecreateAntia']=!0x1,this['bRecreateAntia']&&(this['bAntialias']?(this['canvas']['width']=0x5*this['canvas']['width'],this['canvas']['height']=0x5*this['canvas']['height'],this['canvas']['style']['transform']='scale(0.2)',this['canvas']['style']['transformOrigin']='0\x200'):(this['canvas']['width']=this['canvas']['width']/0x5,this['canvas']['height']=this['canvas']['height']/0x5,this['canvas']['style']['transform']='scale(1)',this['canvas']['style']['transformOrigin']='0\x200')),0x1;}},{'key':'SR_SetCallBack','value':function value(_0x4bd774,_0x2c72eb,_0x174eee){return 0x1;}},{'key':'SR_DrawFont','value':function value(){}}]),_0x19d50f;}(),_0x32d1bc=function(){function _0x6cccc6(){_0xa7bfb2(this,_0x6cccc6),this['bPortAllocated']=[],this['pRenderParam']=[],this['pFishParam']=[],this['stPTZColor']=[],this['pPTZSetColor']=null,this['nBasePTZPointNum']=[],this['nOriPTZPointNum']=[],this['nPanoPTZPointNum']=[],this['nPTZFragmentNum']=[],this['pBasePTZPoints']=[],this['pPanoPTZPoints']=[],this['pRectPoints']=[],this['nPTZRectNum']=[],this['nPTZDisplayMode']=_0x508d32,this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this['fRY2']=0x1,this['bBlack']=!0x1,this['pOriPTZPoints']=[],this['nWndPort']=_0x108024,this['nPlaceType']=0x0,this['nPTZFragmentNode']=[],this['bPTZSelected']=[],this['nPTZDisplayMode']=_0x55f7ec;for(var _0x11a9ac=0x0;_0x11a9ac<_0x56c4f4;++_0x11a9ac){this['bPortAllocated'][_0x11a9ac]=!0x1,this['bPTZSelected'][_0x11a9ac]=!0x1,this['pRenderParam'][_0x11a9ac]={},this['pRenderParam'][_0x11a9ac]['fCosH']=0x1,this['pRenderParam'][_0x11a9ac]['fSinH']=0x0,this['pRenderParam'][_0x11a9ac]['fCosV']=0x1,this['pRenderParam'][_0x11a9ac]['fSinV']=0x0,this['pRenderParam'][_0x11a9ac]['fAngle']=0x0,this['pRenderParam'][_0x11a9ac]['fZoom']=0x0,this['pRenderParam'][_0x11a9ac]['fRX1']=0x0,this['pRenderParam'][_0x11a9ac]['fRX2']=0x1,this['pRenderParam'][_0x11a9ac]['fRY1']=0x0,this['pRenderParam'][_0x11a9ac]['fRY2']=0x1,this['pRenderParam'][_0x11a9ac]['nDisplayEffect']=0x0,this['pRenderParam'][_0x11a9ac]['bBlack']=!0x1,this['pRenderParam'][_0x11a9ac]['bCut']=!0x1,this['pFishParam'][_0x11a9ac]={},this['pFishParam'][_0x11a9ac]['nFishParamType']=0x0,this['pFishParam'][_0x11a9ac]['fRXLeft']=0x0,this['pFishParam'][_0x11a9ac]['fRXRight']=0x1,this['pFishParam'][_0x11a9ac]['fRYTop']=0x0,this['pFishParam'][_0x11a9ac]['fRYBottom']=0x1,this['pFishParam'][_0x11a9ac]['bBlack']=!0x1,this['pFishParam'][_0x11a9ac]['bCut']=!0x1,this['pFishParam'][_0x11a9ac]['fAngle']=0x0,this['pFishParam'][_0x11a9ac]['fZoom']=0x0,this['pFishParam'][_0x11a9ac]['fPTZX']=0.5,this['pFishParam'][_0x11a9ac]['fPTZY']=0.5,this['stPTZColor'][_0x11a9ac]={},this['stPTZColor'][_0x11a9ac]['fR']=0x0,this['stPTZColor'][_0x11a9ac]['fG']=0x0,this['stPTZColor'][_0x11a9ac]['fB']=0x0,this['stPTZColor'][_0x11a9ac]['fA']=0x0,this['nBasePTZPointNum'][_0x11a9ac]=0x0,this['nOriPTZPointNum'][_0x11a9ac]=0x0,this['nPanoPTZPointNum'][_0x11a9ac]=0x0,this['nPTZRectNum'][_0x11a9ac]=0x0,this['pPanoPTZPoints'][_0x11a9ac]=[],this['pRectPoints'][_0x11a9ac]=[],this['pBasePTZPoints'][_0x11a9ac]=[],this['pOriPTZPoints'][_0x11a9ac]=[];for(var _0x523453=0x0;_0x523453<0x4;++_0x523453)this['pRectPoints'][_0x11a9ac][_0x523453]={},this['pRectPoints'][_0x11a9ac][_0x523453]['fX']=0x0,this['pRectPoints'][_0x11a9ac][_0x523453]['fY']=0x0;for(var _0x4d1610=0x0;_0x4d1610<_0x3682dd;++_0x4d1610)this['pBasePTZPoints'][_0x11a9ac][_0x4d1610]={},this['pBasePTZPoints'][_0x11a9ac][_0x4d1610]['fX']=0x0,this['pBasePTZPoints'][_0x11a9ac][_0x4d1610]['fY']=0x0,this['pOriPTZPoints'][_0x11a9ac][_0x4d1610]={},this['pOriPTZPoints'][_0x11a9ac][_0x4d1610]['fX']=0x0,this['pOriPTZPoints'][_0x11a9ac][_0x4d1610]['fY']=0x0,this['pPanoPTZPoints'][_0x11a9ac][_0x4d1610]={},this['pPanoPTZPoints'][_0x11a9ac][_0x4d1610]['fX']=0x0,this['pPanoPTZPoints'][_0x11a9ac][_0x4d1610]['fY']=0x0;this['nPTZFragmentNum'][_0x11a9ac]=0x0,this['nPTZFragmentNode'][_0x11a9ac]=[];for(var _0x5df155=0x0;_0x5df155<0x64;++_0x5df155)this['nPTZFragmentNode'][_0x11a9ac][_0x5df155]=0x0;}this['InitColorList']();}return _0x3e0d7c(_0x6cccc6,[{'key':'GetFECPort','value':function value(_0x58df9f){for(var _0x4b296a=_0x108024,_0x3f293c=0x0;_0x3f293c<_0x56c4f4;++_0x3f293c)if(0x0==this['bPortAllocated'][_0x3f293c]){_0x4b296a=_0x3f293c;break;}if(_0x4b296a==_0x108024)return _0x4b296a;if(_0x58df9f==_0x58af5b['SR_DE_NULL'])return _0x4b296a;var _0x29435d=this['JudgeDisplayEffect'](_0x58df9f);if(_0x4e01e5!=_0x29435d)return this['FreeFECPort'](_0x4b296a),_0x4b296a=_0x108024;if(_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']==_0x58df9f||_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']==_0x58df9f||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']==_0x58df9f||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']==_0x58df9f||_0x58af5b['SR_DE_FISH_PANORAMA_WALL']==_0x58df9f||_0x58af5b['SR_DE_FISH_ORIGINAL']==_0x58df9f){if(_0x108024!=this['nWndPort'])return this['FreeFECPort'](_0x4b296a),_0x4b296a=_0x108024;this['nWndPort']=_0x4b296a;}if(!(_0x58af5b['SR_DE_FISH_PTZ_CEILING']!=_0x58df9f&&_0x58af5b['SR_DE_FISH_PTZ_FLOOR']!=_0x58df9f&&_0x58af5b['SR_DE_FISH_PTZ_WALL']!=_0x58df9f||_0x108024==this['nWndPort']||null==this['pRenderParam'][this['nWndPort']]||_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']!=this['pRenderParam'][this['nWndPort']]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']!=this['pRenderParam'][this['nWndPort']]['nDisplayEffect']))return this['FreeFECPort'](_0x4b296a),_0x4b296a=_0x108024;if(_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']==_0x58df9f||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']==_0x58df9f){for(var _0x2a5582=0x0;_0x2a5582<_0x56c4f4;++_0x2a5582)if(null!=this['pRenderParam'][_0x2a5582]&&(_0x58af5b['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x2a5582]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x2a5582]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x2a5582]['nDisplayEffect']))return this['FreeFECPort'](_0x4b296a),_0x4b296a=_0x108024;}if(_0x58af5b['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==_0x58df9f){for(var _0x118042=0x0;_0x118042<_0x56c4f4;++_0x118042)if(null!=this['pRenderParam'][_0x118042]&&_0x58af5b['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==this['pRenderParam'][_0x118042]['nDisplayEffect'])return this['FreeFECPort'](_0x4b296a),_0x4b296a=_0x108024;}if(_0x58af5b['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==_0x58df9f){for(var _0x12e194=0x0;_0x12e194<_0x56c4f4;++_0x12e194)if(null!=this['pRenderParam'][_0x12e194]&&_0x58af5b['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==this['pRenderParam'][_0x12e194]['nDisplayEffect'])return this['FreeFECPort'](_0x4b296a),_0x4b296a=_0x108024;}return this['pRenderParam'][_0x4b296a]['fCosH']=0x1,this['pRenderParam'][_0x4b296a]['fSinH']=0x0,this['pRenderParam'][_0x4b296a]['fCosV']=0x1,this['pRenderParam'][_0x4b296a]['fSinH']=0x0,this['pRenderParam'][_0x4b296a]['fAngle']=0x0,this['pRenderParam'][_0x4b296a]['fRX1']=this['fRX1'],this['pRenderParam'][_0x4b296a]['fRX2']=this['fRX2'],this['pRenderParam'][_0x4b296a]['fRY1']=this['fRY1'],this['pRenderParam'][_0x4b296a]['fRY2']=this['fRY2'],this['pRenderParam'][_0x4b296a]['bBlack']=this['bBlack'],this['pRenderParam'][_0x4b296a]['fZoom']=0.035+0.8,this['pRenderParam'][_0x4b296a]['nDisplayEffect']=_0x58df9f,this['pFishParam'][_0x4b296a]['fAngle']=this['pRenderParam'][_0x4b296a]['fAngle'],this['pFishParam'][_0x4b296a]['fPTZX']=0.5,this['pFishParam'][_0x4b296a]['fPTZY']=0.5,this['pFishParam'][_0x4b296a]['fRXLeft']=this['pRenderParam'][_0x4b296a]['fRX1'],this['pFishParam'][_0x4b296a]['fRXRight']=this['pRenderParam'][_0x4b296a]['fRX2'],this['pFishParam'][_0x4b296a]['fRYTop']=this['pRenderParam'][_0x4b296a]['fRY1'],this['pFishParam'][_0x4b296a]['fRYBottom']=this['pRenderParam'][_0x4b296a]['fRY2'],this['pFishParam'][_0x4b296a]['bBlack']=this['pRenderParam'][_0x4b296a]['bBlack'],this['pFishParam'][_0x4b296a]['fZoom']=(this['pRenderParam'][_0x4b296a]['fZoom']-0.8)/0x7,this['bPortAllocated'][_0x4b296a]=!0x0,_0x4b296a;}},{'key':'FreeFECPort','value':function value(_0x9ea83b){if(_0x9ea83b<0x0||_0x9ea83b>=_0x56c4f4)return _0x554921;this['nWndPort']==_0x9ea83b&&(this['nWndPort']=_0x108024),this['pRenderParam'][_0x9ea83b]['fCosH']=0x1,this['pRenderParam'][_0x9ea83b]['fSinH']=0x0,this['pRenderParam'][_0x9ea83b]['fCosV']=0x1,this['pRenderParam'][_0x9ea83b]['fSinV']=0x0,this['pRenderParam'][_0x9ea83b]['fAngle']=0x0,this['pRenderParam'][_0x9ea83b]['fZoom']=0x0,this['pRenderParam'][_0x9ea83b]['fRX1']=0x0,this['pRenderParam'][_0x9ea83b]['fRX2']=0x1,this['pRenderParam'][_0x9ea83b]['fRY1']=0x0,this['pRenderParam'][_0x9ea83b]['fRY2']=0x1,this['pRenderParam'][_0x9ea83b]['nDisplayEffect']=0x0,this['pRenderParam'][_0x9ea83b]['bBlack']=!0x1,this['pRenderParam'][_0x9ea83b]['bCut']=!0x1,this['pFishParam'][_0x9ea83b]['nFishParamType']=0x0,this['pFishParam'][_0x9ea83b]['fRXLeft']=0x0,this['pFishParam'][_0x9ea83b]['fRXRight']=0x1,this['pFishParam'][_0x9ea83b]['fRYTop']=0x0,this['pFishParam'][_0x9ea83b]['fRYBottom']=0x1,this['pFishParam'][_0x9ea83b]['bBlack']=!0x1,this['pFishParam'][_0x9ea83b]['bCut']=!0x1,this['pFishParam'][_0x9ea83b]['fAngle']=0x0,this['pFishParam'][_0x9ea83b]['fZoom']=0x0,this['pFishParam'][_0x9ea83b]['fPTZX']=0.5,this['pFishParam'][_0x9ea83b]['fPTZY']=0.5,this['nBasePTZPointNum'][_0x9ea83b]=0x0,this['nOriPTZPointNum'][_0x9ea83b]=0x0,this['nPanoPTZPointNum'][_0x9ea83b]=0x0,this['nPTZRectNum'][_0x9ea83b]=0x0;for(var _0x55b831=0x0;_0x55b831<0x4;++_0x55b831)this['pRectPoints'][_0x9ea83b][_0x55b831]['fX']=0x0,this['pRectPoints'][_0x9ea83b][_0x55b831]['fY']=0x0;for(var _0x568f84=0x0;_0x568f84<_0x3682dd;++_0x568f84)this['pBasePTZPoints'][_0x9ea83b][_0x568f84]['fX']=0x0,this['pBasePTZPoints'][_0x9ea83b][_0x568f84]['fY']=0x0,this['pOriPTZPoints'][_0x9ea83b][_0x568f84]['fX']=0x0,this['pOriPTZPoints'][_0x9ea83b][_0x568f84]['fY']=0x0,this['pPanoPTZPoints'][_0x9ea83b][_0x568f84]['fX']=0x0,this['pPanoPTZPoints'][_0x9ea83b][_0x568f84]['fY']=0x0;if(null!=this['pPTZSetColor']&&(this['pPTZSetColor'][_0x9ea83b]['fA']=0x0,this['pPTZSetColor'][_0x9ea83b]['fR']=0x0,this['pPTZSetColor'][_0x9ea83b]['fG']=0x0,this['pPTZSetColor'][_0x9ea83b]['fB']=0x0),this['bPTZSelected'][_0x9ea83b]=!0x1,0x0!=this['nPlaceType']){var _0x350ee3=!0x1;if(null!=this['pRenderParam'][i]){for(var _0x35043e=0x0;_0x35043e<_0x56c4f4;++_0x35043e)if(null!=this['pRenderParam'][_0x35043e]&&(_0x58af5b['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PANORAMA_WALL']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_CYLINDER_CEILING']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_CEILING']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']==this['pRenderParam'][_0x35043e]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']==this['pRenderParam'][_0x35043e]['nDisplayEffect'])){_0x350ee3=!0x0;break;}}_0x350ee3||(this['nPlaceType']=0x0);}for(var _0x415511=!0x1,_0x17f17d=0x0;_0x17f17d<_0x56c4f4;++_0x17f17d)if(null!=this['pRenderParam'][_0x17f17d]){_0x415511=!0x0;break;}_0x415511||(this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this['fRY2']=0x1,this['bBlack']=!0x1),this['nPTZFragmentNum'][_0x9ea83b]=0x0;for(var _0x39ac39=0x0;_0x39ac39<0x64;++_0x39ac39)this['nPTZFragmentNode'][_0x9ea83b][_0x39ac39]=0x0;return this['bPortAllocated'][_0x9ea83b]=!0x1,_0x4e01e5;}},{'key':'DeInit','value':function value(){for(var _0xb6e99b=0x0;_0xb6e99b<_0x56c4f4;++_0xb6e99b){for(var _0x1cbd90=0x0;_0x1cbd90<0x4;++_0x1cbd90)this['pRectPoints'][_0xb6e99b][_0x1cbd90]=null;for(var _0x190fc2=0x0;_0x190fc2<_0x3682dd;++_0x190fc2)this['pBasePTZPoints'][_0xb6e99b][_0x190fc2]=null,this['pOriPTZPoints'][_0xb6e99b][_0x190fc2]=null,this['pPanoPTZPoints'][_0xb6e99b][_0x190fc2]=null;this['nPTZFragmentNum'][_0xb6e99b]=0x0,this['nPTZFragmentNode'][_0xb6e99b]=null,this['bPortAllocated'][_0xb6e99b]=!0x1,this['bPTZSelected'][_0xb6e99b]=!0x1,this['pRenderParam'][_0xb6e99b]=null,this['pFishParam'][_0xb6e99b]=null,this['stPTZColor'][_0xb6e99b]=null,this['nBasePTZPointNum'][_0xb6e99b]=0x0,this['nOriPTZPointNum'][_0xb6e99b]=0x0,this['nPanoPTZPointNum'][_0xb6e99b]=0x0,this['nPTZRectNum'][_0xb6e99b]=0x0,this['pPanoPTZPoints'][_0xb6e99b]=null,this['pRectPoints'][_0xb6e99b]=null,this['pBasePTZPoints'][_0xb6e99b]=null,this['pOriPTZPoints'][_0xb6e99b]=null;}return this['bPortAllocated']=null,this['pRenderParam']=null,this['pFishParam']=null,this['stPTZColor']=null,this['pPTZSetColor']=null,this['nBasePTZPointNum']=null,this['nOriPTZPointNum']=null,this['nPanoPTZPointNum']=null,this['nPTZFragmentNum']=null,this['pBasePTZPoints']=null,this['pPanoPTZPoints']=null,this['pRectPoints']=null,this['nPTZRectNum']=null,this['nPTZDisplayMode']=_0x508d32,this['fRX1']=0x0,this['fRX2']=0x1,this['fRY1']=0x0,this['fRY2']=0x1,this['bBlack']=!0x1,this['pOriPTZPoints']=null,this['pBasePTZPoints']=null,this['nWndPort']=_0x108024,this['nPlaceType']=0x0,this['nPTZFragmentNode']=null,this['bPTZSelected']=null,this['nPTZDisplayMode']=_0x55f7ec,_0x4e01e5;}},{'key':'InitColorList','value':function value(){this['stPTZColor'][0x0]['fR']=0.5,this['stPTZColor'][0x0]['fG']=0.5,this['stPTZColor'][0x0]['fB']=0x0,this['stPTZColor'][0x0]['fA']=0x1,this['stPTZColor'][0x1]['fR']=0x1,this['stPTZColor'][0x1]['fG']=0x0,this['stPTZColor'][0x1]['fB']=0x0,this['stPTZColor'][0x1]['fA']=0x1,this['stPTZColor'][0x2]['fR']=0x0,this['stPTZColor'][0x2]['fG']=0x1,this['stPTZColor'][0x2]['fB']=0x0,this['stPTZColor'][0x2]['fA']=0x1,this['stPTZColor'][0x3]['fR']=0x0,this['stPTZColor'][0x3]['fG']=0x0,this['stPTZColor'][0x3]['fB']=0x1,this['stPTZColor'][0x3]['fA']=0x1,this['stPTZColor'][0x4]['fR']=0x1,this['stPTZColor'][0x4]['fG']=0x1,this['stPTZColor'][0x4]['fB']=0x0,this['stPTZColor'][0x4]['fA']=0x1,this['stPTZColor'][0x5]['fR']=0.5,this['stPTZColor'][0x5]['fG']=0x0,this['stPTZColor'][0x5]['fB']=0x1,this['stPTZColor'][0x5]['fA']=0x1,this['stPTZColor'][0x6]['fR']=0x0,this['stPTZColor'][0x6]['fG']=0x1,this['stPTZColor'][0x6]['fB']=0x1,this['stPTZColor'][0x6]['fA']=0x1,this['stPTZColor'][0x7]['fR']=0x1,this['stPTZColor'][0x7]['fG']=0.5,this['stPTZColor'][0x7]['fB']=0x0,this['stPTZColor'][0x7]['fA']=0x1,this['stPTZColor'][0x8]['fR']=0x0,this['stPTZColor'][0x8]['fG']=0.5,this['stPTZColor'][0x8]['fB']=0.5,this['stPTZColor'][0x8]['fA']=0x1;for(var _0x489cdd=0x9;_0x489cdd<_0x56c4f4;_0x489cdd++)this['stPTZColor'][_0x489cdd]['fR']=0x1*_0x489cdd/_0x56c4f4,this['stPTZColor'][_0x489cdd]['fG']=0x1*_0x489cdd/_0x56c4f4,this['stPTZColor'][_0x489cdd]['fB']=0x1*_0x489cdd/_0x56c4f4,this['stPTZColor'][_0x489cdd]['fA']=0x1;return _0x4e01e5;}},{'key':'GetRangePoints','value':function value(_0x18b560){if(_0x18b560<0x0||_0x18b560>=_0x56c4f4)return _0x554921;if(null==this['pRenderParam'][_0x18b560])return _0x39e372;var _0x230cdf=0x0,_0x114364=0x0;switch(this['nOriPTZPointNum'][_0x18b560]=0x0,this['nBasePTZPointNum'][_0x18b560]=0x0,this['pRenderParam'][_0x18b560]['nDisplayEffect']){case _0x58af5b['SR_DE_FISH_PTZ_CEILING']:for(_0x114364=0x0;_0x114364<0x1;_0x114364+=0.01)this['GetFishPTZCeiling'](_0x230cdf,_0x114364,_0x18b560);for(_0x114364=0.9995,_0x230cdf=0x0;_0x230cdf<0x1;_0x230cdf+=0.02)this['GetFishPTZCeiling'](_0x230cdf,_0x114364,_0x18b560);for(_0x230cdf=0.999,_0x114364=0.9995;_0x114364>=0x0;_0x114364-=0.01)this['GetFishPTZCeiling'](_0x230cdf,_0x114364,_0x18b560);for(_0x114364=0x0,_0x230cdf=0.999;_0x230cdf>=0x0;_0x230cdf-=0.02)this['GetFishPTZCeiling'](_0x230cdf,_0x114364,_0x18b560);break;case _0x58af5b['SR_DE_FISH_PTZ_FLOOR']:for(_0x114364=0x0;_0x114364<0x1;_0x114364+=0.01)this['GetFishPTZFloor'](_0x230cdf,_0x114364,_0x18b560);for(_0x114364=0.9995,_0x230cdf=0x0;_0x230cdf<0x1;_0x230cdf+=0.02)this['GetFishPTZFloor'](_0x230cdf,_0x114364,_0x18b560);for(_0x230cdf=0.999,_0x114364=0.9995;_0x114364>=0x0;_0x114364-=0.01)this['GetFishPTZFloor'](_0x230cdf,_0x114364,_0x18b560);for(_0x114364=0x0,_0x230cdf=0.999;_0x230cdf>=0x0;_0x230cdf-=0.02)this['GetFishPTZFloor'](_0x230cdf,_0x114364,_0x18b560);break;case _0x58af5b['SR_DE_FISH_PTZ_WALL']:for(_0x114364=0x0;_0x114364<0x1;_0x114364+=0.01)this['GetFishPTZWALL'](_0x230cdf,_0x114364,_0x18b560);for(_0x114364=0.9995,_0x230cdf=0x0;_0x230cdf<0x1;_0x230cdf+=0.02)this['GetFishPTZWALL'](_0x230cdf,_0x114364,_0x18b560);for(_0x230cdf=0.999,_0x114364=0.9995;_0x114364>=0x0;_0x114364-=0.01)this['GetFishPTZWALL'](_0x230cdf,_0x114364,_0x18b560);for(_0x114364=0x0,_0x230cdf=0.999;_0x230cdf>=0x0;_0x230cdf-=0.02)this['GetFishPTZWALL'](_0x230cdf,_0x114364,_0x18b560);}return _0x4e01e5;}},{'key':'TransformPTZRangePoints','value':function value(_0x1493ea){if(_0x108024==this['nWndPort'])return _0x39e372;if(null==this['pBasePTZPoints'][_0x1493ea]||null==this['pRenderParam'][this['nWndPort']])return _0x39e372;this['nPanoPTZPointNum'][_0x1493ea]=0x0;var _0x4f84fd=_0x4e01e5,_0x2ddf93=this['nWndPort'];switch(this['pRenderParam'][_0x2ddf93]['nDisplayEffect']){case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:if(_0x4f84fd=this['GetPanoPTZWall'](_0x1493ea),_0x4e01e5!=_0x4f84fd)return _0x4f84fd;break;case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:if(_0x4f84fd=this['GetPanoPTZFloor'](_0x1493ea),_0x4e01e5!=_0x4f84fd)return _0x4f84fd;break;case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:if(_0x4f84fd=this['GetPanoPTZCeiling'](_0x1493ea),_0x4e01e5!=_0x4f84fd)return _0x4f84fd;break;default:return _0xbd5163;}return this['CalcPTZFragmentPoints'](_0x1493ea),_0x4e01e5;}},{'key':'GetRectPoints','value':function value(_0x1d7b22){if(_0x1d7b22<0x0||_0x1d7b22>=_0x56c4f4)return _0x554921;if(this['nWndPort']==_0x108024)return _0x39e372;if(null==this['pRenderParam'][this['nWndPort']]||null==this['pFishParam'][_0x1d7b22])return _0x39e372;var _0x5f4b02=this['pRenderParam'][this['nWndPort']]['nDisplayEffect'],_0x17acfe=_0x4e01e5,_0x290a1b={'fX':0x0,'fY':0x0};switch(_0x5f4b02){case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:if(_0x17acfe=this['GetPointFish2PanoWall'](_0x290a1b,this['pFishParam'][_0x1d7b22]['fPTZX'],this['pFishParam'][_0x1d7b22]['fPTZY']),_0x4e01e5!=_0x17acfe)return _0x17acfe;break;case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:if(_0x17acfe=this['GetPointFish2PanoFloor'](_0x290a1b,this['pFishParam'][_0x1d7b22]['fPTZX'],this['pFishParam'][_0x1d7b22]['fPTZY']),_0x4e01e5!=_0x17acfe)return _0xbd5163==_0x17acfe&&(this['pRectPoints'][_0x1d7b22]=null),_0x17acfe;break;case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:if(_0x17acfe=this['GetPointFish2PanoCeiling'](_0x290a1b,this['pFishParam'][_0x1d7b22]['fPTZX'],this['pFishParam'][_0x1d7b22]['fPTZY']),_0x4e01e5!=_0x17acfe)return _0xbd5163==_0x17acfe&&(this['pRectPoints'][_0x1d7b22]=null),_0x17acfe;break;case _0x58af5b['SR_DE_FISH_ORIGINAL']:_0x290a1b['fX']=this['pFishParam'][_0x1d7b22]['fPTZX'],_0x290a1b['fY']=this['pFishParam'][_0x1d7b22]['fPTZY'];break;default:return _0xbd5163;}if(null==this['pRectPoints'][_0x1d7b22]){this['pRectPoints'][_0x1d7b22]=[];for(var _0x3dfc77=0x0;_0x3dfc77<0x4;++_0x3dfc77)this['pRectPoints'][_0x1d7b22][_0x3dfc77]={},this['pRectPoints'][_0x1d7b22][_0x3dfc77]['fX']=0x0,this['pRectPoints'][_0x1d7b22][_0x3dfc77]['fY']=0x0;}return this['pRectPoints'][_0x1d7b22][0x0]['fX']=_0x290a1b['fX']-_0x51992d,this['pRectPoints'][_0x1d7b22][0x0]['fY']=_0x290a1b['fY']-_0x51992d,this['pRectPoints'][_0x1d7b22][0x1]['fX']=_0x290a1b['fX']+_0x51992d,this['pRectPoints'][_0x1d7b22][0x1]['fY']=_0x290a1b['fY']-_0x51992d,this['pRectPoints'][_0x1d7b22][0x2]['fX']=_0x290a1b['fX']+_0x51992d,this['pRectPoints'][_0x1d7b22][0x2]['fY']=_0x290a1b['fY']+_0x51992d,this['pRectPoints'][_0x1d7b22][0x3]['fX']=_0x290a1b['fX']-_0x51992d,this['pRectPoints'][_0x1d7b22][0x3]['fY']=_0x290a1b['fY']+_0x51992d,this['nPTZRectNum'][_0x1d7b22]=0x4,_0x4e01e5;}},{'key':'GetFishPTZCeiling','value':function value(_0x41ca5b,_0x43389a,_0x504024){var _0x35d440,_0x10390d,_0x30170d,_0x23101f,_0x36b663,_0x10a79f,_0x1ead0e,_0x41d326={'fX':0x0,'fY':0x0},_0x3234fc={'fX':0x0,'fY':0x0},_0x315d50={'fX':0x0,'fY':0x0},_0x105059={};_0x23101f=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x36b663=(this['fRX1']+this['fRX2'])/0x2*0x1,_0x10a79f=(this['fRY1']+this['fRY2'])/0x2*_0x23101f,_0x1ead0e=(this['fRX2']-this['fRX1'])/0x2*0x1,_0x41d326['fX']=_0x43389a-0.5,_0x41d326['fY']=0.5-_0x41ca5b,_0x35d440=this['pRenderParam'][_0x504024]['fZoom'],_0x3234fc['fX']=_0x41d326['fX'],_0x3234fc['fY']=_0x41d326['fY']*this['pRenderParam'][_0x504024]['fCosV']+_0x35d440*this['pRenderParam'][_0x504024]['fSinV'],_0x10390d=_0x35d440*this['pRenderParam'][_0x504024]['fCosV']-_0x41d326['fY']*this['pRenderParam'][_0x504024]['fSinV'],_0x30170d=Math['sqrt'](_0x3234fc['fX']*_0x3234fc['fX']+_0x3234fc['fY']*_0x3234fc['fY']);var _0x122528=Math['sqrt'](_0x3234fc['fX']*_0x3234fc['fX']+_0x3234fc['fY']*_0x3234fc['fY']+_0x10390d*_0x10390d),_0x213b24=Math['asin'](_0x30170d/_0x122528)/1.5707963*0.5;_0x3234fc['fX']=_0x213b24*_0x3234fc['fX']/_0x30170d,_0x3234fc['fY']=_0x213b24*_0x3234fc['fY']/_0x30170d,_0x315d50['fX']=_0x3234fc['fX']*this['pRenderParam'][_0x504024]['fCosH']-_0x3234fc['fY']*this['pRenderParam'][_0x504024]['fSinH'],_0x315d50['fY']=_0x3234fc['fX']*this['pRenderParam'][_0x504024]['fSinH']+_0x3234fc['fY']*this['pRenderParam'][_0x504024]['fCosH'],_0x105059['fX']=0x2*_0x315d50['fX']*_0x1ead0e+_0x36b663,_0x105059['fY']=0x2*-_0x315d50['fY']*_0x1ead0e+_0x10a79f;var _0x3ee96a=this['nBasePTZPointNum'][_0x504024];this['pBasePTZPoints'][_0x504024][_0x3ee96a]['fX']=_0x315d50['fX']+0.5,this['pBasePTZPoints'][_0x504024][_0x3ee96a]['fY']=0.5-_0x315d50['fY'],this['nBasePTZPointNum'][_0x504024]=this['nBasePTZPointNum'][_0x504024]+0x1;var _0x3a8332=this['fRX1']<=0x0?0x0:0x1*this['fRX1'],_0x1297f8=this['fRY1']<=0x0?0x0:this['fRY1']*_0x23101f,_0x3fed14=this['fRX2']>=0x1?0x1-_0x3a8332:0x1*this['fRX2']-_0x3a8332,_0x32f5a6=this['fRY2']>=0x1?_0x23101f-_0x1297f8:this['fRY2']*_0x23101f-_0x1297f8;if(_0x105059['fX']=(_0x105059['fX']-_0x3a8332)/_0x3fed14,_0x105059['fY']=(_0x105059['fY']-_0x1297f8)/_0x32f5a6,_0x105059['fX']<=0x1&&_0x105059['fY']<=0x1&&_0x105059['fX']>=0x0&&_0x105059['fY']>=0x0){var _0x7355d5=this['nOriPTZPointNum'][_0x504024];this['pOriPTZPoints'][_0x504024][_0x7355d5]['fX']=_0x105059['fX'],this['pOriPTZPoints'][_0x504024][_0x7355d5]['fY']=_0x105059['fY'],this['nOriPTZPointNum'][_0x504024]=this['nOriPTZPointNum'][_0x504024]+0x1;}return _0x4e01e5;}},{'key':'GetFishPTZFloor','value':function value(_0x53f092,_0x26d6e5,_0xf16cf1){var _0x5c363a,_0x2dd528,_0x5db1b3,_0xa5c110,_0xf03ae9,_0x134f7d,_0x4541be,_0x31a2e4={'fX':0x0,'fY':0x0},_0x1f0adf={'fX':0x0,'fY':0x0},_0x73e949={'fX':0x0,'fY':0x0},_0x388336={};_0xa5c110=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0xf03ae9=(this['fRX1']+this['fRX2'])/0x2*0x1,_0x134f7d=(this['fRY1']+this['fRY2'])/0x2*_0xa5c110,_0x4541be=(this['fRX2']-this['fRX1'])/0x2*0x1,_0x31a2e4['fX']=_0x53f092-0.5,_0x31a2e4['fY']=_0x26d6e5-0.5,_0x5c363a=this['pRenderParam'][_0xf16cf1]['fZoom'],_0x1f0adf['fX']=_0x31a2e4['fX'],_0x1f0adf['fY']=_0x31a2e4['fY']*this['pRenderParam'][_0xf16cf1]['fCosV']+_0x5c363a*this['pRenderParam'][_0xf16cf1]['fSinV'],_0x2dd528=_0x5c363a*this['pRenderParam'][_0xf16cf1]['fCosV']-_0x31a2e4['fY']*this['pRenderParam'][_0xf16cf1]['fSinV'],_0x5db1b3=Math['sqrt'](_0x1f0adf['fX']*_0x1f0adf['fX']+_0x1f0adf['fY']*_0x1f0adf['fY']);var _0x37f1f5=Math['sqrt'](_0x1f0adf['fX']*_0x1f0adf['fX']+_0x1f0adf['fY']*_0x1f0adf['fY']+_0x2dd528*_0x2dd528),_0x50f64a=Math['asin'](_0x5db1b3/_0x37f1f5)/1.5707963*0.5;_0x1f0adf['fX']=_0x50f64a*_0x1f0adf['fX']/_0x5db1b3,_0x1f0adf['fY']=_0x50f64a*_0x1f0adf['fY']/_0x5db1b3,_0x73e949['fX']=_0x1f0adf['fX']*this['pRenderParam'][_0xf16cf1]['fCosH']-_0x1f0adf['fY']*this['pRenderParam'][_0xf16cf1]['fSinH'],_0x73e949['fY']=_0x1f0adf['fX']*this['pRenderParam'][_0xf16cf1]['fSinH']+_0x1f0adf['fY']*this['pRenderParam'][_0xf16cf1]['fCosH'],_0x388336['fX']=0x2*_0x73e949['fX']*_0x4541be+_0xf03ae9,_0x388336['fY']=0x2*_0x73e949['fY']*_0x4541be+_0x134f7d;var _0x48696e=this['nBasePTZPointNum'][_0xf16cf1];this['pBasePTZPoints'][_0xf16cf1][_0x48696e]['fX']=_0x73e949['fX']+0.5,this['pBasePTZPoints'][_0xf16cf1][_0x48696e]['fY']=_0x73e949['fY']+0.5,this['nBasePTZPointNum'][_0xf16cf1]=this['nBasePTZPointNum'][_0xf16cf1]+0x1;var _0x53ef92=this['fRX1']<=0x0?0x0:0x1*this['fRX1'],_0x38617f=this['fRY1']<=0x0?0x0:this['fRY1']*_0xa5c110,_0x3ea0d3=this['fRX2']>=0x1?0x1-_0x53ef92:0x1*this['fRX2']-_0x53ef92,_0x32a398=this['fRY2']>=0x1?_0xa5c110-_0x38617f:this['fRY2']*_0xa5c110-_0x38617f;if(_0x388336['fX']=(_0x388336['fX']-_0x53ef92)/_0x3ea0d3,_0x388336['fY']=(_0x388336['fY']-_0x38617f)/_0x32a398,_0x388336['fX']<=0x1&&_0x388336['fY']<=0x1&&_0x388336['fX']>=0x0&&_0x388336['fY']>=0x0){var _0x43ad94=this['nOriPTZPointNum'][_0xf16cf1];this['pOriPTZPoints'][_0xf16cf1][_0x43ad94]['fX']=_0x388336['fX'],this['pOriPTZPoints'][_0xf16cf1][_0x43ad94]['fY']=_0x388336['fY'],this['nOriPTZPointNum'][_0xf16cf1]=this['nOriPTZPointNum'][_0xf16cf1]+0x1;}return _0x4e01e5;}},{'key':'GetFishPTZWALL','value':function value(_0x2d5ebd,_0x4e1f86,_0x3f18f3){var _0x34df1c,_0x5a028b,_0x4d3adf,_0x24873a,_0x3a4b93,_0x11f6c0,_0x14872d,_0x3c07ca,_0x55e27f={'fX':0x0,'fY':0x0},_0x514588={'fX':0x0,'fY':0x0},_0x3e849a={'fX':0x0,'fY':0x0},_0x392ae2={};_0x3a4b93=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x11f6c0=(this['fRX1']+this['fRX2'])/0x2*0x1,_0x14872d=(this['fRY1']+this['fRY2'])/0x2*_0x3a4b93,_0x3c07ca=(this['fRX2']-this['fRX1'])/0x2*0x1,_0x55e27f['fX']=_0x4e1f86-0.5,_0x55e27f['fY']=_0x2d5ebd-0.5,_0x34df1c=this['pRenderParam'][_0x3f18f3]['fZoom'],_0x514588['fX']=_0x55e27f['fX'],_0x514588['fY']=_0x55e27f['fY']*this['pRenderParam'][_0x3f18f3]['fCosV']+_0x34df1c*this['pRenderParam'][_0x3f18f3]['fSinV'],_0x5a028b=_0x34df1c*this['pRenderParam'][_0x3f18f3]['fCosV']-_0x55e27f['fY']*this['pRenderParam'][_0x3f18f3]['fSinV'],_0x3e849a['fX']=_0x514588['fX']*this['pRenderParam'][_0x3f18f3]['fCosH']+_0x5a028b*this['pRenderParam'][_0x3f18f3]['fSinH'],_0x3e849a['fY']=_0x514588['fY'],_0x4d3adf=_0x5a028b*this['pRenderParam'][_0x3f18f3]['fCosH']-_0x514588['fX']*this['pRenderParam'][_0x3f18f3]['fSinH'],_0x24873a=Math['sqrt'](_0x3e849a['fX']*_0x3e849a['fX']+_0x3e849a['fY']*_0x3e849a['fY']);var _0x14e736=Math['sqrt'](_0x3e849a['fX']*_0x3e849a['fX']+_0x3e849a['fY']*_0x3e849a['fY']+_0x4d3adf*_0x4d3adf),_0x366158=Math['asin'](_0x24873a/_0x14e736)/1.5707963*0.5;_0x392ae2['fX']=_0x366158*_0x3e849a['fX']/_0x24873a*_0x3c07ca*0x2+_0x11f6c0,_0x392ae2['fY']=_0x366158*_0x3e849a['fY']/_0x24873a*_0x3c07ca*0x2+_0x14872d;var _0x4eac63=this['nBasePTZPointNum'][_0x3f18f3];this['pBasePTZPoints'][_0x3f18f3][_0x4eac63]['fX']=_0x366158*_0x3e849a['fX']/_0x24873a+0.5,this['pBasePTZPoints'][_0x3f18f3][_0x4eac63]['fY']=_0x366158*_0x3e849a['fY']/_0x24873a+0.5,this['nBasePTZPointNum'][_0x3f18f3]=this['nBasePTZPointNum'][_0x3f18f3]+0x1;var _0x2d6062=this['fRX1']<=0x0?0x0:0x1*this['fRX1'],_0x49701a=this['fRY1']<=0x0?0x0:this['fRY1']*_0x3a4b93,_0x14d122=this['fRX2']>=0x1?0x1-_0x2d6062:0x1*this['fRX2']-_0x2d6062,_0x3b8047=this['fRY2']>=0x1?_0x3a4b93-_0x49701a:this['fRY2']*_0x3a4b93-_0x49701a;if(_0x392ae2['fX']=(_0x392ae2['fX']-_0x2d6062)/_0x14d122,_0x392ae2['fY']=(_0x392ae2['fY']-_0x49701a)/_0x3b8047,_0x392ae2['fX']<=0x1&&_0x392ae2['fY']<=0x1&&_0x392ae2['fX']>=0x0&&_0x392ae2['fY']>=0x0){var _0x384d98=this['nOriPTZPointNum'][_0x3f18f3];this['pOriPTZPoints'][_0x3f18f3][_0x384d98]['fX']=_0x392ae2['fX'],this['pOriPTZPoints'][_0x3f18f3][_0x384d98]['fY']=_0x392ae2['fY'],this['nOriPTZPointNum'][_0x3f18f3]=this['nOriPTZPointNum'][_0x3f18f3]+0x1;}return _0x4e01e5;}},{'key':'GetPanoPTZCeiling','value':function value(_0x51848f){if(null==this['pRenderParam'][_0x51848f]||null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==this['pBasePTZPoints'][_0x51848f])return _0x39e372;var _0x4287a5,_0x5e0e39,_0x29488b=this['nBasePTZPointNum'][_0x51848f];_0x4287a5=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x5e0e39=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x467212,_0x3c15da=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRY1']<0x0||this['fRX1']<0x0)&&(this['fRX1']<0x0&&(_0x467212=0x1*-this['fRX1'])>_0x3c15da&&(_0x3c15da=_0x467212),this['fRX2']>0x1&&(_0x467212=0x1*(this['fRX2']-0x1))>_0x3c15da&&(_0x3c15da=_0x467212),this['fRY1']<0x0&&(_0x467212=-this['fRY1']*_0x4287a5)>_0x3c15da&&(_0x3c15da=_0x467212),this['fRY2']>0x1&&(_0x467212=(this['fRY2']-0x1)*_0x4287a5)>_0x3c15da&&(_0x3c15da=_0x467212));for(var _0xd405e,_0x429fb1=_0x3c15da/_0x5e0e39,_0x2b05b2={'fX':0x0,'fY':0x0},_0x5efd16={'fX':0x0,'fY':0x0},_0x1e5816=0x0;_0x1e5816<_0x29488b;++_0x1e5816)if(_0x5efd16['fX']=this['pBasePTZPoints'][_0x51848f][_0x1e5816]['fX'],_0x5efd16['fY']=this['pBasePTZPoints'][_0x51848f][_0x1e5816]['fY'],!(Math['abs'](_0x5efd16['fX']-0.5)<_0x58bec0&&Math['abs'](_0x5efd16['fY']-0.5)<_0x58bec0)){var _0x48e25d={'fX':0x0,'fY':0x0},_0x31c42c={'fX':0x0,'fY':0x0};_0x48e25d['fX']=_0x5efd16['fX']-0.5,_0x48e25d['fY']=_0x5efd16['fY']-0.5,_0x31c42c['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x31c42c['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x26e3eb=Math['sqrt'](_0x48e25d['fX']*_0x48e25d['fX']+_0x48e25d['fY']*_0x48e25d['fY']),_0x19bc9c=Math['sqrt'](_0x31c42c['fX']*_0x31c42c['fX']+_0x31c42c['fY']*_0x31c42c['fY']);if(_0xd405e=Math['acos']((_0x48e25d['fX']*_0x31c42c['fX']+_0x48e25d['fY']*_0x31c42c['fY'])/(_0x26e3eb*_0x19bc9c)),_0x48e25d['fX']*_0x31c42c['fY']-_0x48e25d['fY']*_0x31c42c['fX']>0x0&&(_0xd405e=6.2831852-_0xd405e),_0x2b05b2['fX']=_0xd405e/6.2831853,_0x2b05b2['fY']=(0x2*(0.5-_0x26e3eb)-_0x429fb1)/(0.8-_0x429fb1),_0x2b05b2['fY']>=0x0&&_0x2b05b2['fX']>=0x0&&_0x2b05b2['fY']<=0x1&&_0x2b05b2['fX']<=0x1){var _0x1d1513=this['nPanoPTZPointNum'][_0x51848f];this['pPanoPTZPoints'][_0x51848f][_0x1d1513]['fX']=_0x2b05b2['fX'],this['pPanoPTZPoints'][_0x51848f][_0x1d1513]['fY']=_0x2b05b2['fY'],this['nPanoPTZPointNum'][_0x51848f]=this['nPanoPTZPointNum'][_0x51848f]+0x1;}}return _0x4e01e5;}},{'key':'GetPanoPTZFloor','value':function value(_0x439ed0){if(null==this['pRenderParam'][_0x439ed0]||null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==this['pBasePTZPoints'][_0x439ed0])return _0x39e372;var _0x3ff2d2,_0x4a39e5,_0xeec5a1=this['nBasePTZPointNum'][_0x439ed0];_0x3ff2d2=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x4a39e5=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x2f178b,_0x26a0d4=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRY1']<0x0||this['fRX1']<0x0)&&(this['fRX1']<0x0&&(_0x2f178b=0x1*-this['fRX1'])>_0x26a0d4&&(_0x26a0d4=_0x2f178b),this['fRX2']>0x1&&(_0x2f178b=0x1*(this['fRX2']-0x1))>_0x26a0d4&&(_0x26a0d4=_0x2f178b),this['fRY1']<0x0&&(_0x2f178b=-this['fRY1']*_0x3ff2d2)>_0x26a0d4&&(_0x26a0d4=_0x2f178b),this['fRY2']>0x1&&(_0x2f178b=(this['fRY2']-0x1)*_0x3ff2d2)>_0x26a0d4&&(_0x26a0d4=_0x2f178b));for(var _0x5bf1ee,_0x478957=_0x26a0d4/_0x4a39e5,_0x43813c={'fX':0x0,'fY':0x0},_0x26a991={'fX':0x0,'fY':0x0},_0x13d5c3=0x0;_0x13d5c3<_0xeec5a1;++_0x13d5c3)if(_0x26a991['fX']=this['pBasePTZPoints'][_0x439ed0][_0x13d5c3]['fX'],_0x26a991['fY']=this['pBasePTZPoints'][_0x439ed0][_0x13d5c3]['fY'],!(Math['abs'](_0x26a991['fX']-0.5)<_0x58bec0&&Math['abs'](_0x26a991['fY']-0.5)<_0x58bec0)){var _0x5af488={'fX':0x0,'fY':0x0},_0x4f8b82={'fX':0x0,'fY':0x0};_0x5af488['fX']=_0x26a991['fX']-0.5,_0x5af488['fY']=_0x26a991['fY']-0.5,_0x4f8b82['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x4f8b82['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x323587=Math['sqrt'](_0x5af488['fX']*_0x5af488['fX']+_0x5af488['fY']*_0x5af488['fY']),_0x38b756=Math['sqrt'](_0x4f8b82['fX']*_0x4f8b82['fX']+_0x4f8b82['fY']*_0x4f8b82['fY']);if(_0x5bf1ee=Math['acos']((_0x5af488['fX']*_0x4f8b82['fX']+_0x5af488['fY']*_0x4f8b82['fY'])/(_0x323587*_0x38b756)),_0x5af488['fX']*_0x4f8b82['fY']-_0x5af488['fY']*_0x4f8b82['fX']>0x0&&(_0x5bf1ee=6.2831852-_0x5bf1ee),_0x43813c['fX']=0x1-_0x5bf1ee/6.2831853,_0x43813c['fY']=0x1-(0x2*(0.5-_0x323587)-_0x478957)/(0.8-_0x478957),_0x43813c['fY']>=0x0&&_0x43813c['fX']>=0x0&&_0x43813c['fY']<=0x1&&_0x43813c['fX']<=0x1){var _0x16d527=this['nPanoPTZPointNum'][_0x439ed0];this['pPanoPTZPoints'][_0x439ed0][_0x16d527]['fX']=_0x43813c['fX'],this['pPanoPTZPoints'][_0x439ed0][_0x16d527]['fY']=_0x43813c['fY'],this['nPanoPTZPointNum'][_0x439ed0]=this['nPanoPTZPointNum'][_0x439ed0]+0x1;}}return _0x4e01e5;}},{'key':'GetPanoPTZWall','value':function value(_0x199bcb){if(null==this['pRenderParam'][_0x199bcb]||null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==this['pBasePTZPoints'][_0x199bcb])return _0x39e372;var _0x5acf3a,_0x432336,_0x178c66=this['nBasePTZPointNum'][_0x199bcb];_0x5acf3a=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x432336=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x22903d,_0x52b026,_0x5bec82,_0x59c0a0,_0x52384f,_0x12dee=0x0,_0x512b2e=0x1,_0x1dc084=0.1,_0x78519b=0.9;this['fRX1']<0x0&&(_0x22903d=0x1*-this['fRX1'],_0x12dee=_0x22903d/=0x2*_0x432336),this['fRX2']>0x1&&(_0x52b026=0x1*(this['fRX2']-0x1),_0x512b2e=0x1-(_0x52b026/=0x2*_0x432336)),this['fRY1']<0x0&&(_0x5bec82=-this['fRY1']*_0x5acf3a,_0x1dc084=(_0x5bec82/=0x2*_0x432336)>0.1?_0x5bec82:0.1),this['fRY2']>0x1&&(_0x59c0a0=(this['fRY2']-0x1)*_0x5acf3a,_0x78519b=(_0x59c0a0/=0x2*_0x432336)>0x1-0.9?0x1-_0x59c0a0:0.9);for(var _0x404d10={'fX':0x0,'fY':0x0},_0x54dca3={'fX':0x0,'fY':0x0},_0x536af3=0x0;_0x536af3<_0x178c66;++_0x536af3){_0x54dca3['fX']=this['pBasePTZPoints'][_0x199bcb][_0x536af3]['fX'],_0x54dca3['fY']=this['pBasePTZPoints'][_0x199bcb][_0x536af3]['fY'];var _0x4ba939=0x2*_0x54dca3['fX']*_0x432336,_0x5122c5=0x2*_0x54dca3['fY']*_0x432336;if(_0x52384f=Math['sqrt'](_0x432336*_0x432336-(_0x5122c5-_0x432336)*(_0x5122c5-_0x432336)),!(Math['abs'](_0x52384f)<_0x58bec0)&&(_0x54dca3['fX']=_0x432336*(_0x4ba939-_0x432336)/_0x52384f+_0x432336,_0x54dca3['fY']=_0x5122c5,_0x404d10['fX']=(_0x54dca3['fX']-0x2*_0x12dee*_0x432336)/(0x2*(_0x512b2e-_0x12dee)*_0x432336),_0x404d10['fY']=(_0x54dca3['fY']-0x2*_0x1dc084*_0x432336)/(0x2*(_0x78519b-_0x1dc084)*_0x432336),_0x404d10['fY']>=0x0&&_0x404d10['fX']>=0x0&&_0x404d10['fY']<=0x1&&_0x404d10['fX']<=0x1)){var _0x253c31=this['nPanoPTZPointNum'][_0x199bcb];this['pPanoPTZPoints'][_0x199bcb][_0x253c31]['fX']=_0x404d10['fX'],this['pPanoPTZPoints'][_0x199bcb][_0x253c31]['fY']=_0x404d10['fY'],this['nPanoPTZPointNum'][_0x199bcb]=this['nPanoPTZPointNum'][_0x199bcb]+0x1;}}return _0x4e01e5;}},{'key':'GetPointPano2FishCeiling','value':function value(_0x5d924c,_0x351581,_0x97b02d){if(null==_0x5d924c||null==this['pRenderParam'][this['nWndPort']])return _0x39e372;var _0x460f5f,_0x3a19ea;_0x460f5f=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x3a19ea=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0xda6c17,_0x38445e=0x0,_0x544dd1=0x1,_0x1b350d=0x0,_0x374b66=0x1,_0x890d1c=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&((_0xda6c17=0x1*-this['fRX1'])>_0x890d1c&&(_0x890d1c=_0xda6c17),_0x38445e=_0xda6c17/=0x2*_0x3a19ea),this['fRX2']>0x1&&((_0xda6c17=0x1*(this['fRX2']-0x1))>_0x890d1c&&(_0x890d1c=_0xda6c17),_0x544dd1=0x1-(_0xda6c17/=0x2*_0x3a19ea)),this['fRY1']<0x0&&((_0xda6c17=-this['fRY1']*_0x460f5f)>_0x890d1c&&(_0x890d1c=_0xda6c17),_0x1b350d=_0xda6c17/=0x2*_0x3a19ea),this['fRY2']>0x1&&((_0xda6c17=(this['fRY2']-0x1)*_0x460f5f)>_0x890d1c&&(_0x890d1c=_0xda6c17),_0x374b66=0x1-(_0xda6c17/=0x2*_0x3a19ea)));var _0x36b0ca,_0x933264,_0x570cd8=_0x890d1c/_0x3a19ea,_0x4b9356={},_0x51061d={};return _0x4b9356['fX']=_0x351581,_0x4b9356['fY']=(0.8-_0x570cd8)*_0x97b02d+_0x570cd8,_0x36b0ca=6.2831853*_0x4b9356['fX']+this['pRenderParam'][this['nWndPort']]['fAngle'],_0x933264=0.5*(0x1-_0x4b9356['fY']),_0x51061d['fX']=0.5-_0x933264*Math['sin'](_0x36b0ca),_0x51061d['fY']=0.5+_0x933264*Math['cos'](_0x36b0ca),_0x51061d['fX']=(_0x51061d['fX']-_0x38445e)/(_0x544dd1-_0x38445e),_0x51061d['fY']=(_0x51061d['fY']-_0x1b350d)/(_0x374b66-_0x1b350d),_0x5d924c['fX']=_0x51061d['fX'],_0x5d924c['fY']=_0x51061d['fY'],_0x4e01e5;}},{'key':'GetPointPano2FishFloor','value':function value(_0x5cdc1e,_0x39c0f9,_0x4c732b){if(null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==_0x5cdc1e)return _0x554921;var _0x47155d,_0x101050;_0x47155d=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x101050=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x785062,_0x527673=0x0,_0x1dc42a=0x1,_0x2038e1=0x0,_0x1ae14c=0x1,_0x5b537f=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&((_0x785062=0x1*-this['fRX1'])>_0x5b537f&&(_0x5b537f=_0x785062),_0x527673=_0x785062/=0x2*_0x101050),this['fRX2']>0x1&&((_0x785062=0x1*(this['fRX2']-0x1))>_0x5b537f&&(_0x5b537f=_0x785062),_0x1dc42a=0x1-(_0x785062/=0x2*_0x101050)),this['fRY1']<0x0&&((_0x785062=-this['fRY1']*_0x47155d)>_0x5b537f&&(_0x5b537f=_0x785062),_0x2038e1=_0x785062/=0x2*_0x101050),this['fRY2']>0x1&&((_0x785062=(this['fRY2']-0x1)*_0x47155d)>_0x5b537f&&(_0x5b537f=_0x785062),_0x1ae14c=0x1-(_0x785062/=0x2*_0x101050)));var _0x239307,_0x223c00,_0x4ace57=_0x5b537f/_0x101050,_0x3c576a={},_0x1738fa={};return _0x3c576a['fX']=0x1-_0x39c0f9,_0x3c576a['fY']=(0.8-_0x4ace57)*(0x1-_0x4c732b)+_0x4ace57,_0x239307=6.2831853*_0x3c576a['fX']+this['pRenderParam'][this['nWndPort']]['fAngle'],_0x223c00=0.5*(0x1-_0x3c576a['fY']),_0x1738fa['fX']=0.5-_0x223c00*Math['sin'](_0x239307),_0x1738fa['fY']=0.5+_0x223c00*Math['cos'](_0x239307),_0x1738fa['fX']=(_0x1738fa['fX']-_0x527673)/(_0x1dc42a-_0x527673),_0x1738fa['fY']=(_0x1738fa['fY']-_0x2038e1)/(_0x1ae14c-_0x2038e1),_0x5cdc1e['fX']=_0x1738fa['fX'],_0x5cdc1e['fY']=_0x1738fa['fY'],_0x4e01e5;}},{'key':'GetPointPano2FishWall','value':function value(_0x34d0fc,_0x44932b,_0x14d0ad){if(null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==_0x34d0fc)return _0x554921;var _0x1b0871,_0x3e8acc;_0x1b0871=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x3e8acc=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x153508,_0x1e17c5,_0x17cdc6,_0x45af4e,_0x599423=0x0,_0x3c58b2=0x1,_0x58ea5b=0.1,_0x4b204e=0.9,_0x21b413=0x0,_0x2ff135=0x1,_0x267a2d=0x0,_0x212c50=0x1;this['fRX1']<0x0&&(_0x153508=0x1*-this['fRX1'],_0x599423=_0x153508/=0x2*_0x3e8acc,_0x21b413=_0x153508),this['fRX2']>0x1&&(_0x1e17c5=0x1*(this['fRX2']-0x1),_0x3c58b2=0x1-(_0x1e17c5/=0x2*_0x3e8acc),_0x2ff135=0x1-_0x1e17c5),this['fRY1']<0x0&&(_0x17cdc6=-this['fRY1']*_0x1b0871,_0x58ea5b=(_0x17cdc6/=0x2*_0x3e8acc)>0.1?_0x17cdc6:0.1,_0x267a2d=_0x17cdc6),this['fRY2']>0x1&&(_0x45af4e=(this['fRY2']-0x1)*_0x1b0871,_0x4b204e=(_0x45af4e/=0x2*_0x3e8acc)>0x1-0.9?0x1-_0x45af4e:0.9,_0x212c50=0x1-_0x45af4e);var _0x2d3e3b={},_0x34c550={};_0x2d3e3b['fX']=_0x44932b*(_0x3c58b2-_0x599423)+_0x599423,_0x2d3e3b['fY']=_0x14d0ad*(_0x4b204e-_0x58ea5b)+_0x58ea5b;var _0x399e25=Math['sqrt'](0.25-(_0x2d3e3b['fY']-0.5)*(_0x2d3e3b['fY']-0.5));return _0x34c550['fX']=(_0x2d3e3b['fX']-0.5)*_0x399e25/0.5+0.5,_0x34c550['fY']=_0x2d3e3b['fY'],_0x34c550['fX']=(_0x34c550['fX']-_0x21b413)/(_0x2ff135-_0x21b413),_0x34c550['fY']=(_0x34c550['fY']-_0x267a2d)/(_0x212c50-_0x267a2d),_0x34d0fc['fX']=_0x34c550['fX'],_0x34d0fc['fY']=_0x34c550['fY'],_0x4e01e5;}},{'key':'UpdatePTZPosition','value':function value(_0x56cc8d,_0x5ec25a,_0x4f75ea){if(null==this['pRenderParam'][_0x56cc8d])return _0x39e372;var _0x1838c3={'fHAngleSin':0x0,'fHAngleCos':0x0,'fVAngleSin':0x0,'fVAngleCos':0x0},_0x3ce697=_0x4e01e5;if(_0x58af5b['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x56cc8d]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x56cc8d]['nDisplayEffect']){if((_0x3ce697=this['ComputeAngleVertical'](_0x5ec25a,_0x4f75ea,_0x1838c3,this['pRenderParam'][_0x56cc8d]['nDisplayEffect']))!=_0x4e01e5)return _0x3ce697;}else {if(_0x58af5b['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x56cc8d]['nDisplayEffect'])return _0xbd5163;if((_0x3ce697=this['ComputeAngleHorizontal'](_0x5ec25a,_0x4f75ea,_0x1838c3))!=_0x4e01e5)return _0x3ce697;}return 0x0==this['IsInImage'](this['fRX1'],this['fRX2'],this['fRY1'],this['fRY2'],_0x1838c3,this['pRenderParam'][_0x56cc8d]['fZoom'],this['pRenderParam'][_0x56cc8d]['nDisplayEffect'])?_0x554921:(this['pRenderParam'][_0x56cc8d]['fCosH']=_0x1838c3['fHAngleCos'],this['pRenderParam'][_0x56cc8d]['fSinH']=_0x1838c3['fHAngleSin'],this['pRenderParam'][_0x56cc8d]['fCosV']=_0x1838c3['fVAngleCos'],this['pRenderParam'][_0x56cc8d]['fSinV']=_0x1838c3['fVAngleSin'],_0x4e01e5);}},{'key':'JudgeDisplayEffect','value':function value(_0x236c89){var _0x2122a0=0x0;switch(_0x2122a0){case 0x0:return _0x2122a0=this['GetPlaceType'](_0x236c89),0x4==this['nPlaceType']&&(this['nPlaceType']=0x0),_0x4e01e5;case 0x3:return (_0x2122a0=this['GetPlaceType'](_0x236c89))==this['nPlaceType']||0x4==this['nPlaceType']?_0x4e01e5:_0xbd5163;case 0x2:case 0x1:return (_0x2122a0=this['GetPlaceType'](_0x236c89))==this['nPlaceType']||0x4==_0x2122a0?_0x4e01e5:_0xbd5163;default:return _0xbd5163;}return _0xbd5163;}},{'key':'GetPlaceType','value':function value(_0x4692b8){switch(_0x4692b8){case _0x58af5b['SR_DE_FISH_PTZ_CEILING']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']:case _0x58af5b['SR_DE_FISH_CYLINDER_CEILING']:case _0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:return 0x3;case _0x58af5b['SR_DE_FISH_PTZ_FLOOR']:case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:case _0x58af5b['SR_DE_FISH_PANARAMA_FLOOR_180']:case _0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']:case _0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:return 0x2;case _0x58af5b['SR_DE_FISH_PTZ_WALL']:case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:case _0x58af5b['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:case _0x58af5b['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:return 0x1;case _0x58af5b['SR_DE_FISH_SEMISPHERE']:case _0x58af5b['SR_DE_FISH_ORIGINAL']:case _0x58af5b['SR_DE_FISH_PLANET']:case _0x58af5b['SR_DE_FISH_SPHERE']:case _0x58af5b['SR_DE_FISH_PLANET']:return 0x4;default:return 0x0;}return 0x0;}},{'key':'SetFishParam','value':function value(_0x356401,_0x5d07b3){if(_0x356401<0x0||_0x356401>=_0x56c4f4)return _0x554921;if(null==_0x5d07b3)return _0x554921;if(null==this['pRenderParam'][_0x356401])return _0x39e372;var _0x143220=_0x4e01e5;switch(_0x5d07b3['nFishParamType']){case _0x1a235b:if((_0x143220=this['UpdateCircyeParam'](_0x5d07b3['fRXLeft'],_0x5d07b3['fRXRight'],_0x5d07b3['fRYTop'],_0x5d07b3['fRYBottom']))!=_0x4e01e5)return _0x143220;this['pRenderParam'][_0x356401]['bCut']=_0x5d07b3['bCut'],this['bBlack']=_0x5d07b3['bBlack'];break;case _0x15dbff:if(_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']!=this['pRenderParam'][_0x356401]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']!=this['pRenderParam'][_0x356401]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']!=this['pRenderParam'][_0x356401]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']!=this['pRenderParam'][_0x356401]['nDisplayEffect'])return _0xbd5163;if((_0x143220=this['UpdateWideScanAngle'](_0x356401,_0x5d07b3['fAngle']))!=_0x4e01e5)return _0x143220;this['pFishParam'][_0x356401]['fAngle']=_0x5d07b3['fAngle'];break;case _0x16f8a2:if(_0x58af5b['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x356401]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PTZ_CEILING']!=this['pRenderParam'][_0x356401]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PTZ_FLOOR']!=this['pRenderParam'][_0x356401]['nDisplayEffect'])return _0xbd5163;if((_0x143220=this['UpdateRangeParam'](_0x356401,_0x5d07b3['fZoom']))!=_0x4e01e5)return _0x143220;this['pFishParam'][_0x356401]['fZoom']=_0x5d07b3['fZoom'];break;case _0x33e182:if(_0x58af5b['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x356401]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PTZ_CEILING']!=this['pRenderParam'][_0x356401]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PTZ_FLOOR']!=this['pRenderParam'][_0x356401]['nDisplayEffect'])return _0xbd5163;if((_0x143220=this['UpdatePTZPosition'](_0x356401,_0x5d07b3['fPTZX'],_0x5d07b3['fPTZY'],this['pRenderParam'][_0x356401]['fZoom'],!0x0))!=_0x4e01e5)return _0x143220;this['pFishParam'][_0x356401]['fPTZX']=_0x5d07b3['fPTZX'],this['pFishParam'][_0x356401]['fPTZY']=_0x5d07b3['fPTZY'];break;case _0x43d66b:return _0xbd5163;}return _0x143220=this['ComputePTZPoints']();}},{'key':'GetFishParam','value':function value(_0x2012ec,_0x37dfcc){return _0x2012ec<0x0||_0x2012ec>=_0x56c4f4||null==_0x37dfcc||null==this['pFishParam'][_0x2012ec]?_0x554921:(_0x37dfcc['fRXLeft']=this['fRX1'],_0x37dfcc['fRXRight']=this['fRX2'],_0x37dfcc['fRYTop']=this['fRY1'],_0x37dfcc['fRYBottom']=this['fRY2'],_0x37dfcc['bBlack']=this['bBlack'],_0x37dfcc['bCut']=this['pRenderParam'][_0x2012ec]['bCut'],_0x37dfcc['nFishParamType']=this['pFishParam'][_0x2012ec]['nFishParamType'],_0x37dfcc['fAngle']=this['pFishParam'][_0x2012ec]['fAngle'],_0x37dfcc['fZoom']=this['pFishParam'][_0x2012ec]['fZoom'],_0x37dfcc['fPTZX']=this['pFishParam'][_0x2012ec]['fPTZX'],_0x37dfcc['fPTZY']=this['pFishParam'][_0x2012ec]['fPTZY'],_0x4e01e5);}},{'key':'GetRenderParam','value':function value(_0x32f641,_0x1d20c5){return _0x32f641<0x0||_0x32f641>=_0x56c4f4||null==_0x1d20c5||null==this['pRenderParam'][_0x32f641]?_0x554921:(_0x1d20c5['fRXLeft']=this['fRX1'],_0x1d20c5['fRXRight']=this['fRX2'],_0x1d20c5['fRYTop']=this['fRY1'],_0x1d20c5['fRYBottom']=this['fRY2'],_0x1d20c5['bBlack']=this['bBlack'],_0x1d20c5['fCosH']=this['pRenderParam'][_0x32f641]['fCosH'],_0x1d20c5['fSinH']=this['pRenderParam'][_0x32f641]['fSinH'],_0x1d20c5['fCosV']=this['pRenderParam'][_0x32f641]['fCosV'],_0x1d20c5['fSinV']=this['pRenderParam'][_0x32f641]['fSinV'],_0x1d20c5['fAngle']=this['pRenderParam'][_0x32f641]['fAngle'],_0x1d20c5['fZoom']=this['pRenderParam'][_0x32f641]['fZoom'],_0x1d20c5['nDisplayEffect']=this['pRenderParam'][_0x32f641]['nDisplayEffect'],_0x1d20c5['bCut']=this['pRenderParam'][_0x32f641]['bCut'],_0x4e01e5);}},{'key':'UpdateCircyeParam','value':function value(_0x181bae,_0x8f1033,_0x287d93,_0x4cfc7d){if(_0x181bae<=-0.5||_0x181bae>=0.4||_0x8f1033<=0.6||_0x8f1033>=1.5||_0x287d93<=-0.5||_0x287d93>=0.4||_0x4cfc7d<=0.6||_0x4cfc7d>=1.5||_0x181bae+_0x8f1033<=0.8||_0x181bae+_0x8f1033>=1.2||_0x287d93+_0x4cfc7d<=0.8||_0x287d93+_0x4cfc7d>=1.2)return _0x554921;if(_0x181bae<0x0||_0x8f1033>0x1||_0x287d93<0x0||_0x4cfc7d>0x1){for(var _0x38b818=0x0;_0x38b818<_0x56c4f4;++_0x38b818)if(_0x58af5b['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x38b818]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x38b818]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x38b818]['nDisplayEffect']){var _0x46af6a={};if(_0x46af6a['fHAngleCos']=this['pRenderParam'][_0x38b818]['fCosH'],_0x46af6a['fHAngleSin']=this['pRenderParam'][_0x38b818]['fSinH'],_0x46af6a['fVAngleCos']=this['pRenderParam'][_0x38b818]['fCosV'],_0x46af6a['fVAngleSin']=this['pRenderParam'][_0x38b818]['fSinV'],0x0==this['IsInImage'](_0x181bae,_0x8f1033,_0x287d93,_0x4cfc7d,_0x46af6a,this['pRenderParam'][_0x38b818]['fZoom'],this['pRenderParam'][_0x38b818]['nDisplayEffect']))return _0x554921;}}return this['fRX1']=_0x181bae,this['fRX2']=_0x8f1033,this['fRY1']=_0x287d93,this['fRY2']=_0x4cfc7d,_0x4e01e5;}},{'key':'UpdateWideScanAngle','value':function value(_0x4ddada,_0x5a8636){return null==this['pRenderParam'][_0x4ddada]?_0x39e372:(_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']==this['pRenderParam'][_0x4ddada]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']==this['pRenderParam'][_0x4ddada]['nDisplayEffect']?this['pRenderParam'][_0x4ddada]['fAngle']=_0x5a8636:_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']!=this['pRenderParam'][_0x4ddada]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']!=this['pRenderParam'][_0x4ddada]['nDisplayEffect']||(this['pRenderParam'][_0x4ddada]['fAngle']=-_0x5a8636),_0x4e01e5);}},{'key':'ComputeAngleVertical','value':function value(_0x4e1dce,_0x40e24a,_0xd1f6b7,_0xae746a){var _0x301260=_0x4e1dce,_0x1d4d4a=_0x40e24a,_0x48ca46=Math['sqrt']((_0x1d4d4a-0.5)*(_0x1d4d4a-0.5)+(_0x301260-0.5)*(_0x301260-0.5));if(_0x48ca46>0.5)return _0x554921;if(_0x48ca46<0.001)return _0xd1f6b7['fVAngleCos']=0x1,_0xd1f6b7['fVAngleSin']=0x0,_0xd1f6b7['fHAngleCos']=0x1,_0xd1f6b7['fHAngleSin']=0x0,_0x4e01e5;if(_0xae746a==_0x58af5b['SR_DE_FISH_PTZ_CEILING']){_0xd1f6b7['fHAngleCos']=(0.5-_0x1d4d4a)/_0x48ca46,_0xd1f6b7['fHAngleSin']=(0.5-_0x301260)/_0x48ca46;var _0x166033=_0x48ca46*_0x49f762;_0xd1f6b7['fVAngleCos']=Math['cos'](_0x166033),_0xd1f6b7['fVAngleSin']=Math['sin'](_0x166033);}else {if(_0xae746a!=_0x58af5b['SR_DE_FISH_PTZ_FLOOR'])return _0x554921;_0xd1f6b7['fHAngleCos']=(_0x1d4d4a-0.5)/_0x48ca46,_0xd1f6b7['fHAngleSin']=(0.5-_0x301260)/_0x48ca46;var _0x5f5e0b=_0x48ca46*_0x49f762;_0xd1f6b7['fVAngleCos']=Math['cos'](_0x5f5e0b),_0xd1f6b7['fVAngleSin']=Math['sin'](_0x5f5e0b);}return _0x4e01e5;}},{'key':'ComputeAngleHorizontal','value':function value(_0x58f97f,_0x4ac541,_0x517a8a){var _0x56d1b2,_0x14f85e,_0x13dbcb,_0xe3031,_0x2e2b4a,_0x17ed02,_0x4a5d53,_0x597a0e=_0x58f97f;return (_0x4ac541-(_0x2e2b4a=0.5))*(_0x4ac541-_0x2e2b4a)+(_0x597a0e-_0x2e2b4a)*(_0x597a0e-_0x2e2b4a)>0.25?_0x554921:(_0x17ed02=(_0x4ac541-_0x2e2b4a)/_0x2e2b4a*_0x49f762/0x2,_0x56d1b2=Math['cos'](_0x17ed02),_0x14f85e=Math['sin'](_0x17ed02),(_0x597a0e-_0x2e2b4a)/_0x2e2b4a/_0x56d1b2>0x1||(_0x597a0e-_0x2e2b4a)/_0x2e2b4a/_0x56d1b2<-0x1?SR_ERR_PARAM:(_0x4a5d53=(_0x597a0e-_0x2e2b4a)/_0x2e2b4a/_0x56d1b2*_0x49f762/0x2,_0x13dbcb=Math['cos'](_0x4a5d53),_0xe3031=Math['sin'](_0x4a5d53),_0x517a8a['fVAngleCos']=_0x56d1b2,_0x517a8a['fVAngleSin']=_0x14f85e,_0x517a8a['fHAngleCos']=_0x13dbcb,_0x517a8a['fHAngleSin']=_0xe3031,_0x4e01e5));}},{'key':'IsInImage','value':function value(_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2,_0x35bb61,_0x42d59c){return 0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0x1,0.5,_0x42d59c)&&0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0x0,0.5,_0x42d59c)&&0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0.5,0x1,_0x42d59c)&&0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0.5,0x0,_0x42d59c)&&0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0x0,0x0,_0x42d59c)&&0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0x0,0x1,_0x42d59c)&&0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0x1,0x1,_0x42d59c)&&0x1!=this['IsOutofImage'](_0x5647e3,_0x92ca27,_0x14f93f,_0x1430e8,_0x5edde2['fHAngleCos'],_0x5edde2['fHAngleSin'],_0x5edde2['fVAngleCos'],_0x5edde2['fVAngleSin'],_0x35bb61,0x1,0x0,_0x42d59c);}},{'key':'IsOutofImage','value':function value(_0x19b51b,_0x7e5dbb,_0x24221a,_0x4ff7a4,_0x18a87d,_0x212f97,_0x4cfe11,_0x94574c,_0x4d66b1,_0x4d5dc9,_0x141ad7,_0x15b59c){var _0x1d1807,_0x58efd9,_0x4e5fb5,_0x20989a,_0xcf39dd,_0x2c9e9c,_0x5ee03c,_0x57a655,_0x368d47,_0x5a790a,_0x29d373,_0x586ab8,_0x16232a;if(_0x29d373=(_0x19b51b+_0x7e5dbb)/0x2*0x1,_0x586ab8=(_0x24221a+_0x4ff7a4)/0x2*(_0x5a790a=(_0x7e5dbb-_0x19b51b)/(_0x4ff7a4-_0x24221a)),_0x16232a=(_0x7e5dbb-_0x19b51b)/0x2*0x1,_0x15b59c==_0x58af5b['SR_DE_FISH_PTZ_CEILING']){if(_0x58efd9=_0x4d5dc9-0.5,_0x4e5fb5=(_0x1d1807=0.5-_0x141ad7)*_0x4cfe11+(_0x2c9e9c=_0x4d66b1)*_0x94574c,(_0x5ee03c=_0x2c9e9c*_0x4cfe11-_0x1d1807*_0x94574c)<=0x0)return !0x0;_0x368d47=Math['sqrt'](_0x58efd9*_0x58efd9+_0x4e5fb5*_0x4e5fb5);var _0x4b0292=Math['sqrt'](_0x58efd9*_0x58efd9+_0x4e5fb5*_0x4e5fb5+_0x5ee03c*_0x5ee03c),_0x32509a=Math['asin'](_0x368d47/_0x4b0292)/1.5707963*0.5;if(_0xcf39dd=(-((_0x58efd9=_0x32509a*_0x58efd9/_0x368d47)*_0x212f97+(_0x4e5fb5=_0x32509a*_0x4e5fb5/_0x368d47)*_0x18a87d)*_0x16232a*0x2+_0x586ab8)/_0x5a790a,(_0x20989a=((_0x58efd9*_0x18a87d-_0x4e5fb5*_0x212f97)*_0x16232a*0x2+_0x29d373)/0x1)<0x0||_0x20989a>0x1||_0xcf39dd<0x0||_0xcf39dd>0x1)return !0x0;}if(_0x15b59c==_0x58af5b['SR_DE_FISH_PTZ_FLOOR']){if(_0x58efd9=_0x4d5dc9-0.5,_0x4e5fb5=(_0x1d1807=_0x141ad7-0.5)*_0x4cfe11+(_0x2c9e9c=_0x4d66b1)*_0x94574c,(_0x5ee03c=_0x2c9e9c*_0x4cfe11-_0x1d1807*_0x94574c)<=0x0)return !0x0;_0x368d47=Math['sqrt'](_0x58efd9*_0x58efd9+_0x4e5fb5*_0x4e5fb5);var _0x346508=Math['sqrt'](_0x58efd9*_0x58efd9+_0x4e5fb5*_0x4e5fb5+_0x5ee03c*_0x5ee03c),_0x2884f4=Math['asin'](_0x368d47/_0x346508)/1.5707963*0.5;if(_0xcf39dd=(((_0x58efd9=_0x2884f4*_0x58efd9/_0x368d47)*_0x212f97+(_0x4e5fb5=_0x2884f4*_0x4e5fb5/_0x368d47)*_0x18a87d)*_0x16232a*0x2+_0x586ab8)/_0x5a790a,(_0x20989a=((_0x58efd9*_0x18a87d-_0x4e5fb5*_0x212f97)*_0x16232a*0x2+_0x29d373)/0x1)<0x0||_0x20989a>0x1||_0xcf39dd<0x0||_0xcf39dd>0x1)return !0x0;}if(_0x15b59c==_0x58af5b['SR_DE_FISH_PTZ_WALL']){if(_0x20989a=(_0x58efd9=_0x4d5dc9-0.5)*_0x18a87d+(_0x5ee03c=(_0x2c9e9c=_0x4d66b1)*_0x4cfe11-(_0x1d1807=_0x141ad7-0.5)*_0x94574c)*_0x212f97,_0xcf39dd=_0x4e5fb5=_0x1d1807*_0x4cfe11+_0x2c9e9c*_0x94574c,(_0x57a655=_0x5ee03c*_0x18a87d-_0x58efd9*_0x212f97)<=0x0)return !0x0;_0x368d47=Math['sqrt'](_0x20989a*_0x20989a+_0xcf39dd*_0xcf39dd);var _0x1672ca=Math['sqrt'](_0x20989a*_0x20989a+_0xcf39dd*_0xcf39dd+_0x57a655*_0x57a655),_0x3aa096=Math['asin'](_0x368d47/_0x1672ca)/1.5707963*0.5;if(_0xcf39dd=(_0x3aa096*_0xcf39dd/_0x368d47*_0x16232a*0x2+_0x586ab8)/_0x5a790a,(_0x20989a=(_0x3aa096*_0x20989a/_0x368d47*_0x16232a*0x2+_0x29d373)/0x1)<0x0||_0x20989a>0x1||_0xcf39dd<0x0||_0xcf39dd>0x1)return !0x0;}return !0x1;}},{'key':'ComputePTZPoints','value':function value(){if(_0x108024==this['nWndPort'])return _0x39e372;for(var _0x1089b6=0x0;_0x1089b6<_0x56c4f4;++_0x1089b6)if(null!=this['pRenderParam'][_0x1089b6]&&(_0x58af5b['SR_DE_FISH_PTZ_CEILING']==this['pRenderParam'][_0x1089b6]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_FLOOR']==this['pRenderParam'][_0x1089b6]['nDisplayEffect']||_0x58af5b['SR_DE_FISH_PTZ_WALL']==this['pRenderParam'][_0x1089b6]['nDisplayEffect'])){var _0x1d4fde=_0x4e01e5;if(this['nPTZDisplayMode']==_0x55f7ec){if(_0x1d4fde=this['GetRangePoints'](_0x1089b6),_0x4e01e5!=_0x1d4fde)continue;if(_0x1d4fde=this['TransformPTZRangePoints'](_0x1089b6),_0x4e01e5!=_0x1d4fde)continue;}else {if(this['nPTZDisplayMode']==_0x438e64&&(_0x1d4fde=this['GetRectPoints'](_0x1089b6),_0x4e01e5!=_0x1d4fde))continue;}}return _0x4e01e5;}},{'key':'GetWndPort','value':function value(){return this['nWndPort'];}},{'key':'GetPTZDisplayMode','value':function value(){return this['nPTZDisplayMode'];}},{'key':'GetPTZColor','value':function value(_0x567797,_0xfe856e){return _0x567797<0x0||_0x567797>=_0x56c4f4||null==_0xfe856e?_0x554921:(_0xfe856e['fA']=this['stPTZColor'][_0x567797]['fA'],_0xfe856e['fR']=this['stPTZColor'][_0x567797]['fR'],_0xfe856e['fG']=this['stPTZColor'][_0x567797]['fG'],_0xfe856e['fB']=this['stPTZColor'][_0x567797]['fB'],null!=this['pPTZSetColor']&&(Math['abs'](this['pPTZSetColor'][_0x567797]['fA'])<_0x58bec0||Math['abs'](this['pPTZSetColor'][_0x567797]['fR'])<_0x58bec0||Math['abs'](this['pPTZSetColor'][_0x567797]['fG'])<_0x58bec0||Math['abs'](this['pPTZSetColor'][_0x567797]['fB'])<_0x58bec0)&&(_0xfe856e['fA']=this['pPTZSetColor'][_0x567797]['fA'],_0xfe856e['fR']=this['pPTZSetColor'][_0x567797]['fR'],_0xfe856e['fG']=this['pPTZSetColor'][_0x567797]['fG'],_0xfe856e['fB']=this['pPTZSetColor'][_0x567797]['fB']),_0x4e01e5);}},{'key':'SetPTZColor','value':function value(_0x9ba5b5,_0x20da6f){if(_0x9ba5b5<0x0||_0x9ba5b5>=_0x56c4f4)return _0x554921;if(null==_0x20da6f)return _0x554921;if(null==this['pPTZSetColor']){this['pPTZSetColor']=[];for(var _0x1a9d1a=0x0;_0x1a9d1a<_0x56c4f4;++_0x1a9d1a)this['pPTZSetColor'][_0x1a9d1a]={},this['pPTZSetColor'][_0x1a9d1a]['fR']=0x0,this['pPTZSetColor'][_0x1a9d1a]['fG']=0x0,this['pPTZSetColor'][_0x1a9d1a]['fB']=0x0,this['pPTZSetColor'][_0x1a9d1a]['fA']=0x1;}return this['pPTZSetColor'][_0x9ba5b5]['fR']=_0x20da6f['fR'],this['pPTZSetColor'][_0x9ba5b5]['fG']=_0x20da6f['fG'],this['pPTZSetColor'][_0x9ba5b5]['fB']=_0x20da6f['fB'],this['pPTZSetColor'][_0x9ba5b5]['fA']=_0x20da6f['fA'],_0x4e01e5;}},{'key':'IsPTZSelected','value':function value(_0x3c8174){return !(_0x3c8174<0x0||_0x3c8174>=_0x56c4f4)&&this['bPTZSelected'][_0x3c8174];}},{'key':'GetPTZPort','value':function value(_0x199742,_0x36adcf,_0x689ded){if(this['nWndPort']==_0x108024)return _0x39e372;if(null==this['pRenderParam'][this['nWndPort']])return _0x39e372;var _0xc38102=_0x56c4f4,_0x192415={};_0x192415['fX']=_0x199742,_0x192415['fY']=_0x36adcf;for(var _0x429ac9=0x0;_0x429ac9<_0x56c4f4;++_0x429ac9)this['bPTZSelected'][_0x429ac9]=!0x1;if(this['nPTZDisplayMode']==_0x55f7ec){switch(this['pRenderParam'][this['nWndPort']]['nDisplayEffect']){case _0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:this['GetPointPano2FishFloor'](_0x192415,_0x199742,_0x36adcf);break;case _0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:this['GetPointPano2FishCeiling'](_0x192415,_0x199742,_0x36adcf);break;case _0x58af5b['SR_DE_FISH_PANORAMA_WALL']:this['GetPointPano2FishWall'](_0x192415,_0x199742,_0x36adcf);}for(var _0x124ba8=0x0;_0x124ba8<_0x56c4f4;++_0x124ba8)if(0x0!=this['nOriPTZPointNum'][_0x124ba8]){var _0x26f3a3={};_0x26f3a3['fX']=this['pOriPTZPoints'][_0x124ba8][0x0]['fX'],_0x26f3a3['fY']=this['pOriPTZPoints'][_0x124ba8][0x0]['fY'];var _0x116f6f={};_0x116f6f['fX']=this['pOriPTZPoints'][_0x124ba8][0x0]['fX'],_0x116f6f['fY']=this['pOriPTZPoints'][_0x124ba8][0x0]['fY'];for(var _0x44d9a3=0x1;_0x44d9a3<this['nOriPTZPointNum'][_0x124ba8];++_0x44d9a3)this['GetPTZRectange'](_0x26f3a3,_0x116f6f,this['pOriPTZPoints'][_0x124ba8][_0x44d9a3]);if(_0x192415['fX']<=_0x26f3a3['fX']&&_0x192415['fX']>=_0x116f6f['fX']&&_0x192415['fY']>=_0x116f6f['fY']&&_0x192415['fY']<=_0x26f3a3['fY']){_0xc38102=_0x124ba8;break;}}}else {if(this['nPTZDisplayMode']!=_0x438e64)return _0xbd5163;for(var _0xfd85dd=0x0;_0xfd85dd<_0x56c4f4;++_0xfd85dd)if(_0x192415['fX']<=this['pRectPoints'][_0xfd85dd][0x2]['fX']&&_0x192415['fX']>=this['pRectPoints'][_0xfd85dd][0x0]['fX']&&_0x192415['fY']>=this['pRectPoints'][_0xfd85dd][0x0]['fY']&&_0x192415['fY']<=this['pRectPoints'][_0xfd85dd][0x2]['fY']){_0xc38102=_0xfd85dd;break;}}return _0xc38102<_0x56c4f4?(this['bPTZSelected'][_0xc38102]=!0x0,_0x689ded['nPTZPort']=_0xc38102,_0x4e01e5):_0xbd5163;}},{'key':'SetPTZPort','value':function value(_0x4ad6b9){if(_0x4ad6b9<0x0||_0x4ad6b9>=_0x56c4f4)return _0x554921;for(var _0x3c899d=0x0;_0x3c899d<_0x56c4f4;++_0x3c899d)this['bPTZSelected'][_0x3c899d]=!0x1;if(this['nPTZDisplayMode']==_0x55f7ec){if(0x0==this['nOriPTZPointNum'][_0x4ad6b9])return _0x554921;this['bPTZSelected'][_0x4ad6b9]=!0x0;}else {if(0x0==this['nPTZRectNum'][_0x4ad6b9])return _0x554921;this['bPTZSelected'][_0x4ad6b9]=!0x0;}return _0x4e01e5;}},{'key':'GetPTZRectange','value':function value(_0x12c910,_0x4139af,_0x164673){return _0x164673['fX']<_0x4139af['fX']&&(_0x4139af['fX']=_0x164673['fX']),_0x164673['fY']<_0x4139af['fY']&&(_0x4139af['fY']=_0x164673['fY']),_0x164673['fX']>_0x12c910['fX']&&(_0x12c910['fX']=_0x164673['fX']),_0x164673['fY']>_0x12c910['fY']&&(_0x12c910['fY']=_0x164673['fY']),_0x4e01e5;}},{'key':'GetPTZPoints','value':function value(_0x106205,_0x9e43e8,_0x484419){return _0x106205<0x0||_0x106205>=_0x56c4f4?_0x554921:null==this['pRenderParam'][this['nWndPort']]?_0x39e372:(_0x55f7ec==_0x484419?null!=this['pOriPTZPoints'][_0x106205]&&0x0!=this['nOriPTZPointNum'][_0x106205]&&(_0x9e43e8['pstPoints']=this['pOriPTZPoints'][_0x106205],_0x9e43e8['nPointNum']=this['nOriPTZPointNum'][_0x106205]):_0x438e64==_0x484419&&null!=this['pRectPoints'][_0x106205]&&(_0x9e43e8['pstPoints']=this['pRectPoints'][_0x106205],_0x9e43e8['nPointNum']=0x4),_0x4e01e5);}},{'key':'SetPTZDisplayMode','value':function value(_0x265fe0){return this['nPTZDisplayMode']=_0x265fe0,this['ComputePTZPoints']();}},{'key':'GetDisplayEffect','value':function value(_0x4a17f1){return _0x4a17f1<0x0||_0x4a17f1>=_0x56c4f4||null==this['pRenderParam']?_0x58af5b['SR_DE_NULL']:this['pRenderParam'][_0x4a17f1]['nDisplayEffect'];}},{'key':'GetPTZFragmentPoints','value':function value(_0x41e3be,_0x409917,_0x2fe769){if(_0x41e3be<0x0||_0x41e3be>=_0x56c4f4)return _0x554921;if(null==this['pPanoPTZPoints'][_0x41e3be]||0x0==this['nPanoPTZPointNum'][_0x41e3be])return _0x554921;var _0x49206a=this['nPTZFragmentNode'][_0x41e3be][_0x2fe769];if(_0x409917['nPointNum']=this['nPTZFragmentNode'][_0x41e3be][_0x2fe769+0x1]-this['nPTZFragmentNode'][_0x41e3be][_0x2fe769],_0x409917['nPointNum']<0x0)return _0x39e372;_0x409917['pstPoints']=[];for(var _0x2c9af2=0x0;_0x2c9af2<_0x409917['nPointNum'];++_0x2c9af2){var _0x21c43f={};_0x21c43f['fX']=this['pPanoPTZPoints'][_0x41e3be][_0x49206a+_0x2c9af2]['fX'],_0x21c43f['fY']=this['pPanoPTZPoints'][_0x41e3be][_0x49206a+_0x2c9af2]['fY'],_0x409917['pstPoints']['push'](_0x21c43f);}return _0x4e01e5;}},{'key':'GetPTZFragmentNum','value':function value(_0x4a0b12){return _0x4a0b12<0x0||_0x4a0b12>=_0x56c4f4||0x0==this['nPTZFragmentNum'][_0x4a0b12]?0x0:this['nPTZFragmentNum'][_0x4a0b12];}},{'key':'CalcPTZFragmentPoints','value':function value(_0x4d76c7){if(_0x4d76c7<0x0||_0x4d76c7>=_0x56c4f4)return _0x554921;if(null==this['pPanoPTZPoints'][_0x4d76c7]||0x0==this['nPanoPTZPointNum'][_0x4d76c7])return _0x39e372;this['nPTZFragmentNode'][_0x4d76c7][0x0]=0x0,this['nPTZFragmentNum'][_0x4d76c7]=0x1;for(var _0x42689f=0x0,_0xc3da4=0x0;_0xc3da4<this['nPanoPTZPointNum'][_0x4d76c7]-0x1;_0xc3da4++)Math['abs'](this['pPanoPTZPoints'][_0x4d76c7][_0xc3da4+0x1]['fX']-this['pPanoPTZPoints'][_0x4d76c7][_0xc3da4]['fX'])>0.5&&(_0x42689f=this['nPTZFragmentNum'][_0x4d76c7],this['nPTZFragmentNode'][_0x4d76c7][_0x42689f]=_0xc3da4+0x1,this['nPTZFragmentNum'][_0x4d76c7]=this['nPTZFragmentNum'][_0x4d76c7]+0x1);var _0x312f43=this['nPanoPTZPointNum'][_0x4d76c7];return Math['abs'](this['pPanoPTZPoints'][_0x4d76c7][0x0]['fX']-this['pPanoPTZPoints'][_0x4d76c7][_0x312f43-0x1]['fX'])<0.5&&(this['pPanoPTZPoints'][_0x4d76c7][_0x312f43]['fX']=this['pPanoPTZPoints'][_0x4d76c7][0x0]['fX'],this['pPanoPTZPoints'][_0x4d76c7][_0x312f43]['fY']=this['pPanoPTZPoints'][_0x4d76c7][0x0]['fY'],this['nPanoPTZPointNum'][_0x4d76c7]=this['nPanoPTZPointNum'][_0x4d76c7]+0x1),_0x42689f=this['nPTZFragmentNum'][_0x4d76c7],this['nPTZFragmentNode'][_0x4d76c7][_0x42689f]=this['nPanoPTZPointNum'][_0x4d76c7],_0x4e01e5;}},{'key':'IsPortAllocated','value':function value(_0x35b2cc){return this['bPortAllocated'][_0x35b2cc];}},{'key':'GetPointFish2PanoCeiling','value':function value(_0x6fcf6e,_0xe1d800,_0x38ef14){if(null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==_0x6fcf6e)return _0x554921;var _0x3f5b26,_0x465dcb;_0x3f5b26=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x465dcb=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x265243,_0x3f7154=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&(_0x265243=0x1*-this['fRX1'])>_0x3f7154&&(_0x3f7154=_0x265243),this['fRX2']>0x1&&(_0x265243=0x1*(this['fRX2']-0x1))>_0x3f7154&&(_0x3f7154=_0x265243),this['fRY1']<0x0&&(_0x265243=-this['fRY1']*_0x3f5b26)>_0x3f7154&&(_0x3f7154=_0x265243),this['fRY2']>0x1&&(_0x265243=(this['fRY2']-0x1)*_0x3f5b26)>_0x3f7154&&(_0x3f7154=_0x265243));var _0x3352fc,_0x47ce15=_0x3f7154/_0x465dcb,_0x5272dc={};if(_0x5272dc['fX']=0x0,_0x5272dc['fY']=0x0,Math['abs'](_0xe1d800-0.5)<_0x58bec0&&Math['abs'](_0x38ef14-0.5)<_0x58bec0)return _0xbd5163;var _0x277d4b={},_0x47b09f={};_0x277d4b['fX']=_0xe1d800-0.5,_0x277d4b['fY']=_0x38ef14-0.5,_0x47b09f['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x47b09f['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x5d62da=Math['sqrt'](_0x277d4b['fX']*_0x277d4b['fX']+_0x277d4b['fY']*_0x277d4b['fY']),_0x312ec3=Math['sqrt'](_0x47b09f['fX']*_0x47b09f['fX']+_0x47b09f['fY']*_0x47b09f['fY']);return _0x3352fc=Math['acos']((_0x277d4b['fX']*_0x47b09f['fX']+_0x277d4b['fY']*_0x47b09f['fY'])/(_0x5d62da*_0x312ec3)),_0x277d4b['fX']*_0x47b09f['fY']-_0x277d4b['fY']*_0x47b09f['fX']>0x0&&(_0x3352fc=6.2831852-_0x3352fc),_0x5272dc['fX']=_0x3352fc/6.2831853,_0x5272dc['fY']=(0x2*(0.5-_0x5d62da)-_0x47ce15)/(0.8-_0x47ce15),_0x5272dc['fY']>=0x0&&_0x5272dc['fX']>=0x0&&_0x5272dc['fY']<=0x1&&_0x5272dc['fX']<=0x1?(_0x6fcf6e['fX']=_0x5272dc['fX'],_0x6fcf6e['fY']=_0x5272dc['fY'],_0x4e01e5):_0x554921;}},{'key':'GetPointFish2PanoFloor','value':function value(_0x2e5712,_0x1db9db,_0x135c2d){if(null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==_0x2e5712)return _0x554921;var _0xb8a60f,_0x4d7a4c;_0xb8a60f=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x4d7a4c=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x1d9cbe,_0x253c3f=0x0;(this['fRX2']>0x1||this['fRY2']>0x1||this['fRX1']<0x0||this['fRY1']<0x0)&&(this['fRX1']<0x0&&(_0x1d9cbe=0x1*-this['fRX1'])>_0x253c3f&&(_0x253c3f=_0x1d9cbe),this['fRX2']>0x1&&(_0x1d9cbe=0x1*(this['fRX2']-0x1))>_0x253c3f&&(_0x253c3f=_0x1d9cbe),this['fRY1']<0x0&&(_0x1d9cbe=-this['fRY1']*_0xb8a60f)>_0x253c3f&&(_0x253c3f=_0x1d9cbe),this['fRY2']>0x1&&(_0x1d9cbe=(this['fRY2']-0x1)*_0xb8a60f)>_0x253c3f&&(_0x253c3f=_0x1d9cbe));var _0x5f2cb2,_0x19c7dc=_0x253c3f/_0x4d7a4c,_0x112bae={'fX':0x0,'fY':0x0};if(Math['abs'](_0x1db9db-0.5)<_0x58bec0&&Math['abs'](_0x135c2d-0.5)<_0x58bec0)return _0xbd5163;var _0x40daf5={},_0x571c7c={};_0x40daf5['fX']=_0x1db9db-0.5,_0x40daf5['fY']=_0x135c2d-0.5,_0x571c7c['fX']=-0.5*Math['sin'](this['pRenderParam'][this['nWndPort']]['fAngle']),_0x571c7c['fY']=0.5*Math['cos'](this['pRenderParam'][this['nWndPort']]['fAngle']);var _0x22f52f=Math['sqrt'](_0x40daf5['fX']*_0x40daf5['fX']+_0x40daf5['fY']*_0x40daf5['fY']),_0x337881=Math['sqrt'](_0x571c7c['fX']*_0x571c7c['fX']+_0x571c7c['fY']*_0x571c7c['fY']);return _0x5f2cb2=Math['acos']((_0x40daf5['fX']*_0x571c7c['fX']+_0x40daf5['fY']*_0x571c7c['fY'])/(_0x22f52f*_0x337881)),_0x40daf5['fX']*_0x571c7c['fY']-_0x40daf5['fY']*_0x571c7c['fX']>0x0&&(_0x5f2cb2=6.2831852-_0x5f2cb2),_0x112bae['fX']=0x1-_0x5f2cb2/6.2831853,_0x112bae['fY']=0x1-(0x2*(0.5-_0x22f52f)-_0x19c7dc)/(0.8-_0x19c7dc),_0x112bae['fY']>=0x0&&_0x112bae['fX']>=0x0&&_0x112bae['fY']<=0x1&&_0x112bae['fX']<=0x1?(_0x2e5712['fX']=_0x112bae['fX'],_0x2e5712['fY']=_0x112bae['fY'],_0x4e01e5):_0x554921;}},{'key':'GetPointFish2PanoWall','value':function value(_0x7e29e5,_0x1fda4d,_0x2085ab){if(null==this['pRenderParam'][this['nWndPort']])return _0x39e372;if(null==_0x7e29e5)return _0x554921;var _0x33f119,_0x109173;_0x33f119=(this['fRX2']-this['fRX1'])/(this['fRY2']-this['fRY1']),_0x109173=(this['fRX2']-this['fRX1'])/0x2*0x1;var _0x5a4f0f,_0x53fd54,_0x227e01,_0x5b97cd,_0x3912ad,_0x94a333=0x0,_0x3c32d5=0x1,_0x39e706=0.1,_0x524258=0.9;this['fRX1']<0x0&&(_0x5a4f0f=0x1*-this['fRX1'],_0x94a333=_0x5a4f0f/=0x2*_0x109173),this['fRX2']>0x1&&(_0x53fd54=0x1*(this['fRX2']-0x1),_0x3c32d5=0x1-(_0x53fd54/=0x2*_0x109173)),this['fRY1']<0x0&&(_0x227e01=-this['fRY1']*_0x33f119,_0x39e706=(_0x227e01/=0x2*_0x109173)>0.1?_0x227e01:0.1),this['fRY2']>0x1&&(_0x5b97cd=(this['fRY2']-0x1)*_0x33f119,_0x524258=(_0x5b97cd/=0x2*_0x109173)>0x1-0.9?0x1-_0x5b97cd:0.9);var _0x1a4b4b={'fX':0x0,'fY':0x0},_0x49ec88=0x2*_0x1fda4d*_0x109173,_0x4066d6=0x2*_0x2085ab*_0x109173;return _0x3912ad=Math['sqrt'](_0x109173*_0x109173-(_0x4066d6-_0x109173)*(_0x4066d6-_0x109173)),Math['abs'](_0x3912ad)<_0x58bec0?SR_ERR_PARAM:(_0x1fda4d=_0x109173*(_0x49ec88-_0x109173)/_0x3912ad+_0x109173,_0x2085ab=_0x4066d6,_0x1a4b4b['fX']=(_0x1fda4d-0x2*_0x94a333*_0x109173)/(0x2*(_0x3c32d5-_0x94a333)*_0x109173),_0x1a4b4b['fY']=(_0x2085ab-0x2*_0x39e706*_0x109173)/(0x2*(_0x524258-_0x39e706)*_0x109173),_0x1a4b4b['fY']>=0x0&&_0x1a4b4b['fX']>=0x0&&_0x1a4b4b['fY']<=0x1&&_0x1a4b4b['fX']<=0x1?(_0x7e29e5['fX']=_0x1a4b4b['fX'],_0x7e29e5['fY']=_0x1a4b4b['fY'],_0x4e01e5):_0x554921);}},{'key':'UpdateRangeParam','value':function value(_0x53e8a3,_0x40adcb){if(null==this['pRenderParam'][_0x53e8a3])return _0x39e372;if(_0x40adcb<0.00001||_0x40adcb>0.6)return _0x554921;var _0x4a047e=0x0;return _0x58af5b['SR_DE_FISH_PTZ_WALL']!=this['pRenderParam'][_0x53e8a3]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PTZ_CEILING']!=this['pRenderParam'][_0x53e8a3]['nDisplayEffect']&&_0x58af5b['SR_DE_FISH_PTZ_FLOOR']!=this['pRenderParam'][_0x53e8a3]['nDisplayEffect']||(_0x4a047e=0x7*_0x40adcb+0.8,this['IsInImage'](this['fRX1'],this['fRX2'],this['fRY1'],this['fRY2'],this['pRenderParam'][_0x53e8a3]['fCosH'],this['pRenderParam'][_0x53e8a3]['fSinH'],this['pRenderParam'][_0x53e8a3]['fCosV'],this['pRenderParam'][_0x53e8a3]['fSinV'],_0x4a047e,this['pRenderParam'][_0x53e8a3]['nDisplayEffect']))?(this['pRenderParam'][_0x53e8a3]['fZoom']=_0x4a047e,_0x4e01e5):_0x554921;}}]),_0x6cccc6;}(),_0x432dee=0x20,_0x5afd01=function(){function _0x37e29d(){_0xa7bfb2(this,_0x37e29d),this['renderEngine']='webgl',this['oVideoHandle']=null,this['mainCanvasID']=null,this['curTimestamp']=0x0,this['mainSubPort']=0x0,this['mainVaildSubPort']=0x0,this['mainFECCorrect']=_0x58af5b['SR_DE_NULL'],this['FECErrorCode']=0x0,this['subPortNum']=0x0,this['FECShowMode']=_0x55f7ec,this['pFishParamManager'],this['InitFECParam'](),this['privateLinesInfo']=[],this['privateFontsInfo']=[],this['privateImagesInfo']=[],this['bSRCallBackFlag']=!0x1,this['curLinesInfo']=null,this['maxPrivateLineTimeStamp']=0x0,this['hasSetFECParamManager']=!0x1,this['curWaterMarkFontsInfo']=null,this['curWaterMarkImageInfo']=null;}return _0x3e0d7c(_0x37e29d,[{'key':'InitDisplay','value':function value(_0x530809,_0x3e4526,_0x3d55c2){return this['renderEngine']=_0x3e4526,this['mainCanvasID']=_0x530809,'2d'===this['renderEngine']||'2D'===this['renderEngine']?(this['oVideoHandle']=new _0x243f6b(),console['log']('2d\x20render')):(this['oVideoHandle']=new _0x5e29b6(),this['mainFECCorrect']!=_0x58af5b['SR_DE_NULL']&&(null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x32d1bc()),this['oVideoHandle']['SR_SetFishParamManager'](this['pFishParamManager']),this['hasSetFECParamManager']=!0x0),console['log']('webgl\x20render')),this['oVideoHandle']['SR_Init'](_0x530809,_0x3d55c2),this['mainVaildSubPort']=this['oVideoHandle']['SR_AddSubPort'](this['mainFECCorrect']),-0x1==this['mainVaildSubPort']?(console['info']('%c\x20InitDisplay\x20SR_AddSubPort\x20error\x20subport:%d','color:\x20red',this['mainVaildSubPort']),0x0):(null==this['stFishEyeManager'][0x0]['pRender']&&this['mainFECCorrect']!==_0x58af5b['SR_DE_NULL']&&(this['stFishEyeManager'][0x0]['pRender']=this['oVideoHandle'],this['stFishEyeManager'][0x0]['nSubPort']=0x0,this['stFishEyeManager'][0x0]['sCanvasID']=this['mainCanvasID'],this['stFishEyeManager'][0x0]['bUsed']=0x1,this['stFishEyeManager'][0x0]['bInited']=0x1,this['stFishEyeManager'][0x0]['nValidSubPort']=this['mainVaildSubPort']),0x1);}},{'key':'ReleaseDisplay','value':function value(){if(null!=this['oVideoHandle']&&(this['oVideoHandle']['SR_DelSubPort'](this['mainVaildSubPort']),this['oVideoHandle']['SR_Destroy'](),this['oVideoHandle']=null),this['subPortNum']>0x0){for(var _0x281eaa=0x1;_0x281eaa<_0x432dee;_0x281eaa++)0x0!=this['stFishEyeManager'][_0x281eaa]['nSubPort']&&null!=this['stFishEyeManager'][_0x281eaa]['sCanvasID']&&0x0!=this['stFishEyeManager'][_0x281eaa]['bInited']&&(this['FEC_Disable'](_0x281eaa),this['FEC_DelPort'](_0x281eaa));}for(var _0x4901b0=0x0;_0x4901b0<_0x432dee;_0x4901b0++)this['stFishEyeManager'][_0x4901b0]['pRender']=null;return this['stFishEyeManager']['splice'](0x0,this['stFishEyeManager']['length']),this['stFishParam']['splice'](0x0,this['stFishParam']['length']),null!=this['pFishParamManager']&&(this['pFishParamManager']['DeInit'](),this['pFishParamManager']=null),this['FECShowMode']=_0x55f7ec,this['DeInitPrivateParam'](),0x1;}},{'key':'DeInitPrivateParam','value':function value(){this['privateLinesInfo']['splice'](0x0,this['privateLinesInfo']['length']),this['privateFontsInfo']['splice'](0x0,this['privateFontsInfo']['length']),this['privateImagesInfo']['splice'](0x0,this['privateImagesInfo']['length']),this['bSRCallBackFlag']=!0x1,this['curLinesInfo']=null;}},{'key':'DisplayFrame','value':function value(_0x3d7c53,_0x3e781c,_0x5e716d,_0x58d2da,_0x3abad7,_0x115b16){var _0x27e72e=this;return new Promise(function(_0x91bfac){var _0x3f7350=-0x1;if(null!=_0x3d7c53&&(_0x3f7350=_0x58d2da),_0x27e72e['bSRCallBackFlag']||(null!=_0x27e72e['oVideoHandle']&&_0x27e72e['oVideoHandle']['SR_SetCallBack'](_0x27e72e['WebGLDisplayCallBack'],_0x27e72e,_0x3db7f1),_0x27e72e['bSRCallBackFlag']=!0x0),null!=_0x3d7c53&&(0x0!=_0x27e72e['privateLinesInfo']['length']&&(_0x27e72e['curTimestamp']=_0x3f7350,_0x27e72e['FindIntelNodefromList'](_0x27e72e['curTimestamp'])),null!=_0x27e72e['oVideoHandle']&&_0x27e72e['oVideoHandle']['SR_Draw'](_0x3d7c53,_0x3e781c,_0x5e716d,_0x3abad7,_0x115b16),_0x27e72e['subPortNum']>0x0)){for(var _0x329059=0x1;_0x329059<_0x432dee;_0x329059++)0x0!=_0x27e72e['stFishEyeManager'][_0x329059]['nSubPort']&&null!=_0x27e72e['stFishEyeManager'][_0x329059]['sCanvasID']&&0x0!=_0x27e72e['stFishEyeManager'][_0x329059]['bInited']&&null!=_0x27e72e['stFishEyeManager'][_0x329059]['pRender']&&_0x27e72e['stFishEyeManager'][_0x329059]['pRender']['SR_Draw'](_0x3d7c53,_0x3e781c,_0x5e716d,null,null);}_0x91bfac(_0x3f7350);});}},{'key':'SetDisplayRect','value':function value(_0x37da09,_0x3cfb46,_0x40dd5e,_0x2e0c9e){return null!=this['oVideoHandle']?this['oVideoHandle']['SR_SetDisplayRect'](_0x37da09,_0x3cfb46,_0x40dd5e,_0x2e0c9e,_0x39748a):0x0;}},{'key':'SetCanvasSize','value':function value(_0x31ec78,_0x20cc0d){return null!=this['curWaterMarkFontsInfo']&&(this['curWaterMarkFontsInfo']['pstFontSize']['nFontWidth']=this['curWaterMarkFontsInfo']['pstFontSize']['nFontWidth']*_0x31ec78/this['mainCanvasID']['width'],this['curWaterMarkFontsInfo']['pstFontSize']['nFontHeight']=this['curWaterMarkFontsInfo']['pstFontSize']['nFontHeight']*_0x20cc0d/this['mainCanvasID']['height']),null!=this['oVideoHandle']?this['oVideoHandle']['SR_SetCanvasSize'](_0x31ec78,_0x20cc0d):0x0;}},{'key':'GetCanvasSize','value':function value(){return null!=this['oVideoHandle']?this['oVideoHandle']['SR_GetCanvasSize']():0x0;}},{'key':'SetAntialias','value':function value(_0x27421d){return null!=this['oVideoHandle']?this['oVideoHandle']['SR_SetAntialias'](_0x27421d):0x0;}},{'key':'SetD3DPostProcess','value':function value(_0x19d23e,_0x4668f1){return null!=this['oVideoHandle']?this['oVideoHandle']['SR_SetImagePostProcess'](_0x19d23e,_0x4668f1):0x0;}},{'key':'InitFECParam','value':function value(){this['stFishEyeManager']=[];for(var _0x2c7622=0x0;_0x2c7622<_0x432dee;_0x2c7622++)this['stFishEyeManager'][_0x2c7622]={},this['stFishEyeManager'][_0x2c7622]['pRender']=null,this['stFishEyeManager'][_0x2c7622]['nSubPort']=0x0,this['stFishEyeManager'][_0x2c7622]['sCanvasID']=null,this['stFishEyeManager'][_0x2c7622]['bUsed']=0x0,this['stFishEyeManager'][_0x2c7622]['bInit']=0x0,this['stFishEyeManager'][_0x2c7622]['nValidSubPort']=0x0,this['stFishEyeManager'][_0x2c7622]['emPlaceType']=_0x138512,this['stFishEyeManager'][_0x2c7622]['emCorrectType']=_0x106093,this['stFishEyeManager'][_0x2c7622]['emEffect']=_0x58af5b['SR_DE_FISH_ORIGINAL'];this['stFishParam']=[];for(var _0x5624f6=0x0;_0x5624f6<_0x432dee;_0x5624f6++)this['stFishParam'][_0x5624f6]={},this['stFishParam'][_0x5624f6]['nUpDateType']=0x0,this['stFishParam'][_0x5624f6]['stPTZParam']={},this['stFishParam'][_0x5624f6]['stPTZParam']['fPTZPositionX']=0x0,this['stFishParam'][_0x5624f6]['stPTZParam']['fPTZPositionY']=0x0,this['stFishParam'][_0x5624f6]['stCycleParam']={},this['stFishParam'][_0x5624f6]['stCycleParam']['fRadiusLeft']=0x0,this['stFishParam'][_0x5624f6]['stCycleParam']['fRadiusRight']=0x0,this['stFishParam'][_0x5624f6]['stCycleParam']['fRadiusTop']=0x0,this['stFishParam'][_0x5624f6]['stCycleParam']['fRadiusBottom']=0x0,this['stFishParam'][_0x5624f6]['fZoom']=0x0,this['stFishParam'][_0x5624f6]['fWideScanOffset']=0x0,this['stFishParam'][_0x5624f6]['stPTZColor']={},this['stFishParam'][_0x5624f6]['stPTZColor']['nR']=0x0,this['stFishParam'][_0x5624f6]['stPTZColor']['nG']=0x0,this['stFishParam'][_0x5624f6]['stPTZColor']['nB']=0x0,this['stFishParam'][_0x5624f6]['stPTZColor']['nAlpha']=0x0,this['stFishParam'][_0x5624f6]['stPTZSelect']={},this['stFishParam'][_0x5624f6]['stPTZSelect']['fTop']=0x0,this['stFishParam'][_0x5624f6]['stPTZSelect']['fBottom']=0x0,this['stFishParam'][_0x5624f6]['stPTZSelect']['fLeft']=0x0,this['stFishParam'][_0x5624f6]['stPTZSelect']['fRight']=0x0,this['stFishParam'][_0x5624f6]['nCut']=0x0;}},{'key':'FEC_SetCanvasID','value':function value(_0x112b64){return this['mainFECCorrect']=_0x58af5b['SR_DE_FISH_ORIGINAL'],0x1;}},{'key':'FEC_ResetCorrectType','value':function value(_0x1cd20e,_0x51b11d,_0x17f1c0){if(!0x1===this['hasSetFECParamManager']&&(null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x32d1bc()),this['oVideoHandle']['SR_SetFishParamManager'](this['pFishParamManager']),this['hasSetFECParamManager']=!0x0),_0x17f1c0!=_0x106093&&_0x17f1c0!=_0x3a265d&&_0x17f1c0!=_0x39d783&&_0x17f1c0!=_0x4fb0c9&&_0x17f1c0!=_0x3f622d&&_0x17f1c0!=_0x1ae1fd&&_0x17f1c0!=_0x4ec0ec)return console['log']('%c\x2020230627\x20hardDecoder\x20not\x20support\x20correctType:%d','color:red',_0x17f1c0),this['FECErrorCode']=0x10,0x0;if(0x1!=this['FECParamJudge'](_0x1cd20e,_0x51b11d,_0x17f1c0))return 0x0;var _0x12466a;if(_0x12466a=this['_ConvertDisplayEffect'](_0x51b11d,_0x17f1c0),0x0==_0x1cd20e&&null==this['stFishEyeManager'][_0x1cd20e]['pRender']&&(this['stFishEyeManager'][_0x1cd20e]['pRender']=this['oVideoHandle'],this['stFishEyeManager'][_0x1cd20e]['nSubPort']=_0x1cd20e,this['stFishEyeManager'][_0x1cd20e]['sCanvasID']=this['mainCanvasID'],this['stFishEyeManager'][_0x1cd20e]['bUsed']=0x1,this['stFishEyeManager'][_0x1cd20e]['bInited']=0x1,this['stFishEyeManager'][_0x1cd20e]['nValidSubPort']=this['mainVaildSubPort'],this['stFishEyeManager'][_0x1cd20e]['emPlaceType']=_0x51b11d,this['stFishEyeManager'][_0x1cd20e]['emCorrectType']=_0x17f1c0,this['stFishEyeManager'][_0x1cd20e]['emEffect']=_0x12466a,this['mainFECCorrect']=_0x12466a),null!=this['stFishEyeManager'][_0x1cd20e]['pRender']){this['stFishEyeManager'][_0x1cd20e]['pRender']['SR_DelSubPort'](this['stFishEyeManager'][_0x1cd20e]['nValidSubPort']);var _0x24aebf=this['stFishEyeManager'][_0x1cd20e]['pRender']['SR_AddSubPort'](_0x12466a);if(-0x1==_0x24aebf)return console['info']('%c\x20FEC_ResetCorrectType\x20SR_AddSubPort\x20error\x20subport:%d','color:\x20red',_0x24aebf),0x0;if(this['stFishEyeManager'][_0x1cd20e]['nValidSubPort']=_0x24aebf,this['stFishEyeManager'][_0x1cd20e]['emPlaceType']=_0x51b11d,this['stFishEyeManager'][_0x1cd20e]['emCorrectType']=_0x17f1c0,this['stFishEyeManager'][_0x1cd20e]['emEffect']=_0x12466a,_0x4fb0c9<=this['stFishEyeManager'][_0x1cd20e]['emCorrectType']){var _0x229533=this['stFishEyeManager'][_0x1cd20e]['pRender']['SR_SetRenderState'](_0x2fc046,0x0);_0x4e01e5!=_0x229533&&console['log']('>>>VideoRender.js\x20SR_SetRenderState\x20failed\x20ret：%08x\x0a',_0x229533);}}return this['FECShowMode']>0x0&&null!=this['stFishEyeManager'][_0x1cd20e]['pRender']&&this['stFishEyeManager'][_0x1cd20e]['pRender']['SR_SetPTZDisplayMode'](this['FECShowMode']),0x0==_0x1cd20e&&(this['mainVaildSubPort']=this['stFishEyeManager'][_0x1cd20e]['nValidSubPort']),0x1;}},{'key':'FEC_GetPort','value':function value(_0x43697f,_0x1af722){if(_0x1af722!=_0x106093&&_0x1af722!=_0x3a265d&&_0x1af722!=_0x39d783&&_0x1af722!=_0x4fb0c9&&_0x1af722!=_0x3f622d&&_0x1af722!=_0x1ae1fd&&_0x1af722!=_0x4ec0ec)return console['log']('%c\x2020230627\x20hardDecoder\x20not\x20support\x20emCorrectType:%d','color:red',_0x1af722),this['FECErrorCode']=0x10,-0x1;var _0x2efbd7;if(0x1!=this['FECParamJudge'](-0x1,_0x43697f,_0x1af722))return -0x1;var _0x1a9aa6=0x0;for(_0x2efbd7=0x1;_0x2efbd7<_0x432dee;_0x2efbd7++)if(0x0==this['stFishEyeManager'][_0x2efbd7]['nSubPort']&&0x0==this['stFishEyeManager'][_0x2efbd7]['bUsed']){this['stFishEyeManager'][_0x2efbd7]['nSubPort']=_0x2efbd7,this['stFishEyeManager'][_0x2efbd7]['nValidSubPort']=-0x1,this['stFishEyeManager'][_0x2efbd7]['bUsed']=0x1,this['stFishEyeManager'][_0x2efbd7]['emPlaceType']=_0x43697f,this['stFishEyeManager'][_0x2efbd7]['emCorrectType']=_0x1af722,_0x1a9aa6=_0x2efbd7;break;}if(_0x432dee==_0x2efbd7)return console['info']('%c\x20FEC_GetPort-12\x20fish\x20subport\x20max','color:\x20red'),this['FECErrorCode']=0x504,-0x1;var _0x38cfda;return _0x38cfda=this['_ConvertDisplayEffect'](this['stFishEyeManager'][_0x1a9aa6]['emPlaceType'],this['stFishEyeManager'][_0x1a9aa6]['emCorrectType']),_0x58af5b['SR_DE_FISH_ORIGINAL']!=_0x38cfda?(0x0==this['stFishEyeManager'][_0x1a9aa6]['bInited']&&(this['stFishEyeManager'][_0x1a9aa6]['emEffect']=_0x38cfda,this['stFishEyeManager'][_0x1a9aa6]['bInited']=0x0,this['stFishParam'][_0x1a9aa6]['fZoom']=0.005,this['stFishParam'][_0x1a9aa6]['stPTZParam']['fPTZPositionX']=0.5,this['stFishParam'][_0x1a9aa6]['stPTZParam']['fPTZPositionY']=0.5,this['stFishParam'][_0x1a9aa6]['fWideScanOffset']=0x0),this['FECErrorCode']=0x0,this['subPortNum']++,_0x1a9aa6):_0x1a9aa6<_0x432dee&&0x0==this['stFishEyeManager'][_0x1a9aa6]['bInited']?(this['stFishEyeManager'][_0x1a9aa6]['emEffect']=_0x38cfda,this['stFishEyeManager'][_0x1a9aa6]['bInited']=0x0,this['stFishParam'][_0x1a9aa6]['fZoom']=0x0,this['stFishParam'][_0x1a9aa6]['stPTZParam']['fPTZPositionX']=0x0,this['stFishParam'][_0x1a9aa6]['stPTZParam']['fPTZPositionY']=0x0,this['stFishParam'][_0x1a9aa6]['fWideScanOffset']=0x0,this['FECErrorCode']=0x0,this['subPortNum']++,_0x1a9aa6):(this['stFishEyeManager'][_0x2efbd7]['pRender']=null,this['stFishEyeManager'][_0x2efbd7]['nSubPort']=0x0,this['stFishEyeManager'][_0x2efbd7]['sCanvasID']=null,this['stFishEyeManager'][_0x2efbd7]['bUsed']=0x0,this['stFishEyeManager'][_0x2efbd7]['bInited']=0x0,this['stFishEyeManager'][_0x2efbd7]['nValidSubPort']=0x0,this['stFishEyeManager'][_0x2efbd7]['emPlaceType']=_0x138512,this['stFishEyeManager'][_0x2efbd7]['emCorrectType']=_0x106093,this['stFishEyeManager'][_0x2efbd7]['emEffect']=_0x58af5b['SR_DE_FISH_ORIGINAL'],this['FECErrorCode']=_0x205828,-0x1);}},{'key':'FECParamJudge','value':function value(_0xcec194,_0x51d6d3,_0x1d126a){if((_0x46372b==_0x51d6d3||_0x138512==_0x51d6d3)&&_0x1ae1fd==_0x1d126a)return console['info']('%c\x20FEC_GetPort-1\x20floor\x20and\x20ceiling\x20not\x20support\x20lat','color:\x20red'),this['FECErrorCode']=_0x205828,0x0;if(_0x278af9==_0x51d6d3&&_0x4ec0ec==_0x1d126a)return console['info']('%c\x20FEC_GetPort-2\x20wall\x20not\x20support\x20cylinger','color:\x20red'),this['FECErrorCode']=_0x205828,0x0;if(_0x278af9==_0x51d6d3&&_0x48007e==_0x1d126a)return console['info']('%c\x20FEC_GetPort-3\x20wall\x20not\x20support\x20split\x20cylinger','color:\x20red'),this['FECErrorCode']=_0x205828,0x0;if((_0x46372b==_0x51d6d3||_0x138512==_0x51d6d3)&&_0x2723d4==_0x1d126a)return console['info']('%c\x20FEC_GetPort-4\x20floor\x20and\x20ceiling\x20not\x20support\x20horizontal','color:\x20red'),this['FECErrorCode']=_0x205828,0x0;if((_0x46372b==_0x51d6d3||_0x138512==_0x51d6d3)&&_0x2cbb81==_0x1d126a)return console['info']('%c\x20FEC_GetPort-5\x20floor\x20and\x20ceiling\x20not\x20support\x20vertical','color:\x20red'),this['FECErrorCode']=_0x205828,0x0;if(_0x278af9!=_0x51d6d3&&_0x46372b!=_0x51d6d3&&_0x138512!=_0x51d6d3)return console['info']('%c\x20FEC_GetPort-6\x20emPlaceType\x20only\x20support\x20floor,\x20ceiling\x20and\x20wall','color:\x20red'),this['FECErrorCode']=MP_E_SUPPORT,0x0;if(0x0!=_0x1d126a&&_0x1d126a!=_0x3f622d&&_0x1d126a!=_0x3a265d&&_0x1d126a!=_0x39d783&&_0x1d126a!=_0x1ae1fd&&_0x1d126a!=_0x4fb0c9&&_0x1d126a!=_0x4ec0ec&&_0x1d126a!=_0x48007e&&_0x1d126a!=_0x27ffa7&&_0x1d126a!=_0x2723d4&&_0x1d126a!=_0x2cbb81)return console['info']('%c\x20FEC_GetPort-7\x20emCorrectType\x20error','color:\x20red'),this['FECErrorCode']=MP_E_SUPPORT,0x0;for(var _0x5e4caf=0x0;_0x5e4caf<_0x432dee;_0x5e4caf++)if(_0x5e4caf!=_0xcec194){if(this['stFishEyeManager'][_0x5e4caf]['bUsed']&&this['stFishEyeManager'][_0x5e4caf]['emPlaceType']!=_0x51d6d3)return console['info']('%c\x20FEC_GetPort-8\x20emPlaceType\x20changed','color:\x20red'),this['FECErrorCode']=0x517,0x0;if(this['stFishEyeManager'][_0x5e4caf]['bUsed']&&this['stFishEyeManager'][_0x5e4caf]['emCorrectType']!=_0x3f622d&&this['stFishEyeManager'][_0x5e4caf]['emCorrectType']!=_0x4fb0c9&&this['stFishEyeManager'][_0x5e4caf]['emCorrectType']!=_0x4ec0ec&&this['stFishEyeManager'][_0x5e4caf]['emCorrectType']!=_0x48007e&&this['stFishEyeManager'][_0x5e4caf]['emCorrectType']!=_0x27ffa7&&this['stFishEyeManager'][_0x5e4caf]['emCorrectType']!=_0x2723d4&&this['stFishEyeManager'][_0x5e4caf]['emCorrectType']!=_0x2cbb81&&_0x1d126a!=_0x3f622d&&_0x1d126a!=_0x4fb0c9&&_0x1d126a!=_0x4ec0ec&&_0x1d126a!=_0x48007e&&_0x1d126a!=_0x27ffa7&&_0x1d126a!=_0x2723d4&&_0x1d126a!=_0x2cbb81)return console['info']('%c\x20FEC_GetPort-9\x20origin/180/360/lat\x20only\x20display\x20one\x20port','color:\x20red'),this['FECErrorCode']=0x518,0x0;if(this['stFishEyeManager'][_0x5e4caf]['bUsed']&&(this['stFishEyeManager'][_0x5e4caf]['emCorrectType']==_0x3f622d&&_0x1d126a==_0x3a265d||this['stFishEyeManager'][_0x5e4caf]['emCorrectType']==_0x3a265d&&_0x1d126a==_0x3f622d))return console['info']('%c\x20FEC_GetPort-10\x20180\x20cannot\x20support\x20ptz','color:\x20red'),this['FECErrorCode']=0x518,0x0;if(_0x2cbb81==_0x1d126a&&(this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']<=-0.5||this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']>0x0||this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']<0x1||this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']>=1.5||this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']<=-0.5||this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']>=0.4||this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']<=0.6||this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']>=1.5||this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']+this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']<=0.8||this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']+this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']>=1.2||this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']+this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']<=0.8||this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']+this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']>=1.2))return console['info']('%c\x20FEC_GetPort-11\x20veitical\x20param\x20error','color:\x20red'),this['FECErrorCode']=_0x1ee478,0x0;}return 0x1;}},{'key':'FEC_Enable','value':function value(_0x4d0428){return _0x4d0428<0x1||_0x4d0428>0x1f||null==_0x4d0428?(console['info']('%c\x20FEC_Enable-1\x20nSubPort:%d','color:\x20red',_0x4d0428),this['FECErrorCode']=_0x2fcdfc,0x0):null!==this['stFishEyeManager'][_0x4d0428]['pRender']?(console['info']('%c\x20FEC_Enable-2\x20nSubPort:%d','color:\x20red',_0x4d0428),this['FECErrorCode']=0x515,0x0):(null==this['stFishEyeManager'][_0x4d0428]['pRender']&&(this['stFishEyeManager'][_0x4d0428]['pRender']=new _0x5e29b6(),null==this['pFishParamManager']&&(this['pFishParamManager']=new _0x32d1bc()),this['stFishEyeManager'][_0x4d0428]['pRender']['SR_SetFishParamManager'](this['pFishParamManager'])),0x1);}},{'key':'FEC_SetWnd','value':function value(_0x1048a7,_0x3fd710){if(_0x1048a7<0x1||_0x1048a7>0x1f||null==_0x1048a7)return console['info']('%c\x20FEC_SetWnd-1\x20nSubPort:%d','color:\x20red',_0x1048a7),this['FECErrorCode']=_0x2fcdfc,0x0;if(null==this['stFishEyeManager'][_0x1048a7]['pRender'])return console['info']('%c\x20FEC_SetWnd-2\x20nSubPort:%d\x20pRender\x20is\x20null','color:\x20red',_0x1048a7),this['FECErrorCode']=_0x3b6cac,0x0;if(0x0==this['stFishEyeManager'][_0x1048a7]['bUsed'])return console['info']('%c\x20FEC_SetWnd-3\x20nSubPort:%d\x20bUsed:%d','color:\x20red',_0x1048a7,this['stFishEyeManager'][_0x1048a7]['bUsed']),this['FECErrorCode']=_0x1928b9,0x0;if(null==_0x3fd710)return console['info']('%c\x20FEC_SetWnd-4\x20nSubPort:%d\x20sCanvasID:%s','color:\x20red',_0x1048a7,_0x3fd710),this['FECErrorCode']=0x519,0x0;if(0x0!=this['stFishEyeManager'][_0x1048a7]['nSubPort']&&0x0!=this['stFishEyeManager'][_0x1048a7]['bUsed']){if(0x0!=this['stFishEyeManager'][_0x1048a7]['bInited']&&null!=this['stFishEyeManager'][_0x1048a7]['sCanvasID'])return _0x3fd710!=this['stFishEyeManager'][_0x1048a7]['sCanvasID']?(console['info']('%c\x20FEC_SetWnd-5\x20nSubPort:%d\x20sCanvasID:%s\x20already\x20init','color:\x20red',_0x1048a7,_0x3fd710),this['FECErrorCode']=0x506,0x0):0x1;var _0x5d539e;_0x5d539e=this['_ConvertDisplayEffect'](this['stFishEyeManager'][_0x1048a7]['emPlaceType'],this['stFishEyeManager'][_0x1048a7]['emCorrectType']);var _0x3a7ad7=this['stFishEyeManager'][_0x1048a7]['pRender']['SR_Init'](_0x3fd710,_0x3a627d),_0x286d7d=this['stFishEyeManager'][_0x1048a7]['pRender']['SR_AddSubPort'](_0x5d539e);if(-0x1==_0x286d7d)return console['info']('%c\x20FEC_SetWnd\x20SR_AddSubPort\x20error\x20subport:%d','color:\x20red',_0x1048a7),0x0;if(this['stFishEyeManager'][_0x1048a7]['nValidSubPort']=_0x286d7d,_0x4e01e5!=_0x3a7ad7)return this['stFishEyeManager'][_0x1048a7]['bInited']=0x0,this['stFishEyeManager'][_0x1048a7]['sCanvasID']=null,this['FECErrorCode']=_0x1928b9,0x0;if(this['stFishEyeManager'][_0x1048a7]['bInited']=0x1,this['stFishEyeManager'][_0x1048a7]['sCanvasID']=_0x3fd710,_0x4fb0c9<=this['stFishEyeManager'][_0x1048a7]['emCorrectType']){var _0x14a503=this['stFishEyeManager'][_0x1048a7]['pRender']['SR_SetRenderState'](_0x2fc046,0x0);_0x4e01e5!=_0x14a503&&console['log']('>>>VideoRender.js\x20SR_SetRenderState\x20failed\x20ret：%08x\x0a',_0x14a503);}return this['FECShowMode']>0x0&&this['stFishEyeManager'][_0x1048a7]['pRender']['SR_SetPTZDisplayMode'](this['FECShowMode']),0x1;}return this['FECErrorCode']=_0x1928b9,0x0;}},{'key':'FEC_Disable','value':function value(_0x29a37e,_0x268019,_0x1a8677){if(_0x29a37e<0x1||_0x29a37e>0x1f||null==_0x29a37e)return console['info']('%c\x20FEC_Disable-1\x20nSubPort:%d','color:\x20red',_0x29a37e),this['FECErrorCode']=_0x2fcdfc,0x0;if(0x1==this['stFishEyeManager'][_0x29a37e]['bInited']&&null!=this['stFishEyeManager'][_0x29a37e]['pRender']){if(_0x4e01e5!=this['stFishEyeManager'][_0x29a37e]['pRender']['SR_DelSubPort'](this['stFishEyeManager'][_0x29a37e]['nValidSubPort']))return console['info']('%c\x20FEC_Disable-2\x20SR_DelSubPort\x20error\x20nSubPort:%d','color:\x20red',_0x29a37e),0x0;this['stFishEyeManager'][_0x29a37e]['bInited']=0x0,this['stFishEyeManager'][_0x29a37e]['nValidSubPort']=-0x1,this['stFishEyeManager'][_0x29a37e]['pRender']['SR_Destroy'](),this['stFishEyeManager'][_0x29a37e]['pRender']=null;}return 0x1;}},{'key':'FEC_DelPort','value':function value(_0x5f06db){return _0x5f06db<0x1||_0x5f06db>0x1f||null==_0x5f06db?(console['info']('%c\x20FEC_DelPort-1\x20nSubPort:%d','color:\x20red',_0x5f06db),this['FECErrorCode']=_0x2fcdfc,0x0):0x0==this['stFishEyeManager'][_0x5f06db]['bUsed']?(console['info']('%c\x20FEC_DelPort-2\x20nSubPort:%d\x20bUsed：%d','color:\x20red',_0x5f06db,this['stFishEyeManager'][_0x5f06db]['bUsed']),this['FECErrorCode']=_0x1928b9,0x0):(this['stFishEyeManager'][_0x5f06db]['nSubPort']=0x0,this['stFishEyeManager'][_0x5f06db]['sCanvasID']=null,this['stFishEyeManager'][_0x5f06db]['bUsed']=0x0,this['stFishEyeManager'][_0x5f06db]['bInited']=0x0,this['stFishEyeManager'][_0x5f06db]['nValidSubPort']=0x0,this['stFishEyeManager'][_0x5f06db]['emPlaceType']=_0x138512,this['stFishEyeManager'][_0x5f06db]['emCorrectType']=_0x106093,this['stFishEyeManager'][_0x5f06db]['emEffect']=_0x58af5b['SR_DE_FISH_ORIGINAL'],this['stFishParam'][_0x5f06db]['stCycleParam']['fRadiusLeft']=0x0,this['stFishParam'][_0x5f06db]['stCycleParam']['fRadiusRight']=0x1,this['stFishParam'][_0x5f06db]['stCycleParam']['fRadiusTop']=0x0,this['stFishParam'][_0x5f06db]['stCycleParam']['fRadiusBottom']=0x1,this['subPortNum']>0x0&&this['subPortNum']--,0x1);}},{'key':'FEC_SetParam','value':function value(_0x30bca1,_0x2a0734){if(this['FECErrorCode']=0x0,_0x30bca1<0x0||_0x30bca1>0x1f||null==_0x30bca1)return console['info']('%c\x20FEC_SetParam-1\x20nSubPort:%d','color:\x20red',_0x30bca1),this['FECErrorCode']=_0x2fcdfc,0x0;if(null==this['stFishEyeManager'][_0x30bca1]['pRender'])return console['info']('%c\x20FEC_SetParam-2\x20nSubPort:%d\x20pRender:%d','color:\x20red',_0x30bca1,this['stFishEyeManager'][_0x30bca1]['pRender']),this['FECErrorCode']=_0x3b6cac,0x0;if(0x0==this['stFishEyeManager'][_0x30bca1]['bUsed'])return console['info']('%c\x20FEC_SetParam-3\x20nSubPort:%d\x20bUsed:%d','color:\x20red',_0x30bca1,this['stFishEyeManager'][_0x30bca1]['bUsed']),this['FECErrorCode']=_0x1928b9,0x0;if(this['stFishEyeManager'][_0x30bca1]['emCorrectType']>=_0x4fb0c9&&this['stFishEyeManager'][_0x30bca1]['emCorrectType']<=_0x2cbb81&&0x1e&_0x2a0734['upDateType'])return console['info']('%c\x20FEC_SetParam-4\x20nSubPort:%d\x20not\x203D','color:\x20red',_0x30bca1),this['FECErrorCode']=_0x513d06,0x0;if(_0x64a4f0&_0x2a0734['upDateType']){if(null==_0x2a0734['stCycleParam'])return this['FECErrorCode']=_0x1ee478,0x0;for(var _0x3b60d1=0x1;_0x3b60d1<_0x432dee;_0x3b60d1++){if(this['stFishEyeManager'][_0x3b60d1]['bUsed']&&this['stFishEyeManager'][_0x3b60d1]['nSubPort']&&_0x2723d4==this['stFishEyeManager'][_0x3b60d1]['emCorrectType']&&(_0x2a0734['stCycleParam']['fRadiusLeft']<=-0.5||_0x2a0734['stCycleParam']['fRadiusLeft']>=0.4||_0x2a0734['stCycleParam']['fRadiusRight']<=0.6||_0x2a0734['stCycleParam']['fRadiusRight']>=1.5||_0x2a0734['stCycleParam']['fRadiusTop']<=-0.5||_0x2a0734['stCycleParam']['fRadiusTop']>0x0||_0x2a0734['stCycleParam']['fRadiusBottom']<0x1||_0x2a0734['stCycleParam']['fRadiusBottom']>=1.5||_0x2a0734['stCycleParam']['fRadiusLeft']+_0x2a0734['stCycleParam']['fRadiusRight']<=0.8||_0x2a0734['stCycleParam']['fRadiusLeft']+_0x2a0734['stCycleParam']['fRadiusRight']>=1.2||_0x2a0734['stCycleParam']['fRadiusTop']+_0x2a0734['stCycleParam']['fRadiusBottom']<=0.8||_0x2a0734['stCycleParam']['fRadiusTop']+_0x2a0734['stCycleParam']['fRadiusBottom']>=1.2))return this['FECErrorCode']=_0x1ee478,0x0;if(this['stFishEyeManager'][_0x3b60d1]['bUsed']&&this['stFishEyeManager'][_0x3b60d1]['nSubPort']&&_0x2cbb81==this['stFishEyeManager'][_0x3b60d1]['emCorrectType']&&(_0x2a0734['stCycleParam']['fRadiusLeft']<=-0.5||_0x2a0734['stCycleParam']['fRadiusLeft']>0x0||_0x2a0734['stCycleParam']['fRadiusRight']<0x1||_0x2a0734['stCycleParam']['fRadiusRight']>=1.5||_0x2a0734['stCycleParam']['fRadiusTop']<=-0.5||_0x2a0734['stCycleParam']['fRadiusTop']>=0.4||_0x2a0734['stCycleParam']['fRadiusBottom']<=0.6||_0x2a0734['stCycleParam']['fRadiusBottom']>=1.5||_0x2a0734['stCycleParam']['fRadiusLeft']+_0x2a0734['stCycleParam']['fRadiusRight']<=0.8||_0x2a0734['stCycleParam']['fRadiusLeft']+_0x2a0734['stCycleParam']['fRadiusRight']>=1.2||_0x2a0734['stCycleParam']['fRadiusTop']+_0x2a0734['stCycleParam']['fRadiusBottom']<=0.8||_0x2a0734['stCycleParam']['fRadiusTop']+_0x2a0734['stCycleParam']['fRadiusBottom']>=1.2))return this['FECErrorCode']=_0x1ee478,0x0;}}if(0x0==this['stFishEyeManager'][_0x30bca1]['bInited']){if(_0x563cdc&_0x2a0734['upDateType']){if(_0x3a265d!=this['stFishEyeManager'][_0x30bca1]['emCorrectType']&&_0x39d783!=this['stFishEyeManager'][_0x30bca1]['emCorrectType']||_0x278af9==this['stFishEyeManager'][_0x30bca1]['emPlaceType'])return this['FECErrorCode']=_0x513d06,0x0;for(var _0x565822=0x1;_0x565822<_0x432dee;_0x565822++)if(this['stFishEyeManager'][_0x565822]['nSubPort']&&this['stFishEyeManager'][_0x565822]['bUsed']&&this['stFishEyeManager'][_0x565822]['emCorrectType']==_0x3f622d)return this['FECErrorCode']=_0xd535e3,0x0;this['stFishParam'][_0x30bca1]['fWideScanOffset']=_0x2a0734['fValue'];}if(_0x401beb&_0x2a0734['upDateType']){if(null==_0x2a0734['stPTZColor'])return this['FECErrorCode']=_0x1ee478,0x0;if(_0x2a0734['stPTZColor']['nR']>0xff||_0x2a0734['stPTZColor']['nG']>0xff||_0x2a0734['stPTZColor']['nB']>0xff||_0x2a0734['stPTZColor']['nAlpha']>0xff)return this['FECErrorCode']=_0x513d06,0x0;this['stFishParam'][_0x30bca1]['stPTZColor']['nR']=_0x2a0734['stPTZColor']['nR'],this['stFishParam'][_0x30bca1]['stPTZColor']['nG']=_0x2a0734['stPTZColor']['nG'],this['stFishParam'][_0x30bca1]['stPTZColor']['nB']=_0x2a0734['stPTZColor']['nB'],this['stFishParam'][_0x30bca1]['stPTZColor']['nAlpha']=_0x2a0734['stPTZColor']['nAlpha'];}if(_0x231754&_0x2a0734['upDateType']){if(_0x3f622d!=this['stFishEyeManager'][_0x30bca1]['emCorrectType'])return this['FECErrorCode']=_0x513d06,0x0;this['stFishParam'][_0x30bca1]['stPTZParam']['fPTZPositionX']=_0x2a0734['fPTZParam']['fPTZPositionX'],this['stFishParam'][_0x30bca1]['stPTZParam']['fPTZPositionY']=_0x2a0734['fPTZParam']['fPTZPositionY'];}if(_0x1afe14&_0x2a0734['upDateType']){if(_0x3f622d!=this['stFishEyeManager'][_0x30bca1]['emCorrectType'])return this['FECErrorCode']=_0x513d06,0x0;this['stFishParam'][_0x30bca1]['fZoom']=_0x2a0734['fPTZZoom'];}if(_0x322752&_0x2a0734['upDateType']){if(null==this['stFishParam']['stPTZSelect'])return 0x0;if(_0x3f622d!=this['stFishEyeManager'][_0x30bca1]['emCorrectType'])return this['FECErrorCode']=_0x513d06,0x0;this['stFishParam']['stPTZSelect']['fTop']=_0x2a0734['stPTZSelect']['fTop'],this['stFishParam']['stPTZSelect']['fBottom']=_0x2a0734['stPTZSelect']['fBottom'],this['stFishParam']['stPTZSelect']['fLeft']=_0x2a0734['stPTZSelect']['fLeft'],this['stFishParam']['stPTZSelect']['fRight']=_0x2a0734['stPTZSelect']['fRight'];}if(_0x64a4f0&_0x2a0734['upDateType']){if(null==_0x2a0734['stCycleParam'])return this['FECErrorCode']=_0x1ee478,0x0;if(0x0==this['_IsValidRadiusParam'](_0x2a0734['stCycleParam']))return this['FECErrorCode']=_0x1ee478,0x0;this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']=_0x2a0734['stCycleParam']['fRadiusLeft'],this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']=_0x2a0734['stCycleParam']['fRadiusRight'],this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']=_0x2a0734['stCycleParam']['fRadiusTop'],this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']=_0x2a0734['stCycleParam']['fRadiusBottom'];}return 0x1;}if(_0x563cdc&_0x2a0734['upDateType']){if(_0x3a265d!=this['stFishEyeManager'][_0x30bca1]['emCorrectType']&&_0x39d783!=this['stFishEyeManager'][_0x30bca1]['emCorrectType']||_0x278af9==this['stFishEyeManager'][_0x30bca1]['emPlaceType'])return this['FECErrorCode']=_0x513d06,0x0;for(var _0x3b2b01=0x1;_0x3b2b01<_0x432dee;_0x3b2b01++)if(this['stFishEyeManager'][_0x3b2b01]['nSubPort']&&this['stFishEyeManager'][_0x3b2b01]['bUsed']&&this['stFishEyeManager'][_0x3b2b01]['emCorrectType']==_0x3f622d)return this['FECErrorCode']=_0xd535e3,0x0;var _0x100264={};if(_0x100264['nFishParamType']=_0x15dbff,_0x100264['bBlack']=0x0,_0x100264['fAngle']=_0x2a0734['fValue'],_0x4e01e5!=this['stFishEyeManager'][_0x30bca1]['pRender']['SR_SetFishParam'](_0x100264))return this['FECErrorCode']=_0xd535e3,0x0;this['stFishParam'][_0x30bca1]['fWideScanOffset']=_0x2a0734['fValue'];}if(_0x401beb&_0x2a0734['upDateType']){if(null==_0x2a0734['stPTZColor'])return this['FECErrorCode']=_0x513d06,0x0;if(_0x2a0734['stPTZColor']['nR']>0xff||_0x2a0734['stPTZColor']['nG']>0xff||_0x2a0734['stPTZColor']['nB']>0xff||_0x2a0734['stPTZColor']['nAlpha']>0xff)return this['FECErrorCode']=_0x513d06,0x0;var _0x5e8c52={};_0x5e8c52['fR']=float(_0x2a0734['stPTZColor']['nR']/0xff),_0x5e8c52['fG']=float(_0x2a0734['stPTZColor']['nG']/0xff),_0x5e8c52['fB']=float(_0x2a0734['stPTZColor']['nB']/0xff),_0x5e8c52['fA']=float(_0x2a0734['stPTZColor']['nAlpha']/0xff),this['stFishParam'][_0x30bca1]['stPTZColor']['nR']=_0x2a0734['stPTZColor']['nR'],this['stFishParam'][_0x30bca1]['stPTZColor']['nG']=_0x2a0734['stPTZColor']['nG'],this['stFishParam'][_0x30bca1]['stPTZColor']['nB']=_0x2a0734['stPTZColor']['nB'],this['stFishParam'][_0x30bca1]['stPTZColor']['nAlpha']=_0x2a0734['stPTZColor']['nAlpha'];}if(_0x231754&_0x2a0734['upDateType']){if(_0x3f622d!=this['stFishEyeManager'][_0x30bca1]['emCorrectType'])return this['FECErrorCode']=_0x513d06,0x0;var _0x3b72b8={};if(_0x3b72b8['nFishParamType']=_0x33e182,_0x3b72b8['bBlack']=0x0,_0x3b72b8['fPTZX']=_0x2a0734['fPTZParam']['fPTZPositionX'],_0x3b72b8['fPTZY']=_0x2a0734['fPTZParam']['fPTZPositionY'],_0x4e01e5!=this['stFishEyeManager'][_0x30bca1]['pRender']['SR_SetFishParam'](_0x3b72b8))return this['FECErrorCode']=_0xd535e3,0x0;this['stFishParam'][_0x30bca1]['stPTZParam']['fPTZPositionX']=_0x2a0734['fPTZParam']['fPTZPositionX'],this['stFishParam'][_0x30bca1]['stPTZParam']['fPTZPositionY']=_0x2a0734['fPTZParam']['fPTZPositionY'];}if(_0x1afe14&_0x2a0734['upDateType']){if(_0x3f622d!=this['stFishEyeManager'][_0x30bca1]['emCorrectType'])return this['FECErrorCode']=_0x513d06,0x0;var _0x51c55a={};if(_0x51c55a['nFishParamType']=_0x16f8a2,_0x51c55a['bBlack']=0x0,_0x51c55a['fZoom']=_0x2a0734['fPTZZoom'],_0x4e01e5!=this['stFishEyeManager'][_0x30bca1]['pRender']['SR_SetFishParam'](_0x51c55a))return this['FECErrorCode']=_0xd535e3,0x0;this['stFishParam'][_0x30bca1]['fZoom']=_0x2a0734['fPTZZoom'];}if(_0x64a4f0&_0x2a0734['upDateType']){if(0x0==this['_IsValidRadiusParam'](_0x2a0734['stCycleParam']))return this['FECErrorCode']=_0x1ee478,0x0;var _0x2e1d7e={};if(_0x2e1d7e['nFishParamType']=_0x1a235b,_0x2e1d7e['bBlack']=0x1,_0x2e1d7e['fRXLeft']=_0x2a0734['stCycleParam']['fRadiusLeft'],_0x2e1d7e['fRXRight']=_0x2a0734['stCycleParam']['fRadiusRight'],_0x2e1d7e['fRYTop']=_0x2a0734['stCycleParam']['fRadiusTop'],_0x2e1d7e['fRYBottom']=_0x2a0734['stCycleParam']['fRadiusBottom'],_0x4e01e5!=this['stFishEyeManager'][_0x30bca1]['pRender']['SR_SetFishParam'](this['stFishEyeManager'][_0x30bca1]['nValidSubPort'],_0x2e1d7e))return this['FECErrorCode']=_0x1ee478,0x0;this['stFishParam'][0x0]['stCycleParam']['fRadiusLeft']=_0x2a0734['stCycleParam']['fRadiusLeft'],this['stFishParam'][0x0]['stCycleParam']['fRadiusRight']=_0x2a0734['stCycleParam']['fRadiusRight'],this['stFishParam'][0x0]['stCycleParam']['fRadiusTop']=_0x2a0734['stCycleParam']['fRadiusTop'],this['stFishParam'][0x0]['stCycleParam']['fRadiusBottom']=_0x2a0734['stCycleParam']['fRadiusBottom'];}return _0x322752&_0x2a0734['upDateType']&&_0x3f622d==this['stFishEyeManager'][_0x30bca1]['emCorrectType']&&_0x4e01e5!=this['stFishEyeManager'][_0x30bca1]['pRender']['SR_SetFishParam'](this['stFishEyeManager'][_0x30bca1]['stPTZSelect'])?(this['FECErrorCode']=0x513,0x0):0x1;}},{'key':'FEC_GetParam','value':function value(_0x2e314c,_0x15b1b0){return _0x2e314c<0x0||_0x2e314c>0x1f||null==_0x2e314c?(console['info']('%c\x20FEC_GetParam-1\x20nSubPort:%d','color:\x20red',_0x2e314c),this['FECErrorCode']=_0x2fcdfc,0x0):null==this['stFishEyeManager'][_0x2e314c]['pRender']?(console['info']('%c\x20FEC_GetParam-2\x20pRender:%d','color:\x20red',this['stFishEyeManager'][_0x2e314c]['pRender']),this['FECErrorCode']=_0x3b6cac,0x0):(this['stFishEyeManager'][_0x2e314c]['pRender']['SR_GetFishParam'](_0x15b1b0),_0x15b1b0['emCorrectType']=this['stFishEyeManager'][_0x2e314c]['emCorrectType'],0x1);}},{'key':'_IsValidRadiusParam','value':function value(_0x18bbac){return _0x18bbac['fRadiusBottom']<=_0x18bbac['fRadiusTop']||_0x18bbac['fRadiusRight']<=_0x18bbac['fRadiusLeft']?0x0:0x1;}},{'key':'FEC_SetViewParam','value':function value(_0x587fe7,_0x20d6cc,_0x48604c){return _0x587fe7<0x0||_0x587fe7>0x1f||null==_0x587fe7?(console['info']('%c\x20FEC_SetViewParam-1\x20nSubPort:%d','color:\x20red',_0x587fe7),this['FECErrorCode']=_0x2fcdfc,0x0):null==this['stFishEyeManager'][_0x587fe7]['pRender']?(console['info']('%c\x20FEC_SetViewParam-2\x20pRender:%d','color:\x20red',this['stFishEyeManager'][_0x587fe7]['pRender']),this['FECErrorCode']=_0x3b6cac,0x0):_0x20d6cc<_0x60b800||_0x20d6cc>_0x139d52?(this['FECErrorCode']=_0x515d92,0x0):(this['FECErrorCode']=0x0,0x0==this['stFishEyeManager'][_0x587fe7]['bInited']?(this['FECErrorCode']=_0x1928b9,0x0):_0x4fb0c9<=this['stFishEyeManager'][_0x587fe7]['emCorrectType']?_0x4e01e5!=this['stFishEyeManager'][_0x587fe7]['pRender']['SR_SetViewParam'](_0x20d6cc,_0x48604c)?(this['FECErrorCode']=_0x515d92,0x0):0x1:(this['FECErrorCode']=_0x513d06,0x0));}},{'key':'FEC_GetViewParam','value':function value(_0x55243f,_0x354d34,_0x3d6f70){if(_0x3d6f70['fValue']=-0x1,_0x55243f<0x0||_0x55243f>0x1f||null==_0x55243f)return console['info']('%c\x20FEC_GetViewParam-1\x20nSubPort:%d','color:\x20red',_0x55243f),this['FECErrorCode']=_0x2fcdfc,0x0;if(null==this['stFishEyeManager'][_0x55243f]['pRender'])return console['info']('%c\x20FEC_GetViewParam-2\x20pRender:%d','color:\x20red',this['stFishEyeManager'][_0x55243f]['pRender']),this['FECErrorCode']=_0x3b6cac,0x0;if(_0x354d34<0x1||_0x354d34>0x3||0x0==this['stFishEyeManager'][_0x55243f]['bInited'])return 0x0;if(_0x4fb0c9<=this['stFishEyeManager'][_0x55243f]['emCorrectType'])this['stFishEyeManager'][_0x55243f]['pRender']['SR_GetViewParam'](_0x354d34,_0x3d6f70);return 0x1;}},{'key':'FEC_SetDisplayRegion','value':function value(_0x42f8de,_0x5ca0e0,_0x282276,_0x24ee2d,_0x5e3416,_0xea020d,_0x52cc76){return _0x42f8de<0x0||_0x42f8de>0x1f||null==_0x42f8de?(console['info']('%c\x20FEC_SetDisplayRegion-1\x20nSubPort:%d','color:\x20red',_0x42f8de),this['FECErrorCode']=_0x2fcdfc,0x0):null==this['stFishEyeManager'][_0x42f8de]['pRender']?(console['info']('%c\x20FEC_SetDisplayRegion-2\x20pRender:%d','color:\x20red',this['stFishEyeManager'][_0x42f8de]['pRender']),this['FECErrorCode']=_0x3b6cac,0x0):0x0!=_0x5ca0e0||0x0!=_0x282276?(this['FECErrorCode']=_0x515d92,0x0):this['stFishEyeManager'][_0x42f8de]['emCorrectType']!=_0x106093&&this['stFishEyeManager'][_0x42f8de]['emCorrectType']!=_0x3a265d&&this['stFishEyeManager'][_0x42f8de]['emCorrectType']!=_0x39d783&&this['stFishEyeManager'][_0x42f8de]['emCorrectType']!=_0x1ae1fd?(this['FECErrorCode']=_0x205828,0x0):0x0==this['stFishEyeManager'][_0x42f8de]['bInited']?(this['FECErrorCode']=_0x1928b9,0x0):_0x24ee2d<0x0||_0x5e3416<0x0||_0xea020d<0x0||_0x52cc76<0x0?(this['FECErrorCode']=_0x515d92,0x0):_0x4e01e5!=this['stFishEyeManager'][_0x42f8de]['pRender']['SR_SetDisplayRect'](_0x24ee2d,_0x5e3416,_0xea020d,_0x52cc76,_0x39748a)?(this['FECErrorCode']=0x511,0x0):0x1;}},{'key':'FEC_SetBackCilling','value':function value(_0x256e02,_0x206feb){return _0x256e02<0x0||_0x256e02>0x1f||null==_0x256e02?(this['FECErrorCode']=_0x2fcdfc,0x0):null==this['stFishEyeManager'][_0x256e02]['pRender']?(this['FECErrorCode']=_0x3b6cac,0x0):0x0==this['stFishEyeManager'][_0x256e02]['bInited']?(this['FECErrorCode']=_0x1928b9,0x0):_0x4e01e5!=this['stFishEyeManager'][_0x256e02]['pRender']['SR_SetRenderState'](_0x2fc046,_0x206feb)?(this['FECErrorCode']=0x511,0x0):0x1;}},{'key':'FEC_GetPTZPort','value':function value(_0x36f156,_0x4cf099,_0x115069){if(null!=this['stFishEyeManager'][_0x36f156]['pRender']){var _0x379569={'nPTZPort':-0x1};if(this['stFishEyeManager'][_0x36f156]['pRender']['SR_GetPTZPort'](_0x4cf099,_0x115069,_0x379569)==_0x4e01e5)return _0x379569['nPTZPort'];}return -0x1;}},{'key':'FEC_SetPTZDisplayMode','value':function value(_0x36e35e){return _0x36e35e>=0x0&&_0x36e35e<=0x2?(null!=this['stFishEyeManager'][0x0]['pRender']&&this['stFishEyeManager'][0x0]['pRender']['SR_SetPTZDisplayMode'](_0x36e35e),this['FECShowMode']=_0x36e35e,0x1):(console['info']('%c\x20FEC_SetPTZDisplayMode\x20ptzMode:%d','color:\x20red',_0x36e35e),0x0);}},{'key':'SetWaterMarkFont','value':function value(_0x32b23b){return this['curWaterMarkFontsInfo']=_0x32b23b,0x1;}},{'key':'SetWaterMarkImage','value':function value(_0x4b4cfb){var _0x157c07=this,_0x17f056=new ImageDecoder({'data':_0x4b4cfb['pImageData'],'type':'image/'+_0x4b4cfb['pImageType']});return null!=_0x4b4cfb['pImageData']&&_0x17f056['decode'](_0x4b4cfb['pImageData'])['then'](function(_0x32b235){_0x157c07['curWaterMarkImageInfo']={},_0x157c07['curWaterMarkImageInfo']['videoStream']=_0x32b235['image'],_0x157c07['curWaterMarkImageInfo']['nImageWidth']=_0x32b235['image']['displayWidth'],_0x157c07['curWaterMarkImageInfo']['nImageHeight']=_0x32b235['image']['displayHeight'],null!=_0x4b4cfb['pstRectPos']?_0x157c07['curWaterMarkImageInfo']['pstRectPos']=_0x4b4cfb['pstRectPos']:_0x157c07['curWaterMarkImageInfo']['pstRectPos']={'fLeft':0x0,'fRight':0.1,'fTop':0x0,'fBottom':0.1},null!=_0x4b4cfb['fAlpha']&&_0x4b4cfb['fAlpha']<=0x1&&_0x4b4cfb['fAlpha']>=0x0?_0x157c07['curWaterMarkImageInfo']['fAlpha']=_0x4b4cfb['fAlpha']:_0x157c07['curWaterMarkImageInfo']['fAlpha']=0x1;}),0x1;}},{'key':'_ConvertDisplayEffect','value':function value(_0x2535c2,_0x5e02bc){switch(_0x2535c2){case _0x278af9:return _0x3f622d==_0x5e02bc?_0x58af5b['SR_DE_FISH_PTZ_WALL']:_0x39d783==_0x5e02bc||_0x1ae1fd==_0x5e02bc?_0x58af5b['SR_DE_FISH_PANORAMA_WALL']:_0x4fb0c9==_0x5e02bc?_0x58af5b['SR_DE_FISH_SEMISPHERE']:_0x27ffa7==_0x5e02bc?_0x58af5b['SR_DE_FISH_PLANET']:_0x2723d4==_0x5e02bc?_0x58af5b['SR_DE_FISH_ARCSPHERE_HORIZONTAL_WALL']:_0x2cbb81==_0x5e02bc?_0x58af5b['SR_DE_FISH_ARCSPHERE_VERTICAL_WALL']:_0x58af5b['SR_DE_FISH_ORIGINAL'];case _0x46372b:return _0x3f622d==_0x5e02bc?_0x58af5b['SR_DE_FISH_PTZ_FLOOR']:_0x39d783==_0x5e02bc?_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_360']:_0x3a265d==_0x5e02bc?_0x58af5b['SR_DE_FISH_PANORAMA_FLOOR_180']:_0x1ae1fd==_0x5e02bc?_0x58af5b['SR_DE_FISH_PANORAMA_WALL']:_0x4fb0c9==_0x5e02bc?_0x58af5b['SR_DE_FISH_SEMISPHERE']:_0x4ec0ec==_0x5e02bc?_0x58af5b['SR_DE_FISH_CYLINDER_FLOOR']:_0x48007e==_0x5e02bc?_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_FLOOR']:_0x27ffa7==_0x5e02bc?_0x58af5b['SR_DE_FISH_PLANET']:_0x58af5b['SR_DE_FISH_ORIGINAL'];case _0x138512:return _0x3f622d==_0x5e02bc?_0x58af5b['SR_DE_FISH_PTZ_CEILING']:_0x39d783==_0x5e02bc?_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_360']:_0x3a265d==_0x5e02bc?_0x58af5b['SR_DE_FISH_PANORAMA_CEILING_180']:_0x1ae1fd==_0x5e02bc?_0x58af5b['SR_DE_FISH_PANORAMA_WALL']:_0x4fb0c9==_0x5e02bc?_0x58af5b['SR_DE_FISH_SEMISPHERE']:_0x4ec0ec==_0x5e02bc?_0x58af5b['SR_DE_FISH_CYLINDER_CEILING']:_0x48007e==_0x5e02bc?_0x58af5b['SR_DE_FISH_CYLINDER_SPLIT_CEILING']:_0x27ffa7==_0x5e02bc?_0x58af5b['SR_DE_FISH_PLANET']:_0x58af5b['SR_DE_FISH_ORIGINAL'];default:return _0x58af5b['SR_DE_FISH_ORIGINAL'];}}},{'key':'GetCanvasData','value':function value(_0x5c63c9){var _0x5e10be={'nWidth':0x0,'nHeight':0x0,'nBufferLen':0x0},_0x12f5ef=this['oVideoHandle']['SR_GetCaptureSize'](_0x5e10be);(_0x4e01e5!=_0x12f5ef||_0x5e10be['nBufferLen']<=0x0)&&_0x5c63c9(null);var _0x218c1b=new Uint8Array(_0x5e10be['nBufferLen']);null==_0x218c1b&&_0x5c63c9(null);var _0x24b705={};_0x24b705['pBuffer']=_0x218c1b,this['oVideoHandle']['SR_CaptureScreen'](_0x24b705),_0x5c63c9(_0x218c1b,_0x5e10be['nWidth'],_0x5e10be['nHeight']);}},{'key':'FindIntelNodefromList','value':function value(_0x5c50d1){if(0x0!=this['privateLinesInfo']['length']){var _0x7abbdf=this['privateLinesInfo'][0x0]['absTimeStamp'];if(_0x7abbdf<=_0x5c50d1+0x64&&_0x7abbdf>_0x5c50d1-0x64)this['curLinesInfo']=this['privateLinesInfo']['shift']();else {if(_0x7abbdf>_0x5c50d1+0x7d0||_0x7abbdf<_0x5c50d1-0x7d0)for(this['curLinesInfo']=this['privateLinesInfo']['shift']();this['privateLinesInfo']['length']>0x0;){var _0x1b4ac3=this['privateLinesInfo'][0x0]['absTimeStamp'];if(!(_0x1b4ac3>_0x5c50d1+0x7d0||_0x1b4ac3<_0x5c50d1-0x7d0))break;this['curLinesInfo']=this['privateLinesInfo']['shift']();}}}}},{'key':'RenderPrivateData','value':function value(_0x1c3226){return 0x0==this['privateLinesInfo']['length']&&_0x1c3226&&(this['curLinesInfo']=null),0x1;}},{'key':'InputPrivateInfo','value':function value(_0x2cefa6,_0x5439a1,_0x3b128d){var _0x60b259=!0x1,_0x587106=0x0;if(_0x2cefa6['linesNum']>0x0){if(_0x2cefa6['absTimeStamp']<=this['maxPrivateLineTimeStamp']){var _0xb67d78=0x0;for(_0xb67d78=0x0;_0xb67d78<this['privateLinesInfo']['length'];_0xb67d78++)if(this['privateLinesInfo'][_0xb67d78]['absTimeStamp']==_0x2cefa6['absTimeStamp']){_0x60b259=!0x0,_0x587106=_0xb67d78;break;}}if(_0x60b259){var _0x4325b5=this['privateLinesInfo'][_0x587106]['linesNum'];this['privateLinesInfo'][_0x587106]['linesNum']=_0x4325b5+_0x2cefa6['linesNum'];for(var _0x526c9b=0x0;_0x526c9b<_0x2cefa6['linesNum'];_0x526c9b++){this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]={},this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['vertex_num']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['vertex_num'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['lineWidth']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['lineWidth'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['bFill']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['bFill'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['bLoop']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['bLoop'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['color']={},this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['color']['R']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['color']['R'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['color']['G']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['color']['G'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['color']['B']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['color']['B'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['color']['A']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['color']['A'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['stPoint']=[];for(var _0x4ace78=0x0;_0x4ace78<_0x2cefa6['stDrawLinesArray'][_0x526c9b]['vertex_num'];_0x4ace78++)this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['stPoint'][_0x4ace78]={},this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['stPoint'][_0x4ace78]['x']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['stPoint'][_0x4ace78]['x'],this['privateLinesInfo'][_0x587106]['stDrawLinesArray'][_0x526c9b+_0x4325b5]['stPoint'][_0x4ace78]['y']=_0x2cefa6['stDrawLinesArray'][_0x526c9b]['stPoint'][_0x4ace78]['y'];}}else {this['maxPrivateLineTimeStamp']<_0x2cefa6['absTimeStamp']&&(this['maxPrivateLineTimeStamp']=_0x2cefa6['absTimeStamp']);var _0x28441d={};_0x28441d['linesNum']=_0x2cefa6['linesNum'],_0x28441d['absTimeStamp']=_0x2cefa6['absTimeStamp'],_0x28441d['stDrawLinesArray']=[];for(var _0x401b4a=0x0;_0x401b4a<_0x2cefa6['linesNum'];_0x401b4a++){_0x28441d['stDrawLinesArray'][_0x401b4a]={},_0x28441d['stDrawLinesArray'][_0x401b4a]['vertex_num']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['vertex_num'],_0x28441d['stDrawLinesArray'][_0x401b4a]['lineWidth']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['lineWidth'],_0x28441d['stDrawLinesArray'][_0x401b4a]['bFill']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['bFill'],_0x28441d['stDrawLinesArray'][_0x401b4a]['bLoop']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['bLoop'],_0x28441d['stDrawLinesArray'][_0x401b4a]['color']={},_0x28441d['stDrawLinesArray'][_0x401b4a]['color']['R']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['color']['R'],_0x28441d['stDrawLinesArray'][_0x401b4a]['color']['G']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['color']['G'],_0x28441d['stDrawLinesArray'][_0x401b4a]['color']['B']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['color']['B'],_0x28441d['stDrawLinesArray'][_0x401b4a]['color']['A']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['color']['A'],_0x28441d['stDrawLinesArray'][_0x401b4a]['stPoint']=[];for(var _0x5a0b9e=0x0;_0x5a0b9e<_0x2cefa6['stDrawLinesArray'][_0x401b4a]['vertex_num'];_0x5a0b9e++)_0x28441d['stDrawLinesArray'][_0x401b4a]['stPoint'][_0x5a0b9e]={},_0x28441d['stDrawLinesArray'][_0x401b4a]['stPoint'][_0x5a0b9e]['x']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['stPoint'][_0x5a0b9e]['x'],_0x28441d['stDrawLinesArray'][_0x401b4a]['stPoint'][_0x5a0b9e]['y']=_0x2cefa6['stDrawLinesArray'][_0x401b4a]['stPoint'][_0x5a0b9e]['y'];}this['privateLinesInfo']['push'](_0x28441d);}}return 0x1;}},{'key':'WebGLDisplayCallBack','value':function value(_0x1edecf){if(0x0!=_0x1edecf['privateLinesInfo']['length']||null!=_0x1edecf['curLinesInfo']||null!=_0x1edecf['curWaterMarkFontsInfo']||null!==_0x1edecf['curWaterMarkImageInfo']){if(null!=_0x1edecf['curLinesInfo']){for(var _0x492965=[],_0x20b09c=0x0,_0x578906=0x1,_0x538b8d=0x0;_0x538b8d<_0x1edecf['curLinesInfo']['linesNum'];_0x538b8d++){_0x492965[_0x538b8d]={},_0x492965[_0x538b8d]['nPointNum']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['vertex_num'],_0x492965[_0x538b8d]['nLineWidth']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['lineWidth'],_0x578906=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['bFill'],_0x492965[_0x538b8d]['bLoop']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['bLoop'],_0x492965[_0x538b8d]['pstColor']={},_0x492965[_0x538b8d]['pstColor']['fR']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['color']['R'],_0x492965[_0x538b8d]['pstColor']['fG']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['color']['G'],_0x492965[_0x538b8d]['pstColor']['fB']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['color']['B'],_0x492965[_0x538b8d]['pstColor']['fA']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['color']['A'],_0x492965[_0x538b8d]['pstPoints']=[];for(var _0x27da65=0x0;_0x27da65<_0x492965[_0x538b8d]['nPointNum'];_0x27da65++)_0x492965[_0x538b8d]['pstPoints'][_0x27da65]={},_0x492965[_0x538b8d]['pstPoints'][_0x27da65]['fX']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['stPoint'][_0x27da65]['x'],_0x492965[_0x538b8d]['pstPoints'][_0x27da65]['fY']=_0x1edecf['curLinesInfo']['stDrawLinesArray'][_0x538b8d]['stPoint'][_0x27da65]['y'];_0x20b09c+=_0x492965[_0x538b8d]['nPointNum'];}_0x1edecf['oVideoHandle']['SR_DrawLinesEx'](_0x492965,_0x1edecf['curLinesInfo']['linesNum'],_0x20b09c,_0x578906);}if(null!=_0x1edecf['curWaterMarkFontsInfo']){if(_0x1edecf['curWaterMarkFontsInfo']['pstFontRotate']['fFillFullScreen']){var _0x113769=[],_0x33626c=[];_0x33626c[0x0]=0.05,_0x33626c[0x1]=0.35,_0x33626c[0x2]=0.75;for(var _0x3a4988=0x0;_0x3a4988<0x9;++_0x3a4988){_0x113769[_0x3a4988]={},_0x113769[_0x3a4988]['pString']=_0x1edecf['curWaterMarkFontsInfo']['pFontString'],_0x113769[_0x3a4988]['nFontWidth']=_0x1edecf['mainCanvasID']['width']/0x1e,_0x113769[_0x3a4988]['nFontHeight']=_0x1edecf['mainCanvasID']['height']/0x1e,_0x113769[_0x3a4988]['pstStartPos']={};var _0x382d56=_0x3a4988%0x3,_0x16ab4c=Math['floor'](_0x3a4988/0x3);_0x113769[_0x3a4988]['pstStartPos']['fX']=_0x33626c[_0x382d56],_0x113769[_0x3a4988]['pstStartPos']['fY']=_0x33626c[_0x16ab4c],_0x113769[_0x3a4988]['pstFontColor']=_0x1edecf['curWaterMarkFontsInfo']['pstFontColor'],_0x113769[_0x3a4988]['bBackGround']=!0x1,_0x113769[_0x3a4988]['pstBGColor']=null,_0x113769[_0x3a4988]['fRotateAngle']=0x1e,_0x113769[_0x3a4988]['pFontFamily']=_0x1edecf['curWaterMarkFontsInfo']['pFontFamily'];}_0x1edecf['oVideoHandle']['SR_DrawFontEx'](_0x113769,0x9);}else _0x1edecf['oVideoHandle']['SR_DrawFont'](_0x1edecf['curWaterMarkFontsInfo']['pFontString'],_0x1edecf['curWaterMarkFontsInfo']['pstStartPos'],_0x1edecf['curWaterMarkFontsInfo']['pstFontColor'],_0x1edecf['curWaterMarkFontsInfo']['pstFontSize']['nFontWidth'],_0x1edecf['curWaterMarkFontsInfo']['pstFontSize']['nFontHeight'],!0x1,null,_0x1edecf['curWaterMarkFontsInfo']['pstFontRotate']['fRotateAngle'],_0x1edecf['curWaterMarkFontsInfo']['pFontFamily']);}null!==_0x1edecf['curWaterMarkImageInfo']&&_0x1edecf['oVideoHandle']['SR_DrawImage'](_0x1edecf['curWaterMarkImageInfo']['videoStream'],_0x1edecf['curWaterMarkImageInfo']['nImageWidth'],_0x1edecf['curWaterMarkImageInfo']['nImageHeight'],_0x1edecf['curWaterMarkImageInfo']['pstRectPos'],_0x3a627d,_0x1edecf['curWaterMarkImageInfo']['fAlpha']);}}}]),_0x37e29d;}(),_0x444805=function(){function _0x238d07(){_0xa7bfb2(this,_0x238d07),this['startTime']=0x0,this['curTime']=0x0,this['timeWalk']=0x0,this['lastDate']=0x0,this['preTimerStamp']=0x0;}return _0x3e0d7c(_0x238d07,[{'key':'Init','value':function value(){this['startTime']=this['GetCurTime']();}},{'key':'GetCurTime','value':function value(){return this['curTime']=0x3c*new Date()['getHours']()*0x3c*0x3e8+0x3c*new Date()['getMinutes']()*0x3e8+0x3e8*new Date()['getSeconds']()+new Date()['getMilliseconds'](),this['lastDate']=new Date()['getDate'](),this['curTime'];}},{'key':'GetTimerWalk','value':function value(){var _0x48eedf=this['GetCurTime']()-this['startTime'];return this['lastDate']!==new Date()['getDate']()&&(_0x48eedf+=0x18*(new Date()['getDate']()-this['lastDate'])*0x3c*0x3c*0x3e8),_0x48eedf;}},{'key':'timerReset','value':function value(){this['startTime']=0x0,this['curTime']=0x0,this['timeWalk']=0x0,this['lastDate']=0x0,this['preTimerStamp']=0x0;}}]),_0x238d07;}(),_0x323419=function(){function _0x5b7979(){var _0x38f265=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null;_0xa7bfb2(this,_0x5b7979),this['canvas']=null,this['streamOpenMode']=0x0,this['context']=null,this['oVideoDecoder']=null,this['frameBuffers']=[],this['initTimer']=!0x1,this['preTimeStamp']=0x0,this['baseTimeStamp']=0x0,this['resetTimer']=!0x0,this['RenderFrame']=this['RenderFrame']['bind'](this),this['renderCurStatus']=0x2,this['playSpeed']=0x1,this['nplaySpeed']=0x1,this['displayBuf']=0xe,this['needForward']=!0x1,this['firstFrame']=!0x0,this['LatcyTime']=0x0,this['displayFrameInfoCB']=null,this['displayFrameInfo']=[],this['curFrameInfo']={},this['curFrameInfo']['timeStamp']=0x0,this['sx']=0x0,this['sy']=0x0,this['sw']=0x0,this['sh']=0x0,this['displayRunning']=!0x1,this['oRenderTimer']=null,this['waitIFrameTimestamp']=0x0,this['curFrame']=null,this['player']=null,null!=_0x38f265&&(this['player']=_0x38f265),this['renderEngine']='webgl',this['oVideoRender']=null,this['FECCanvasID']='',this['oVideoRender']=new _0x5afd01();}return _0x3e0d7c(_0x5b7979,[{'key':'init','value':function value(_0xfa18c8,_0x35d21b,_0x5dae43,_0x15b5fe){this['canvas']=_0xfa18c8,this['streamOpenMode']=_0x35d21b,this['renderEngine']=_0x15b5fe,this['SetCurStatus'](0x2),null==this['oVideoDecoder']&&(this['oVideoDecoder']=new _0x413030(_0x5dae43,this,this['player']),null!==this['oVideoDecoder']&&this['oVideoDecoder']['initDecoder']()),this['frameBuffers']=this['oVideoDecoder']['ready_frames'],null!=this['oVideoRender']&&this['oVideoRender']['InitDisplay'](this['canvas'],this['renderEngine'],0x100),null==this['oRenderTimer']&&(this['oRenderTimer']=new _0x444805());}},{'key':'HardDecodeError','value':function value(){return this['player']['_switchHardToSoft'](),0x1;}},{'key':'inputData','value':function value(_0x2b046a,_0x3e2bb0){var _0x33ea89={};_0x33ea89['port']=_0x3e2bb0['port'],_0x33ea89['codecType']=_0x3e2bb0['codecType'],_0x33ea89['frameType']=_0x3e2bb0['frameType'],_0x33ea89['frameSize']=_0x3e2bb0['frameSize'],_0x33ea89['width']=_0x3e2bb0['width'],_0x33ea89['height']=_0x3e2bb0['height'],_0x33ea89['timeStamp']=_0x3e2bb0['timeStamp'],_0x33ea89['frameRate']=_0x3e2bb0['frameRate'],_0x33ea89['frameNum']=_0x3e2bb0['frameNum'],_0x33ea89['interlace']=_0x3e2bb0['interlace'],_0x33ea89['streamEnd']=_0x3e2bb0['streamEnd'],_0x33ea89['cropLeft']=_0x3e2bb0['cropLeft'],_0x33ea89['cropRight']=_0x3e2bb0['cropRight'],_0x33ea89['cropTop']=_0x3e2bb0['cropTop'],_0x33ea89['cropBottom']=_0x3e2bb0['cropBottom'],_0x33ea89['year']=_0x3e2bb0['year'],_0x33ea89['month']=_0x3e2bb0['month'],_0x33ea89['week']=_0x3e2bb0['week'],_0x33ea89['day']=_0x3e2bb0['day'],_0x33ea89['hour']=_0x3e2bb0['hour'],_0x33ea89['minute']=_0x3e2bb0['minute'],_0x33ea89['second']=_0x3e2bb0['second'],_0x33ea89['milliseconds']=_0x3e2bb0['milliseconds'],this['displayFrameInfo']['push'](_0x33ea89),this['oVideoDecoder']['inputData'](_0x2b046a,_0x3e2bb0);}},{'key':'_resetDecoder','value':function value(){var _0x5285f8=this;return new Promise(function(_0x437fe2,_0x21891d){_0x5285f8['oVideoDecoder']['resetDecoder']()['then'](function(){_0x5285f8['displayFrameInfo']['splice'](0x0,_0x5285f8['displayFrameInfo']['length']),_0x5285f8['curFrameInfo']={},_0x5285f8['oVideoRender']['DeInitPrivateParam'](),_0x5285f8['renderCurStatus']=0x2,_0x5285f8['player']?_0x5285f8['player']['JSPlayM4_ResetEnd']():postMessage({'function':'resetEnd'}),_0x437fe2();},function(){_0x21891d();});});}},{'key':'_resetRenderTimer','value':function value(){this['initTimer']=!0x1,this['preTimeStamp']=0x0,this['baseTimeStamp']=0x0,this['resetTimer']=!0x0,null!=this['oRenderTimer']&&this['oRenderTimer']['timerReset'](),this['RenderFrame']=this['RenderFrame']['bind'](this),this['renderCurStatus']=0x2,this['curTimeStamp']=0x0,this['getImageJPEG']=!0x1,this['getImageBMP']=!0x1,this['getCropImageJPEG']=!0x1,this['getCropImageBMP']=!0x1,this['displayFrameInfoCB']=null,this['displayFrameInfo']['splice'](0x0,this['displayFrameInfo']['length']),this['curFrameInfo']={};}},{'key':'_destroyPlayCtrl','value':function value(){var _0x53e283=this;this['oVideoDecoder']['destroyDecoder']()['then'](function(){_0x53e283['oVideoDecoder']=null,null!=_0x53e283['oVideoRender']&&(_0x53e283['oVideoRender']['ReleaseDisplay'](),_0x53e283['oVideoRender']=null),_0x53e283['_resetRenderTimer'](),_0x53e283['oRenderTimer']=null,console['log']('>>>JS\x2002\x20destroy\x20oVideoDecoder/oVideoRender'),_0x53e283['displayRunning']=!0x1;},function(){console['log']('stop\x20failed\x20');});}},{'key':'RenderFrame','value':function value(){var _0x37f91d=this;switch(this['renderCurStatus']){case 0x0:this['_resetRenderTimer'](),this['_resetDecoder']()['then'](function(){var _0x39ee03=setTimeout(function(){_0x37f91d['RenderFrame'](),clearTimeout(_0x39ee03);},0x1);},function(){});break;case 0x2:if(this['displayRunning'])this['chooseFrame']()['then'](function(_0xc99434){if(_0x37f91d['curFrame']=_0xc99434,-0x1==_0x37f91d['displayBuf']||0x0==_0x37f91d['streamOpenMode']&&0x0==_0x37f91d['LatcyTime'])null!=_0x37f91d['curFrame']&&(_0x37f91d['curTimeStamp']=_0x37f91d['curFrame']['timestamp'],_0x37f91d['paint'](_0x37f91d['curFrame'])),requestAnimationFrame(_0x37f91d['RenderFrame']);else {if(null!=_0x37f91d['curFrame']){_0x37f91d['initTimer']&&!_0x37f91d['resetTimer']||(_0x37f91d['oRenderTimer']['Init'](),_0x37f91d['initTimer']=!0x0,_0x37f91d['resetTimer']=!0x1,_0x37f91d['preTimeStamp']=_0x37f91d['curFrame']['timestamp'],_0x37f91d['baseTimeStamp']=_0x37f91d['curFrame']['timestamp'],0x1==_0x37f91d['streamOpenMode']&&(_0x37f91d['LatcyTime']=0x0)),_0x37f91d['curTimeStamp']=_0x37f91d['curFrame']['timestamp'];var _0x115ce9=_0x37f91d['curTimeStamp']-_0x37f91d['preTimeStamp'],_0x55f736=_0x37f91d['curTimeStamp']-_0x37f91d['baseTimeStamp'];(_0x115ce9>0x1388||_0x115ce9<0x0||_0x55f736<0x0)&&(_0x37f91d['oRenderTimer']['Init'](),_0x37f91d['preTimeStamp']=_0x37f91d['curFrame']['timestamp'],_0x37f91d['baseTimeStamp']=_0x37f91d['curTimeStamp']);var _0x1e5bad=(_0x37f91d['curTimeStamp']-_0x37f91d['baseTimeStamp']+_0x37f91d['LatcyTime'])/_0x37f91d['playSpeed']-_0x37f91d['oRenderTimer']['GetTimerWalk']();if(_0x1e5bad<0xf&&_0x1e5bad>-0xf)_0x37f91d['paint'](_0x37f91d['curFrame']),_0x37f91d['preTimeStamp']=_0x37f91d['curTimeStamp'],_0x37f91d['RenderFrame']();else {if(_0x1e5bad<0x0)_0x37f91d['paint'](_0x37f91d['curFrame']),_0x37f91d['preTimeStamp']=_0x37f91d['curTimeStamp'],_0x37f91d['RenderFrame']();else var _0x2148d2=setTimeout(function(){0x2==_0x37f91d['renderCurStatus']?(_0x37f91d['paint'](_0x37f91d['curFrame']),_0x37f91d['preTimeStamp']=_0x37f91d['curTimeStamp'],_0x37f91d['RenderFrame']()):_0x37f91d['RenderFrame'](),clearTimeout(_0x2148d2);},_0x1e5bad-0x5);}}else {_0x37f91d['playSpeed']>0x2&&0x1;var _0x160b40=setTimeout(function(){_0x37f91d['RenderFrame'](),clearTimeout(_0x160b40);},0x0);}}});else var _0x541444=setTimeout(function(){_0x37f91d['RenderFrame'](),clearTimeout(_0x541444);},0x5);break;case 0x3:var _0x46651f=setTimeout(function(){_0x37f91d['_refresh'](),_0x37f91d['RenderFrame'](),clearTimeout(_0x46651f);},0x5);break;case 0x5:if(this['needForward'])this['chooseFrame']()['then'](function(_0x358989){_0x37f91d['curFrame']=_0x358989;var _0x285b4a=setTimeout(function(){null!=_0x37f91d['curFrame']&&(_0x37f91d['paint'](_0x37f91d['curFrame']),_0x37f91d['needForward']=!0x1),_0x37f91d['RenderFrame'](),clearTimeout(_0x285b4a);},0x1);});else var _0x352de9=setTimeout(function(){_0x37f91d['_refresh'](),_0x37f91d['RenderFrame'](),clearTimeout(_0x352de9);},0x5);break;case 0x4:return void this['_destroyPlayCtrl']();default:return;}}},{'key':'paint','value':function value(_0x5838a6){var _0x1dcb8f=this;return new Promise(function(_0x45698f,_0x278f05){if(0x4==_0x1dcb8f['curstatus']||null==_0x5838a6||null==_0x1dcb8f['oVideoRender'])_0x45698f();else {_0x1dcb8f['waitIFrameTimestamp']===_0x5838a6['timestamp']&&(_0x1dcb8f['resetTimer']=!0x0);var _0x4473df={'nCropLeft':0x0,'nCropRight':0x0,'nCropTop':0x0,'nCropBottom':0x0};_0x4473df['nCodeWidth']=_0x5838a6['displayWidth'],_0x4473df['nCodeHeight']=_0x5838a6['displayHeight'];var _0x2a3850={'x':0x0,'y':0x0};_0x2a3850['width']=_0x5838a6['displayWidth'],_0x2a3850['height']=_0x5838a6['displayHeight'],_0x1dcb8f['oVideoRender']['DisplayFrame'](_0x5838a6,_0x5838a6['displayWidth'],_0x5838a6['displayHeight'],_0x5838a6['timestamp'],_0x4473df,null)['then'](function(_0x4b3076){null!==_0x1dcb8f['displayFrameInfoCB']&&_0x1dcb8f['respondFrameInfoCB'](_0x4b3076),_0x1dcb8f['firstFrame']&&(null!=_0x1dcb8f['player']?null!=_0x1dcb8f['player']['FFCallBackFun']&&_0x1dcb8f['player']['FFCallBackFun']():postMessage({'function':'firstFrameCB','value':!0x0}),_0x1dcb8f['firstFrame']=!0x1),_0x45698f();});}});}},{'key':'respondFrameInfoCB','value':function value(_0x24114c){if(0x0!=this['displayFrameInfo']['length']&&this['curFrameInfo']['timeStamp']!==_0x24114c){for(var _0x1d1d7c={},_0x1196f3=0x0;_0x1196f3<this['displayFrameInfo']['length']&&(_0x1d1d7c=this['displayFrameInfo']['shift']())['timeStamp']!=_0x24114c;_0x1196f3++);this['curFrameInfo']['port']=_0x1d1d7c['port'],this['curFrameInfo']['codecType']=_0x1d1d7c['codecType'],this['curFrameInfo']['frameType']=_0x1d1d7c['frameType'],this['curFrameInfo']['frameSize']=_0x1d1d7c['frameSize'],this['curFrameInfo']['width']=_0x1d1d7c['width'],this['curFrameInfo']['height']=_0x1d1d7c['height'],this['curFrameInfo']['timeStamp']=_0x1d1d7c['timeStamp'],this['curFrameInfo']['frameRate']=_0x1d1d7c['frameRate'],this['curFrameInfo']['frameNum']=_0x1d1d7c['frameNum'],this['curFrameInfo']['interlace']=_0x1d1d7c['interlace'],this['curFrameInfo']['streamEnd']=_0x1d1d7c['streamEnd'],this['curFrameInfo']['cropLeft']=_0x1d1d7c['cropLeft'],this['curFrameInfo']['cropRight']=_0x1d1d7c['cropRight'],this['curFrameInfo']['cropTop']=_0x1d1d7c['cropTop'],this['curFrameInfo']['cropBottom']=_0x1d1d7c['cropBottom'],this['curFrameInfo']['year']=_0x1d1d7c['year'],this['curFrameInfo']['month']=_0x1d1d7c['month'],this['curFrameInfo']['week']=_0x1d1d7c['week'],this['curFrameInfo']['day']=_0x1d1d7c['day'],this['curFrameInfo']['hour']=_0x1d1d7c['hour'],this['curFrameInfo']['minute']=_0x1d1d7c['minute'],this['curFrameInfo']['second']=_0x1d1d7c['second'],this['curFrameInfo']['milliseconds']=_0x1d1d7c['milliseconds'],this['displayFrameInfoCB'](this['curFrameInfo']);}}},{'key':'postImageData','value':function value(_0x27295c,_0x4a2159,_0x4f6bf3,_0x2a6351,_0x13f972){this['player']?(this['getImageJPEG']&&(this['getImageJPEG']=!0x1,this['player']['_GetImage2'](_0x27295c,_0x4a2159,_0x4f6bf3,_0x2a6351,'jpeg',_0x13f972,0x0,0x0,0x0,0x0)),this['getImageBMP']&&(this['getImageBMP']=!0x1,this['player']['_GetImage2'](_0x27295c,_0x4a2159,_0x4f6bf3,_0x2a6351,'bmp',_0x13f972,0x0,0x0,0x0,0x0)),this['getCropImageJPEG']&&(this['getCropImageJPEG']=!0x1,this['player']['_GetImage2'](_0x27295c,_0x4a2159,_0x4f6bf3,_0x2a6351,'jpeg',_0x13f972,this['sx'],this['sy'],this['sw'],this['sh'])),this['getCropImageBMP']&&(this['getCropImageBMP']=!0x1,this['player']['_GetImage2'](_0x27295c,_0x4a2159,_0x4f6bf3,_0x2a6351,'bmp',_0x13f972,this['sx'],this['sy'],this['sw'],this['sh']))):(this['getImageJPEG']&&(this['getImageJPEG']=!0x1,postMessage({'function':'imageYUV','value':_0x27295c['buffer'],'size':_0x4a2159,'width':_0x4f6bf3,'height':_0x2a6351,'type':'jpeg','yuvType':_0x13f972,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x27295c['buffer']])),this['getImageBMP']&&(this['getImageBMP']=!0x1,postMessage({'function':'imageYUV','value':_0x27295c['buffer'],'size':_0x4a2159,'width':_0x4f6bf3,'height':_0x2a6351,'type':'bmp','yuvType':_0x13f972,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x27295c['buffer']])),this['getCropImageJPEG']&&(this['getCropImageJPEG']=!0x1,postMessage({'function':'imageYUV','value':_0x27295c['buffer'],'size':_0x4a2159,'width':_0x4f6bf3,'height':_0x2a6351,'type':'jpeg','yuvType':_0x13f972,'sx':this['sx'],'sy':this['sy'],'sw':this['sw'],'sh':this['sh']},[_0x27295c['buffer']])),this['getCropImageBMP']&&(this['getCropImageBMP']=!0x1,postMessage({'function':'imageYUV','value':_0x27295c['buffer'],'size':_0x4a2159,'width':_0x4f6bf3,'height':_0x2a6351,'type':'bmp','yuvType':_0x13f972,'sx':this['sx'],'sy':this['sy'],'sw':this['sw'],'sh':this['sh']},[_0x27295c['buffer']])));}},{'key':'chooseFrame','value':function value(){var _0x3ab7fc=this;return new Promise(function(_0x394aef,_0x57398b){if(null==_0x3ab7fc['oVideoRender']||null==_0x3ab7fc['oVideoDecoder'])_0x394aef(null);else {if(_0x3ab7fc['oVideoDecoder']['decoderObjNeedReset'])_0x3ab7fc['oVideoDecoder']['resetDecoder']()['then'](function(){_0x3ab7fc['oVideoDecoder']['decoderObjNeedReset']=!0x1,_0x394aef(null);},function(){_0x57398b();});else {var _0x454df9=_0x3ab7fc['oVideoDecoder']['GetFrameBufferLength']();0x1==_0x3ab7fc['streamOpenMode']&&_0x454df9<0x3?_0x394aef(null):_0x3ab7fc['oVideoDecoder']['GetFrame']()['then'](function(_0x5a948b){_0x394aef(_0x5a948b);},function(){});}}});}},{'key':'SetDisplayRegion','value':function value(_0x1cb668,_0x5f1cc2,_0x37d403,_0x3ca9bf){return null==this['oVideoRender']?0x0:(this['sx']=_0x1cb668,this['sy']=_0x5f1cc2,this['sw']=_0x37d403,this['sh']=_0x3ca9bf,this['oVideoRender']['SetDisplayRect'](_0x1cb668,_0x5f1cc2,_0x37d403,_0x3ca9bf));}},{'key':'SetCurStatus','value':function value(_0x15284d){return this['renderCurStatus']=_0x15284d,0x1;}},{'key':'fast','value':function value(){var _0x3540e3=this['_GetFastSpeed'](this['nplaySpeed']);return this['_SetPlaySpeed'](_0x3540e3);}},{'key':'slow','value':function value(){var _0x5442b4=this['_GetSlowSpeed'](this['nplaySpeed']);return this['_SetPlaySpeed'](_0x5442b4);}},{'key':'Pause','value':function value(_0x2f1bc6){if(_0x2f1bc6)this['SetCurStatus'](0x3);else {if(0x3!==this['renderCurStatus'])return -0x1;this['SetCurStatus'](0x2),this['resetTimer']=!0x0;}return 0x1;}},{'key':'_refresh','value':function value(){0x0!=this['frameBuffers']['length']&&this['paint'](this['frameBuffers'][0x0]);}},{'key':'OneByOne','value':function value(_0x220a4e){if(_0x220a4e)this['SetCurStatus'](0x5),this['needForward']=!0x0;else {if(0x5!==this['renderCurStatus'])return -0x1;this['SetCurStatus'](0x2),this['resetTimer']=!0x0,this['needForward']=!0x1,this['_SetPlaySpeed'](0x1);}return 0x1;}},{'key':'SetCanvasSize','value':function value(_0x2e90a4,_0x1f83dc){return null!=this['oVideoRender']&&this['oVideoRender']['SetCanvasSize'](_0x2e90a4,_0x1f83dc);}},{'key':'GetCanvasSize','value':function value(){return null!=this['oVideoRender']&&this['oVideoRender']['GetCanvasSize']();}},{'key':'GetPlayedTime','value':function value(){return this['curTimeStamp'];}},{'key':'_SetPlaySpeed','value':function value(_0x1da6fd){switch(_0x1da6fd){case-0x10:case-0x8:case-0x4:case-0x2:case 0x1:case 0x2:case 0x4:case 0x8:case 0x10:case 0x20:case 0x40:break;default:return -0x1;}return _0x1da6fd===this['nplaySpeed']||(this['nplaySpeed']=_0x1da6fd,this['playSpeed']=_0x1da6fd>0x0?_0x1da6fd:-0x1/_0x1da6fd,console['log']('playSpeed:'+this['playSpeed']),this['resetTimer']=!0x0,this['needForward']=!0x1,0x2!=this['renderCurStatus']&&this['SetCurStatus'](0x2)),0x1;}},{'key':'_GetFastSpeed','value':function value(_0x270d50){var _0x51eb3f=0x0;switch(_0x270d50){case-0x10:_0x51eb3f=-0x8;break;case-0x8:_0x51eb3f=-0x4;break;case-0x4:_0x51eb3f=-0x2;break;case-0x2:_0x51eb3f=0x1;break;case 0x1:_0x51eb3f=0x2;break;case 0x2:_0x51eb3f=0x4;break;case 0x4:_0x51eb3f=0x8;break;case 0x8:_0x51eb3f=0x10;break;case 0x10:_0x51eb3f=0x20;break;case 0x20:_0x51eb3f=0x40;break;default:_0x51eb3f=0x0;}return _0x51eb3f;}},{'key':'_GetSlowSpeed','value':function value(_0x577c3e){var _0x2a409f=0x0;switch(_0x577c3e){case-0x8:_0x2a409f=-0x10;break;case-0x4:_0x2a409f=-0x8;break;case-0x2:_0x2a409f=-0x4;break;case 0x1:_0x2a409f=-0x2;break;case 0x2:_0x2a409f=0x1;break;case 0x4:_0x2a409f=0x2;break;case 0x8:_0x2a409f=0x4;break;case 0x10:_0x2a409f=0x8;break;case 0x20:_0x2a409f=0x10;break;case 0x40:_0x2a409f=0x20;break;default:_0x2a409f=0x0;}return _0x2a409f;}},{'key':'SetDisplayBuf','value':function value(_0x47e330){return this['displayBuf']=_0x47e330,this['LatcyTime']=0x1==_0x47e330?0x0:0xf==_0x47e330?0x2bc:0x2d==_0x47e330?0x76c:_0x47e330>0x6&&_0x47e330<0x2d?0x28*_0x47e330+0x64:-0x1==_0x47e330?0x0:0x32,0x1;}},{'key':'GetJPEG','value':function value(){var _0x39e91e=this;console['log']('>>>30\x20this.oVideoDecoder.GetImageYUV'),this['oVideoDecoder']['GetImageYUV']()['then'](function(_0x43fab9){var _0x1366a2=_0x43fab9['yuvFrameBuffer'],_0x4fefa3=_0x43fab9['yuvLength'],_0x3422c6=_0x43fab9['displayWidth'],_0x53f974=_0x43fab9['displayHeight'],_0x155635=_0x43fab9['yuvType'];console['log']('>>>31\x20this.oVideoDecoder.GetImageYUV\x20yuvLength:'+_0x4fefa3),-0x1!=_0x1366a2&&(_0x39e91e['player']?_0x39e91e['player']['_GetImage2'](_0x1366a2,_0x4fefa3,_0x3422c6,_0x53f974,'jpeg',_0x155635,0x0,0x0,0x0,0x0):postMessage({'function':'imageYUV','value':_0x1366a2['buffer'],'size':_0x4fefa3,'width':_0x3422c6,'height':_0x53f974,'type':'jpeg','yuvType':_0x155635,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x1366a2['buffer']]));},function(){});}},{'key':'GetBMP','value':function value(){var _0x215bd3=this;this['oVideoDecoder']['GetImageYUV']()['then'](function(_0x80a6ab){var _0x4dffe0=_0x80a6ab['yuvFrameBuffer'],_0x4d2fca=_0x80a6ab['yuvLength'],_0x49733c=_0x80a6ab['displayWidth'],_0x53e747=_0x80a6ab['displayHeight'],_0x677a32=_0x80a6ab['yuvType'];-0x1!=_0x4dffe0&&(_0x215bd3['player']?_0x215bd3['player']['_GetImage2'](_0x4dffe0,_0x4d2fca,_0x49733c,_0x53e747,'bmp',_0x677a32,0x0,0x0,0x0,0x0):postMessage({'function':'imageYUV','value':_0x4dffe0['buffer'],'size':_0x4d2fca,'width':_0x49733c,'height':_0x53e747,'type':'bmp','yuvType':_0x677a32,'sx':0x0,'sy':0x0,'sw':0x0,'sh':0x0},[_0x4dffe0['buffer']]));},function(){});}},{'key':'GetCropJPEG','value':function value(){var _0x5857d5=this;this['oVideoDecoder']['GetImageYUV']()['then'](function(_0x4e9e88){var _0x4081e6=_0x4e9e88['yuvFrameBuffer'],_0x386cb6=_0x4e9e88['yuvLength'],_0x5f4d43=_0x4e9e88['displayWidth'],_0x2d1ab0=_0x4e9e88['displayHeight'],_0x4e5a48=_0x4e9e88['yuvType'];-0x1!=_0x4081e6&&(_0x5857d5['player']?_0x5857d5['player']['_GetImage2'](_0x4081e6,_0x386cb6,_0x5f4d43,_0x2d1ab0,'jpeg',_0x4e5a48,_0x5857d5['sx'],_0x5857d5['sy'],_0x5857d5['sw'],_0x5857d5['sh']):postMessage({'function':'imageYUV','value':_0x4081e6['buffer'],'size':_0x386cb6,'width':_0x5f4d43,'height':_0x2d1ab0,'type':'jpeg','yuvType':_0x4e5a48,'sx':_0x5857d5['sx'],'sy':_0x5857d5['sy'],'sw':_0x5857d5['sw'],'sh':_0x5857d5['sh']},[_0x4081e6['buffer']]));},function(){});}},{'key':'GetCropBMP','value':function value(){var _0xc7434a=this;this['oVideoDecoder']['GetImageYUV']()['then'](function(_0x5532d6){var _0x2e08ff=_0x5532d6['yuvFrameBuffer'],_0x4545d5=_0x5532d6['yuvLength'],_0x371742=_0x5532d6['displayWidth'],_0x29796f=_0x5532d6['displayHeight'],_0x5e9729=_0x5532d6['yuvType'];-0x1!=_0x2e08ff&&(_0xc7434a['player']?_0xc7434a['player']['_GetImage2'](_0x2e08ff,_0x4545d5,_0x371742,_0x29796f,'bmp',_0x5e9729,_0xc7434a['sx'],_0xc7434a['sy'],_0xc7434a['sw'],_0xc7434a['sh']):postMessage({'function':'imageYUV','value':_0x2e08ff['buffer'],'size':_0x4545d5,'width':_0x371742,'height':_0x29796f,'type':'bmp','yuvType':_0x5e9729,'sx':_0xc7434a['sx'],'sy':_0xc7434a['sy'],'sw':_0xc7434a['sw'],'sh':_0xc7434a['sh']},[_0x2e08ff['buffer']]));},function(){});}},{'key':'GetCanvasCapture','value':function value(_0x29f798){return this['oVideoRender']['GetCanvasData'](_0x29f798),0x1;}},{'key':'SetDecodeFrameType','value':function value(_0x1eedc0){return this['waitIFrameTimestamp']=_0x1eedc0,0x1;}},{'key':'SetStreamEnd','value':function value(){return this['oVideoDecoder']['SetStreamEnd'](),0x1;}},{'key':'SetAntialias','value':function value(_0x29aff9){return null!=this['oVideoRender']?this['oVideoRender']['SetAntialias'](_0x29aff9):0x0;}},{'key':'SetFrameInfoCallBack','value':function value(_0x3e1c9e,_0x552c7e){return this['displayFrameInfoCB']=_0x552c7e?_0x3e1c9e:null,0x1;}},{'key':'FEC_SetCanvasID','value':function value(_0x157cb7){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetCanvasID'](_0x157cb7):(this['FECCanvasID']=_0x157cb7,0x0);}},{'key':'FEC_ResetCorrectType','value':function value(_0x48ceeb,_0x448751,_0x14baaf){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_ResetCorrectType'](_0x48ceeb,_0x448751,_0x14baaf):0x0;}},{'key':'FEC_GetPort','value':function value(_0x1b2bc1,_0x486dd7){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),-0x1):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetPort'](_0x1b2bc1,_0x486dd7):-0x1;}},{'key':'FEC_Enable','value':function value(_0x1c7882){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_Enable'](_0x1c7882):0x0;}},{'key':'FEC_SetParam','value':function value(_0xa6a0aa,_0x2340d0){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetParam'](_0xa6a0aa,_0x2340d0):0x0;}},{'key':'FEC_GetParam','value':function value(_0x690485,_0x844373){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetParam'](_0x690485,_0x844373):0x0;}},{'key':'FEC_SetViewParam','value':function value(_0x98ca4f,_0x491fca,_0x731b1e){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetViewParam'](_0x98ca4f,_0x491fca,_0x731b1e):0x0;}},{'key':'FEC_GetViewParam','value':function value(_0x2dbebe,_0x5d1878,_0x535f8e){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetViewParam'](_0x2dbebe,_0x5d1878,_0x535f8e):0x0;}},{'key':'FEC_SetWnd','value':function value(_0x126ed8,_0x3d9f96){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetWnd'](_0x126ed8,_0x3d9f96):0x0;}},{'key':'FEC_Disable','value':function value(_0x15252a,_0x3707ee,_0x2901c7){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_Disable'](_0x15252a,_0x3707ee,_0x2901c7):0x0;}},{'key':'FEC_DelPort','value':function value(_0x1a60f4){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_DelPort'](_0x1a60f4):0x0;}},{'key':'FEC_SetDisplayRegion','value':function value(_0x496f29,_0x15e963,_0x3479e8,_0x4101d7,_0x2d44a1,_0x5df0b1,_0x1aeded){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetDisplayRegion'](_0x496f29,_0x15e963,_0x3479e8,_0x4101d7,_0x2d44a1,_0x5df0b1,_0x1aeded):0x0;}},{'key':'FEC_SetBackCilling','value':function value(_0x120f9c,_0x4351f3){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetBackCilling'](_0x120f9c,_0x4351f3):0x0;}},{'key':'FEC_GetPTZPort','value':function value(_0x14f553,_0x14506e,_0x512d44){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),-0x1):null!=this['oVideoRender']?this['oVideoRender']['FEC_GetPTZPort'](_0x14f553,_0x14506e,_0x512d44):-0x1;}},{'key':'FEC_SetPTZDisplayMode','value':function value(_0x3230a7){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20FEC\x20correct','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['FEC_SetPTZDisplayMode'](_0x3230a7):0x0;}},{'key':'InputPrivateInfo','value':function value(_0x580f6d,_0x4b2352,_0x55d6dd){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20PrivateInfo','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['InputPrivateInfo'](_0x580f6d,_0x4b2352,_0x55d6dd):0x1;}},{'key':'RenderPrivateData','value':function value(_0x872798){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20PrivateInfo','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['RenderPrivateData'](_0x872798):0x1;}},{'key':'SetWaterMarkFont','value':function value(_0x1fa718){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20PrivateInfo','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetWaterMarkFont'](_0x1fa718):0x1;}},{'key':'SetWaterMarkImage','value':function value(_0x3363d1){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20PrivateInfo','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetWaterMarkImage'](_0x3363d1):0x1;}},{'key':'SetD3DPostProcess','value':function value(_0x2a8572,_0x3b4069){return '2d'===this['renderEngine']||'2D'===this['renderEngine']?(console['log']('%c\x202D\x20render\x20not\x20support\x20PrivateInfo','color:red'),0x0):null!=this['oVideoRender']?this['oVideoRender']['SetD3DPostProcess'](_0x2a8572,_0x3b4069):0x1;}}]),_0x5b7979;}(),_0x5aa5bc=function(){function _0xfabae5(_0x1f7fd1){_0xa7bfb2(this,_0xfabae5),this['player']=_0x1f7fd1,this['oVideoPlayCtrl']=new _0x323419(_0x1f7fd1);}return _0x3e0d7c(_0xfabae5,[{'key':'init','value':function value(_0x2271d9,_0x1ed4f2,_0x3b6234,_0x2abf75){if(null===this['oVideoPlayCtrl'])return 0x0;this['oVideoPlayCtrl']['init'](_0x2271d9,_0x1ed4f2,_0x3b6234,_0x2abf75);}},{'key':'inputData','value':function value(_0x378f69,_0x31abf3){null!=this['oVideoPlayCtrl']&&this['oVideoPlayCtrl']['inputData'](_0x378f69,_0x31abf3);}},{'key':'SetDisplayRegion','value':function value(_0x26dcdd,_0x5e15c1,_0x261180,_0x5e5a40){if(null===this['oVideoPlayCtrl'])return 0x0;this['oVideoPlayCtrl']['SetDisplayRegion'](_0x26dcdd,_0x5e15c1,_0x261180,_0x5e5a40);}},{'key':'stop','value':function value(){var _0xf19103=this;if(null===this['oVideoPlayCtrl'])return 0x0;this['oVideoPlayCtrl']['SetCurStatus'](0x4);var _0x5e14b7=setInterval(function(){null!=_0xf19103['oVideoPlayCtrl']&&(_0xf19103['oVideoPlayCtrl']['displayRunning']||(clearInterval(_0x5e14b7),_0x5e14b7=null,_0xf19103['oVideoPlayCtrl']=null,console['log']('>>>JS\x2003\x20destroy\x20oVideoPlayCtrl')));},0x2);}},{'key':'fast','value':function value(){return null===this['oVideoPlayCtrl']||0x1!==this['oVideoPlayCtrl']['fast']()?0x0:void 0x0;}},{'key':'slow','value':function value(){return null===this['oVideoPlayCtrl']||0x1!==this['oVideoPlayCtrl']['slow']()?0x0:void 0x0;}},{'key':'SetDisplayBuf','value':function value(_0x4b0b55){return null===this['oVideoPlayCtrl']||0x1!==this['oVideoPlayCtrl']['SetDisplayBuf'](_0x4b0b55)?0x0:void 0x0;}},{'key':'Pause','value':function value(_0x1b7ffc){return null===this['oVideoPlayCtrl']||0x1!==this['oVideoPlayCtrl']['Pause'](_0x1b7ffc)?0x0:void 0x0;}},{'key':'OneByOne','value':function value(_0x394d39){return null===this['oVideoPlayCtrl']||0x1!==this['oVideoPlayCtrl']['OneByOne'](_0x394d39)?0x0:void 0x0;}},{'key':'SetCanvasSize','value':function value(_0x4d99dd,_0x100831){return null===this['oVideoPlayCtrl']||0x1!==this['oVideoPlayCtrl']['SetCanvasSize'](_0x4d99dd,_0x100831)?0x0:void 0x0;}},{'key':'GetCanvasSize','value':function value(){return null===this['oVideoPlayCtrl']||0x1!==this['oVideoPlayCtrl']['GetCanvasSize']()?0x0:void 0x0;}},{'key':'GetPlayedTime','value':function value(){return null===this['oVideoPlayCtrl']?0x0:this['oVideoPlayCtrl']['GetPlayedTime']();}},{'key':'needReset','value':function value(){this['oVideoPlayCtrl']['SetCurStatus'](0x0);}},{'key':'GetJPEG','value':function value(){this['oVideoPlayCtrl']['GetJPEG']();}},{'key':'GetBMP','value':function value(){this['oVideoPlayCtrl']['GetBMP']();}},{'key':'GetCropJPEG','value':function value(){this['oVideoPlayCtrl']['GetCropJPEG']();}},{'key':'GetCropBMP','value':function value(){this['oVideoPlayCtrl']['GetCropBMP']();}},{'key':'JSPlayM4_GetCanvasCapture','value':function value(_0x301c61){this['oVideoPlayCtrl']['GetCanvasCapture'](_0x301c61);}},{'key':'SetDecodeFrameType','value':function value(_0x945c2b){this['oVideoPlayCtrl']['SetDecodeFrameType'](_0x945c2b);}},{'key':'streamEnd','value':function value(){this['oVideoPlayCtrl']['SetStreamEnd']();}},{'key':'SetAntialias','value':function value(_0x123b14){return this['oVideoPlayCtrl']['SetAntialias'](_0x123b14);}},{'key':'SetFrameInfoCallBack','value':function value(_0x1bb005,_0x1f1fbc){return this['oVideoPlayCtrl']['SetFrameInfoCallBack'](_0x1bb005,_0x1f1fbc);}},{'key':'FEC_SetCanvasID','value':function value(_0x2f983a){return this['oVideoPlayCtrl']['FEC_SetCanvasID'](_0x2f983a);}},{'key':'FEC_ResetCorrectType','value':function value(_0x4a1fbc,_0x527c11,_0x25c881){return this['oVideoPlayCtrl']['FEC_ResetCorrectType'](_0x4a1fbc,_0x527c11,_0x25c881);}},{'key':'FEC_GetPort','value':function value(_0x35171f,_0x34b241){return this['oVideoPlayCtrl']['FEC_GetPort'](_0x35171f,_0x34b241);}},{'key':'FEC_Enable','value':function value(_0x41c69c){return this['oVideoPlayCtrl']['FEC_Enable'](_0x41c69c);}},{'key':'FEC_SetParam','value':function value(_0x96efe6,_0xb80bed){return this['oVideoPlayCtrl']['FEC_SetParam'](_0x96efe6,_0xb80bed);}},{'key':'FEC_GetParam','value':function value(_0x438a67,_0x390d7e){return this['oVideoPlayCtrl']['FEC_GetParam'](_0x438a67,_0x390d7e);}},{'key':'FEC_SetViewParam','value':function value(_0x335059,_0x474d94,_0x2e048f){return this['oVideoPlayCtrl']['FEC_SetViewParam'](_0x335059,_0x474d94,_0x2e048f);}},{'key':'FEC_GetViewParam','value':function value(_0x13c91a,_0x4daed9,_0x151f13){return this['oVideoPlayCtrl']['FEC_GetViewParam'](_0x13c91a,_0x4daed9,_0x151f13);}},{'key':'FEC_SetWnd','value':function value(_0x464f50,_0x150c39){return this['oVideoPlayCtrl']['FEC_SetWnd'](_0x464f50,_0x150c39);}},{'key':'FEC_Disable','value':function value(_0x3e80c1,_0x1d1bf7,_0x1b024f){return this['oVideoPlayCtrl']['FEC_Disable'](_0x3e80c1,_0x1d1bf7,_0x1b024f);}},{'key':'FEC_DelPort','value':function value(_0x6afd6b){return this['oVideoPlayCtrl']['FEC_DelPort'](_0x6afd6b);}},{'key':'FEC_SetDisplayRegion','value':function value(_0x2be0da,_0x4c983f,_0x4a4e9e,_0x4ea190,_0x4e594b,_0x1692de,_0x512eae){return this['oVideoPlayCtrl']['FEC_SetDisplayRegion'](_0x2be0da,_0x4c983f,_0x4a4e9e,_0x4ea190,_0x4e594b,_0x1692de,_0x512eae);}},{'key':'FEC_SetBackCilling','value':function value(_0x46ecb2,_0x32c8d7){return this['oVideoPlayCtrl']['FEC_SetBackCilling'](_0x46ecb2,_0x32c8d7);}},{'key':'FEC_GetPTZPort','value':function value(_0x211502,_0x34998e,_0x3153d5){return this['oVideoPlayCtrl']['FEC_GetPTZPort'](_0x211502,_0x34998e,_0x3153d5);}},{'key':'FEC_SetPTZDisplayMode','value':function value(_0x4c6a45){return this['oVideoPlayCtrl']['FEC_SetPTZDisplayMode'](_0x4c6a45);}},{'key':'InputPrivateInfo','value':function value(_0x3bab8f,_0x5973b6,_0x4fe00b){return this['oVideoPlayCtrl']['InputPrivateInfo'](_0x3bab8f,_0x5973b6,_0x4fe00b);}},{'key':'RenderPrivateData','value':function value(_0x3cf5b5){return this['oVideoPlayCtrl']['RenderPrivateData'](_0x3cf5b5);}},{'key':'SetWaterMarkFont','value':function value(_0x494a32){return this['oVideoPlayCtrl']['SetWaterMarkFont'](_0x494a32);}},{'key':'SetWaterMarkImage','value':function value(_0x480cac){return this['oVideoPlayCtrl']['SetWaterMarkImage'](_0x480cac);}},{'key':'SetD3DPostProcess','value':function value(_0x52c832,_0x39399){return this['oVideoPlayCtrl']['SetD3DPostProcess'](_0x52c832,_0x39399);}}]),_0xfabae5;}();function _0x1ba087(_0x415edd,_0x5b1fa7){var _0x198333='undefined'!=typeof Symbol&&_0x415edd[Symbol['iterator']]||_0x415edd['@@iterator'];if(!_0x198333){if(Array['isArray'](_0x415edd)||(_0x198333=function(_0x54da3e,_0x1d7f5d){if(!_0x54da3e)return;if('string'==typeof _0x54da3e)return _0xd71fe2(_0x54da3e,_0x1d7f5d);var _0x55ace4=Object['prototype']['toString']['call'](_0x54da3e)['slice'](0x8,-0x1);'Object'===_0x55ace4&&_0x54da3e['constructor']&&(_0x55ace4=_0x54da3e['constructor']['name']);if('Map'===_0x55ace4||'Set'===_0x55ace4)return Array['from'](_0x54da3e);if('Arguments'===_0x55ace4||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/['test'](_0x55ace4))return _0xd71fe2(_0x54da3e,_0x1d7f5d);}(_0x415edd))||_0x5b1fa7&&_0x415edd&&'number'==typeof _0x415edd['length']){_0x198333&&(_0x415edd=_0x198333);var _0x1e141a=0x0,_0x9a6175=function _0x9a6175(){};return {'s':_0x9a6175,'n':function n(){return _0x1e141a>=_0x415edd['length']?{'done':!0x0}:{'done':!0x1,'value':_0x415edd[_0x1e141a++]};},'e':function e(_0x12112a){throw _0x12112a;},'f':_0x9a6175};}throw new TypeError('Invalid\x20attempt\x20to\x20iterate\x20non-iterable\x20instance.\x0aIn\x20order\x20to\x20be\x20iterable,\x20non-array\x20objects\x20must\x20have\x20a\x20[Symbol.iterator]()\x20method.');}var _0x19ba28,_0x34b0e7=!0x0,_0x53bb72=!0x1;return {'s':function s(){_0x198333=_0x198333['call'](_0x415edd);},'n':function n(){var _0x1455d4=_0x198333['next']();return _0x34b0e7=_0x1455d4['done'],_0x1455d4;},'e':function e(_0x37afda){_0x53bb72=!0x0,_0x19ba28=_0x37afda;},'f':function f(){try{_0x34b0e7||null==_0x198333['return']||_0x198333['return']();}finally{if(_0x53bb72)throw _0x19ba28;}}};}function _0xd71fe2(_0x2adffe,_0xd4ed5){(null==_0xd4ed5||_0xd4ed5>_0x2adffe['length'])&&(_0xd4ed5=_0x2adffe['length']);for(var _0xda1a95=0x0,_0x2e7e8c=new Array(_0xd4ed5);_0xda1a95<_0xd4ed5;_0xda1a95++)_0x2e7e8c[_0xda1a95]=_0x2adffe[_0xda1a95];return _0x2e7e8c;}var _0x32f317=[];!function(){for(var _0x5ce463=0x0;_0x5ce463<0x8;_0x5ce463++){_0x32f317[_0x5ce463]=[];for(var _0x23d5dc=0x0;_0x23d5dc<0x40;_0x23d5dc++)_0x32f317[_0x5ce463][_0x23d5dc]=null;}}();var _0x5be749=null,_0x2a6a76=!0x1,_0x34dfb1=0x1,_0x35ec0c=0x1,_0x13311d={'bSupHardOrSoft':!0x0,'bSupHardDecAVC':!0x0,'bSupHardDecHEVC':!0x0},_0x5f201a=-0x1;window['JSPlayM4_RawDataCallBack']=function(_0x1819df,_0x1d69a5,_0x20f1db,_0x5052aa){null!=_0x32f317[_0x5052aa][_0x1819df]&&_0x32f317[_0x5052aa][_0x1819df]['__proto__']['hasOwnProperty']('JSPlayM4_InputRawData')&&_0x32f317[_0x5052aa][_0x1819df]['JSPlayM4_InputRawData'](_0x1819df,_0x1d69a5,_0x20f1db);},window['JSPlayM4_PrivateInfoCallBack']=function(_0x560208,_0x13d9de,_0x125e9f,_0x2c2cf0,_0x294033){null!=_0x32f317[_0x294033][_0x560208]&&_0x32f317[_0x294033][_0x560208]['__proto__']['hasOwnProperty']('JSPlayM4_InputPrivateInfo')&&_0x32f317[_0x294033][_0x560208]['JSPlayM4_InputPrivateInfo'](_0x13d9de,_0x125e9f,_0x2c2cf0);};var _0x4dc8d6=function(){function _0x1d62de(_0x3dfdf1,_0x4e866c,_0x50f771){var _0x56c1ad=this,_0x1be23e=arguments['length']>0x3&&void 0x0!==arguments[0x3]?arguments[0x3]:0x0,_0x1ad9ef=arguments['length']>0x4&&void 0x0!==arguments[0x4]?arguments[0x4]:'webgl',_0xa47661=arguments['length']>0x5&&void 0x0!==arguments[0x5]?arguments[0x5]:0x0,_0x42a157=arguments['length']>0x6&&void 0x0!==arguments[0x6]?arguments[0x6]:-0x1;_0xa7bfb2(this,_0x1d62de),this['jsplayer']=_0x3dfdf1,this['szBasePath']=_0x4e866c,this['oJSPlayerObj']=this,this['port']=-0x1,this['hasWebWorker']=_0xa47661,this['nUser']=_0x1be23e,this['renderEngine']=_0x1ad9ef,this['pcVideoManager']=null,this['decodeWorker']=null,this['offscreen']=null,this['canvasID']='',this['canvasCnv']=null,this['decodeEngine']=0x1,this['FirstFrameCallBackflag']=!0x1,this['inputDataBuffer']=null,this['inputDataBufferSize']=0x32000,this['canvasIDData']=null,this['_decoderLoaded']=!0x1,this['streamOpenMode']=0x0,this['width']=0x0,this['height']=0x0,this['rawDataFrameInfoBuffer']=null,this['rawDataFrameInfo']={},this['displayFrameInfo']={},this['startTimeStamp']=0x0,this['decodeFrameType']=0x0,this['switchDecodeFrame']=!0x1,this['displayBuf']=0x0,this['FirstFrame']=!0x0,this['codecType']=0x0,this['curStatus']=0x0,this['playSpeed']=0x1,this['needWaitIFrame']=!0x1,this['printfFlag']=!0x1,this['SetDisRegionBottom']=0x0,this['SetDisRegionLeft']=0x0,this['SetDisRegionRight']=0x0,this['SetDisRegionTop']=0x0,this['cropBottom']=0x0,this['cropLeft']=0x0,this['cropRight']=0x0,this['cropTop']=0x0,this['canvasWidth']=0x3c0,this['canvasHeight']=0x1e0,this['enableCanvas']=!0x0,this['needResetCanvasSize']=0x0,this['setHasThread']=_0x42a157,this['hasThread']=0x0,this['aTotalBuffer']=[],this['iFrameNum']=0x0,this['bWriteData']=!0x0,this['downloadFlag']=!0x1,this['bWriteAudioResampleData']=!0x0,this['audioANRBuffer']=[],this['iAudioANRFrameNum']=0x0,this['bWriteAudioBefDecData']=!0x0,this['audioBefDecBuffer']=[],this['iAudioBefDecFrameNum']=0x0,this['bWriteAudioAfterDecode']=!0x0,this['audioAfDecOUTBuffer']=[],this['iAudioAfDecOUTFrameNum']=0x0,this['bWriteAudioBeforeRender']=!0x0,this['audioBeRenOUTBuffer']=[],this['iAudioBeRenOUTFrameNum']=0x0,this['bWriteAudioResampleData']=!0x0,this['audioResampleBuffer']=[],this['iAudioResampleFrameNum']=0x0,this['pBmpData']=null,this['nBmpDataSize']=0x0,this['pBmpSizeData']=null,this['bmpDataCallback']=null,this['bmpDownloadFlag']=!0x1,this['pJpegData']=null,this['nJpegDataSize']=0x0,this['pJPEGSizeData']=null,this['jpegDataCallback']=null,this['jpegDownloadFlag']=!0x1,this['aInputDataBuffer']=[],this['iInputMaxBufSize']=0x200000,this['stDisplayRect']={'top':0x0,'left':0x0,'right':0x0,'bottom':0x0},this['iZoomNum']=0x0,this['iRatio_x']=0x1,this['iRatio_y']=0x1,this['pFECTotalCanvasIDData']=null,this['iFECCanvasIDLen']=0x0,this['iFECZoomNum']=0x0,this['iFECRatio_x']=0x1,this['iFECRatio_y']=0x1,this['stFECDisplayRect']={'top':0x0,'left':0x0,'right':0x0,'bottom':0x0},this['FECcanvasIDArray']=[],this['FECGetPortCB']=null,this['FECGetPTZPortCB']=null,this['FECParamCB']=null,this['FECViewParamCB']=null,this['FFCallBackFun']=null,this['addtionCallBackFun']=null,this['displayCallBackFun']=null,this['decCallBackFun']=null,this['getPlayTimeCallBackFun']=null,this['runtimeCBFun']=null,this['fn']=_0x50f771,this['callbackFlag']=!0x1,this['runTimeModule']=0x0,this['needPlaySound']=!0x1,this['decInterval']=-0x1,this['volumeValue']=-0x1,this['renderPrivateInfo']=new Map(),this['renderIntelSubEx']=new Map(),this['renderIntelFlagEx']=new Map(),this['reversePlay']=!0x1,this['decodeThreadNum']=0x0,this['antialiasFlag']=0x0,this['decodeERCLevel']=0x0,this['d3dPostProcessType']=0x0,this['d3dPostProcessValue']=0x0,this['resetBufferType']=0x0,this['playOrBackSwitchMode']=0x0,this['setStretchPlayTime']=0x0,this['setStretchPlaySpeed']=0x0,this['autoSmoothPlayModel']=-0x1,this['keepPlaySpeed']=-0x1,this['FECCanvasID']='',this['FECPlaceType']=0x0,this['FECCorrectType']=0x0,this['HIK40Head']=[],this['HIKHeadSize']=0x28,this['HIKPoolSize']=0x200000,this['supportWebCodecs']=_getFSupportWebCodecs(),this['supportSab']=!!window['SharedArrayBuffer'];var _0x73a122=new OffscreenCanvas(0x1,0x1),_0x1effae=_0x73a122['getContext']('webgl');if(this['supportOffscreen']=!!_0x1effae,_0x73a122=null,_0x1effae=null,console['log']('%cstart\x20load\x20Decoder.js\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\x20blue'),null!=_0x5be749||_0x2a6a76)new Promise(function(_0x2751a8,_0x1fedfb){_0x2751a8();})['then'](function(){if(null===_0x5be749)var _0x37c80a=setInterval(function(){null!==_0x5be749&&(clearInterval(_0x37c80a),_0x37c80a=null,_0x56c1ad['fn'](_0x13311d));},0xa);else _0x56c1ad['fn'](_0x13311d);});else {if(_0x2a6a76=!0x0,_0x5f201a=_getFExplore(),this['supportWebCodecs']?-0x1<_0x5f201a&&_0x5f201a<0x5e?(console['info']('%c1>your\x20chrome\x20version\x20%d\x20does\x20not\x20support\x20264/265\x20hard\x20Decoder,please\x20update\x20the\x20latest\x20version\x20above\x20chromeV107','color:\x20red',_0x5f201a),_0x35ec0c=0x0,_0x34dfb1=0x0,_0x13311d['bSupHardDecAVC']=!0x1,_0x13311d['bSupHardDecHEVC']=!0x1,this['supportSab']?_0x13311d['bSupHardOrSoft']=!0x0:_0x13311d['bSupHardOrSoft']=!0x1):0x5e<=_0x5f201a&&_0x5f201a<0x6b?(console['info']('%c1>your\x20chrome\x20version\x20%d\x20does\x20not\x20support\x20265\x20hard\x20Decoder,please\x20update\x20the\x20latest\x20version\x20above\x20chromeV107','color:\x20red',_0x5f201a),_0x34dfb1=0x0,_0x13311d['bSupHardDecAVC']=!0x0,_0x13311d['bSupHardDecHEVC']=!0x1,_0x13311d['bSupHardOrSoft']=!0x0):(_0x13311d['bSupHardDecAVC']=!0x0,_0x13311d['bSupHardDecHEVC']=!0x1,_0x13311d['bSupHardOrSoft']=!0x0):(console['info']('%c1>your\x20browser\x20does\x20not\x20support\x20hard\x20Decoder\x20','color:\x20red'),_0x35ec0c=0x0,_0x34dfb1=0x0,_0x13311d['bSupHardDecAVC']=!0x1,_0x13311d['bSupHardDecHEVC']=!0x1,this['supportSab']?_0x13311d['bSupHardOrSoft']=!0x0:_0x13311d['bSupHardOrSoft']=!0x1),_0x13311d['bSupHardOrSoft']){var _0x57f44d=this['szBasePath'],_0x44bbe4=document['createElement']('script');_0x44bbe4['type']='text/javascript',_0x44bbe4['src']=_0x57f44d,console['info']('%c>>>>The\x20Decoder.js\x20path:%s','color:\x20green',_0x57f44d),_0x44bbe4['onload']=function(){window['JSPlayerModule']()['then'](function(_0x11222f){_0x5be749=_0x11222f,_0x56c1ad['_decoderLoaded']=!0x0,console['log']('%cEnd\x20load\x20Decoder.js\x20time:'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds'](),'color:\x20blue'),_0x56c1ad['supportWebCodecs']?VideoDecoder['isConfigSupported']({'codec':'hvc1.1.6.L123.00','hardwareAcceleration':'prefer-hardware'})['then'](function(_0x2593da){_0x2593da['supported']?(_0x13311d['bSupHardDecHEVC']=!0x0,console['info']('%c1>your\x20browser\x20support\x20264/265\x20hard\x20Decoder','color:\x20green')):(console['warn']('%c1>your\x20PC\x20does\x20not\x20support\x20265\x20hard\x20Decoder,\x20if\x20you\x20want\x20to\x20hard\x20decode\x20265\x20,try\x20to\x20update\x20the\x20GPU\x20driver','color:\x20red'),_0x34dfb1=0x0),_0x56c1ad['callbackFlag']||(_0x56c1ad['fn'](_0x13311d),_0x56c1ad['callbackFlag']=!0x0);})['catch'](function(){_0x34dfb1=0x0,_0x13311d['bSupHardDecHEVC']=!0x1,console['log']('%c2>hevc\x20supported\x20error','color:\x20red'),_0x56c1ad['callbackFlag']||(_0x56c1ad['fn'](_0x13311d),_0x56c1ad['callbackFlag']=!0x0);}):_0x56c1ad['fn'](_0x13311d);});},document['body']['appendChild'](_0x44bbe4);}else console['log']('%c\x20not\x20support\x20hard\x20or\x20soft','color:red'),new Promise(function(_0x23806e,_0x866160){_0x23806e();})['then'](function(){_0x56c1ad['fn'](_0x13311d);});}}return _0x3e0d7c(_0x1d62de,[{'key':'startWorker','value':function(_0x3acd18){function _0xea7b1(_0x4a836d,_0x393c22){return _0x3acd18['apply'](this,arguments);}return _0xea7b1['toString']=function(){return _0x3acd18['toString']();},_0xea7b1;}(function(_0x5dcecd,_0xd5ba74){if(window['Worker']){if(null==_0xd5ba74['decodeWorker']){if(_0xd5ba74['decodeWorker']=new _0x1b572b(),null==_0xd5ba74['decodeWorker'])return 0x0;console['log']('decodeWorker\x20create\x20success!');}_0xd5ba74['canvasCnv']=document['getElementById'](_0x5dcecd),_0xd5ba74['offscreen']=_0xd5ba74['canvasCnv']['transferControlToOffscreen'](),_0xd5ba74['decodeWorker']['postMessage']({'command':'init','streamOpenMode':_0xd5ba74['streamOpenMode'],'canvas':_0xd5ba74['offscreen'],'supportSab':_0xd5ba74['supportSab'],'renderEngine':_0xd5ba74['renderEngine']},[_0xd5ba74['offscreen']]),0x0!=_0xd5ba74['displayBuf']&&_0xd5ba74['decodeWorker']['postMessage']({'command':'SetDisplayBuf','value':_0xd5ba74['displayBuf']}),_0xd5ba74['decodeWorker']['onmessage']=function(_0x47f1e8){var _0x420463=_0x47f1e8['data'];switch(_0x420463['function']){case'error':startWorker(_0xd5ba74['canvasID'],_0xd5ba74);break;case'GetFrameData':var _0x278f19=new Uint8Array(_0x420463['data']);_0xd5ba74['downloadRTPData'](_0x278f19);break;case'GetRawData':_0xd5ba74['JSPlayM4_GetRawData']();break;case'OrderError':console['log']('>>>JS\x20OrderError');break;case'GetPlayedTime':var _0x4d2dee=_0x420463['value'];_0xd5ba74['getPlayTimeCallBackFun']&&_0xd5ba74['getPlayTimeCallBackFun'](_0x4d2dee-_0xd5ba74['startTimeStamp']);break;case'resetEnd':_0xd5ba74['JSPlayM4_ResetEnd']();break;case'bitmap':var _0x2135f4=_0x420463['value'],_0x60a443=_0x420463['type'];_0xd5ba74['_GetImage'](_0x2135f4,_0x60a443);break;case'imageYUV':var _0x53106a=new Uint8Array(_0x420463['value']),_0x165f5d=_0x420463['size'],_0xd9df74=new Uint8Array(_0x53106a),_0x4fff49=_0x420463['type'],_0x5e7df3=_0x420463['width'],_0xf9a753=_0x420463['height'],_0x1cbe48=_0x420463['yuvType'],_0x3864ed=_0x420463['sx'],_0x402e29=_0x420463['sy'],_0x5f2218=_0x420463['sw'],_0x5ee1fc=_0x420463['sh'];_0xd5ba74['_GetImage2'](_0xd9df74,_0x165f5d,_0x5e7df3,_0xf9a753,_0x4fff49,_0x1cbe48,_0x3864ed,_0x402e29,_0x5f2218,_0x5ee1fc),_0x53106a=null,_0xd9df74=null,_0x420463['value']=null;break;case'stop':_0xd5ba74['decodeWorker']=null,console['log']('HardWorker\x20is\x20null');break;case'firstFrameCB':null!=_0xd5ba74['FFCallBackFun']&&_0xd5ba74['FFCallBackFun']();break;case'SetFrameInfoCallBack':_0xd5ba74['displayFrameInfo']['port']=_0x420463['curFrameInfo']['port'],_0xd5ba74['displayFrameInfo']['codecType']=_0x420463['curFrameInfo']['codecType'],_0xd5ba74['displayFrameInfo']['frameType']=_0x420463['curFrameInfo']['frameType'],_0xd5ba74['displayFrameInfo']['frameSize']=_0x420463['curFrameInfo']['frameSize'],_0xd5ba74['displayFrameInfo']['width']=_0x420463['curFrameInfo']['width'],_0xd5ba74['displayFrameInfo']['height']=_0x420463['curFrameInfo']['height'],_0xd5ba74['displayFrameInfo']['timeStamp']=_0x420463['curFrameInfo']['timeStamp'],_0xd5ba74['displayFrameInfo']['frameRate']=_0x420463['curFrameInfo']['frameRate'],_0xd5ba74['displayFrameInfo']['frameNum']=_0x420463['curFrameInfo']['frameNum'],_0xd5ba74['displayFrameInfo']['interlace']=_0x420463['curFrameInfo']['interlace'],_0xd5ba74['displayFrameInfo']['streamEnd']=_0x420463['curFrameInfo']['streamEnd'],_0xd5ba74['displayFrameInfo']['cropLeft']=_0x420463['curFrameInfo']['cropLeft'],_0xd5ba74['displayFrameInfo']['cropRight']=_0x420463['curFrameInfo']['cropRight'],_0xd5ba74['displayFrameInfo']['cropTop']=_0x420463['curFrameInfo']['cropTop'],_0xd5ba74['displayFrameInfo']['cropBottom']=_0x420463['curFrameInfo']['cropBottom'],_0xd5ba74['displayFrameInfo']['year']=_0x420463['curFrameInfo']['year'],_0xd5ba74['displayFrameInfo']['month']=_0x420463['curFrameInfo']['month'],_0xd5ba74['displayFrameInfo']['week']=_0x420463['curFrameInfo']['week'],_0xd5ba74['displayFrameInfo']['day']=_0x420463['curFrameInfo']['day'],_0xd5ba74['displayFrameInfo']['hour']=_0x420463['curFrameInfo']['hour'],_0xd5ba74['displayFrameInfo']['minute']=_0x420463['curFrameInfo']['minute'],_0xd5ba74['displayFrameInfo']['second']=_0x420463['curFrameInfo']['second'],_0xd5ba74['displayFrameInfo']['milliseconds']=_0x420463['curFrameInfo']['milliseconds'];break;case'FECGetViewParam':null!=_0xd5ba74['FECViewParamCB']&&_0xd5ba74['FECViewParamCB'](_0x420463['Param3D']);break;case'FECGetParam':null!=_0xd5ba74['FECParamCB']&&_0xd5ba74['FECParamCB'](_0x420463['param2d']);break;case'FECGetPort':null!=_0xd5ba74['FECGetPortCB']&&_0xd5ba74['FECGetPortCB'](_0x420463['fishSubPort']);break;case'FECGetPTZPort':null!=_0xd5ba74['FECGetPTZPortCB']&&_0xd5ba74['FECGetPTZPortCB'](_0x420463['fishSubPort']);}},_0xd5ba74['decodeWorker']['addEventListener']('error',function(_0x48af0d){console['error'](_0x48af0d);});}})},{'key':'JSPlayM4_SetStreamEnd','value':function value(){return 0x0;}},{'key':'JSPlayM4_GetPort','value':function value(){return this['printfFlag']&&console['log']('>>>>>yff>>>\x20JSPlayM4_GetPort\x201'),null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetPort','color:\x20red'),0x0):(this['port']=_0x5be749['_JSPlayM4_GetPort'](),_0x32f317[this['nUser']][this['port']]=this['oJSPlayerObj'],this['printfFlag']&&console['log']('>>>>>yff>>>\x20JSPlayM4_GetPort\x202'),0x1);}},{'key':'JSPlayM4_SetStreamOpenMode','value':function value(_0x876551){return this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_SetStreamOpenMode\x201\x20mode:'+_0x876551),null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetStreamOpenMode','color:\x20red'),0x0):(0x0==this['hasWebWorker']&&(this['pcVideoManager']=new _0x5aa5bc(this)),this['streamOpenMode']=_0x876551,this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_SetStreamOpenMode\x202\x20\x20mode:'+_0x876551),_0x5be749['_JSPlayM4_SetStreamOpenMode'](this['port'],_0x876551));}},{'key':'JSPlayM4_OpenStream','value':function value(_0xf1fdb7,_0x13b52b,_0x112764){if(this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_OpenStream\x201\x20:'+_0xf1fdb7+',this.port:'+this['port']),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_OpenStream','color:\x20red'),0x0;var _0x3cebcb=_0x5be749['_malloc'](_0x13b52b);if(null===_0x3cebcb)return console['log']('hikHeadBuffer\x20malloc\x20failed'),0x0;var _0x27713f=new Uint8Array(_0xf1fdb7['buffer']);if(0x5==_0xf1fdb7[0xa]&&0x0==_0xf1fdb7[0xb]){if(this['codecType']=0x5,!_0x13311d['bSupHardDecHEVC']&&!this['supportSab'])return console['info']('%c3>The\x20codecType\x20is\x20VIDEO_AVC265,not\x20support\x20SharedArrayBuffer','color:\x20red'),0x10;}else 0x1==_0xf1fdb7[0xa]&&0x0==_0xf1fdb7[0xb]?this['codecType']=0x1:0x0==_0xf1fdb7[0xa]&&0x1==_0xf1fdb7[0xb]?this['codecType']=0x100:this['codecType']=0x0;_0x5be749['writeArrayToMemory'](_0x27713f,_0x3cebcb);var _0x37a1e0=_0x5be749['_JSPlayM4_OpenStream'](this['port'],_0x3cebcb,_0x13b52b,_0x112764);return null!==_0x3cebcb&&(_0x5be749['_free'](_0x3cebcb),_0x3cebcb=null),_0x27713f=null,this['HIK40Head']=_0xf1fdb7,this['HIKHeadSize']=_0x13b52b,this['HIKPoolSize']=_0x112764,_0x37a1e0;}},{'key':'JSPlayM4_SetDecodeEngine','value':function value(_0x5412cd){return this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_SetDecodeEngine\x201:'+_0x5412cd),0x0!=_0x5412cd&&0x1!=_0x5412cd?(console['log']('0\x20is\x20softDecode,\x201\x20is\x20hardDecoder,decodeEngine:'+_0x5412cd),0x0):0x0!==_0x5412cd||this['supportSab']&&this['supportOffscreen']?(this['decodeEngine']=_0x5412cd,0x1):(this['jsplayer']['_switchV3ToV1'](this['streamOpenMode'],this['HIK40Head'],this['HIKHeadSize'],this['HIKPoolSize'],!0x0),0x0);}},{'key':'_switchHardToSoft','value':function value(){return this['JSPlayM4_Stop'](),this['JSPlayM4_CloseStream'](),this['JSPlayM4_FreePort'](),this['supportSab']&&this['supportOffscreen']?(this['JSPlayM4_SetDecodeEngine'](0x0)&&(console['log']('V3\x20switchHardToSoft\x20this.szBasePath:'+this['szBasePath']),this['JSPlayM4_GetPort'](),this['JSPlayM4_SetStreamOpenMode'](this['streamOpenMode']),this['JSPlayM4_OpenStream'](this['HIK40Head'],this['HIKHeadSize'],this['HIKPoolSize']),this['_HardToSoftNeedResetParam'](),this['JSPlayM4_Play']()),0x1):(this['jsplayer']['_switchV3ToV1'](this['streamOpenMode'],this['HIK40Head'],this['HIKHeadSize'],this['HIKPoolSize'],!0x0),0x0);}},{'key':'_HardToSoftNeedResetParam','value':function value(){null!=this['FFCallBackFun']&&_0x5be749['_JSPlayM4_SetFirstFrameCallBack'](this['port'],this['FirstFrameCallBackflag'],this['nUser']),this['JSPlayM4_SetDecodeFrameType'](this['decodeFrameType']),-0x1!=this['decInterval']&&_0x5be749['_JSPlayM4_SetIFrameDecInterval'](this['port'],nInterval),0x0!=this['decodeThreadNum']&&_0x5be749['_JSPlayM4_SetDecodeThreadNum'](this['port'],this['decodeThreadNum']),0x0!=this['decodeERCLevel']&&_0x5be749['_JSPlayM4_SetDecodeERC'](this['port'],this['decodeERCLevel']),0x0!=this['resetBufferType']&&_0x5be749['_JSPlayM4_ResetBuffer'](this['port'],this['resetBufferType']),null!=this['runtimeCBFun']&&_0x5be749['_JSPlayM4_SetRunTimeInfoCallBackEx'](this['port'],this['runTimeModule'],this['nUser']),0x0!=this['playOrBackSwitchMode']&&_0x5be749['_JSPlayM4_SetPlayOrBackSwitchMode'](this['port'],this['playOrBackSwitchMode']);var _0x1545e4,_0x16f6d9=_0x1ba087(this['renderPrivateInfo']['keys']());try{for(_0x16f6d9['s']();!(_0x1545e4=_0x16f6d9['n']())['done'];){var _0x49d729=_0x1545e4['value'],_0x1d8253=this['renderPrivateInfo']['get'](_0x49d729);_0x5be749['_JSPlayM4_RenderPrivateData'](this['port'],_0x49d729,_0x1d8253);}}catch(_0x161194){_0x16f6d9['e'](_0x161194);}finally{_0x16f6d9['f']();}var _0x48367f,_0x3a7fc4=_0x1ba087(this['renderIntelSubEx']['keys']());try{for(_0x3a7fc4['s']();!(_0x48367f=_0x3a7fc4['n']())['done'];){var _0x1b162d=_0x48367f['value'],_0x3e30d0=this['renderIntelSubEx']['get'](_0x1b162d),_0x3c16fa=this['renderIntelFlagEx']['get'](_0x1b162d);_0x5be749['_JSPlayM4_RenderPrivateDataEx'](this['port'],_0x1b162d,_0x3e30d0,_0x3c16fa);}}catch(_0x165615){_0x3a7fc4['e'](_0x165615);}finally{_0x3a7fc4['f']();}return 0x0!=this['displayBuf']&&_0x5be749['_JSPlayM4_SetDisplayBuf'](this['port'],this['displayBuf']),0x0!=this['antialiasFlag']&&_0x5be749['_JSPlayM4_SetAntialias'](this['port'],this['antialiasFlag']),0x0!=this['d3dPostProcessValue']&&_0x5be749['_JSPlayM4_SetD3DPostProcess'](this['port'],this['d3dPostProcessType'],this['d3dPostProcessValue']),0x0!=this['setStretchPlaySpeed']&&_0x5be749['_JSPlayM4_SetStretchPlay'](this['port'],this['setStretchPlayTime'],this['setStretchPlaySpeed']),-0x1!=this['autoSmoothPlayModel']&&_0x5be749['_JSPlayM4_SetAutoSmoothPlay'](this['port'],this['autoSmoothPlayModel']),-0x1!=this['keepPlaySpeed']&&_0x5be749['_JSPlayM4_KeepPlaySpeed'](this['port'],this['keepPlaySpeed']),this['JSPlayM4_GetSDKVersion'](),this['JSPlayM4_GetBuildDate'](),''!=this['FECCanvasID']&&this['JSPlayM4_FEC_SetCanvasID'](this['FECCanvasID']),0x0!=this['FECPlaceType']&&_0x5be749['_JSPlayM4_FEC_ResetCorrectType'](this['port'],0x0,this['FECPlaceType'],this['FECCorrectType']),0x1;}},{'key':'JSPlayM4_DownloadData','value':function value(){return this['downloadFlag']=!0x0,0x1;}},{'key':'JSPlayM4_InputRawData','value':function value(_0x416f0b,_0x290946,_0x1a8af2){if(this['rawDataFrameInfoBuffer']=_0x1a8af2,this['rawDataFrameInfo']['port']=_0x416f0b,this['rawDataFrameInfo']['codecType']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x4>>0x2],this['rawDataFrameInfo']['frameType']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0xc>>0x2],this['rawDataFrameInfo']['frameSize']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x10>>0x2],this['rawDataFrameInfo']['width']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x14>>0x2],this['rawDataFrameInfo']['height']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x18>>0x2],this['rawDataFrameInfo']['timeStamp']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x1c>>0x2],this['rawDataFrameInfo']['frameRate']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x20>>0x2],this['rawDataFrameInfo']['frameNum']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x24>>0x2],this['rawDataFrameInfo']['isKeyFrame']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x28>>0x2],this['rawDataFrameInfo']['interlace']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x2c>>0x2],this['rawDataFrameInfo']['streamEnd']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x30>>0x2],this['rawDataFrameInfo']['cropLeft']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x34>>0x2],this['rawDataFrameInfo']['cropRight']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x38>>0x2],this['rawDataFrameInfo']['cropTop']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x3c>>0x2],this['rawDataFrameInfo']['cropBottom']=_0x5be749['HEAP32'][this['rawDataFrameInfoBuffer']+0x40>>0x2],this['rawDataFrameInfo']['year']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x44>>0x1],this['rawDataFrameInfo']['month']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x46>>0x1],this['rawDataFrameInfo']['week']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x48>>0x1],this['rawDataFrameInfo']['day']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x4a>>0x1],this['rawDataFrameInfo']['hour']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x4c>>0x1],this['rawDataFrameInfo']['minute']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x4e>>0x1],this['rawDataFrameInfo']['second']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x50>>0x1],this['rawDataFrameInfo']['milliseconds']=_0x5be749['HEAP16'][this['rawDataFrameInfoBuffer']+0x52>>0x1],this['rawDataFrameInfo']['needSetPreSoft']=!0x1,(this['rawDataFrameInfo']['frameRate']<0x1||0x1==this['rawDataFrameInfo']['interlace'])&&(this['rawDataFrameInfo']['needSetPreSoft']=!0x0),0x0!=this['width']&&0x0!=this['height']||(this['width']=this['rawDataFrameInfo']['width'],this['height']=this['rawDataFrameInfo']['height'],this['startTimeStamp']=this['rawDataFrameInfo']['timeStamp'],this['FirstFrame']=!0x1),0x0==this['rawDataFrameInfo']['cropLeft']&&0x0==this['rawDataFrameInfo']['cropRight']&&0x0==this['rawDataFrameInfo']['cropTop']&&0x0==this['rawDataFrameInfo']['cropBottom']||(this['cropBottom']=this['rawDataFrameInfo']['cropBottom'],this['cropLeft']=this['rawDataFrameInfo']['cropLeft'],this['cropRight']=this['rawDataFrameInfo']['cropRight'],this['cropTop']=this['rawDataFrameInfo']['cropTop']),0x1==this['decodeFrameType']){if(0x1!==this['rawDataFrameInfo']['isKeyFrame'])return 0x1;this['needWaitIFrame']&&(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'SetDecodeFrameType','timestamp':this['rawDataFrameInfo']['timeStamp']}):this['pcVideoManager']['SetDecodeFrameType'](this['rawDataFrameInfo']['timeStamp']),this['needWaitIFrame']=!0x1);}if(0x0==this['decodeFrameType']&&0x1==this['switchDecodeFrame']){if(0x1!==this['rawDataFrameInfo']['isKeyFrame'])return 0x1;this['switchDecodeFrame']=!0x1;}if(this['downloadFlag']&&this['downloadRTPData'](_0x290946),this['hasWebWorker']){if(null===this['decodeWorker'])return _0x290946=null,0x0;this['decodeWorker']['postMessage']({'command':'inputData','rawData':_0x290946['buffer'],'rawDataFrameInfo':this['rawDataFrameInfo']},[_0x290946['buffer']]);}else null!==this['pcVideoManager']&&this['pcVideoManager']['inputData'](_0x290946,this['rawDataFrameInfo']);}},{'key':'JSPlayM4_GetRawData','value':function value(){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetRawData','color:\x20red'),0x0;_0x5be749['_JSPlayM4_GetRawData'](this['port']);}},{'key':'JSPlayM4_ResetEnd','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_ResetEnd','color:\x20red'),0x0):_0x5be749['_JSPlayM4_ResetEnd'](this['port']);}},{'key':'JSPlayM4_NeedReset','value':function value(_0x1a952f,_0x2a8046,_0x5d35c2){return this['hasWebWorker']?null!=_0x32f317[_0x5d35c2][_0x1a952f]['decodeWorker']&&_0x32f317[_0x5d35c2][_0x1a952f]['decodeWorker']['postMessage']({'command':'needReset'}):this['pcVideoManager']['needReset'](),0x1;}},{'key':'JSPlayM4_SetAudioDisplayBuf','value':function value(_0xbbfe27){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetAudioDisplayBuf','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetAudioDisplayBuf'](this['port'],_0xbbfe27);}},{'key':'JSPlayM4_Play','value':function value(){var _0x12fcb2=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null;if(this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_Play\x201\x20this.canvasID:'+this['canvasID']+',this.supportSab:'+this['supportSab']),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_Play','color:\x20red'),0x0;if(this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_Play\x202:'+this['decodeEngine']),null!=_0x12fcb2&&(this['canvasID']=_0x12fcb2,this['canvasWidth']=document['getElementById'](this['canvasID'])['width'],this['canvasHeight']=document['getElementById'](this['canvasID'])['height']),0x0===_0x34dfb1&&0x5===this['codecType']?(this['decodeEngine']=0x0,console['info']('%c2>there\x20will\x20decode\x20265\x20by\x20softDecoder','color:\x20green')):0x0!==_0x35ec0c||0x100!==this['codecType']&&0x1!==this['codecType']||(this['decodeEngine']=0x0,console['info']('%c2>there\x20will\x20decode\x20264\x20by\x20softDecoder','color:\x20green')),!(this['supportSab']&&this['supportOffscreen']||0x0!==this['decodeEngine']))return console['info']('%c3>SharedArrayBuffer\x20or\x20Offscreen\x20Error\x20,\x20does\x20not\x20support\x20Soft\x20Decdoe!!!!!','color:\x20red'),this['jsplayer']['_switchV3ToV1'](this['streamOpenMode'],this['HIK40Head'],this['HIKHeadSize'],this['HIKPoolSize'],!0x0),0x0;-0x1!=this['setHasThread']&&(this['hasThread']=this['setHasThread']),_0x5be749['_JSPlayM4_SetDecodeEngine'](this['port'],this['decodeEngine'],this['hasThread']);if(console['log']('%cThe\x20final\x20decodeEngine\x20is\x20%d\x20(0\x20is\x20soft,1\x20is\x20hard),codecType:%d','color:\x20green',this['decodeEngine'],this['codecType']),0x0===this['decodeEngine']&&null!=this['canvasID']){var _0x2c7d2d=document['getElementById'](this['canvasID']);_0x2c7d2d&&(this['clonedCanvas']=_0x2c7d2d['cloneNode'](!0x0),this['clonedCanvasParentNode']=_0x2c7d2d['parentNode'],this['clonedCanvasParentNode']['replaceChild'](this['clonedCanvas'],_0x2c7d2d));}this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_Play\x202\x20this.canvasID:'+this['canvasID']+',this.supportSab:'+this['supportSab']+',this.decodeEngine:'+this['decodeEngine']);var _0x1c0876=0x1;if(0x1===this['decodeEngine']){this['hasWebWorker']?this['startWorker'](this['canvasID'],this):(this['canvasCnv']=document['getElementById'](this['canvasID']),this['pcVideoManager']['init'](this['canvasCnv'],this['streamOpenMode'],this['supportSab'],this['renderEngine']),0x0!=this['displayBuf']&&this['pcVideoManager']['SetDisplayBuf'](this['displayBuf'])),_0x5be749['_JSPlayM4_SetVideoRawDataCallBack'](this['port'],this['nUser']);var _0x1499aa=_0x5be749['addFunction'](this['JSPlayM4_NeedReset'],'viii');_0x5be749['_JSPlayM4_SetResetCallBack'](this['port'],_0x1499aa,this['nUser']),_0x5be749['_JSPlayM4_SetPrivateInfoCallBack'](this['port'],this['nUser']),this['JSPlayM4_SetCanvasSize'](this['canvasWidth'],this['canvasHeight']),0x1==(_0x1c0876=_0x5be749['_JSPlayM4_Play'](this['port'],null))&&(this['curStatus']=0x2);}else {if(0x0===this['decodeEngine']){if(''!=this['canvasID']&&null!=this['canvasID']){var _0x4cb1ae=this['_stringToBytes']('#'+this['canvasID']),_0x304d11=0x2*(this['canvasID']['length']+0x1);if(this['canvasIDData']=_0x5be749['_malloc'](_0x304d11),null===this['canvasIDData'])return 0x0;var _0x6f6223=_0x5be749['HEAPU8']['subarray'](this['canvasIDData'],this['canvasIDData']+_0x304d11),_0x3e6393=new Uint8Array(_0x304d11);_0x6f6223['set'](_0x3e6393,0x0),_0x6f6223['set'](new Uint8Array(_0x4cb1ae)),_0x6f6223=null,_0x3e6393=null;}0x1==(_0x1c0876=_0x5be749['_JSPlayM4_Play'](this['port'],this['canvasIDData']))&&(this['curStatus']=0x2);}}return this['JSPlayM4_SetFrameInfoCallBack'](0x1),_0x1c0876;}},{'key':'JSPlayM4_InputData','value':function value(_0x23b2d5,_0x4089a5){if(null===_0x5be749){var _0x533963=this['aInputDataBuffer']['length'];if(_0x533963+_0x4089a5>this['iInputMaxBufSize'])return console['log']('WasmPlayerV3.0\x20input\x20over'),0x0;for(var _0x3c3b7e=0x0;_0x3c3b7e<_0x4089a5;_0x3c3b7e++)this['aInputDataBuffer'][_0x533963+_0x3c3b7e]=_0x23b2d5[_0x3c3b7e];return 0x0;}if(this['inputDataBufferSize']<_0x4089a5&&(null!==this['inputDataBuffer']&&(_0x5be749['_free'](this['inputDataBuffer']),this['inputDataBuffer']=null),this['inputDataBufferSize']=_0x4089a5),null===this['inputDataBuffer']&&(this['inputDataBuffer']=_0x5be749['_malloc'](this['inputDataBufferSize'])),null===this['inputDataBuffer'])return console['log']('inputdata\x20malloc\x20failed!!!'),0x0;if(0x1==this['needResetCanvasSize']&&(this['JSPlayM4_SetCanvasSize'](this['canvasWidth'],this['canvasHeight']+0x1),this['needResetCanvasSize']=0x0),this['enableCanvas']){var _0x160175=this['JSPlayM4_GetFrameInfo'](),_0x306041=_0x160175['width'],_0xb2359c=_0x160175['height'];_0x306041&&_0xb2359c&&(this['JSPlayM4_SetCanvasSize'](this['canvasWidth'],this['canvasHeight']-0x1),this['enableCanvas']=!0x1,this['needResetCanvasSize']=0x1);}var _0x5e6ef9=new Uint8Array(_0x23b2d5['buffer']);_0x5be749['writeArrayToMemory'](_0x5e6ef9,this['inputDataBuffer']);var _0x2a9027=_0x5be749['_JSPlayM4_InputData'](this['port'],this['inputDataBuffer'],_0x4089a5);return this['printfFlag']&&console['log']('>>>>>yff>>>>>\x20JSPlayM4_InputData\x202\x20res:'+_0x2a9027+',inputSize:'+_0x4089a5),_0x2a9027;}},{'key':'JSPlayM4_Stop','value':function value(){var _0x514ef5=!(arguments['length']>0x0&&void 0x0!==arguments[0x0])||arguments[0x0];if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_Stop','color:\x20red'),0x0;if(this['hasWebWorker']?null!=this['decodeWorker']&&this['decodeWorker']['postMessage']({'command':'stop'}):null!=this['pcVideoManager']&&this['pcVideoManager']['stop'](),this['bWriteData']&&this['iFrameNum']>0x0){console['log']('download'+this['iFrameNum']+'Psdata');var _0x14d03d=new Uint8Array(this['aTotalBuffer']);this['_downloadFile'](_0x14d03d,'RTPRaw.data'),this['aTotalBuffer']['splice'](0x0,this['aTotalBuffer']['length']),this['bWriteData']=!0x1,this['iFrameNum']=0x0,_0x14d03d=null;}if(0x2==this['curStatus']||0x5==this['curStatus']){var _0x29d9be=_0x5be749['_JSPlayM4_Stop'](this['port']);if(0x1==_0x29d9be&&(this['curStatus']=0x4),0x1==_0x29d9be&&_0x514ef5){var _0x4ed078=document['getElementById'](this['canvasID']);if(_0x4ed078&&(this['clonedCanvas']=_0x4ed078['cloneNode'](!0x0),this['clonedCanvasParentNode']=_0x4ed078['parentNode'],this['clonedCanvasParentNode']['replaceChild'](this['clonedCanvas'],_0x4ed078)),0x0!=this['FECcanvasIDArray']['length'])for(var _0x4b6095=0x0;_0x4b6095<this['FECcanvasIDArray']['length'];_0x4b6095++){var _0x4aa438=document['getElementById'](this['FECcanvasIDArray'][_0x4b6095]);_0x4aa438&&(this['clonedCanvas']=_0x4aa438['cloneNode'](!0x0),this['clonedCanvasParentNode']=_0x4aa438['parentNode'],this['clonedCanvasParentNode']['replaceChild'](this['clonedCanvas'],_0x4aa438));}}return _0x29d9be;}return 0x1;}},{'key':'JSPlayM4_CloseStream','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_CloseStream','color:\x20red'),0x0):null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FreePort','color:\x20red'),0x0):(null!==this['inputDataBuffer']&&(_0x5be749['_free'](this['inputDataBuffer']),this['inputDataBuffer']=null),null!==this['canvasIDData']&&(_0x5be749['_free'](this['canvasIDData']),this['canvasIDData']=null,this['FirstFrame']=!0x0),null!=this['pFECTotalCanvasIDData']&&(_0x5be749['_free'](this['pFECTotalCanvasIDData']),this['pFECTotalCanvasIDData']=null),null!=this['pBmpData']&&(_0x5be749['_free'](this['pBmpData']),this['pBmpData']=null),null!=this['pBmpSizeData']&&(_0x5be749['_free'](this['pBmpSizeData']),this['pBmpSizeData']=null),null!=this['pJpegData']&&(_0x5be749['_free'](this['pJpegData']),this['pJpegData']=null),null!=this['pJPEGSizeData']&&(_0x5be749['_free'](this['pJPEGSizeData']),this['pJPEGSizeData']=null),this['bmpDataCallback']=null,this['jpegDataCallback']=null,this['aTotalBuffer']['splice'](0x0,this['aTotalBuffer']['length']),this['audioANRBuffer']['splice'](0x0,this['audioANRBuffer']['length']),this['audioBefDecBuffer']['splice'](0x0,this['audioBefDecBuffer']['length']),this['audioAfDecOUTBuffer']['splice'](0x0,this['audioAfDecOUTBuffer']['length']),this['audioBeRenOUTBuffer']['splice'](0x0,this['audioBeRenOUTBuffer']['length']),this['audioResampleBuffer']['splice'](0x0,this['audioResampleBuffer']['length']),this['aInputDataBuffer']['splice'](0x0,this['aInputDataBuffer']['length']),this['width']=0x0,this['height']=0x0,this['curStatus']=0x1,this['iZoomNum']=0x0,this['rawDataFrameInfoBuffer']=null,this['displayFrameInfo']={},this['rawDataFrameInfo']={},this['pcVideoManager']=null,_0x5be749['_JSPlayM4_CloseStream'](this['port']));}},{'key':'JSPlayM4_FreePort','value':function value(){return _0x5be749['_JSPlayM4_FreePort'](this['port']);}},{'key':'JSPlayM4_SetDecodeFrameType','value':function value(_0x3e8645){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDecodeFrameType','color:\x20red'),0x0):(this['decodeFrameType']=_0x3e8645,0x1===this['decodeEngine']?(0x0==_0x3e8645&&0x1==this['decodeFrameType']&&(this['switchDecodeFrame']=!0x0),0x1==_0x3e8645&&(this['needWaitIFrame']=!0x0),0x1):_0x5be749['_JSPlayM4_SetDecodeFrameType'](this['port'],_0x3e8645));}},{'key':'JSPlayM4_PlaySound','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_PlaySound','color:\x20red'),0x0):(this['needPlaySound']=!0x0,_0x5be749['_JSPlayM4_PlaySound'](this['port']));}},{'key':'resizedataURL','value':function value(_0x2753f4,_0x45ea0b,_0x16804d){return new Promise(function(){var _0x450593,_0x36a9b3=(_0x450593=_0x127fb4()['mark'](function _0x3b8df6(_0x4bce9b,_0x510856){var _0x419654;return _0x127fb4()['wrap'](function(_0x3bc392){for(;;)switch(_0x3bc392['prev']=_0x3bc392['next']){case 0x0:(_0x419654=document['createElement']('img'))['onload']=function(){var _0x3c98b0=document['createElement']('canvas'),_0x2dee41=_0x3c98b0['getContext']('2d');_0x3c98b0['width']=_0x45ea0b,_0x3c98b0['height']=_0x16804d,_0x2dee41['drawImage'](this,0x0,0x0,_0x45ea0b,_0x16804d);var _0x4938d8=_0x3c98b0['toDataURL']();_0x4bce9b(_0x4938d8);},_0x419654['src']=_0x2753f4;case 0x3:case'end':return _0x3bc392['stop']();}},_0x3b8df6);}),function(){var _0x2344a0=this,_0x429730=arguments;return new Promise(function(_0x4155d5,_0x4470a8){var _0x842dc7=_0x450593['apply'](_0x2344a0,_0x429730);function _0x2045f0(_0x19c1c3){_0xb99566(_0x842dc7,_0x4155d5,_0x4470a8,_0x2045f0,_0x37131d,'next',_0x19c1c3);}function _0x37131d(_0x534ffb){_0xb99566(_0x842dc7,_0x4155d5,_0x4470a8,_0x2045f0,_0x37131d,'throw',_0x534ffb);}_0x2045f0(void 0x0);});});return function(_0x36d376,_0xe21748){return _0x36a9b3['apply'](this,arguments);};}());}},{'key':'_GetImage','value':function value(_0x1c9d3f,_0x2513af){if(0x1===this['decodeEngine']&&_0x1c9d3f['width']&&_0x1c9d3f['height']){var _0x17458f='image/'+_0x2513af,_0x94347=document['createElement']('canvas'),_0x418710=_0x94347['getContext']('2d');_0x94347['width']=_0x1c9d3f['width'],_0x94347['height']=_0x1c9d3f['height'],_0x418710['drawImage'](_0x1c9d3f,0x0,0x0,_0x1c9d3f['width'],_0x1c9d3f['height']),_0x94347['toBlob'](function(_0x419671){console['log']('blob:'+_0x419671);var _0x2b1605=window['URL']['createObjectURL'](_0x419671),_0x567273=document['createElement']('a');_0x567273['download']=new Date()['getTime']()+'.'+_0x2513af,_0x567273['href']=_0x2b1605,_0x567273['dataset']['downloadurl']=[_0x17458f,_0x567273['download'],_0x567273['href']]['join'](':'),document['body']['appendChild'](_0x567273),_0x567273['click'](),document['body']['removeChild'](_0x567273),_0x1c9d3f['close'](),_0x418710=null;},_0x17458f);}}},{'key':'_GetImage2','value':function value(_0x4e74f6,_0x8d54e,_0x3d3c20,_0x4b4fda,_0x4ef435,_0x42530f,_0x19fb86,_0x29216c,_0x2fcbe0,_0x2e8740){var _0x19e85f=this;console['log']('>>>4\x20_GetImage2\x20width:'+_0x3d3c20+',height:'+_0x4b4fda),setTimeout(function(){if(0x0!=_0x3d3c20&&0x0!=_0x4b4fda){var _0x5b7a6e=_0x5be749['_malloc'](_0x8d54e);if(null===_0x5b7a6e)return;_0x5be749['writeArrayToMemory'](new Uint8Array(_0x4e74f6,0x0,_0x8d54e),_0x5b7a6e);var _0x29f092=0x0;_0x29f092=0x2c0!=_0x3d3c20||0x120!=_0x4b4fda&&0xf0!=_0x4b4fda?_0x3d3c20*_0x4b4fda*0x4+0x3c:_0x3d3c20*_0x4b4fda*0x8+0x3c;var _0x254965=_0x5be749['_malloc'](_0x29f092),_0x2a0874=_0x5be749['_malloc'](0x4);if(null===_0x254965||null===_0x2a0874)return _0x5be749['_free'](_0x5b7a6e),_0x5b7a6e=null,null!=_0x254965&&(_0x5be749['_free'](_0x254965),_0x254965=null),void(null!=_0x2a0874&&(_0x5be749['_free'](_0x2a0874),_0x2a0874=null));_0x5be749['setValue'](_0x2a0874,_0x29f092,'i32');var _0x1ff1e6=0x2;if('nv12'===_0x42530f?_0x1ff1e6=0x2:'I420'===_0x42530f&&(_0x1ff1e6=0x3),'jpeg'==_0x4ef435)_0x5be749['_JSPlayM4_VideoDataToJpeg'](_0x19e85f['port'],_0x5b7a6e,_0x8d54e,_0x254965,_0x2a0874,_0x3d3c20,_0x4b4fda,_0x1ff1e6,_0x19fb86,_0x29216c,_0x2fcbe0,_0x2e8740);else {if('bmp'==_0x4ef435)_0x5be749['_JSPlayM4_VideoDataToBMP'](_0x19e85f['port'],_0x5b7a6e,_0x8d54e,_0x254965,_0x2a0874,_0x3d3c20,_0x4b4fda,_0x1ff1e6,_0x19fb86,_0x29216c,_0x2fcbe0,_0x2e8740);}var _0x50c759=_0x5be749['getValue'](_0x2a0874,'i32'),_0x757db0=new Uint8Array(_0x50c759);_0x757db0['set'](_0x5be749['HEAPU8']['subarray'](_0x254965,_0x254965+_0x50c759)),0x0==_0x19fb86&&0x0==_0x29216c&&0x0==_0x2fcbe0&&0x0==_0x2e8740?'jpeg'==_0x4ef435?(null!=_0x19e85f['jpegDataCallback']&&_0x19e85f['jpegDataCallback'](_0x757db0,_0x50c759),_0x19e85f['jpegDownloadFlag']&&_0x19e85f['_downloadFile'](_0x757db0,'GetImage.'+_0x4ef435),_0x19e85f['jpegDataCallback']=null,_0x19e85f['jpegDownloadFlag']=!0x1):'bmp'==_0x4ef435&&(null!=_0x19e85f['bmpDataCallback']&&_0x19e85f['bmpDataCallback'](_0x757db0,_0x50c759),_0x19e85f['bmpDownloadFlag']&&_0x19e85f['_downloadFile'](_0x757db0,'GetImage.'+_0x4ef435),_0x19e85f['bmpDataCallback']=null,_0x19e85f['bmpDownloadFlag']=!0x1):_0x19e85f['_downloadFile'](_0x757db0,'GetCropImage.'+_0x4ef435),_0x757db0=null,null!=_0x254965&&(_0x5be749['_free'](_0x254965),_0x254965=null),null!=_0x2a0874&&(_0x5be749['_free'](_0x2a0874),_0x2a0874=null);}},0x0);}},{'key':'JSPlayM4_GetJPEG','value':function value(){var _0x9d49c4=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null,_0x2f22b0=!(arguments['length']>0x1&&void 0x0!==arguments[0x1])||arguments[0x1];if(this['jpegDataCallback']=_0x9d49c4,this['jpegDownloadFlag']=_0x2f22b0,0x1===this['decodeEngine'])return this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'GetJPEG'}):(console['log']('>>>2\x20JSPlayM4_GetJPEG\x20this.pcVideoManager:'+this['pcVideoManager']),null!=this['pcVideoManager']&&this['pcVideoManager']['GetJPEG']()),0x1;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetJPEG','color:\x20red'),0x0;var _0x434620=_0x5be749['_JSPlayM4_GetFrameInfo'](this['port']);if(this['width']=_0x5be749['HEAP32'][_0x434620+0xc>>0x2],this['height']=_0x5be749['HEAP32'][_0x434620+0x10>>0x2],0x0!=this['width']&&0x0!=this['height']){var _0x5bebd2=this['width']*this['height']*0x4+0x3c;if((null==this['pJpegData']||this['nJPEGDataSize']<_0x5bebd2)&&(null!=this['pJpegData']&&(_0x5be749['_free'](this['pJpegData']),this['pJpegData']=null),this['nJPEGDataSize']=_0x5bebd2,this['pJpegData']=_0x5be749['_malloc'](this['nJPEGDataSize']),null===this['pJpegData']))return;null==this['pJPEGSizeData']&&(this['pJPEGSizeData']=_0x5be749['_malloc'](0x4));var _0x26285e=_0x5be749['_JSPlayM4_GetJPEG'](this['port'],this['pJpegData'],this['nJPEGDataSize'],this['pJPEGSizeData']);if(0x1!=_0x26285e){var _0x46153d=_0x5be749['_JSPlayM4_GetLastError'](this['port']);console['log']('errorcode:'+_0x46153d);}if(0x1==_0x26285e){var _0x5cdab9=_0x5be749['getValue'](this['pJPEGSizeData'],'i32'),_0x3f2bec=new Uint8Array(_0x5cdab9);_0x3f2bec['set'](_0x5be749['HEAPU8']['subarray'](this['pJpegData'],this['pJpegData']+_0x5cdab9)),null!=_0x9d49c4&&_0x9d49c4(_0x3f2bec,_0x5cdab9),_0x2f22b0&&this['_downloadFile'](_0x3f2bec,'GetJPEG.jpeg'),_0x3f2bec=null,this['jpegDataCallback']=null,this['jpegDownloadFlag']=!0x1;}return _0x26285e;}return 0x0;}},{'key':'JSPlayM4_GetBMP','value':function value(){var _0x5db67e=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null,_0x178566=!(arguments['length']>0x1&&void 0x0!==arguments[0x1])||arguments[0x1];if(this['bmpDataCallback']=_0x5db67e,this['bmpDownloadFlag']=_0x178566,0x1===this['decodeEngine'])return this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'GetBMP'}):null!=this['pcVideoManager']&&this['pcVideoManager']['GetBMP'](),0x1;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetBMP','color:\x20red'),0x0;var _0x1671e0=_0x5be749['_JSPlayM4_GetFrameInfo'](this['port']);if(this['width']=_0x5be749['HEAP32'][_0x1671e0+0xc>>0x2],this['height']=_0x5be749['HEAP32'][_0x1671e0+0x10>>0x2],0x0==this['width']||0x0==this['height'])return 0x0;var _0x2910a2=0x0;if(_0x2910a2=0x2c0!=this['width']||0x120!=this['height']&&0xf0!=this['height']?this['width']*this['height']*0x4+0x3c:this['width']*this['height']*0x8+0x3c,!(null==this['pBmpData']||this['nBmpDataSize']<_0x2910a2)||(null!=this['pBmpData']&&(_0x5be749['_free'](this['pBmpData']),this['pBmpData']=null),this['nBmpDataSize']=_0x2910a2,this['pBmpData']=_0x5be749['_malloc'](this['nBmpDataSize']),null!==this['pBmpData'])){null==this['pBmpSizeData']&&(this['pBmpSizeData']=_0x5be749['_malloc'](0x4));var _0xadc083=_0x5be749['_JSPlayM4_GetBMP'](this['port'],this['pBmpData'],this['nBmpDataSize'],this['pBmpSizeData']);if(0x1!=_0xadc083){var _0x37a497=_0x5be749['_JSPlayM4_GetLastError'](this['port']);console['log']('errorcode:'+_0x37a497);}if(0x1==_0xadc083){var _0x1b45b4=_0x5be749['getValue'](this['pBmpSizeData'],'i32'),_0x4fed53=new Uint8Array(_0x1b45b4);_0x4fed53['set'](_0x5be749['HEAPU8']['subarray'](this['pBmpData'],this['pBmpData']+_0x1b45b4)),null!=_0x5db67e&&_0x5db67e(_0x4fed53,_0x1b45b4),_0x178566&&this['_downloadFile'](_0x4fed53,'GetBmp.bmp'),_0x4fed53=null,this['bmpDataCallback']=null,this['bmpDownloadFlag']=!0x1;}return 0x1;}}},{'key':'JSPlayM4_GetCropJPEG','value':function value(){if(0x1===this['decodeEngine'])return this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'GetCropJPEG'}):null!=this['pcVideoManager']&&this['pcVideoManager']['GetCropJPEG'](),0x1;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetCropJPEG','color:\x20red'),0x0;var _0x268f97=_0x5be749['_JSPlayM4_GetFrameInfo'](this['port']);if(this['width']=_0x5be749['HEAP32'][_0x268f97+0xc>>0x2],this['height']=_0x5be749['HEAP32'][_0x268f97+0x10>>0x2],0x0!=this['width']&&0x0!=this['height']){var _0x4a3a8e=this['width']*this['height']*0x4+0x3c,_0x5a6f6a=_0x5be749['_malloc'](_0x4a3a8e),_0x594638=_0x5be749['_malloc'](0x4),_0x3e6b81=this['SetDisRegionBottom'],_0x48ac92=this['SetDisRegionLeft'],_0x1b808f=this['SetDisRegionRight'],_0x1014ce=this['SetDisRegionTop'];if(null===_0x5a6f6a)return;var _0x3cb887=_0x5be749['_JSPlayM4_GetCropJPEG'](this['port'],_0x5a6f6a,_0x4a3a8e,_0x594638,0x0,0x0,_0x48ac92,_0x1014ce,_0x1b808f,_0x3e6b81);if(0x1!=_0x3cb887){var _0x5ac4b9=_0x5be749['_JSPlayM4_GetLastError'](this['port']);console['log']('errorcode:'+_0x5ac4b9);}if(0x1==_0x3cb887){var _0x21a688=_0x5be749['getValue'](_0x594638,'i32'),_0x712702=new Uint8Array(_0x21a688);_0x712702['set'](_0x5be749['HEAPU8']['subarray'](_0x5a6f6a,_0x5a6f6a+_0x21a688)),this['_downloadFile'](_0x712702,'GetCropJPEG.jpeg'),_0x712702=null;}return null!=_0x5a6f6a&&(_0x5be749['_free'](_0x5a6f6a),_0x5a6f6a=null),null!=_0x594638&&(_0x5be749['_free'](_0x594638),_0x594638=null),_0x3cb887;}return 0x0;}},{'key':'JSPlayM4_GetCropBMP','value':function value(){if(0x1===this['decodeEngine'])return this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'GetCropBMP'}):null!=this['pcVideoManager']&&this['pcVideoManager']['GetCropBMP'](),0x1;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetCropBMP','color:\x20red'),0x0;var _0x4599e2=_0x5be749['_JSPlayM4_GetFrameInfo'](this['port']);if(this['width']=_0x5be749['HEAP32'][_0x4599e2+0xc>>0x2],this['height']=_0x5be749['HEAP32'][_0x4599e2+0x10>>0x2],0x0==this['width']||0x0==this['height'])return 0x0;var _0xf8c6ae=this['width']*this['height']*0x4+0x3c,_0x298c8c=_0x5be749['_malloc'](_0xf8c6ae),_0x256da6=_0x5be749['_malloc'](0x4),_0x5bdd8b=this['SetDisRegionBottom'],_0x2978ae=this['SetDisRegionLeft'],_0x496731=this['SetDisRegionRight'],_0x2e0f35=this['SetDisRegionTop'];if(null!==_0x298c8c){var _0x269144=_0x5be749['_JSPlayM4_GetCropBMP'](this['port'],_0x298c8c,_0xf8c6ae,_0x256da6,0x0,0x0,_0x2978ae,_0x2e0f35,_0x496731,_0x5bdd8b);if(0x1!=_0x269144){var _0x4a98ce=_0x5be749['_JSPlayM4_GetLastError'](this['port']);console['log']('errorcode:'+_0x4a98ce);}if(0x1==_0x269144){var _0x2ac5e0=_0x5be749['getValue'](_0x256da6,'i32'),_0x22069b=new Uint8Array(_0x2ac5e0);_0x22069b['set'](_0x5be749['HEAPU8']['subarray'](_0x298c8c,_0x298c8c+_0x2ac5e0)),this['_downloadFile'](_0x22069b,'GetCropBmp.bmp'),_0x22069b=null;}return null!=_0x298c8c&&(_0x5be749['_free'](_0x298c8c),_0x298c8c=null),null!=_0x256da6&&(_0x5be749['_free'](_0x256da6),_0x256da6=null),0x1;}}},{'key':'JSPlayM4_GetCanvasCapture','value':function value(_0x5c57f5){return 0x1===this['decodeEngine']?(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'GetCanvasCapture','cbFun':_0x5c57f5}):null!=this['pcVideoManager']&&this['pcVideoManager']['JSPlayM4_GetCanvasCapture'](_0x5c57f5),0x1):(console['info']('%c\x20SoftDecode\x20not\x20support\x20canvas\x20capture','color:\x20red'),0x1);}},{'key':'JSPlayM4_StopSound','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_StopSound','color:\x20red'),0x0):(this['needPlaySound']=!0x1,_0x5be749['_JSPlayM4_StopSound']());}},{'key':'JSPlayM4_GetSDKVersion','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetSDKVersion','color:\x20red'),0x0):_0x5be749['_JSPlayM4_GetSDKVersion']();}},{'key':'JSPlayM4_GetBuildDate','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetBuildDate','color:\x20red'),0x0):_0x5be749['_JSPlayM4_GetBuildDate']();}},{'key':'JSPlayM4_GetLastError','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetLastError','color:\x20red'),0x0):_0x5be749['_JSPlayM4_GetLastError'](this['port']);}},{'key':'JSPlayM4_Fast','value':function value(){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_Fast','color:\x20red'),0x0;if(0x0===this['streamOpenMode'])return 0x1;if(0x1===this['decodeEngine']){if(this['hasWebWorker']){if(null===this['decodeWorker'])return 0x0;this['decodeWorker']['postMessage']({'command':'fast'});}else null!=this['pcVideoManager']&&this['pcVideoManager']['fast']();}var _0x408453=_0x5be749['_JSPlayM4_Fast'](this['port']);return 0x1==_0x408453&&(this['playSpeed']=0x2*this['playSpeed']),_0x408453;}},{'key':'JSPlayM4_Slow','value':function value(){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_Slow','color:\x20red'),0x0;if(0x0===this['streamOpenMode'])return 0x1;if(0x1===this['decodeEngine']){if(this['hasWebWorker']){if(null===this['decodeWorker'])return 0x0;this['decodeWorker']['postMessage']({'command':'slow'});}else null!=this['pcVideoManager']&&this['pcVideoManager']['slow']();}var _0x3b40fa=_0x5be749['_JSPlayM4_Slow'](this['port']);return 0x1==_0x3b40fa&&(this['playSpeed']=this['playSpeed']/0x2),console['log']('this.playSpeed:'+this['playSpeed']),_0x3b40fa;}},{'key':'JSPlayM4_SetIFrameDecInterval','value':function value(_0x19352e){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetIFrameDecInterval','color:\x20red'),0x0):0x1===this['decodeEngine']?0x1:(this['decInterval']=_0x19352e,_0x5be749['_JSPlayM4_SetIFrameDecInterval'](this['port'],_0x19352e));}},{'key':'JSPlayM4_Pause','value':function value(_0x15faa1){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_Pause','color:\x20red'),0x0):0x0===this['streamOpenMode']?0x1:(0x1===this['decodeEngine']&&(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'Pause','value':_0x15faa1}):null!=this['pcVideoManager']&&this['pcVideoManager']['Pause'](_0x15faa1)),_0x5be749['_JSPlayM4_Pause'](this['port'],_0x15faa1));}},{'key':'JSPlayM4_OneByOne','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_OneByOne','color:\x20red'),0x0):0x0===this['streamOpenMode']?0x1:(this['curStatus']=0x5,0x1===this['decodeEngine']&&(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'OneByOne','value':0x1}):null!=this['pcVideoManager']&&this['pcVideoManager']['OneByOne'](0x1)),_0x5be749['_JSPlayM4_OneByOne'](this['port']));}},{'key':'JSPlayM4_OneByOneResume','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_OneByOneResume','color:\x20red'),0x0):0x0===this['streamOpenMode']?0x1:(this['curStatus']=0x2,0x1===this['decodeEngine']&&(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'OneByOne','value':0x0}):null!=this['pcVideoManager']&&this['pcVideoManager']['OneByOne'](0x0)),_0x5be749['_JSPlayM4_Play'](this['port'],this['canvasIDData']));}},{'key':'JSPlayM4_SetVolume','value':function value(_0x2f8f0e){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetVolume','color:\x20red'),0x0):(this['volumeValue']=_0x2f8f0e,_0x5be749['_JSPlayM4_SetVolume'](this['port'],_0x2f8f0e));}},{'key':'JSPlayM4_GetVolume','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetVolume','color:\x20red'),0x0):_0x5be749['_JSPlayM4_GetVolume'](this['port']);}},{'key':'JSPlayM4_SetDisplayRegion','value':function value(_0x1fa0ba,_0x2e4971,_0x535fa3,_0x502e5b,_0x5d3570){var _0x51d88a=arguments['length']>0x5&&void 0x0!==arguments[0x5]&&arguments[0x5],_0x496822=!(arguments['length']>0x6&&void 0x0!==arguments[0x6])||arguments[0x6];if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDisplayRegion','color:\x20red'),0x0;var _0x44a218=0x1,_0x5c3a27=_0x2e4971,_0x494b09=_0x502e5b,_0x24f4c6=_0x535fa3,_0x2202f9=_0x5d3570;if('number'!=typeof _0x2e4971||'number'!=typeof _0x502e5b||'number'!=typeof _0x535fa3||'number'!=typeof _0x5d3570)return console['log']('param\x20is\x20not\x20number'),0x0;if(_0x51d88a)_0x5c3a27=0x0,_0x24f4c6=this['canvasWidth'],_0x494b09=0x0,_0x2202f9=this['canvasHeight'],this['iZoomNum']=0x0,this['iRatio_x']=0x1,this['iRatio_y']=0x1;else {if(_0x496822){if(_0x5c3a27<0x0||_0x24f4c6<0x0||_0x494b09<0x0||_0x2202f9<0x0)return 0x0;0x0!==this['iZoomNum']&&(_0x5c3a27=Math['round'](_0x5c3a27/this['iRatio_x'])+this['stDisplayRect']['left'],_0x494b09=Math['round'](_0x494b09/this['iRatio_y'])+this['stDisplayRect']['top'],_0x24f4c6=Math['round'](_0x24f4c6/this['iRatio_x'])+this['stDisplayRect']['left'],_0x2202f9=Math['round'](_0x2202f9/this['iRatio_y'])+this['stDisplayRect']['top']);}}if(this['stDisplayRect']={'top':_0x494b09,'left':_0x5c3a27,'right':_0x24f4c6,'bottom':_0x2202f9},_0x24f4c6-_0x5c3a27<0x10||_0x2202f9-_0x494b09<0x10||_0x24f4c6-_0x5c3a27>this['canvasWidth']||_0x2202f9-_0x494b09>this['canvasHeight'])return console['log']('>>>JS\x20left:'+_0x2e4971+',right:'+_0x535fa3+',top:'+_0x502e5b+',bottom:'+_0x5d3570+',bClose:'+_0x51d88a+',bZoomEnable:'+_0x496822+',iZoomNum:'+this['iZoomNum']+',canvasWidth:'+this['canvasWidth']+',canvasHeight:'+this['canvasHeight']),0x0;if(0x1===this['decodeEngine']){if(this['SetDisRegionBottom']=_0x2202f9/this['canvasHeight']*this['height'],this['SetDisRegionLeft']=_0x5c3a27/this['canvasWidth']*this['width'],this['SetDisRegionRight']=_0x24f4c6/this['canvasWidth']*this['width'],this['SetDisRegionTop']=_0x494b09/this['canvasHeight']*this['height'],this['hasWebWorker']){if(null===this['decodeWorker'])return 0x0;this['decodeWorker']['postMessage']({'command':'SetDisplayRegion','sx':this['SetDisRegionLeft'],'sy':this['SetDisRegionTop'],'sw':this['SetDisRegionRight']-this['SetDisRegionLeft'],'sh':this['SetDisRegionBottom']-this['SetDisRegionTop']});}else null!=this['pcVideoManager']&&this['pcVideoManager']['SetDisplayRegion'](this['SetDisRegionLeft'],this['SetDisRegionTop'],this['SetDisRegionRight']-this['SetDisRegionLeft'],this['SetDisRegionBottom']-this['SetDisRegionTop']);}else {var _0x37d85f=_0x5be749['_JSPlayM4_GetFrameInfo'](this['port']);this['width']=_0x5be749['HEAP32'][_0x37d85f+0xc>>0x2],this['height']=_0x5be749['HEAP32'][_0x37d85f+0x10>>0x2],this['SetDisRegionBottom']=_0x2202f9/this['canvasHeight']*this['height'],this['SetDisRegionLeft']=_0x5c3a27/this['canvasWidth']*this['width'],this['SetDisRegionRight']=_0x24f4c6/this['canvasWidth']*this['width'],this['SetDisRegionTop']=_0x494b09/this['canvasHeight']*this['height'],_0x44a218=_0x5be749['_JSPlayM4_SetDisplayRegion'](this['port'],this['canvasID'],this['SetDisRegionLeft'],this['SetDisRegionRight'],this['SetDisRegionTop'],this['SetDisRegionBottom']);}return _0x496822&&(this['iRatio_x']=this['canvasWidth']/(_0x24f4c6-_0x5c3a27),this['iRatio_y']=this['canvasHeight']/(_0x2202f9-_0x494b09),this['iZoomNum']++),_0x44a218;}},{'key':'JSPlayM4_SetPrintLogFlag','value':function value(_0x6152e9){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetPrintLogFlag','color:\x20red'),0x0):(this['printfFlag']=Number(_0x6152e9),_0x5be749['_JSPlayM4_SetPrintLogFlag'](this['port'],_0x6152e9));}},{'key':'JSPlayM4_RenderPrivateData','value':function value(_0x1aed9b,_0x3e933e){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_RenderPrivateData','color:\x20red'),0x0;if(this['renderPrivateInfo']['set'](_0x1aed9b,_0x3e933e),0x1===this['decodeEngine']){if(this['hasWebWorker']){if(null===this['decodeWorker'])return 0x0;this['decodeWorker']['postMessage']({'command':'RenderPrivateData','bTrue':_0x3e933e});}else null!=this['pcVideoManager']&&this['pcVideoManager']['RenderPrivateData'](_0x3e933e);}return _0x5be749['_JSPlayM4_RenderPrivateData'](this['port'],_0x1aed9b,_0x3e933e);}},{'key':'JSPlayM4_RenderPrivateDataEx','value':function value(_0x2a5847,_0x52a7ca,_0x4f2ccf){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_RenderPrivateDataEx','color:\x20red'),0x0):(this['renderIntelSubEx']['set'](_0x2a5847,_0x52a7ca),this['renderIntelFlagEx']['set'](_0x2a5847,_0x4f2ccf),_0x5be749['_JSPlayM4_RenderPrivateDataEx'](this['port'],_0x2a5847,_0x52a7ca,_0x4f2ccf));}},{'key':'JSPlayM4_SetCanvasSize','value':function value(_0x2547d4,_0x247867){var _0x5807aa=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetCanvasSize','color:\x20red'),0x0;if(_0x2547d4<0x10||_0x247867<0x10||null===this['canvasID'])return 0x0;if(this['canvasWidth']=_0x2547d4,this['canvasHeight']=_0x247867,0x1===this['decodeEngine']){if(this['hasWebWorker']){if(null==this['decodeWorker'])return 0x0;this['decodeWorker']['postMessage']({'command':'SetCanvasSize','width':_0x2547d4,'height':_0x247867});}else null!=this['pcVideoManager']&&this['pcVideoManager']['SetCanvasSize'](_0x2547d4,_0x247867);}return _0x5be749['_JSPlayM4_SetCanvasSize'](this['port'],_0x2547d4,_0x247867,_0x5807aa);}},{'key':'JSPlayM4_SetDisplayBuf','value':function value(_0x1b53ae){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDisplayBuf','color:\x20red'),0x0):(this['displayBuf']=_0x1b53ae,0x1===this['decodeEngine']&&(this['hasWebWorker']?null===this['decodeWorker']||this['decodeWorker']['postMessage']({'command':'SetDisplayBuf','value':_0x1b53ae}):null!=this['pcVideoManager']&&this['pcVideoManager']['SetDisplayBuf'](_0x1b53ae)),_0x5be749['_JSPlayM4_SetDisplayBuf'](this['port'],_0x1b53ae));}},{'key':'JSPlayM4_GetSourceBufferRemain','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetSourceBufferRemain','color:\x20red'),0x0):_0x5be749['_JSPlayM4_GetSourceBufferRemain'](this['port']);}},{'key':'JSPlayM4_GetBufferValue','value':function value(_0xc4d187){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetBufferValue','color:\x20red'),0x0):_0x5be749['_JSPlayM4_GetBufferValue'](this['port'],_0xc4d187);}},{'key':'JSPlayM4_ReversePlay','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_ReversePlay','color:\x20red'),0x0):0x0===this['streamOpenMode']?0x1:(this['reversePlay']=!0x0,_0x5be749['_JSPlayM4_ReversePlay'](this['port']));}},{'key':'JSPlayM4_SetDecodeThreadNum','value':function value(_0x4bd28a){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDecodeThreadNum','color:\x20red'),0x0):(this['decodeThreadNum']=_0x4bd28a,_0x5be749['_JSPlayM4_SetDecodeThreadNum'](this['port'],_0x4bd28a));}},{'key':'JSPlayM4_GetCanvasSize','value':function value(){var _0x4161fa=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:0x0;return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetCanvasSize','color:\x20red'),0x0):0x1===this['decodeEngine']?(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'GetCanvasSize'}):null!=this['pcVideoManager']&&this['pcVideoManager']['GetCanvasSize'](),0x1):_0x5be749['_JSPlayM4_GetCanvasSize'](this['port'],_0x4161fa);}},{'key':'JSPlayM4_DisplayLostFrames','value':function value(_0x514a7a,_0x5a4c2c,_0x518505){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_DisplayLostFrames','color:\x20red'),0x0):_0x5be749['_JSPlayM4_DisplayLostFrames'](this['port'],_0x514a7a,_0x5a4c2c,_0x518505);}},{'key':'JSPlayM4_SetANRParam','value':function value(_0x4a457b,_0x4ef53b){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetANRParam','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetANRParam'](this['port'],_0x4a457b,_0x4ef53b);}},{'key':'JSPlayM4_SetResampleValue','value':function value(_0x40a488,_0x55b44b){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetResampleValue','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetResampleValue'](this['port'],_0x40a488,_0x55b44b);}},{'key':'JSPlayM4_SetAntialias','value':function value(_0x2292b3){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetAntialias','color:\x20red'),0x0;var _0x1d5d83=0x1;return this['antialiasFlag']=_0x2292b3,0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']&&this['decodeWorker']['postMessage']({'command':'SetAntialias','value':_0x2292b3}):null!=this['pcVideoManager']&&(_0x1d5d83=this['pcVideoManager']['SetAntialias'](_0x2292b3)):_0x1d5d83=_0x5be749['_JSPlayM4_SetAntialias'](this['port'],_0x2292b3),_0x1d5d83;}},{'key':'JSPlayM4_SyncToAudio','value':function value(_0x35d0b3){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SyncToAudio','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SyncToAudio'](this['port'],_0x35d0b3);}},{'key':'JSPlayM4_SetAudioThreadModel','value':function value(_0x2ffa40){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetAudioThreadModel','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetAudioThreadModel'](this['port'],_0x2ffa40);}},{'key':'JSPlayM4_SetDecodeERC','value':function value(_0xcf692d){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDecodeERC','color:\x20red'),0x0):(this['decodeERCLevel']=_0xcf692d,_0x5be749['_JSPlayM4_SetDecodeERC'](this['port'],_0xcf692d));}},{'key':'JSPlayM4_SkipErrorData','value':function value(_0x12f366){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SkipErrorData','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SkipErrorData'](this['port'],_0x12f366);}},{'key':'JSPlayM4_SetDemuxModel','value':function value(_0x4f0575,_0x3d3101){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDemuxModel','color:\x20red'),0x0):(this['setDemuxModelType']=_0x4f0575,this['setDemuxModelFlag']=_0x3d3101,_0x5be749['_JSPlayM4_SetDemuxModel'](this['port'],_0x4f0575,_0x3d3101));}},{'key':'JSPlayM4_SetD3DPostProcess','value':function value(_0x1c990c,_0x5002e3){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetD3DPostProcess','color:\x20red'),0x0;var _0x43a8be=0x1;return this['d3dPostProcessType']=_0x1c990c,this['d3dPostProcessValue']=_0x5002e3,0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']&&this['decodeWorker']['postMessage']({'command':'SetD3DPostProcess','ProcessType':_0x1c990c,'ProcessValue':_0x5002e3}):null!=this['pcVideoManager']&&(_0x43a8be=this['pcVideoManager']['SetD3DPostProcess'](_0x1c990c,_0x5002e3)):_0x43a8be=_0x5be749['_JSPlayM4_SetD3DPostProcess'](this['port'],_0x1c990c,_0x5002e3),_0x43a8be;}},{'key':'JSPlayM4_SetFirstFrameCallBack','value':function value(_0x3e2dfc,_0x541cae){if(!(_0x541cae&&'function'==typeof _0x541cae||null===_0x541cae))return 0x0;if(this['FFCallBackFun']=_0x541cae,this['FirstFrameCallBackflag']=_0x3e2dfc,null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetFirstFrameCallBack','color:\x20red'),0x0;var _0x354f0c=0x1;return 0x0===this['decodeEngine']&&(_0x354f0c=_0x5be749['_JSPlayM4_SetFirstFrameCallBack'](this['port'],_0x3e2dfc,this['nUser'])),_0x354f0c;}},{'key':'JSPlayM4_SetDecCallBack','value':function value(_0x299468,_0xbf7dca){return _0xbf7dca&&'function'==typeof _0xbf7dca||null===_0xbf7dca?(this['decCallBackFun']=_0xbf7dca,null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDecCallBack','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetDecCallBack'](this['port'],_0x299468,this['nUser'])):0x0;}},{'key':'JSPlayM4_SetDisplayCallBack','value':function value(_0x246555,_0x3fc555){return _0x3fc555&&'function'==typeof _0x3fc555||null===_0x3fc555?(this['displayCallBackFun']=_0x3fc555,null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDisplayCallBack','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetDisplayCallBack'](this['port'],_0x246555,this['nUser'])):0x0;}},{'key':'JSPlayM4_SetFrameInfoCallBack','value':function value(_0x559ed7){var _0x313309=this,_0x18d149=0x1;if(0x1===this['decodeEngine'])this['hasWebWorker']?null!=this['decodeWorker']&&this['decodeWorker']['postMessage']({'command':'SetFrameInfoCallBack','value':_0x559ed7}):null!=this['pcVideoManager']&&(_0x18d149=this['pcVideoManager']['SetFrameInfoCallBack'](function(_0x14ef66){_0x313309['displayFrameInfo']['port']=_0x14ef66['port'],_0x313309['displayFrameInfo']['codecType']=_0x14ef66['codecType'],_0x313309['displayFrameInfo']['frameType']=_0x14ef66['frameType'],_0x313309['displayFrameInfo']['frameSize']=_0x14ef66['frameSize'],_0x313309['displayFrameInfo']['width']=_0x14ef66['width'],_0x313309['displayFrameInfo']['height']=_0x14ef66['height'],_0x313309['displayFrameInfo']['timeStamp']=_0x14ef66['timeStamp'],_0x313309['displayFrameInfo']['frameRate']=_0x14ef66['frameRate'],_0x313309['displayFrameInfo']['frameNum']=_0x14ef66['frameNum'],_0x313309['displayFrameInfo']['interlace']=_0x14ef66['interlace'],_0x313309['displayFrameInfo']['streamEnd']=_0x14ef66['streamEnd'],_0x313309['displayFrameInfo']['cropLeft']=_0x14ef66['cropLeft'],_0x313309['displayFrameInfo']['cropRight']=_0x14ef66['cropRight'],_0x313309['displayFrameInfo']['cropTop']=_0x14ef66['cropTop'],_0x313309['displayFrameInfo']['cropBottom']=_0x14ef66['cropBottom'],_0x313309['displayFrameInfo']['year']=_0x14ef66['year'],_0x313309['displayFrameInfo']['month']=_0x14ef66['month'],_0x313309['displayFrameInfo']['week']=_0x14ef66['week'],_0x313309['displayFrameInfo']['day']=_0x14ef66['day'],_0x313309['displayFrameInfo']['hour']=_0x14ef66['hour'],_0x313309['displayFrameInfo']['minute']=_0x14ef66['minute'],_0x313309['displayFrameInfo']['second']=_0x14ef66['second'],_0x313309['displayFrameInfo']['milliseconds']=_0x14ef66['milliseconds'];},_0x559ed7));else {if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetFrameInfoCallBack','color:\x20red'),0x0;_0x18d149=_0x5be749['_JSPlayM4_SetFrameInfoCallBack'](this['port'],_0x559ed7);}return _0x18d149;}},{'key':'JSPlayM4_SetDecCBStream','value':function value(_0x20c951){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetDecCBStream','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetDecCBStream'](this['port'],_0x20c951);}},{'key':'JSPlayM4_GetFrameInfo','value':function value(){var _0x5929dc={};if(0x0==this['decodeEngine']){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetFrameInfo','color:\x20red'),0x0;var _0x17c919=_0x5be749['_JSPlayM4_GetFrameInfo'](this['port']);_0x5929dc['port']=_0x5be749['HEAP32'][_0x17c919>>0x2],_0x5929dc['frameType']=_0x5be749['HEAP32'][_0x17c919+0x4>>0x2],_0x5929dc['frameSize']=_0x5be749['HEAP32'][_0x17c919+0x8>>0x2],_0x5929dc['width']=_0x5be749['HEAP32'][_0x17c919+0xc>>0x2],_0x5929dc['height']=_0x5be749['HEAP32'][_0x17c919+0x10>>0x2],_0x5929dc['timeStamp']=_0x5be749['HEAP32'][_0x17c919+0x14>>0x2],_0x5929dc['frameRate']=_0x5be749['HEAP32'][_0x17c919+0x18>>0x2],_0x5929dc['bitPerSample']=_0x5be749['HEAP32'][_0x17c919+0x1c>>0x2],_0x5929dc['samplesPerSec']=_0x5be749['HEAP32'][_0x17c919+0x20>>0x2],_0x5929dc['channel']=_0x5be749['HEAP32'][_0x17c919+0x24>>0x2],_0x5929dc['frameNum']=_0x5be749['HEAP32'][_0x17c919+0x28>>0x2],_0x5929dc['cropLeft']=_0x5be749['HEAP32'][_0x17c919+0x2c>>0x2],_0x5929dc['cropRight']=_0x5be749['HEAP32'][_0x17c919+0x30>>0x2],_0x5929dc['cropTop']=_0x5be749['HEAP32'][_0x17c919+0x34>>0x2],_0x5929dc['cropBottom']=_0x5be749['HEAP32'][_0x17c919+0x38>>0x2],_0x5929dc['year']=_0x5be749['HEAP16'][_0x17c919+0x3c>>0x1],_0x5929dc['month']=_0x5be749['HEAP16'][_0x17c919+0x3e>>0x1],_0x5929dc['week']=_0x5be749['HEAP16'][_0x17c919+0x40>>0x1],_0x5929dc['day']=_0x5be749['HEAP16'][_0x17c919+0x42>>0x1],_0x5929dc['hour']=_0x5be749['HEAP16'][_0x17c919+0x44>>0x1],_0x5929dc['minute']=_0x5be749['HEAP16'][_0x17c919+0x46>>0x1],_0x5929dc['second']=_0x5be749['HEAP16'][_0x17c919+0x48>>0x1],_0x5929dc['milliseconds']=_0x5be749['HEAP16'][_0x17c919+0x4a>>0x1],this['width']=_0x5929dc['width'],this['height']=_0x5929dc['height'];}else _0x5929dc=this['displayFrameInfo'];return _0x5929dc;}},{'key':'JSPlayM4_GetAdditionData','value':function value(){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetAdditionData','color:\x20red'),0x0;var _0x35f36c=null,_0x7b2c0e=_0x5be749['_JSPlayM4_GetAdditionData'](this['port']);return _0x35f36c['dataType']=_0x5be749['HEAP32'][_0x7b2c0e>>0x2],_0x35f36c['dataStrVersion']=_0x5be749['HEAP32'][_0x7b2c0e+0x4>>0x2],_0x35f36c['dataTimeStamp']=_0x5be749['HEAP32'][_0x7b2c0e+0x8>>0x2],_0x35f36c['dataLength']=_0x5be749['HEAP32'][_0x7b2c0e+0xc>>0x2],_0x35f36c['pData']=_0x5be749['HEAP32'][_0x7b2c0e+0x10>>0x2],_0x35f36c['additionDataBuffer']=new Uint8Array(dataLength),additionDataBuffer['set'](_0x5be749['HEAPU8']['subarray'](pData,pData+dataLength)),_0x35f36c;}},{'key':'JSPlayM4_SetAdditionDataCallBack','value':function value(_0x21b418,_0x171a0b,_0x3fb120){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetAdditionDataCallBack','color:\x20red'),0x0):_0x3fb120&&'function'==typeof _0x3fb120||null===_0x3fb120?(this['addtionCallBackFun']=_0x3fb120,_0x5be749['_JSPlayM4_SetAdditionDataCallBack'](this['port'],_0x21b418,_0x171a0b,this['nUser'])):0x0;}},{'key':'JSPlayM4_GetPlayedTimeEx','value':function value(_0x85b732){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetPlayedTimeEx','color:\x20red'),0x0;if(!(_0x85b732&&'function'==typeof _0x85b732||null===_0x85b732))return 0x0;if(this['getPlayTimeCallBackFun']=_0x85b732,0x1===this['decodeEngine']){if(this['hasWebWorker'])this['decodeWorker']['postMessage']({'command':'GetPlayedTime'});else {if(null!=this['pcVideoManager']){var _0x4468ca=this['pcVideoManager']['GetPlayedTime']();this['getPlayTimeCallBackFun']&&this['getPlayTimeCallBackFun'](_0x4468ca-this['startTimeStamp']);}}}else {var _0x272b74=_0x5be749['_JSPlayM4_GetPlayedTimeEx'](this['port']);this['getPlayTimeCallBackFun'](_0x272b74);}}},{'key':'JSPlayM4_GetFileTime','value':function value(){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetFileTime','color:\x20red'),0x0):_0x5be749['_JSPlayM4_GetFileTime'](this['port']);}},{'key':'JSPlayM4_GetMpOffset','value':function value(_0x2a1166){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_GetMpOffset','color:\x20red'),0x0):_0x2a1166>this['JSPlayM4_GetFileTime']()?-0x1:(0x1===this['decodeEngine']&&(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'needReset'}):null!=this['pcVideoManager']&&this['pcVideoManager']['needReset']()),_0x5be749['_JSPlayM4_GetMpOffset'](this['port'],_0x2a1166));}},{'key':'JSPlayM4_ResetBuffer','value':function value(_0x308d2f){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_ResetBuffer','color:\x20red'),0x0):(this['resetBufferType']=_0x308d2f,_0x5be749['_JSPlayM4_ResetBuffer'](this['port'],_0x308d2f));}},{'key':'JSPlayM4_SetGlobalBaseTime','value':function value(_0x1e27ef,_0xa29d85,_0x19f318,_0x55c0d6,_0x124adc,_0x67e03d,_0x261128){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetGlobalBaseTime','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetGlobalBaseTime'](this['port'],_0x1e27ef,_0xa29d85,_0x19f318,_0x55c0d6,_0x124adc,_0x67e03d,_0x261128);}},{'key':'JSPlayM4_SetSecretKey','value':function value(_0x121108){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetSecretKey','color:\x20red'),0x0;var _0x5355bc=this['_stringToBytes'](_0x121108),_0x1018f8=_0x5be749['_malloc'](0x80);if(null!==_0x1018f8){var _0x1d9c66=_0x5be749['HEAPU8']['subarray'](_0x1018f8,_0x1018f8+0x80),_0x4e3735=new Uint8Array(0x80);_0x1d9c66['set'](_0x4e3735,0x0),_0x1d9c66['set'](new Uint8Array(_0x5355bc)),_0x1d9c66=null,_0x4e3735=null;var _0x325aab=_0x5be749['_JSPlayM4_SetSecretKey'](this['port'],0x1,_0x1018f8,0x80);return null!==_0x1018f8&&(_0x5be749['_free'](_0x1018f8),_0x1018f8=null),_0x325aab;}}},{'key':'JSPlayM4_SetRunTimeInfoCallBackEx','value':function value(_0x173c99,_0x3ee973){return _0x3ee973&&'function'==typeof _0x3ee973||null===_0x3ee973?(this['runtimeCBFun']=_0x3ee973,this['runTimeModule']=_0x173c99,null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetRunTimeInfoCallBackEx','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetRunTimeInfoCallBackEx'](this['port'],_0x173c99,this['nUser'])):0x0;}},{'key':'JSPlayM4_SetPlayOrBackSwitchMode','value':function value(_0x2b7058){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetPlayOrBackSwitchMode','color:\x20red'),0x0):(this['playOrBackSwitchMode']=_0x2b7058,0x0==this['decodeEngine']?_0x5be749['_JSPlayM4_SetPlayOrBackSwitchMode'](this['port'],_0x2b7058):0x0);}},{'key':'JSPlayM4_SetStretchPlay','value':function value(_0x3a1633,_0x1a94a6){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetStretchPlay','color:\x20red'),0x0):(this['setStretchPlayTime']=_0x3a1633,this['setStretchPlaySpeed']=_0x1a94a6,0x0==this['decodeEngine']?_0x5be749['_JSPlayM4_SetStretchPlay'](this['port'],_0x3a1633,_0x1a94a6):0x0);}},{'key':'JSPlayM4_SetAutoSmoothPlay','value':function value(_0x12c20c){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetAutoSmoothPlay','color:\x20red'),0x0):(this['autoSmoothPlayModel']=_0x12c20c,0x0==this['decodeEngine']?_0x5be749['_JSPlayM4_SetAutoSmoothPlay'](this['port'],_0x12c20c):0x0);}},{'key':'JSPlayM4_KeepPlaySpeed','value':function value(_0x3e3621){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_KeepPlaySpeed','color:\x20red'),0x0):(this['keepPlaySpeed']=_0x3e3621,0x0==this['decodeEngine']?_0x5be749['_JSPlayM4_KeepPlaySpeed'](this['port'],_0x3e3621):0x0);}},{'key':'JSPlayM4_IgnoreHeaderAudioDefine','value':function value(_0x8babcd){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_IgnoreHeaderAudioDefine','color:\x20red'),0x0):_0x5be749['_JSPlayM4_IgnoreHeaderAudioDefine'](this['port'],_0x8babcd);}},{'key':'JSPlayM4_SetSycGroup','value':function value(_0x1a755e){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetSycGroup','color:\x20red'),0x0):_0x5be749['_JSPlayM4_SetSycGroup'](this['port'],_0x1a755e);}},{'key':'JSPlayM4_FEC_SetCanvasID','value':function value(){var _0x19a6db=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_SetCanvasID','color:\x20red'),0x0;this['FECCanvasID']=_0x19a6db;var _0x1e5d37=0x1;if(null!=_0x19a6db&&''!=_0x19a6db){if(this['FECcanvasIDArray']=_0x19a6db['split'](','),0x1===this['decodeEngine'])this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'SetCanvasID'}):null!=this['pcVideoManager']?_0x1e5d37=this['pcVideoManager']['FEC_SetCanvasID'](_0x19a6db):console['info']('%c\x20JSPlayM4_FEC_SetCanvasID\x20this.pcVideoManager\x20is\x20null','color:\x20red');else {for(var _0x21dbb9='',_0x47ce44=0x0;_0x47ce44<this['FECcanvasIDArray']['length'];_0x47ce44++)_0x47ce44==this['FECcanvasIDArray']['length']-0x1?_0x21dbb9+='#'+this['FECcanvasIDArray'][_0x47ce44]:_0x21dbb9+='#'+this['FECcanvasIDArray'][_0x47ce44]+',';if(0x0!=this['FECcanvasIDArray']['length'])for(var _0x274249=0x0;_0x274249<this['FECcanvasIDArray']['length'];_0x274249++){var _0x5cea98=document['getElementById'](this['FECcanvasIDArray'][_0x274249]);if(_0x5cea98){var _0x336210=_0x5cea98['cloneNode'](!0x0),_0x23c6ef=_0x5cea98['parentNode'];_0x23c6ef['replaceChild'](_0x336210,_0x5cea98);}}var _0x4b11cf=this['_stringToBytes'](_0x21dbb9),_0x1d3da4=0x2*_0x21dbb9['length'];if(this['pFECTotalCanvasIDData']=_0x5be749['_malloc'](_0x1d3da4),null===this['pFECTotalCanvasIDData'])return 0x0;var _0x364962=_0x5be749['HEAPU8']['subarray'](this['pFECTotalCanvasIDData'],this['pFECTotalCanvasIDData']+_0x1d3da4),_0x5b2436=new Uint8Array(_0x1d3da4);_0x364962['set'](_0x5b2436,0x0),_0x364962['set'](new Uint8Array(_0x4b11cf)),_0x364962=null,_0x5b2436=null,_0x1e5d37=_0x5be749['_JSPlayM4_FEC_SetCanvasID'](this['port'],this['pFECTotalCanvasIDData']);}}else console['log']('\x20JSPlayM4_FEC_SetCanvasID\x20canvasID\x20is\x20null\x20:'+_0x19a6db),_0x1e5d37=0x0;return _0x1e5d37;}},{'key':'JSPlayM4_FEC_ResetCorrectType','value':function value(_0x240815,_0x37a936,_0x7eb7f8){if(this['printfFlag']&&console['log']('JSPlayM4_FEC_ResetCorrectType\x201\x20decodeEngine:'+this['decodeEngine']+',hasWebWorker:'+this['hasWebWorker']+',fishSubPort:'+_0x240815+',placeType:'+_0x37a936+',correctType:'+_0x7eb7f8),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_ResetCorrectType','color:\x20red'),0x0;this['FECPlaceType']=_0x37a936,this['FECCorrectType']=_0x7eb7f8;var _0x47162f=0x1;return 0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECResetCorrectType','fishSubPort':_0x240815,'placeType':_0x37a936,'correctType':_0x7eb7f8}):_0x47162f=0x0:_0x47162f=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_ResetCorrectType'](_0x240815,_0x37a936,_0x7eb7f8):0x0:_0x47162f=_0x5be749['_JSPlayM4_FEC_ResetCorrectType'](this['port'],_0x240815,_0x37a936,_0x7eb7f8),_0x47162f;}},{'key':'JSPlayM4_FEC_GetPort','value':function value(_0xfef3f4,_0x3a2f01){var _0x31c2fd=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:null;if(this['printfFlag']&&console['log']('>>>JS\x20JSPlayM4_FEC_GetPort\x20this.decodeEngine：'+this['decodeEngine']+',placeType:'+_0xfef3f4+',correctType:'+_0x3a2f01),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_GetPort','color:\x20red'),0x0;var _0x48334f=-0x1;return this['FECGetPortCB']=_0x31c2fd,0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECGetPort','placeType':_0xfef3f4,'correctType':_0x3a2f01}):_0x48334f=-0x1:(null!=this['pcVideoManager']?((_0x48334f=this['pcVideoManager']['FEC_GetPort'](_0xfef3f4,_0x3a2f01))<0x1||_0x48334f>0x1f||null==_0x48334f)&&(_0x48334f=-0x1):_0x48334f=-0x1,null!=this['FECGetPortCB']&&this['FECGetPortCB'](_0x48334f)):(((_0x48334f=_0x5be749['_JSPlayM4_FEC_GetPort'](this['port'],_0xfef3f4,_0x3a2f01))<0x1||_0x48334f>0x1f||null==_0x48334f)&&(_0x48334f=-0x1),null!=this['FECGetPortCB']&&this['FECGetPortCB'](_0x48334f)),_0x48334f;}},{'key':'JSPlayM4_FEC_Enable','value':function value(_0x386a1e){if(this['printfFlag']&&console['log']('>>>JS\x20JSPlayM4_FEC_Enable\x20this.decodeEngine：'+this['decodeEngine']+',fishSubPort:'+_0x386a1e),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_Enable','color:\x20red'),0x0;var _0x387bc5=0x1;return 0x0==_0x386a1e?console['log']('fishPort\x20is\x200\x20,main\x20canvas\x20doesn\x27t\x20need\x20call\x20FEC_Enable'):0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECEnable','fishSubPort':_0x386a1e}):_0x387bc5=0x0:_0x387bc5=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_Enable'](_0x386a1e):0x0:_0x387bc5=_0x5be749['_JSPlayM4_FEC_Enable'](this['port'],_0x386a1e),_0x387bc5;}},{'key':'JSPlayM4_FEC_SetParam','value':function value(_0xa16ef6,_0x322b76){if(this['printfFlag']&&console['log']('>>>JS\x20JSPlayM4_FEC_SetParam\x201\x20this.decodeEngine：'+this['decodeEngine']+',fishSubPort:'+_0xa16ef6+',upDateType:'+_0x322b76['upDateType']+',fValue:'+_0x322b76['fValue']),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_SetParam','color:\x20red'),0x0;var _0x48cdb8=0x1;if(0x1===this['decodeEngine'])this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECSetParam','fishSubPort':_0xa16ef6,'param2d':_0x322b76}):_0x48cdb8=0x0:_0x48cdb8=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_SetParam'](_0xa16ef6,_0x322b76):0x0;else {var _0x5c653d=_0x5be749['_JSPlayM4_GetFishEye2DParam']();null!=_0x322b76['upDateType']&&(_0x5be749['HEAP32'][_0x5c653d>>0x2]=_0x322b76['upDateType']),null!=_0x322b76['fPTZParam']&&null!=_0x322b76['fPTZParam']['fPTZPositionX']&&null!=_0x322b76['fPTZParam']['fPTZPositionY']&&(_0x5be749['HEAPF32'][_0x5c653d+0x8>>0x2]=_0x322b76['fPTZParam']['fPTZPositionX'],_0x5be749['HEAPF32'][_0x5c653d+0xc>>0x2]=_0x322b76['fPTZParam']['fPTZPositionY']),null!=_0x322b76['fPTZParam']&&(_0x5be749['HEAPF32'][_0x5c653d+0x20>>0x2]=_0x322b76['fPTZZoom']),null!=_0x322b76['fValue']&&(_0x5be749['HEAPF32'][_0x5c653d+0x24>>0x2]=_0x322b76['fValue']),_0x48cdb8=_0x5be749['_JSPlayM4_FEC_SetParam'](this['port'],_0xa16ef6);}return _0x48cdb8;}},{'key':'JSPlayM4_FEC_GetParam','value':function value(_0x249f94){var _0x224558=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:null;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_GetParam','color:\x20red'),0x0;var _0x4e98a4={'fRXLeft':0x0,'fRXRight':0x0,'fRYTop':0x0,'fRYBottom':0x0,'bBlack':0x0,'bCut':0x0,'nFishParamType':0x0,'fAngle':0x0,'fZoom':0x0,'fPTZX':0x0,'fPTZY':0x0,'emCorrectType':0x0};return this['FECParamCB']=_0x224558,0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']&&this['decodeWorker']['postMessage']({'command':'FECGetParam','fishSubPort':_0x249f94}):null!=this['pcVideoManager']&&(this['pcVideoManager']['FEC_GetParam'](_0x249f94,_0x4e98a4),null!=this['FECParamCB']&&this['FECParamCB'](_0x4e98a4)):console['info']('%c\x20softDecode\x20not\x20support\x20JSPlayM4_FEC_GetParam','color:\x20red'),0x1;}},{'key':'JSPlayM4_FEC_SetViewParam','value':function value(_0x41fd40,_0x2bcb8b,_0x50f282){if(this['printfFlag']&&console['log']('>>>JS\x20JSPlayM4_FEC_SetViewParam\x20this.decodeEngine：'+this['decodeEngine']+',fishSubPort:'+_0x41fd40+',upDateType:'+_0x2bcb8b+',fValue:'+_0x50f282),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_SetViewParam','color:\x20red'),0x0;var _0x2368f2=0x1;return 0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECSetViewParam','fishSubPort':_0x41fd40,'upDateType':_0x2bcb8b,'fValue':_0x50f282}):_0x2368f2=0x0:_0x2368f2=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_SetViewParam'](_0x41fd40,_0x2bcb8b,_0x50f282):0x0:_0x2368f2=_0x5be749['_JSPlayM4_FEC_SetViewParam'](this['port'],_0x41fd40,_0x2bcb8b,_0x50f282),_0x2368f2;}},{'key':'JSPlayM4_FEC_GetViewParam','value':function value(_0x587528,_0x1f1424,_0x53cc5b){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_GetViewParam','color:\x20red'),0x0;var _0x1550f7=0x1;this['FECViewParamCB']=_0x53cc5b;var _0x2e5546={'fValue':-0x1};if(0x1===this['decodeEngine'])this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECGetViewParam','fishSubPort':_0x587528,'upDateType':_0x1f1424}):_0x1550f7=0x0:null!=this['pcVideoManager']?(_0x1550f7=this['pcVideoManager']['FEC_GetViewParam'](_0x587528,_0x1f1424,_0x2e5546),null!=this['FECViewParamCB']&&this['FECViewParamCB'](_0x2e5546)):_0x1550f7=0x0;else {var _0x2daa7e=_0x5be749['_JSPlayM4_GetViewParam'](this['port'],_0x587528,_0x1f1424);_0x2e5546['fValue']=_0x2daa7e,null!=this['FECViewParamCB']&&this['FECViewParamCB'](_0x2e5546);}return _0x1550f7;}},{'key':'JSPlayM4_FEC_SetWnd','value':function value(_0x34bdf5,_0x46eef5){if(this['printfFlag']&&console['log']('>>>JS\x20JSPlayM4_FEC_SetWnd\x20this.decodeEngine：'+this['decodeEngine']+',fishSubPort:'+_0x34bdf5+',hWnd:'+_0x46eef5),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_SetWnd','color:\x20red'),0x0;var _0x48a202=0x1;if(0x0==_0x34bdf5)console['log']('fishPort\x20is\x200\x20,main\x20canvas\x20doesn\x27t\x20need\x20call\x20FEC_SetWnd');else {if(null!=_0x46eef5){if(0x1===this['decodeEngine']){var _0xb0990a=document['getElementById'](_0x46eef5);if(this['hasWebWorker']){var _0x43b5d0=_0xb0990a['transferControlToOffscreen']();null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECSetWnd','fishSubPort':_0x34bdf5,'offscrrenCnv':_0x43b5d0},[_0x43b5d0]):_0x48a202=0x0;}else _0x48a202=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_SetWnd'](_0x34bdf5,_0xb0990a):0x0;}else {var _0x36dcf8=null;if(null!=_0x46eef5){var _0x4bad31=this['_stringToBytes']('#'+_0x46eef5),_0xcb310d=0x2*(_0x46eef5['length']+0x1);_0x36dcf8=_0x5be749['_malloc'](_0xcb310d);var _0x5dae6f=_0x5be749['HEAPU8']['subarray'](_0x36dcf8,_0x36dcf8+_0xcb310d),_0x36a6b8=new Uint8Array(_0xcb310d);_0x5dae6f['set'](_0x36a6b8,0x0),_0x5dae6f['set'](new Uint8Array(_0x4bad31)),_0x5dae6f=null,_0x36a6b8=null;}_0x48a202=_0x5be749['_JSPlayM4_FEC_SetWnd'](this['port'],_0x34bdf5,_0x36dcf8),null!=_0x36dcf8&&(_0x5be749['_free'](_0x36dcf8),_0x36dcf8=null);}}else console['log']('>>>JS\x20JSPlayM4_FEC_SetWnd\x20hwnd\x20error\x20this.decodeEngine：'+this['decodeEngine']+',fishSubPort:'+_0x34bdf5+',hWnd:'+_0x46eef5),_0x48a202=0x0;}return _0x48a202;}},{'key':'JSPlayM4_FEC_Disable','value':function value(){var _0x516a8d=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:0x0,_0x449eb6=!(arguments['length']>0x1&&void 0x0!==arguments[0x1])||arguments[0x1],_0x3e3676=arguments['length']>0x2&&void 0x0!==arguments[0x2]&&arguments[0x2],_0x156321=0x1;return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_Disable','color:\x20red'),0x0):(0x0==_0x516a8d?console['log']('fishPort\x20is\x200\x20,main\x20canvas\x20doesn\x27t\x20need\x20call\x20FEC_Disable'):0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECDisable','fishSubPort':_0x516a8d,'clearFECCanvas':_0x449eb6,'clearContext':_0x3e3676}):_0x156321=0x0:_0x156321=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_Disable'](_0x516a8d,_0x449eb6,_0x3e3676):0x0:_0x156321=_0x5be749['_JSPlayM4_FEC_Disable'](this['port'],_0x516a8d,_0x449eb6,_0x3e3676),_0x156321);}},{'key':'JSPlayM4_FEC_DelPort','value':function value(_0xab84fc){if(this['printfFlag']&&console['log']('>>>JS\x20JSPlayM4_FEC_DelPort\x20this.decodeEngine：'+this['decodeEngine']+',fishSubPort:'+_0xab84fc),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_DelPort','color:\x20red'),0x0;var _0xa7869=0x1;return 0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECDelPort','fishSubPort':_0xab84fc}):_0xa7869=0x0:_0xa7869=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_DelPort'](_0xab84fc):0x0:_0xa7869=_0x5be749['_JSPlayM4_FEC_DelPort'](this['port'],_0xab84fc),_0xa7869;}},{'key':'JSPlayM4_FEC_SetDisplayRegion','value':function value(_0x4aff3c){var _0x523421=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x0,_0x3ae86a=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x566572=arguments['length']>0x3?arguments[0x3]:void 0x0,_0x4d81d8=arguments['length']>0x4&&void 0x0!==arguments[0x4]?arguments[0x4]:null,_0x22e089=arguments['length']>0x5?arguments[0x5]:void 0x0,_0x8dbdd0=arguments['length']>0x6?arguments[0x6]:void 0x0;if(this['printfFlag']&&console['log']('>>>JS\x20JSPlayM4_FEC_SetDisplayRegion\x20this.decodeEngine：'+this['decodeEngine']+',fishSubPort:'+_0x4aff3c+',left:'+_0x566572['left']+',right:'+_0x566572['right']+',top:'+_0x566572['top']+',bottom:'+_0x566572['bottom']),null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_SetDisplayRegion','color:\x20red'),0x0;var _0x58dc3f=0x1,_0x52e439=_0x566572['left'],_0x388787=_0x566572['right'],_0x1fbf55=_0x566572['top'],_0x5ddf38=_0x566572['bottom'];if('number'!=typeof _0x52e439||'number'!=typeof _0x388787||'number'!=typeof _0x5ddf38||'number'!=typeof _0x1fbf55)return console['log']('param\x20is\x20not\x20number'),0x0;if(_0x22e089){if(_0x8dbdd0){if(_0x52e439<0x0||_0x388787<0x0||_0x1fbf55<0x0||_0x5ddf38<0x0)return 0x0;0x0!==this['iFECZoomNum']&&(_0x52e439=Math['round'](_0x52e439/this['iFECRatio_x'])+this['stFECDisplayRect']['left'],_0x1fbf55=Math['round'](_0x1fbf55/this['iFECRatio_y'])+this['stFECDisplayRect']['top'],_0x388787=Math['round'](_0x388787/this['iFECRatio_x'])+this['stFECDisplayRect']['left'],_0x5ddf38=Math['round'](_0x5ddf38/this['iFECRatio_y'])+this['stFECDisplayRect']['top']);}}else _0x52e439=0x0,_0x388787=this['canvasWidth'],_0x1fbf55=0x0,_0x5ddf38=this['canvasHeight'],this['iFECZoomNum']=0x0,this['iFECRatio_x']=0x1,this['iFECRatio_y']=0x1;if(this['stFECDisplayRect']={'top':_0x1fbf55,'left':_0x52e439,'right':_0x388787,'bottom':_0x5ddf38},_0x388787-_0x52e439<0x10||_0x5ddf38-_0x1fbf55<0x10||_0x388787-_0x52e439>this['canvasWidth']||_0x5ddf38-_0x1fbf55>this['canvasHeight'])return 0x0;if(0x1===this['decodeEngine']){var _0x5add6a=_0x52e439/this['canvasWidth']*this['width'],_0x3bff9d=_0x388787/this['canvasWidth']*this['width'],_0x3e728b=_0x1fbf55/this['canvasHeight']*this['height'],_0xae92b5=_0x5ddf38/this['canvasHeight']*this['height'];this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECSetDisplayRegion','fishSubPort':_0x4aff3c,'type':_0x523421,'regionNum':_0x3ae86a,'sx':_0x5add6a,'sy':_0x3e728b,'sw':_0x3bff9d-_0x5add6a,'sh':_0xae92b5-_0x3e728b}):_0x58dc3f=0x0:_0x58dc3f=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_SetDisplayRegion'](_0x4aff3c,_0x523421,_0x3ae86a,_0x5add6a,_0x3e728b,_0x3bff9d-_0x5add6a,_0xae92b5-_0x3e728b):0x0;}else {if(null!==_0x5be749){var _0x4b9cef=_0x52e439/this['canvasWidth']*0x3e8,_0x3cdba6=_0x388787/this['canvasWidth']*0x3e8,_0x5f59c2=_0x1fbf55/this['canvasHeight']*0x3e8,_0x1ce66c=_0x5ddf38/this['canvasHeight']*0x3e8;_0x58dc3f=_0x22e089?_0x5be749['_JSPlayM4_FEC_SetDisplayRegion'](this['port'],_0x4aff3c,_0x523421,_0x3ae86a,_0x4b9cef,_0x3cdba6,_0x5f59c2,_0x1ce66c,_0x4d81d8,_0x22e089):_0x5be749['_JSPlayM4_FEC_SetDisplayRegion'](this['port'],_0x4aff3c,0x0,0x0,0x0,0x0,0x0,0x0,null,_0x22e089);}else _0x58dc3f=0x0;}return _0x8dbdd0&&(this['iFECRatio_x']=this['canvasWidth']/(_0x388787-_0x52e439),this['iFECRatio_y']=this['canvasHeight']/(_0x5ddf38-_0x1fbf55),this['iFECZoomNum']++),_0x58dc3f;}},{'key':'JSPlayM4_FEC_SetBackCilling','value':function value(_0x16544f,_0x132759){var _0x6af514=0x1;return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_SetBackCilling','color:\x20red'),0x0):(0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECSetBackCilling','fishSubPort':_0x16544f,'bValue':_0x132759}):_0x6af514=0x0:_0x6af514=null!=this['pcVideoManager']?this['pcVideoManager']['FEC_SetBackCilling'](_0x16544f,_0x132759):0x0:_0x6af514=_0x5be749['_JSPlayM4_FEC_SetBackCilling'](this['port'],_0x16544f,_0x132759),_0x6af514);}},{'key':'JSPlayM4_FEC_GetPTZPort','value':function value(_0x5d0b29,_0x54e2ba){var _0x4d1f8e=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x5db9c8=arguments['length']>0x3&&void 0x0!==arguments[0x3]?arguments[0x3]:null;if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_GetPTZPort','color:\x20red'),0x0;var _0x33ea9d=-0x1;return this['FECGetPTZPortCB']=_0x5db9c8,0x1===this['decodeEngine']?this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECGetPTZPort','fPositionX':_0x5d0b29,'fPositionY':_0x54e2ba}):_0x33ea9d=0x0:null!=this['pcVideoManager']?(((_0x33ea9d=this['pcVideoManager']['FEC_GetPTZPort'](_0x4d1f8e,_0x5d0b29,_0x54e2ba))<0x0||_0x33ea9d>0x1f||null==_0x33ea9d)&&(_0x33ea9d=-0x1),null!=this['FECGetPTZPortCB']&&this['FECGetPTZPortCB'](_0x33ea9d)):_0x33ea9d=-0x1:console['info']('%c\x20softDecoder\x20not\x20support\x20JSPlayM4_FEC_GetPTZPort','color:\x20red'),_0x33ea9d;}},{'key':'JSPlayM4_FEC_SetPTZDisplayMode','value':function value(_0x5e2bcf){if(null===_0x5be749)return console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_FEC_SetPTZDisplayMode','color:\x20red'),0x0;return 0x1===this['decodeEngine']&&(this['hasWebWorker']?null!=this['decodeWorker']?this['decodeWorker']['postMessage']({'command':'FECSetPTZDisplayMode','ptzMode':_0x5e2bcf}):0x0:null!=this['pcVideoManager']?this['pcVideoManager']['FEC_SetPTZDisplayMode'](_0x5e2bcf):0x0),0x1;}},{'key':'JSPlayM4_FEC_PTZ2Window','value':function value(_0x20838a,_0x727c0b,_0x320647,_0x44c0a1){return 0x1;}},{'key':'JSPlayM4_FEC_PTZ2Window2','value':function value(_0x245ba5,_0x23328,_0x11b804){return 0x1;}},{'key':'JSPlayM4_InputPrivateInfo','value':function value(_0x45ddcb,_0x255ae5,_0xb0effb){var _0x4016cc={};_0x4016cc['linesNum']=_0x5be749['HEAP32'][_0x45ddcb>>0x2],_0x4016cc['absTimeStamp']=_0x5be749['HEAP32'][_0x45ddcb+0x4>>0x2],_0x4016cc['stDrawLinesArray']=[];for(var _0x48c7fc=0x0;_0x48c7fc<_0x4016cc['linesNum'];_0x48c7fc++){_0x4016cc['stDrawLinesArray'][_0x48c7fc]={},_0x4016cc['stDrawLinesArray'][_0x48c7fc]['vertex_num']=_0x5be749['HEAP32'][_0x45ddcb+0x8+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['lineWidth']=_0x5be749['HEAP32'][_0x45ddcb+0xc+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['bFill']=_0x5be749['HEAP32'][_0x45ddcb+0x10+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['bLoop']=_0x5be749['HEAP32'][_0x45ddcb+0x14+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['color']={},_0x4016cc['stDrawLinesArray'][_0x48c7fc]['color']['R']=_0x5be749['HEAPF32'][_0x45ddcb+0x18+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['color']['G']=_0x5be749['HEAPF32'][_0x45ddcb+0x1c+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['color']['B']=_0x5be749['HEAPF32'][_0x45ddcb+0x20+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['color']['A']=_0x5be749['HEAPF32'][_0x45ddcb+0x24+0x70*_0x48c7fc>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['stPoint']=[];for(var _0x2a2f89=0x0;_0x2a2f89<_0x4016cc['stDrawLinesArray'][_0x48c7fc]['vertex_num'];_0x2a2f89++)_0x4016cc['stDrawLinesArray'][_0x48c7fc]['stPoint'][_0x2a2f89]={},_0x4016cc['stDrawLinesArray'][_0x48c7fc]['stPoint'][_0x2a2f89]['x']=_0x5be749['HEAPF32'][_0x45ddcb+0x28+0x70*_0x48c7fc+0x8*_0x2a2f89>>0x2],_0x4016cc['stDrawLinesArray'][_0x48c7fc]['stPoint'][_0x2a2f89]['y']=_0x5be749['HEAPF32'][_0x45ddcb+0x2c+0x70*_0x48c7fc+0x8*_0x2a2f89>>0x2];}var _0x57a26b={},_0x3abd46={};return 0x1===this['decodeEngine']&&(this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'InputPrivateInfo','linesInfo':_0x4016cc,'fontInfo':_0x57a26b,'ImageInfo':_0x3abd46}):null!=this['pcVideoManager']&&this['pcVideoManager']['InputPrivateInfo'](_0x4016cc,_0x57a26b,_0x3abd46)),0x1;}},{'key':'JSPlayM4_SetWaterMarkFont','value':function value(_0x469f8e){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetWaterMarkFont','color:\x20red'),0x0):(0x1===this['decodeEngine']?this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'SetWaterMarkFont','fontParam':_0x469f8e}):null!=this['pcVideoManager']&&this['pcVideoManager']['SetWaterMarkFont'](_0x469f8e):console['log']('%c1>soft\x20decode\x20not\x20support\x20SetWaterMarkFont,','color:\x20red'),0x1);}},{'key':'JSPlayM4_SetWaterMarkImage','value':function value(_0x3ba044){return null===_0x5be749?(console['info']('%coJSPlayerWasm\x20is\x20null,can\x27t\x20JSPlayM4_SetWaterMarkImage','color:\x20red'),0x0):(0x1===this['decodeEngine']?this['hasWebWorker']?this['decodeWorker']['postMessage']({'command':'SetWaterMarkImage','imageParam':_0x3ba044}):null!=this['pcVideoManager']&&this['pcVideoManager']['SetWaterMarkImage'](_0x3ba044):console['log']('%c1>soft\x20decode\x20not\x20support\x20SetWaterMarkImage,','color:\x20red'),0x1);}},{'key':'_stringToBytes','value':function value(_0x1954f9){for(var _0xbce8fd,_0x5622a4,_0x982117=[],_0x3abb86=0x0;_0x3abb86<_0x1954f9['length'];_0x3abb86++){_0xbce8fd=_0x1954f9['charCodeAt'](_0x3abb86),_0x5622a4=[];do{_0x5622a4['push'](0xff&_0xbce8fd),_0xbce8fd>>=0x8;}while(_0xbce8fd);_0x982117=_0x982117['concat'](_0x5622a4['reverse']());}return _0x982117;}},{'key':'_downloadFile','value':function value(_0x485313,_0x2a5260){var _0x2172c0=_0x485313;_0x485313 instanceof Blob||_0x485313 instanceof File||(_0x2172c0=new Blob([_0x485313]));var _0x967b36=window['URL']['createObjectURL'](_0x2172c0),_0x967a11=window['document']['createElement']('a');_0x967a11['href']=_0x967b36,_0x967a11['download']=_0x2a5260;var _0x1ab2a7=document['createEvent']('MouseEvents');_0x1ab2a7['initEvent']('click',!0x0,!0x0),_0x967a11['dispatchEvent'](_0x1ab2a7);}},{'key':'downloadRTPData','value':function value(_0xaec5d2){if(this['bWriteData']){var _0x24a5b1=_0xaec5d2,_0x2fcec5=this['aTotalBuffer']['length'];console['log']('totalLength:'+_0x2fcec5);for(var _0x1e69d2=0x0,_0x512ca5=_0x24a5b1['length'];_0x1e69d2<_0x512ca5;_0x1e69d2++)this['aTotalBuffer'][_0x2fcec5+_0x1e69d2]=_0x24a5b1[_0x1e69d2];this['iFrameNum']++,_0x24a5b1=null,console['log']('downloadRTPdata\x20iFrameNum:'+this['iFrameNum']);}if(this['bWriteData']&&this['iFrameNum']>=0x258){console['log']('download600RawData');var _0x45a175=new Uint8Array(this['aTotalBuffer']);this['_downloadFile'](_0x45a175,'Raw600.data'),this['aTotalBuffer']['splice'](0x0,this['aTotalBuffer']['length']),this['bWriteData']=!0x1,this['iFrameNum']=0x0,_0x45a175=null;}}},{'key':'downloadAudioANRData','value':function value(_0x369be4){if(this['bWriteAudioANRData']){for(var _0x4b6a0d=_0x369be4,_0x2aaf04=this['audioANRBuffer']['length'],_0x5bac89=0x0,_0x50f2a0=_0x4b6a0d['length'];_0x5bac89<_0x50f2a0;_0x5bac89++)this['audioANRBuffer'][_0x2aaf04+_0x5bac89]=_0x4b6a0d[_0x5bac89];this['iAudioANRFrameNum']++,_0x4b6a0d=null,console['log']('download\x20ANR\x20Decode\x20AudioData\x20FrameNum:'+this['iAudioANRFrameNum']);}if(this['bWriteAudioANRData']&&this['iAudioANRFrameNum']>=WRITE_PCM_NUM){console['log']('download'+WRITE_PCM_NUM+'this.audioANRBuffer');var _0x4edad1=new Uint8Array(this['audioANRBuffer']);this['_downloadFile'](_0x4edad1,'AudioANR.data'),this['audioANRBuffer']['splice'](0x0,this['audioANRBuffer']['length']),this['bWriteAudioANRData']=!0x1,this['iAudioANRFrameNum']=0x0,_0x4edad1=null;}}},{'key':'downloadAudioBeforeDecodeData','value':function value(_0x51eba5){if(this['bWriteAudioBefDecData']){for(var _0x224d57=_0x51eba5,_0x4e0f8b=this['audioBefDecBuffer']['length'],_0x3e26ec=0x0,_0x28a910=_0x224d57['length'];_0x3e26ec<_0x28a910;_0x3e26ec++)this['audioBefDecBuffer'][_0x4e0f8b+_0x3e26ec]=_0x224d57[_0x3e26ec];this['iAudioBefDecFrameNum']++,_0x224d57=null,console['log']('download\x201\x20Before\x20Decode\x20AudioData\x20FrameNum:'+this['iAudioBefDecFrameNum']);}if(this['bWriteAudioBefDecData']&&this['iAudioBefDecFrameNum']>=WRITE_PCM_NUM){console['log']('download'+WRITE_PCM_NUM+'this.audioBefDecBuffer');var _0xe0e2ee=new Uint8Array(this['audioBefDecBuffer']);this['_downloadFile'](_0xe0e2ee,'AudioBeforeDecode.data'),this['audioBefDecBuffer']['splice'](0x0,this['audioBefDecBuffer']['length']),this['bWriteAudioBefDecData']=!0x1,this['iAudioBefDecFrameNum']=0x0,_0xe0e2ee=null;}}},{'key':'downloadAudioAfterDecodeData','value':function value(_0x5cae23){if(this['bWriteAudioAfterDecode']){for(var _0x231b46=_0x5cae23,_0x14dc53=this['audioAfDecOUTBuffer']['length'],_0x49ff9e=0x0,_0x51a330=_0x231b46['length'];_0x49ff9e<_0x51a330;_0x49ff9e++)this['audioAfDecOUTBuffer'][_0x14dc53+_0x49ff9e]=_0x231b46[_0x49ff9e];this['iAudioAfDecOUTFrameNum']++,_0x231b46=null,console['log']('download\x202\x20After\x20Decode\x20AudioData\x20FrameNum:'+this['iAudioAfDecOUTFrameNum']);}if(this['bWriteAudioAfterDecode']&&this['iAudioAfDecOUTFrameNum']>=WRITE_PCM_NUM){console['log']('download'+WRITE_PCM_NUM+'this.audioAfDecOUTBuffer');var _0x4914a2=new Uint8Array(this['audioAfDecOUTBuffer']);this['_downloadFile'](_0x4914a2,'AudioAfterDecode.data'),this['audioAfDecOUTBuffer']['splice'](0x0,this['audioAfDecOUTBuffer']['length']),this['bWriteAudioAfterDecode']=!0x1,this['iAudioAfDecOUTFrameNum']=0x0,_0x4914a2=null;}}},{'key':'downloadAudioBeforeRenderData','value':function value(_0x3e1a67){if(this['bWriteAudioBeforeRender']){for(var _0x1066d8=_0x3e1a67,_0x5cb696=this['audioBeRenOUTBuffer']['length'],_0x17af82=0x0,_0x579e83=_0x1066d8['length'];_0x17af82<_0x579e83;_0x17af82++)this['audioBeRenOUTBuffer'][_0x5cb696+_0x17af82]=_0x1066d8[_0x17af82];this['iAudioBeRenOUTFrameNum']++,_0x1066d8=null,console['log']('download\x203\x20Before\x20Render\x20AudioData\x20FrameNum:'+this['iAudioBeRenOUTFrameNum']);}if(this['bWriteAudioBeforeRender']&&this['iAudioBeRenOUTFrameNum']>=WRITE_PCM_NUM){console['log']('download'+WRITE_PCM_NUM+'this.audioBeRenOUTBuffer');var _0x1e334c=new Uint8Array(this['audioBeRenOUTBuffer']);this['_downloadFile'](_0x1e334c,'AudioBeforeRender.data'),this['audioBeRenOUTBuffer']['splice'](0x0,this['audioBeRenOUTBuffer']['length']),this['bWriteAudioBeforeRender']=!0x1,this['iAudioBeRenOUTFrameNum']=0x0,_0x1e334c=null;}}},{'key':'downloadAudioResampleData','value':function value(_0x23b7a6){if(this['bWriteAudioResampleData']){for(var _0x16bdf4=_0x23b7a6,_0x206dca=this['audioResampleBuffer']['length'],_0x2503be=0x0,_0x399acf=_0x16bdf4['length'];_0x2503be<_0x399acf;_0x2503be++)this['audioResampleBuffer'][_0x206dca+_0x2503be]=_0x16bdf4[_0x2503be];this['iAudioResampleFrameNum']++,_0x16bdf4=null,console['log']('download\x203\x20Resample\x20Decode\x20AudioData\x20\x20FrameNum:'+this['iAudioResampleFrameNum']);}if(this['bWriteAudioResampleData']&&this['iAudioResampleFrameNum']>=WRITE_PCM_NUM){console['log']('download'+WRITE_PCM_NUM+'this.audioResampleBuffer');var _0x31f117=new Uint8Array(this['audioResampleBuffer']);this['_downloadFile'](_0x31f117,'AudioResampleData.data'),this['audioResampleBuffer']['splice'](0x0,this['audioResampleBuffer']['length']),this['bWriteAudioResampleData']=!0x1,this['iAudioResampleFrameNum']=0x0,_0x31f117=null;}}}]),_0x1d62de;}();window['_getFExplore']=function(){var _0x31c324,_0x30bc06={},_0x281c56=navigator['userAgent']['toLowerCase']();if((_0x31c324=_0x281c56['match'](/rv:([\d.]+)\) like gecko/))||(_0x31c324=_0x281c56['match'](/msie ([\d\.]+)/))?_0x30bc06['ie']=_0x31c324[0x1]:(_0x31c324=_0x281c56['match'](/edge\/([\d\.]+)/))?_0x30bc06['edge']=_0x31c324[0x1]:(_0x31c324=_0x281c56['match'](/firefox\/([\d\.]+)/))?_0x30bc06['firefox']=_0x31c324[0x1]:(_0x31c324=_0x281c56['match'](/(?:opera|opr).([\d\.]+)/))?_0x30bc06['opera']=_0x31c324[0x1]:(_0x31c324=_0x281c56['match'](/chrome\/([\d\.]+)/))?_0x30bc06['chrome']=_0x31c324[0x1]:(_0x31c324=_0x281c56['match'](/version\/([\d\.]+).*safari/))&&(_0x30bc06['safari']=_0x31c324[0x1]),_0x30bc06['chrome']){var _0x433b5c=_0x30bc06['chrome'],_0x23ff55=_0x433b5c['indexOf']('.');return Number(_0x433b5c['substring'](0x0,_0x23ff55));}return _0x30bc06['ie']?console['info']('%c1>your\x20browser\x20is\x20IE\x20,it\x20does\x20not\x20support\x20play\x20without\x20plugin','color:\x20red'):_0x30bc06['safari']?console['info']('%c1>your\x20browser\x20is\x20safari\x20,it\x20does\x20not\x20support\x20softV2.0\x20or\x20hard\x20decode','color:\x20red'):_0x30bc06['firefox']?console['info']('%c1>your\x20browser\x20is\x20Firefox\x20,it\x20only\x20support\x20soft\x20decode','color:\x20red'):console['info']('%c1>your\x20browser\x20does\x20not\x20support\x20play\x20without\x20plugin','color:\x20red'),-0x1;},window['JSPlayM4_AdditionDataCBFun']=function(_0x370c69,_0xe0c9af,_0x378dac){if(null!=_0x32f317[_0x378dac][_0x370c69]){var _0x144acd={};_0x144acd['dataType']=_0x5be749['HEAP32'][_0xe0c9af>>0x2],_0x144acd['dataStrVersion']=_0x5be749['HEAP32'][_0xe0c9af+0x4>>0x2],_0x144acd['dataTimeStamp']=_0x5be749['HEAP32'][_0xe0c9af+0x8>>0x2],_0x144acd['dataLength']=_0x5be749['HEAP32'][_0xe0c9af+0xc>>0x2],_0x144acd['pData']=_0x5be749['HEAP32'][_0xe0c9af+0x10>>0x2],_0x144acd['additionDataBuffer']=new Uint8Array(_0x144acd['dataLength']),_0x144acd['additionDataBuffer']['set'](_0x5be749['HEAPU8']['subarray'](_0x144acd['pData'],_0x144acd['pData']+_0x144acd['dataLength'])),_0x32f317[_0x378dac][_0x370c69]['hasOwnProperty']('addtionCallBackFun')&&null!=_0x32f317[_0x378dac][_0x370c69]['addtionCallBackFun']&&null!=_0x32f317[_0x378dac][_0x370c69]['addtionCallBackFun']&&_0x32f317[_0x378dac][_0x370c69]['addtionCallBackFun'](_0x144acd);}},window['JSPlayM4_DisplayCallBack']=function(_0x2e748c,_0x2dc91e,_0xe861b9,_0x5cdf27,_0x57152d){if(null!=_0x32f317[_0x57152d][_0x2e748c]){var _0x39b0bc={};_0x39b0bc['yuvData']=_0x2dc91e,_0x39b0bc['isize']=_0xe861b9,_0x39b0bc['timeStamp']=_0x5cdf27,_0x32f317[_0x57152d][_0x2e748c]['hasOwnProperty']('displayCallBackFun')&&null!=_0x32f317[_0x57152d][_0x2e748c]['displayCallBackFun']&&_0x32f317[_0x57152d][_0x2e748c]['displayCallBackFun'](_0x39b0bc);}},window['JSPlayM4_DecCallBack']=function(_0x1a0f22,_0x52ed55,_0x5ae846,_0x24ca51,_0x44b257,_0x223221){if(null!=_0x32f317[_0x223221][_0x1a0f22]){var _0x31c917={};_0x31c917['port']=_0x1a0f22,_0x31c917['Data']=_0x52ed55,_0x31c917['isize']=_0x5ae846,_0x31c917['iDataType']=_0x24ca51,_0x31c917['SampleRate']=_0x44b257,_0x32f317[_0x223221][_0x1a0f22]['hasOwnProperty']('decCallBackFun')&&null!=_0x32f317[_0x223221][_0x1a0f22]['decCallBackFun']&&_0x32f317[_0x223221][_0x1a0f22]['decCallBackFun'](_0x31c917);}},window['JSPlayM4_RunTimeInfoCallBack']=function(_0x294b1f,_0x2abda4,_0x4a6174,_0x41572a){if(null!=_0x32f317[_0x41572a][_0x294b1f]){var _0x40c70b=_0x5be749['HEAP32'][_0x2abda4>>0x2],_0x3404bd=_0x5be749['HEAP32'][_0x2abda4+0x4>>0x2],_0x5f2277=_0x5be749['HEAP32'][_0x2abda4+0x8>>0x2],_0xa7357a=_0x5be749['HEAP32'][_0x2abda4+0xc>>0x2],_0x3623c2=_0x4a6174;_0x32f317[_0x41572a][_0x294b1f]['hasOwnProperty']('runtimeCBFun')&&null!=_0x32f317[_0x41572a][_0x294b1f]['runtimeCBFun']&&_0x32f317[_0x41572a][_0x294b1f]['runtimeCBFun'](_0x40c70b,_0x3404bd,_0x5f2277,_0xa7357a,_0x3623c2);}},window['JSPlayM4_FirstFrameCallBack']=function(_0x56d97e,_0x4bed9d){null!=_0x32f317[_0x4bed9d][_0x56d97e]&&_0x32f317[_0x4bed9d][_0x56d97e]['hasOwnProperty']('FFCallBackFun')&&null!=_0x32f317[_0x4bed9d][_0x56d97e]['FFCallBackFun']&&null!=_0x32f317[_0x4bed9d][_0x56d97e]['FFCallBackFun']&&_0x32f317[_0x4bed9d][_0x56d97e]['FFCallBackFun']();},window['JSPlayM4_AudioANRCallBack']=function(_0x199da5,_0xe9d36a,_0x16629f,_0x3aa1c0){null!=_0x32f317[_0x3aa1c0][_0x199da5]&&_0x32f317[_0x3aa1c0][_0x199da5]['__proto__']['hasOwnProperty']('downloadAudioANRData')&&_0x32f317[_0x3aa1c0][_0x199da5]['downloadAudioANRData'](_0xe9d36a);},window['JSPlayM4_AudioBeforeDecodeCallBack']=function(_0x1deb6c,_0x56a7c1,_0x52e1fc,_0x1cb814){null!=_0x32f317[_0x1cb814][_0x1deb6c]&&_0x32f317[_0x1cb814][_0x1deb6c]['__proto__']['hasOwnProperty']('downloadAudioBeforeDecodeData')&&_0x32f317[_0x1cb814][_0x1deb6c]['downloadAudioBeforeDecodeData'](_0x56a7c1);},window['JSPlayM4_AudioAfterDecodeCallBack']=function(_0x5c4db9,_0x489af5,_0x4257af,_0x1e881d){null!=_0x32f317[_0x1e881d][_0x5c4db9]&&_0x32f317[_0x1e881d][_0x5c4db9]['__proto__']['hasOwnProperty']('downloadAudioAfterDecodeData')&&_0x32f317[_0x1e881d][_0x5c4db9]['downloadAudioAfterDecodeData'](_0x489af5);},window['JSPlayM4_AudioBeforeRenderCallBack']=function(_0x3b5d8e,_0x383cd4,_0x10425d,_0x23959d){null!=_0x32f317[_0x23959d][_0x3b5d8e]&&_0x32f317[_0x23959d][_0x3b5d8e]['__proto__']['hasOwnProperty']('downloadAudioBeforeRenderData')&&_0x32f317[_0x23959d][_0x3b5d8e]['downloadAudioBeforeRenderData'](_0x383cd4);},window['JSPlayM4_AudioResampleCallBack']=function(_0x14c96f,_0x4e2b50,_0x5b573a,_0x325538){null!=_0x32f317[_0x325538][_0x14c96f]&&_0x32f317[_0x325538][_0x14c96f]['__proto__']['hasOwnProperty']('downloadAudioResampleData')&&_0x32f317[_0x325538][_0x14c96f]['downloadAudioResampleData'](_0x4e2b50);},window['JSPlayM4_RTPRawDataCallBack']=function(_0x4942d8,_0x329550,_0xb31963){null!=_0x32f317[_0xb31963][port]&&_0x32f317[_0xb31963][port]['__proto__']['hasOwnProperty']('downloadRTPData')&&_0x32f317[_0xb31963][port]['downloadRTPData'](_0x4942d8);};var _0x596644=function(){function _0x3a4349(_0x1830f9,_0x43577f){for(var _0x393f7f=0x0;_0x393f7f<_0x43577f['length'];_0x393f7f++){var _0x52c4e0=_0x43577f[_0x393f7f];_0x52c4e0['enumerable']=_0x52c4e0['enumerable']||!0x1,_0x52c4e0['configurable']=!0x0,'value'in _0x52c4e0&&(_0x52c4e0['writable']=!0x0),Object['defineProperty'](_0x1830f9,_0x52c4e0['key'],_0x52c4e0);}}return function(_0x480f7d,_0xd41fcf,_0x56ffbe){return _0xd41fcf&&_0x3a4349(_0x480f7d['prototype'],_0xd41fcf),_0x56ffbe&&_0x3a4349(_0x480f7d,_0x56ffbe),_0x480f7d;};}(),_0x3c4ace,_0xd73dc9=(_0x3c4ace=void 0x0,function(_0x12823e){return _0x12823e&&(_0x3c4ace=_0x12823e),_0x3c4ace;}),_0x5089ea=function(){function _0x29cab6(){if(function(_0x24b21c,_0x1f44d2){if(!(_0x24b21c instanceof _0x1f44d2))throw new TypeError('Cannot\x20call\x20a\x20class\x20as\x20a\x20function');}(this,_0x29cab6),_0xd73dc9())return _0xd73dc9();if(void 0x0!==_0x29cab6['unique'])return _0x29cab6['unique'];_0x29cab6['unique']=this,this['oAudioContext']=null,this['currentVolume']=0x50,this['bSetVolume']=!0x1,this['gainNode']=null,this['iWndNum']=-0x1,this['mVolumes']=new Map();var _0x452ad2=window['AudioContext']||window['webkitAudioContext'];this['oAudioContext']=new _0x452ad2(),this['writeString']=function(_0x19ee94,_0x506547,_0x3abcd8){for(var _0x176af3=0x0;_0x176af3<_0x3abcd8['length'];_0x176af3++)_0x19ee94['setUint8'](_0x506547+_0x176af3,_0x3abcd8['charCodeAt'](_0x176af3));},this['setBufferToDataview']=function(_0x44b808,_0x33c5cd,_0x433ed5){for(var _0xa9fc6a=0x0;_0xa9fc6a<_0x433ed5['length'];_0xa9fc6a++,_0x33c5cd++)_0x44b808['setUint8'](_0x33c5cd,_0x433ed5[_0xa9fc6a]);},_0xd73dc9(this);}return _0x596644(_0x29cab6,[{'key':'Play','value':function value(_0x313738,_0xf475d2,_0x52aa4e){var _0x2805a2=new ArrayBuffer(0x2c+_0xf475d2),_0x462ce2=new DataView(_0x2805a2),_0x2fec0b=_0x52aa4e['samplesPerSec'],_0x514a99=_0x52aa4e['channels'],_0x30d0cc=_0x52aa4e['bitsPerSample'];this['writeString'](_0x462ce2,0x0,'RIFF'),_0x462ce2['setUint32'](0x4,0x20+0x2*_0xf475d2,!0x0),this['writeString'](_0x462ce2,0x8,'WAVE'),this['writeString'](_0x462ce2,0xc,'fmt\x20'),_0x462ce2['setUint32'](0x10,0x10,!0x0),_0x462ce2['setUint16'](0x14,0x1,!0x0),_0x462ce2['setUint16'](0x16,_0x514a99,!0x0),_0x462ce2['setUint32'](0x18,_0x2fec0b,!0x0),_0x462ce2['setUint32'](0x1c,0x2*_0x2fec0b,!0x0),_0x462ce2['setUint16'](0x20,_0x514a99*_0x30d0cc/0x8,!0x0),_0x462ce2['setUint16'](0x22,_0x30d0cc,!0x0),this['writeString'](_0x462ce2,0x24,'data'),_0x462ce2['setUint32'](0x28,_0xf475d2,!0x0),this['setBufferToDataview'](_0x462ce2,0x2c,_0x313738);var _0x3e0f1f=this;return this['oAudioContext']['decodeAudioData'](_0x462ce2['buffer'],function(_0x342e11){var _0x20a2ca=_0x3e0f1f['oAudioContext']['createBufferSource']();if(null==_0x20a2ca)return -0x1;_0x20a2ca['buffer']=_0x342e11,_0x20a2ca['start'](0x0),(null==_0x3e0f1f['gainNode']||_0x3e0f1f['bSetVolume'])&&(_0x3e0f1f['gainNode']=_0x3e0f1f['oAudioContext']['createGain'](),_0x3e0f1f['bSetVolume']=!0x1),_0x3e0f1f['gainNode']['gain']['value']=_0x3e0f1f['currentVolume']/0x64,_0x3e0f1f['gainNode']['connect'](_0x3e0f1f['oAudioContext']['destination']),_0x20a2ca['connect'](_0x3e0f1f['gainNode']);},function(_0x1023ea){return console['log']('decode\x20error'),-0x1;}),0x0;}},{'key':'Stop','value':function value(){return null!=this['gainNode']&&(this['gainNode']['disconnect'](),this['gainNode']=null),!0x0;}},{'key':'SetVolume','value':function value(_0x1143f7){return this['bSetVolume']=!0x0,this['currentVolume']=_0x1143f7,this['mVolumes']['set'](this['iWndNum'],this['currentVolume']),!0x0;}},{'key':'SetWndNum','value':function value(_0x1cc14a){this['iWndNum']=_0x1cc14a;var _0x338a4d=this['mVolumes']['get'](_0x1cc14a);return null==_0x338a4d&&(_0x338a4d=0x50),this['currentVolume']=_0x338a4d,!0x0;}},{'key':'GetVolume','value':function value(){var _0x2755ba=this['mVolumes']['get'](this['iWndNum']);return null==_0x2755ba&&(_0x2755ba=0x50),_0x2755ba;}}]),_0x29cab6;}(),_0x2808d1=0x10,_0x5e0aa7=0x1f,_0x11f975=0x19,_0x468fd1=0x5000,_0x10d03a={'width':0x0,'height':0x0,'frameNum':0x0,'yuvData':null},_0x34b6f8={'width':0x0,'height':0x0,'frameNum':0x0,'yuvData':null},_0x9156b4={'sampleRate':0x0,'channel':0x0,'bitsPerSample':0x0,'length':0x0,'pcmData':null},_0x1465a0={'id':null,'cmd':null,'data':null,'errorCode':0x0,'status':null},_0x10ed50=function(){function _0x135c19(_0x3401af,_0x4f98ae,_0x258fcc,_0x536f17){if(_0xa7bfb2(this,_0x135c19),this['jsplayer']=_0x3401af,null==_0x4f98ae||void 0x0===_0x4f98ae||'string'!=typeof _0x4f98ae)return 0x0;if(this['szBasePath']=_0x4f98ae,!_0x258fcc||'function'!=typeof _0x258fcc)return 0x0;this['fnCallBack']=_0x258fcc,this['decodeWorker']=null,this['streamOpenMode']=null,this['bOpenStream']=!0x1,this['audioRenderer']=null,this['aAudioBuffer']=[],this['iAudioBufferSize']=0x0,this['Volume']=0x0,this['oSuperRender']=null,this['aVideoFrameBuffer']=[],this['YUVBufferSize']=0x1,this['szOSDTime']=null,this['bJSPrintLog']=!0x1,this['bWriteYUVData']=!0x1,this['iYUV10size']=0x0,this['aVideoYUVBuffer']=[],this['bWritePCMData']=!0x1,this['iAudioBuffer500Size']=0x0,this['aAudioPCMBuffer']=[],this['bWriteRawData']=!0x1,this['iRawDataSize']=0x0,this['aRawDataBuffer']=[],this['bWriteRTPData']=!0x0,this['iRTPDataSize']=0x0,this['aRTPDataBuffer']=[],this['downloadRTP']=!0x1,this['rtpNum']=0x0,this['bPlaySound']=!0x1,this['bPlay']=!0x1,this['bPause']=!0x1,this['bOnebyOne']=!0x1,this['bPlayRateChange']=!0x1,this['audioNum']=0x0,this['videoNum']=0x0,this['FrameForwardLen']=0x1,this['bOnlyPlaySound']=!0x1,this['bVideoCropInfo']=!0x1,this['dataCallBackFun']=null,this['YUVBufSizeCBFun']=null,this['DecCallBackFun']=null,this['DisplayCallBackFun']=null,this['PCMCallBackFun']=null,this['DecInfoYUV']=_0x10d03a,this['DisplayInfoYUV']=_0x34b6f8,this['DecInfoPCM']=_0x9156b4,this['displayFrameInfo']={},this['frameInfoFlag']=!0x0,this['startTimeStamp']=0x0,this['nWidth']=0x0,this['nHeight']=0x0,this['nSPSCropLeft']=0x0,this['nSPSCropRight']=0x0,this['nSPSCropTop']=0x0,this['nSPSCropBottom']=0x0,this['decCBStream']=0x0,this['sCanvasId']=null,this['aDisplayBuf']=null,this['bVisibility']=!0x0,this['nDecFrameType']=0x0,this['runtimeInfoCBFun']=null,this['firstFrameCB']=null,this['iCanvasWidth']=0x0,this['iCanvasHeight']=0x0,this['iZoomNum']=0x0,this['iRatio_x']=0x1,this['iRatio_y']=0x1,this['stDisplayRect']={'top':0x0,'left':0x0,'right':0x0,'bottom':0x0},this['bDisRect']=!0x1,this['stYUVRect']={'top':0x0,'left':0x0,'right':0x0,'bottom':0x0},this['aInputDataLens']=[],this['aInputDataBuffer']=[],this['bIsGetYUV']=!0x1,this['bIsFirstFrame']=!0x0,this['iInputMaxBufSize']=0x500000,this['bIsInput']=!0x1,this['bIsInputBufOver']=!0x1,this['bIsInputBufWillOver']=!0x1,this['iInputDataLen']=_0x468fd1;var _0x3f3c1a=this;this['errorCode']=0x1,this['loopNum']=0x0,console['info']('%c1>there\x20will\x20play\x20by\x20V1','color:\x20green'),this['setCallBack']=function(_0x53051b,_0x2af448,_0x4cbc10,_0x3d0f33,_0x15a263){var _0x3f9117=_0x1465a0;_0x3f9117['id']=_0x536f17,_0x3f9117['cmd']=_0x2af448,_0x3f9117['data']=_0x4cbc10,_0x3f9117['errorCode']=_0x3d0f33,_0x3f9117['status']=_0x15a263,_0x53051b['errorCode']=_0x3d0f33,_0x53051b['fnCallBack'](_0x3f9117);},this['convertErrorCode']=function(_0xdafb2f){switch(_0xdafb2f){case 0x1:return 0x1;case 0x62:return 0x0;default:return _0xdafb2f;}},this['arrayBufferCopy']=function(_0xb772a7){var _0x5454ed=_0xb772a7['byteLength'],_0x5b588a=new Uint8Array(_0x5454ed),_0x13e87e=new Uint8Array(_0xb772a7),_0xd9f548=0x0;for(_0xd9f548=0x0;_0xd9f548<_0x5454ed;_0xd9f548++)_0x5b588a[_0xd9f548]=_0x13e87e[_0xd9f548];return _0x5b588a;},this['inputDataFun']=function(){var _0x28496a,_0xa930b6=0x0;if(_0x3f3c1a['bIsGetYUV']=!0x1,_0x3f3c1a['bIsInputBufOver']||_0x3f3c1a['bIsInputBufWillOver']){_0x28496a=new Uint8Array(0x1);var _0x17fe22={'command':'InputData','data':new Uint8Array(_0x28496a)['buffer'],'dataSize':0x0};_0x3f3c1a['decodeWorker']['postMessage'](_0x17fe22,[_0x17fe22['data']]);}else {if(_0x3f3c1a['bPlay']&&(!_0x3f3c1a['bPause']||_0x3f3c1a['bOnebyOne'])||this['bOnlyPlaySound']){for(;_0x3f3c1a['aInputDataLens']['length']>0x0&&!((_0xa930b6+=_0x3f3c1a['aInputDataLens']['shift']())>_0x3f3c1a['iInputDataLen']););_0x28496a=_0x3f3c1a['aInputDataBuffer']['splice'](0x0,_0xa930b6),_0x17fe22={'command':'InputData','data':new Uint8Array(_0x28496a)['buffer'],'dataSize':_0xa930b6},_0x3f3c1a['decodeWorker']['postMessage'](_0x17fe22,[_0x17fe22['data']]);}}_0x28496a=null;},this['getPic']=function(_0x85bed1,_0x2ea28d){if(null==this['decodeWorker']||null==this['oSuperRender'])return 0x2;if(!this['bPlay'])return 0x2;if(!_0x85bed1||'function'!=typeof _0x85bed1)return 0x0;if(this['dataCallBackFun']=_0x85bed1,0x0===this['iZoomNum'])this['stYUVRect']['left']=0x0,this['stYUVRect']['top']=0x0,this['stYUVRect']['right']=0x0,this['stYUVRect']['bottom']=0x0;else {if(0x0===this['iCanvasWidth']||0x0===this['iCanvasHeight'])this['stYUVRect']['left']=0x0,this['stYUVRect']['top']=0x0,this['stYUVRect']['right']=0x0,this['stYUVRect']['bottom']=0x0;else {var _0x1b86c1=this['nWidth']/this['iCanvasWidth'],_0x21ed8e=this['nHeight']/this['iCanvasHeight'];this['stYUVRect']['left']=Math['round'](this['stDisplayRect']['left']*_0x1b86c1),this['stYUVRect']['top']=Math['round'](this['stDisplayRect']['top']*_0x21ed8e),this['stYUVRect']['right']=Math['round'](this['stDisplayRect']['right']*_0x1b86c1),this['stYUVRect']['bottom']=Math['round'](this['stDisplayRect']['bottom']*_0x21ed8e);}if(this['stYUVRect']['right']-this['stYUVRect']['left']<0x20||this['stYUVRect']['bottom']-this['stYUVRect']['top']<0x20)return 0x0;}if(null==this['aDisplayBuf'])return 0x2;var _0x3b8db4={'command':_0x2ea28d,'data':this['arrayBufferCopy'](this['aDisplayBuf'])['buffer'],'width':this['nWidth'],'height':this['nHeight'],'rect':this['stYUVRect']};return this['decodeWorker']['postMessage'](_0x3b8db4,[_0x3b8db4['data']]),0x1;},this['createWorker']=function(_0x41c9bc){if(window['Worker']){if(null==_0x41c9bc['decodeWorker']){var _0x13a63e=_0x41c9bc['szBasePath']['substr'](0x0,_0x41c9bc['szBasePath']['lastIndexOf']('/')+0x1);if(_0x41c9bc['decodeWorker']=new Worker(_0x13a63e+'DecodeWorker.js'),_0x41c9bc['bJSPrintLog']&&console['log']('>>>JSPlayV1.1\x20createWorker\x20success!'),null==_0x41c9bc['decodeWorker'])return 0x3c;}_0x41c9bc['decodeWorker']['onmessage']=function(_0x7a762c){var _0x3a45ed=null,_0x1431d=_0x7a762c['data'];switch(_0x41c9bc['errorCode']=_0x1431d['errorCode'],!0x0===_0x41c9bc['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20onmessage\x20eventData.function:'+_0x1431d['function']),_0x1431d['function']){case'printLog':console['log']('print\x20JSPlayerSDK\x20log\x20failed');break;case'loaded':_0x3a45ed='loaded',console['log']('V1\x20Decoder.js\x20loaded\x20path:'+_0x41c9bc['szBasePath']),_0x41c9bc['setCallBack'](_0x41c9bc,'loaded',0x0,0x0,!0x0);break;case'SetStreamOpenMode':_0x3a45ed='SetStreamOpenMode';break;case'OpenStream':if(_0x3a45ed='OpenStream',0x1===_0x1431d['errorCode'])return void(_0x3f3c1a['bOpenStream']=!0x0);break;case'InputData':_0x3a45ed='InputData',0xb===_0x1431d['errorCode']&&(_0x3f3c1a['bIsInputBufOver']=!0x0,console['log']('yff\x20inputBuffer\x20over\x20set\x20key\x20frame\x20\x0a'),0x1!=_0x3f3c1a['nDecFrameType']&&_0x3f3c1a['PlayM4_SetDecodeFrameType'](0x1)),0x24===_0x1431d['errorCode']&&(_0x3f3c1a['bIsInputBufWillOver']=!0x0),_0x1431d['errorCode']===_0x5e0aa7&&(_0x3f3c1a['bIsInputBufOver']=!0x1,_0x3f3c1a['bIsInputBufWillOver']=!0x1,_0x3f3c1a['aInputDataLens']['length']>0x0&&_0x3f3c1a['bIsInput']?(_0x3f3c1a['inputDataFun'](),_0x3f3c1a['bIsInput']=!0x1):_0x3f3c1a['bIsGetYUV']=!0x0);break;case'GetFrameData':if(_0x3a45ed='GetFrameData',!_0x3f3c1a['bOnlyPlaySound']){if(null!=_0x1431d['data']&&null!=_0x1431d['frameInfo'])_0x1431d['frameInfo']['width'],_0x1431d['frameInfo']['height'];if(!_0x3f3c1a['bPlay'])return;if(_0x3f3c1a['errorCode']=_0x1431d['errorCode'],!(_0x3f3c1a['bIsFirstFrame']||_0x1431d['errorCode']!==_0x5e0aa7&&0x23!==_0x1431d['errorCode'])){_0x1431d['errorCode']===_0x5e0aa7&&(_0x3f3c1a['bIsInputBufOver']=!0x1,_0x3f3c1a['bIsInputBufWillOver']=!0x1),_0x3f3c1a['loopNum']>0x5?(_0x3f3c1a['bIsGetYUV']=!0x0,_0x3f3c1a['loopNum']=0x0):(_0x3f3c1a['inputDataFun'](),_0x3f3c1a['loopNum']++);break;}_0x3f3c1a['bIsInputBufOver']||_0x3f3c1a['bIsInputBufWillOver']?_0x3f3c1a['inputDataFun']():'videoType'===_0x1431d['type']&&(_0x3f3c1a['aInputDataLens']['length']>0x0&&_0x3f3c1a['bIsInput']?(_0x3f3c1a['inputDataFun'](),_0x3f3c1a['bIsInput']=!0x1):_0x3f3c1a['bIsGetYUV']=!0x0,_0x3f3c1a['bIsFirstFrame']=!0x1);}if(!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20onmessage\x20that.bVisibility:'+_0x3f3c1a['bVisibility']),_0x3f3c1a['bVisibility']&&(!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20onmessage\x20eventData.errorCode:'+_0x1431d['errorCode']),0x1===_0x1431d['errorCode']))switch(!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20onmessage\x20eventData.type:'+_0x1431d['type']),_0x1431d['type']){case'videoType':if(null==_0x1431d['data']||null==_0x1431d['frameInfo'])return 0x0;null!=_0x3f3c1a['DecCallBackFun']&&(_0x3f3c1a['DecInfoYUV']['port']=0x0,_0x3f3c1a['DecInfoYUV']['iDataType']=0x3,_0x3f3c1a['DecInfoYUV']['height']=_0x1431d['frameInfo']['height'],_0x3f3c1a['DecInfoYUV']['width']=_0x1431d['frameInfo']['width'],_0x3f3c1a['DecInfoYUV']['isize']=_0x1431d['frameInfo']['width']*_0x1431d['frameInfo']['height']*0x3/0x2,_0x3f3c1a['DecInfoYUV']['Data']=new Uint8Array(_0x1431d['data']),_0x3f3c1a['DecCallBackFun'](_0x3f3c1a['DecInfoYUV'])),_0x3f3c1a['bIsFirstFrame']=!0x1,_0x41c9bc['nWidth']=_0x1431d['frameInfo']['width'],_0x41c9bc['nHeight']=_0x1431d['frameInfo']['height'],_0x41c9bc['nSPSCropLeft']=_0x1431d['frameInfo']['cropLeft'],_0x41c9bc['nSPSCropRight']=_0x1431d['frameInfo']['cropRight'],_0x41c9bc['nSPSCropTop']=_0x1431d['frameInfo']['cropTop'],_0x41c9bc['nSPSCropBottom']=_0x1431d['frameInfo']['cropBottom'],_0x41c9bc['timeStamp']=_0x1431d['frameInfo']['timeStamp'];var _0x16f76e=new Object();if(_0x16f76e['data']=_0x1431d['data'],_0x16f76e['osdTime']=_0x1431d['frameInfo'],_0x16f76e['nWidth']=_0x1431d['frameInfo']['width'],_0x16f76e['nHeight']=_0x1431d['frameInfo']['height'],_0x16f76e['frameNum']=_0x1431d['frameInfo']['frameNum'],_0x16f76e['timeStamp']=_0x1431d['frameInfo']['timeStamp'],_0x41c9bc['bWriteYUVData']){for(var _0x34b50b=new Uint8Array(_0x1431d['data']),_0x59aeee=_0x41c9bc['aVideoYUVBuffer']['length'],_0x23c41c=0x0,_0x1e16a2=_0x34b50b['length'];_0x23c41c<_0x1e16a2;_0x23c41c++)_0x41c9bc['aVideoYUVBuffer'][_0x59aeee+_0x23c41c]=_0x34b50b[_0x23c41c];_0x41c9bc['iYUV10size']++,_0x34b50b=null;}if(_0x41c9bc['bWriteYUVData']&&_0x41c9bc['iYUV10size']>=0x14){var _0x222425=new Uint8Array(_0x41c9bc['aVideoYUVBuffer']);_0x41c9bc['downloadFile'](_0x222425,'videoYUV.data'),_0x41c9bc['aVideoYUVBuffer']['splice'](0x0,_0x41c9bc['aVideoYUVBuffer']['length']),_0x41c9bc['bWriteYUVData']=!0x1,_0x41c9bc['iYUV10size']=0x0,_0x222425=null;}if(_0x41c9bc['aVideoFrameBuffer']['push'](_0x16f76e),_0x16f76e=null,_0x41c9bc['aVideoFrameBuffer']['length']>0x5&&(_0x41c9bc['bOnebyOne']||_0x41c9bc['aVideoFrameBuffer']['splice'](0x0,0x2)),_0x41c9bc['bOnebyOne']&&_0x41c9bc['aVideoFrameBuffer']['length']>=0xf){_0x41c9bc['setCallBack'](_0x41c9bc,'OnebyOne',0x0,0x0,!0x1),_0x41c9bc['bIsFirstFrame']=!0x0;break;}break;case'audioType':if(_0x41c9bc['bPlaySound']&&!_0x41c9bc['bPlayRateChange']||_0x3f3c1a['bOnlyPlaySound']){null!=_0x3f3c1a['PCMCallBackFun']&&(_0x3f3c1a['DecInfoPCM']['port']=0x0,_0x3f3c1a['DecInfoPCM']['SampleRate']=_0x1431d['frameInfo']['samplesPerSec'],_0x3f3c1a['DecInfoPCM']['channel']=_0x1431d['frameInfo']['channels'],_0x3f3c1a['DecInfoPCM']['bitsPerSample']=_0x1431d['frameInfo']['bitsPerSample'],_0x3f3c1a['DecInfoPCM']['iDataType']=0x65,_0x3f3c1a['DecInfoPCM']['Data']=new Uint8Array(_0x1431d['data']),_0x3f3c1a['DecInfoPCM']['isize']=_0x3f3c1a['DecInfoPCM']['Data']['length'],_0x3f3c1a['PCMCallBackFun'](_0x3f3c1a['DecInfoPCM']));for(_0x34b50b=new Uint8Array(_0x1431d['data']),_0x59aeee=_0x41c9bc['aAudioBuffer']['length'],_0x23c41c=0x0,_0x1e16a2=_0x34b50b['length'];_0x23c41c<_0x1e16a2;_0x23c41c++)_0x41c9bc['aAudioBuffer'][_0x59aeee+_0x23c41c]=_0x34b50b[_0x23c41c];if(_0x41c9bc['iAudioBufferSize']++,_0x34b50b=null,_0x41c9bc['bWritePCMData']){for(_0x34b50b=new Uint8Array(_0x1431d['data']),_0x59aeee=_0x41c9bc['aAudioPCMBuffer']['length'],_0x23c41c=0x0,_0x1e16a2=_0x34b50b['length'];_0x23c41c<_0x1e16a2;_0x23c41c++)_0x41c9bc['aAudioPCMBuffer'][_0x59aeee+_0x23c41c]=_0x34b50b[_0x23c41c];console['log']('audio_type\x20num:'+_0x41c9bc['iAudioBuffer500Size']+',\x20len:'+_0x34b50b['length']),_0x41c9bc['iAudioBuffer500Size']++,_0x34b50b=null;}if(_0x41c9bc['bWritePCMData']&&_0x41c9bc['iAudioBuffer500Size']>=0x64){var _0x4eb43a=new Uint8Array(_0x41c9bc['aAudioPCMBuffer']);_0x41c9bc['downloadFile'](_0x4eb43a,'audioPCM.data'),_0x41c9bc['aAudioPCMBuffer']['splice'](0x0,_0x41c9bc['aAudioPCMBuffer']['length']),_0x41c9bc['bWritePCMData']=!0x1,_0x41c9bc['iAudioBuffer500Size']=0x0,_0x4eb43a=null;}_0x41c9bc['iAudioBufferSize']>=_0x11f975&&(_0x41c9bc['audioRenderer']['Play'](_0x41c9bc['aAudioBuffer'],_0x41c9bc['aAudioBuffer']['length'],_0x1431d['frameInfo']),_0x41c9bc['aAudioBuffer']['splice'](0x0,_0x41c9bc['aAudioBuffer']['length']),_0x41c9bc['aAudioBuffer']['length']=0x0,_0x41c9bc['iAudioBufferSize']=0x0);}}break;case'GetRawData':if(_0x3a45ed='GetRawData',_0x41c9bc['bWriteRawData']){var _0x146ffe=new Uint8Array(_0x1431d['data']),_0x2fc798=_0x41c9bc['aRawDataBuffer']['length'];for(_0x23c41c=0x0,_0x1e16a2=_0x146ffe['length'];_0x23c41c<_0x1e16a2;_0x23c41c++)_0x41c9bc['aRawDataBuffer'][_0x2fc798+_0x23c41c]=_0x146ffe[_0x23c41c];_0x41c9bc['iRawDataSize']++,_0x146ffe=null;}if(_0x41c9bc['bWriteRawData']&&_0x41c9bc['iRawDataSize']>=0x64){var _0x24348d=new Uint8Array(_0x41c9bc['aRawDataBuffer']);_0x41c9bc['downloadFile'](_0x24348d,'rawBuffer.data'),_0x41c9bc['aRawDataBuffer']['splice'](0x0,_0x41c9bc['aRawDataBuffer']['length']),_0x41c9bc['bWriteRawData']=!0x1,_0x41c9bc['iRawDataSize']=0x0,_0x24348d=null;}break;case'PlaySound':_0x3a45ed='PlaySound';break;case'GetJPEG':if(_0x3a45ed='GetJPEG',0x1!==_0x1431d['errorCode'])return void console['log']('GetJPEG\x20ErrorParam');var _0x390213=_0x1431d['data'];_0x41c9bc['dataCallBackFun'](_0x390213,_0x390213['length']);break;case'GetBMP':if(_0x3a45ed='GetBMP',0x1!==_0x1431d['errorCode'])return void console['log']('GetBMP\x20ErrorParam');var _0x50b253=_0x1431d['data'];_0x41c9bc['dataCallBackFun'](_0x50b253,_0x50b253['length']);break;case'RunTimeInfoCallBack':_0x3a45ed='RunTimeInfoCallBack';var _0x3dec20=_0x1431d['nRunTimeModule'],_0x2e2cc4=_0x1431d['nStrVersion'],_0x327e8a=_0x1431d['nFrameTimeStamp'],_0x128feb=_0x1431d['nFrameNum'],_0x1b1991=_0x1431d['nErrorCode'];null!=_0x41c9bc['runtimeInfoCBFun']&&_0x41c9bc['runtimeInfoCBFun'](_0x3dec20,_0x2e2cc4,_0x327e8a,_0x128feb,_0x1b1991);}'GetFrameData'!==_0x3a45ed&&'loaded'!==_0x3a45ed?_0x41c9bc['setCallBack'](_0x41c9bc,_0x3a45ed,0x0,_0x41c9bc['convertErrorCode'](_0x1431d['errorCode']),!0x0):_0x2808d1!==_0x1431d['errorCode']&&0x65!==_0x1431d['errorCode']&&0x64!==_0x1431d['errorCode']&&0x30!==_0x1431d['errorCode']||_0x41c9bc['setCallBack'](_0x41c9bc,_0x3a45ed,0x0,_0x41c9bc['convertErrorCode'](_0x1431d['errorCode']),!0x0);};}},this['createWorker'](_0x3f3c1a),this['draw']=function(){if(!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20draw\x201\x20that.bPlay:'+_0x3f3c1a['bPlay']),_0x3f3c1a['bPlay']){if(null!=_0x3f3c1a['firstFrameCB']&&(_0x3f3c1a['firstFrameCB'](),_0x3f3c1a['firstFrameCB']=null),!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20draw\x202\x20that.bPause:'+_0x3f3c1a['bPause']),!_0x3f3c1a['bPause']||_0x3f3c1a['bOnebyOne']){requestAnimationFrame(_0x3f3c1a['draw']);var _0x303126=_0x3f3c1a['aVideoFrameBuffer']['length'];if(null!=_0x3f3c1a['YUVBufSizeCBFun']&&_0x3f3c1a['YUVBufSizeCBFun'](_0x303126),_0x3f3c1a['bOnebyOne']){if(_0x303126<=0x8&&_0x3f3c1a['setCallBack'](_0x3f3c1a,'OnebyOne',0x0,_0x5e0aa7,!0x0),_0x303126<=_0x3f3c1a['FrameForwardLen']+0x1)return void _0x3f3c1a['setCallBack'](_0x3f3c1a,'OnebyOne',0x0,_0x5e0aa7,!0x0);for(var _0x43ca24=_0x3f3c1a['FrameForwardLen'];_0x43ca24>0x1;){_0x3f3c1a['aVideoFrameBuffer']['shift'](),_0x43ca24--;}_0x3f3c1a['bOnebyOne']=!0x1;}if(!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20draw\x203\x20iYUVNum:'+_0x303126),_0x303126>0x0){var _0x518220=_0x3f3c1a['aVideoFrameBuffer']['shift'](),_0x5d2865={};_0x5d2865['nCropLeft']=_0x3f3c1a['nSPSCropLeft'],_0x5d2865['nCropRight']=_0x3f3c1a['nSPSCropRight'],_0x5d2865['nCropTop']=_0x3f3c1a['nSPSCropTop'],_0x5d2865['nCropBottom']=_0x3f3c1a['nSPSCropBottom'],_0x5d2865['nCodeWidth']=_0x518220['nWidth'],_0x5d2865['nCodeHeight']=_0x518220['nHeight'],_0x3f3c1a['aDisplayBuf']=_0x518220['data'];var _0x33ab6f=new Uint8Array(_0x3f3c1a['aDisplayBuf']);!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20draw\x204\x20that.bVideoCropInfo:'+_0x3f3c1a['bVideoCropInfo']),_0x3f3c1a['bVideoCropInfo']?(console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20draw\x205\x20oVideoFrameInfo.nWidth:'+_0x518220['nWidth']+',nHeight:'+_0x518220['nHeight']+',that.nSPSCropLeft:'+_0x3f3c1a['nSPSCropLeft']+',that.nSPSCropRight:'+_0x3f3c1a['nSPSCropRight']+',that.nSPSCropTop:'+_0x3f3c1a['nSPSCropTop']+',that.nSPSCropBottom:'+_0x3f3c1a['nSPSCropBottom']),_0x3f3c1a['oSuperRender']['DisplayFrame'](_0x33ab6f,_0x518220['nWidth']-_0x3f3c1a['nSPSCropLeft']-_0x3f3c1a['nSPSCropRight'],_0x518220['nHeight']-_0x3f3c1a['nSPSCropTop']-_0x3f3c1a['nSPSCropBottom'],_0x518220['timeStamp'],_0x5d2865,null)):(!0x0===_0x3f3c1a['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20JSPlaySDKInterface\x20draw\x206\x20oVideoFrameInfo.nWidth:'+_0x518220['nWidth']+',nHeight:'+_0x518220['nHeight']+',that.oSuperRender:'+_0x3f3c1a['oSuperRender']),_0x3f3c1a['oSuperRender']['DisplayFrame'](_0x33ab6f,_0x518220['nWidth'],_0x518220['nHeight'],_0x518220['timeStamp'],_0x5d2865,null)),null!=_0x3f3c1a['DisplayCallBackFun']&&(_0x3f3c1a['DisplayInfoYUV']['height']=_0x518220['nHeight'],_0x3f3c1a['DisplayInfoYUV']['width']=_0x518220['nWidth'],_0x3f3c1a['DisplayInfoYUV']['iSize']=_0x3f3c1a['DisplayInfoYUV']['height']*_0x3f3c1a['DisplayInfoYUV']['width']*0x3/0x2,_0x3f3c1a['DisplayInfoYUV']['frameNum']=_0x518220['frameNum'],_0x3f3c1a['DisplayInfoYUV']['timeStamp']=_0x518220['timeStamp'],_0x3f3c1a['DisplayInfoYUV']['yuvData']=new Uint8Array(_0x33ab6f),_0x3f3c1a['DisplayCallBackFun'](_0x3f3c1a['DisplayInfoYUV'])),_0x3f3c1a['frameInfoFlag']&&(_0x3f3c1a['displayFrameInfo']['codecType']=0x0,_0x3f3c1a['displayFrameInfo']['frameType']=0x0,_0x3f3c1a['displayFrameInfo']['frameSize']=0x0,_0x3f3c1a['displayFrameInfo']['width']=_0x518220['nWidth'],_0x3f3c1a['displayFrameInfo']['height']=_0x518220['nHeight'],_0x3f3c1a['displayFrameInfo']['timeStamp']=_0x518220['timeStamp'],_0x3f3c1a['displayFrameInfo']['frameRate']=0x0,_0x3f3c1a['displayFrameInfo']['frameNum']=_0x518220['frameNum'],_0x3f3c1a['displayFrameInfo']['interlace']=0x0,_0x3f3c1a['displayFrameInfo']['streamEnd']=0x0,_0x3f3c1a['displayFrameInfo']['cropLeft']=_0x3f3c1a['nSPSCropLeft'],_0x3f3c1a['displayFrameInfo']['cropRight']=_0x3f3c1a['nSPSCropRight'],_0x3f3c1a['displayFrameInfo']['cropTop']=_0x3f3c1a['nSPSCropTop'],_0x3f3c1a['displayFrameInfo']['cropBottom']=_0x3f3c1a['nSPSCropBottom'],_0x3f3c1a['displayFrameInfo']['year']=_0x518220['osdTime']['year'],_0x3f3c1a['displayFrameInfo']['month']=_0x518220['osdTime']['month'],_0x3f3c1a['displayFrameInfo']['week']=0x0,_0x3f3c1a['displayFrameInfo']['day']=_0x518220['osdTime']['day'],_0x3f3c1a['displayFrameInfo']['hour']=_0x518220['osdTime']['hour'],_0x3f3c1a['displayFrameInfo']['minute']=_0x518220['osdTime']['minute'],_0x3f3c1a['displayFrameInfo']['second']=_0x518220['osdTime']['second'],_0x3f3c1a['displayFrameInfo']['milliseconds']=_0x518220['osdTime']['ms']),0x0==_0x3f3c1a['startTimeStamp']&&(_0x3f3c1a['startTimeStamp']=_0x518220['timeStamp']),_0x33ab6f=null;var _0x3bcf05=_0x518220['osdTime']['year'],_0x1f80dc=_0x518220['osdTime']['month'],_0x9b2d0b=_0x518220['osdTime']['day'],_0xace389=_0x518220['osdTime']['hour'],_0x23bf86=_0x518220['osdTime']['minute'],_0x4b1f84=_0x518220['osdTime']['second'];_0x3f3c1a['szOSDTime']=_0x3bcf05+'-'+_0x1f80dc+'-'+_0x9b2d0b+'\x20'+_0xace389+':'+_0x23bf86+':'+_0x4b1f84,_0x518220=null;}else _0x3f3c1a['setCallBack'](_0x3f3c1a,'Play',0x0,_0x5e0aa7,!0x0);}}else _0x3f3c1a['bPlay']||(_0x3f3c1a['aVideoFrameBuffer']['splice'](0x0,_0x3f3c1a['aVideoFrameBuffer']['length']),_0x3f3c1a['aAudioBuffer']['splice'](0x0,_0x3f3c1a['aAudioBuffer']['length']));};}return _0x3e0d7c(_0x135c19,[{'key':'PlayM4_SetCurrentFrameNum','value':function value(_0x3a9edb,_0x312b17){return _0x2808d1;}},{'key':'PlayM4_OpenPlayerSDKPrintLog','value':function value(_0x4218e0){return !0x0===_0x4218e0?(this['bJSPrintLog']=!0x0,this['decodeWorker']['postMessage']({'command':'printLog','data':_0x4218e0})):(this['bJSPrintLog']=!0x1,this['decodeWorker']['postMessage']({'command':'printLog','data':_0x4218e0})),0x1;}},{'key':'PlayM4_DownloadYUVdata','value':function value(){return this['bWriteYUVData']=!0x0,0x1;}},{'key':'PlayM4_DownloadPCMdata','value':function value(){return this['bWritePCMData']=!0x0,0x1;}},{'key':'PlayM4_SetDecCallBack','value':function value(_0x5ca73c,_0x5115ba){return _0x5ca73c?(0x1==this['decCBStream']&&(this['DecCallBackFun']=_0x5115ba),0x2==this['decCBStream']&&(this['PCMCallBackFun']=_0x5115ba),0x3==this['decCBStream']&&(this['PCMCallBackFun']=_0x5115ba,this['DecCallBackFun']=_0x5115ba)):(0x1==this['decCBStream']&&(this['DecCallBackFun']=null),0x2==this['decCBStream']&&(this['PCMCallBackFun']=null),0x3==this['decCBStream']&&(this['PCMCallBackFun']=null,this['DecCallBackFun']=null)),0x1;}},{'key':'PlayM4_SetDisplayCallBack','value':function value(_0x3d82b1){return _0x3d82b1&&'function'==typeof _0x3d82b1?(this['DisplayCallBackFun']=_0x3d82b1,0x1):0x0;}},{'key':'PlayM4_SetPCMCallBack','value':function value(_0x1e21ba){return _0x1e21ba&&'function'==typeof _0x1e21ba?(this['PCMCallBackFun']=_0x1e21ba,0x1):0x0;}},{'key':'PlayM4_SetStreamOpenMode','value':function value(_0x11ff0f){return null==_0x11ff0f||void 0x0===_0x11ff0f||0x0!==_0x11ff0f&&0x1!==_0x11ff0f?0x0:(this['streamOpenMode']=_0x11ff0f,0x1);}},{'key':'PlayM4_DownloadRTPData','value':function value(_0x3dace0){this['downloadRTP']=_0x3dace0;}},{'key':'PlayM4_SetVideoCropInfo','value':function value(_0x3817b8){return null==_0x3817b8||void 0x0===_0x3817b8||'boolean'!=typeof _0x3817b8?0x0:(this['bVideoCropInfo']=_0x3817b8,0x1);}},{'key':'PlayM4_OpenStream','value':function value(_0x36a2ee,_0x17ae55,_0x2a8433){if(this['bJSPrintLog']&&console['log']('>>>JS\x20PlayM4_OpenStream\x20nSysTime:'+(new Date()['getMonth']()+0x1)+'-'+new Date()['getDate']()+'\x20'+new Date()['getHours']()+':'+new Date()['getMinutes']()+':'+new Date()['getSeconds']()+'.'+new Date()['getMilliseconds']()),null==this['decodeWorker'])return 0x2;if(this['downloadRTP']){var _0x5517e7=new Uint8Array(_0x36a2ee['buffer']);this['DownloadRTPData'](_0x5517e7),console['log']('write\x2040\x20hik\x20head');}return null==_0x36a2ee||_0x17ae55<=0x0||_0x2a8433<=0x0?0x0:(this['bPlay']=!0x1,this['bPause']=!0x1,this['bOnebyOne']=!0x1,this['bIsFirstFrame']=!0x0,this['bIsGetYUV']=!0x1,this['bIsInput']=!0x1,0x4===_0x36a2ee[0x8]&&0x0===_0x36a2ee[0x9]?this['streamOpenMode']=0x0:this['streamOpenMode']=0x1,this['decodeWorker']['postMessage']({'command':'SetStreamOpenMode','data':this['streamOpenMode']}),this['decodeWorker']['postMessage']({'command':'OpenStream','data':_0x36a2ee,'dataSize':_0x17ae55,'bufPoolSize':_0x2a8433}),this['bOpenStream']=!0x0,0x1);}},{'key':'PlayM4_CloseStream','value':function value(){return null===this['decodeWorker']?0x1:null===this['decodeWorker']||!0x1===this['bOpenStream']?0x2:(this['bOnlyPlaySound']=!0x1,this['decodeWorker']['postMessage']({'command':'CloseStream'}),null!==this['oSuperRender']&&(this['oSuperRender']['ReleaseDisplay'](),this['oSuperRender']=null),null!==this['audioRenderer']&&(this['audioRenderer']['Stop'](),this['audioRenderer']=null),this['aAudioBuffer']['splice'](0x0,this['aAudioBuffer']['length']),this['aVideoFrameBuffer']['splice'](0x0,this['aVideoFrameBuffer']['length']),this['aInputDataBuffer']['splice'](0x0,this['aInputDataBuffer']['length']),this['aInputDataLens']['splice'](0x0,this['aInputDataLens']['length']),this['aVideoYUVBuffer']['splice'](0x0,this['aVideoYUVBuffer']['length']),this['aAudioPCMBuffer']['splice'](0x0,this['aAudioPCMBuffer']['length']),this['aRawDataBuffer']['splice'](0x0,this['aRawDataBuffer']['length']),this['bOpenStream']=!0x1,this['iAudioBufferSize']=0x0,this['szOSDTime']=null,this['startTimeStamp'],0x1);}},{'key':'PlayM4_Destroy','value':function value(){return null===this['decodeWorker']||(this['PlayM4_CloseStream'](),this['decodeWorker']['terminate'](),this['decodeWorker']=null),0x1;}},{'key':'PlayM4_FreePort','value':function value(){return this['decodeWorker']['terminate'](),this['decodeWorker']=null,0x1;}},{'key':'PlayM4_InputData','value':function value(_0x5a4e09,_0x21623c){var _0x2a61ed=this['aInputDataBuffer']['length'];if(0x4===_0x21623c){var _0x521dbb=new Uint8Array(_0x5a4e09['buffer']);if(0x1===_0x521dbb[0x0]&&0x2===_0x521dbb[0x1]&&0x3===_0x521dbb[0x2]&&0x4===_0x521dbb[0x3])return this['bIsFirstFrame']||this['bIsGetYUV']?this['inputDataFun']():this['bIsInput']=!0x0,_0x521dbb=null,0x1;}if(_0x2a61ed+_0x21623c>this['iInputMaxBufSize'])return console['log']('input\x20over'),this['bIsGetYUV']?this['inputDataFun']():this['bIsInput']=!0x0,0xb;var _0x2892bf=null,_0x400a93=_0x21623c;switch(this['streamOpenMode']){case 0x1:_0x2892bf=new Uint8Array(_0x5a4e09['buffer']),this['downloadRTP']&&(this['DownloadRTPData'](_0x2892bf),this['rtpNum']++,console['log']('STREAM_FILE\x20psNUm:'+this['rtpNum'])),this['aInputDataLens']['push'](_0x21623c);break;case 0x0:_0x400a93=_0x21623c+0x4;var _0x6b0ce7=new Uint32Array([_0x21623c]),_0x5a2d94=new Uint8Array(_0x6b0ce7['buffer']);(_0x2892bf=new Uint8Array(_0x400a93))['set'](_0x5a2d94,0x0),_0x2892bf['set'](_0x5a4e09,0x4),this['downloadRTP']&&(this['DownloadRTPData'](_0x2892bf),this['rtpNum']++,console['log']('STREAM_REALTIME\x20rtpNUm:'+this['rtpNum'])),_0x6b0ce7=null,_0x5a2d94=null,this['aInputDataLens']['push'](_0x21623c+0x4);break;default:return _0x2808d1;}for(var _0x171a98=0x0;_0x171a98<_0x400a93;_0x171a98++)this['aInputDataBuffer'][_0x2a61ed+_0x171a98]=_0x2892bf[_0x171a98];return !this['bPlay']&&!this['bOnlyPlaySound']||null===this['decodeWorker']||!0x1===this['bOpenStream']||(_0x2892bf=null,this['bOnlyPlaySound']||this['bIsFirstFrame']||this['bIsGetYUV']?this['inputDataFun']():this['bIsInput']=!0x0),0x1;}},{'key':'DownloadRTPData','value':function value(_0x3ab266){if(this['bWriteRTPData']){for(var _0x4b935c=new Uint8Array(_0x3ab266),_0x33b274=this['aRTPDataBuffer']['length'],_0x323c49=0x0,_0x101029=_0x4b935c['length'];_0x323c49<_0x101029;_0x323c49++)this['aRTPDataBuffer'][_0x33b274+_0x323c49]=_0x4b935c[_0x323c49];this['iRTPDataSize']++,_0x4b935c=null;}if(this['bWriteRTPData']&&this['iRTPDataSize']>=0xc8){console['log']('download200RTPdata');var _0x8eb6ab=new Uint8Array(this['aRTPDataBuffer']);this['downloadFile'](_0x8eb6ab,'RTP.data'),this['aRTPDataBuffer']['splice'](0x0,this['aRTPDataBuffer']['length']),this['iRTPDataSize']=0x0,this['rtpNum']=0x0,this['downloadRTP']=!0x1,_0x8eb6ab=null;}}},{'key':'PlayM4_Play','value':function value(_0x4de3a8){if(null===this['decodeWorker'])return 0x2;if(this['bJSPrintLog']&&console['log']('>>>JS\x20PlayM4_Play\x20canvasID:\x20'+_0x4de3a8),null===_0x4de3a8)this['bOnlyPlaySound']=!0x0,this['decodeWorker']['postMessage']({'command':'OnlyPlaySound'}),this['sCanvasId']=null;else {if('string'!=typeof _0x4de3a8)return 0x0;if(this['bOnebyOne']&&(this['bPlayRateChange']=!0x1,this['bOnebyOne']=!0x1,this['bPause']=!0x1,this['draw']()),this['bPlay'])return 0x1;if(null==this['oSuperRender']&&(this['canvasCnv']=document['getElementById'](_0x4de3a8),this['oSuperRender']=new _0x5afd01(),this['oSuperRender']['InitDisplay'](this['canvasCnv'],'webgl',0x1),null==this['oSuperRender']))return 0x3d;this['sCanvasId']=_0x4de3a8,this['bPlay']=!0x0,this['bPause']=!0x1,this['bOnebyOne']=!0x1,this['bPlayRateChange']=!0x1,this['bOnlyPlaySound']=!0x1,this['draw']();}return null==this['audioRenderer']&&(this['audioRenderer']=new _0x5089ea(),null==this['audioRenderer'])?0x3d:(this['decodeWorker']['postMessage']({'command':'Play'}),0x1);}},{'key':'PlayM4_Stop','value':function value(_0x254527){if(!0x0===this['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20V1\x20PlayM4_Stop'),null==this['decodeWorker']||null==this['oSuperRender'])return 0x2;if(!this['bPlay'])return 0x2;this['bPlaySound']&&(this['PlayM4_StopSound'](),this['bPlaySound']=!0x0),this['bPlay']=!0x1,this['bOnebyOne']=!0x1,this['bPause']=!0x1,this['oSuperRender']['SetDisplayRect'](0x0,0x0,this['nWidth'],this['nHeight']),this['iZoomNum']=0x0,this['bDisRect']=!0x1;var _0x133f94={};_0x133f94['nCropLeft']=this['nSPSCropLeft'],_0x133f94['nCropRight']=this['nSPSCropRight'],_0x133f94['nCropTop']=this['nSPSCropTop'],_0x133f94['nCropBottom']=this['nSPSCropBottom'],_0x133f94['nCodeWidth']=this['nWidth'],_0x133f94['nCodeHeight']=this['nHeight'],this['bVideoCropInfo']?this['oSuperRender']['DisplayFrame'](null,this['nWidth']-this['nSPSCropLeft']-this['nSPSCropRight'],this['nHeight']-this['nSPSCropTop']-this['nSPSCropBottom'],this['timeStamp'],_0x133f94,null):this['oSuperRender']['DisplayFrame'](null,this['nWidth'],this['nHeight'],this['timeStamp'],_0x133f94,null);var _0x7ab4a6=document['getElementById'](this['sCanvasId']);return _0x7ab4a6&&(this['clonedCanvas']=_0x7ab4a6['cloneNode'](!0x0),this['clonedCanvasParentNode']=_0x7ab4a6['parentNode'],this['clonedCanvasParentNode']['replaceChild'](this['clonedCanvas'],_0x7ab4a6)),0x1;}},{'key':'PlayM4_PlayRate','value':function value(_0x46d90d){return null==this['decodeWorker']?0x2:(this['bPlayRateChange']=0x1!==_0x46d90d,_0x46d90d<0x1&&(_0x46d90d=0x1),this['iInputDataLen']=_0x46d90d*_0x468fd1,this['decodeWorker']['postMessage']({'command':'PlayRate','playRate':_0x46d90d}),0x1);}},{'key':'PlayM4_Pause','value':function value(_0x4949ef){return null==this['decodeWorker']||null==this['oSuperRender']?0x2:this['bPlay']?this['bOnebyOne']||this['bPause']==_0x4949ef?0x2:'boolean'!=typeof _0x4949ef?0x0:(this['bPause']=_0x4949ef,this['bIsFirstFrame']=!0x0,_0x4949ef?this['bPlaySound']&&(this['PlayM4_StopSound'](),this['bPlaySound']=!0x0):(this['bPlaySound']&&this['PlayM4_PlaySound'](),this['draw']()),0x1):0x2;}},{'key':'PlayM4_OneByOne','value':function value(_0x1163ff){return null==this['decodeWorker']||null==this['oSuperRender']?0x2:this['bPlay']?_0x1163ff>0xa||_0x1163ff<=0x0?0x0:(_0x1163ff||(_0x1163ff=0x1),this['iInputDataLen']=_0x468fd1,this['FrameForwardLen']=_0x1163ff,this['bPause']=!0x0,this['bOnebyOne']=!0x0,this['bIsFirstFrame']=!0x0,this['draw'](),0x1):0x2;}},{'key':'PlayM4_PlaySound','value':function value(_0x4c64e5){return null===this['decodeWorker']||!0x1===this['bOpenStream']?0x2:_0x4c64e5<0x0||_0x4c64e5>0x10?0x0:null==this['audioRenderer']&&(this['audioRenderer']=new _0x5089ea(),null==this['audioRenderer'])?0x3d:(this['decodeWorker']['postMessage']({'command':'PlaySound'}),this['audioRenderer']['SetWndNum'](_0x4c64e5),0x0!==this['Volume']&&this['audioRenderer']['SetVolume'](this['Volume']),this['audioRenderer']['oAudioContext']['resume'](),this['bPlaySound']=!0x0,0x1);}},{'key':'PlayM4_StopSound','value':function value(){return null==this['decodeWorker']||null==this['audioRenderer']?0x2:this['bPlaySound']?(this['decodeWorker']['postMessage']({'command':'StopSound'}),this['bPlaySound']=!0x1,0x1):0x2;}},{'key':'PlayM4_SetDisplayBuf','value':function value(_0x593467){return null==this['decodeWorker']?0x2:_0x593467<=0x0?0x0:(this['YUVBufferSize']=_0x593467,0x1);}},{'key':'PlayM4_SetSecretKey','value':function value(_0x5d3a01,_0x1d701a,_0x2ad3ed){if(null==this['decodeWorker']||!0x1===this['bOpenStream'])return 0x2;if(null==_0x1d701a)return 0x0;if(0x1===_0x5d3a01){if(0x80!==_0x2ad3ed)return 0x0;if(null==_0x1d701a||void 0x0===_0x1d701a)return 0x0;}else {if(0x0!==_0x5d3a01)return 0x0;}return this['decodeWorker']['postMessage']({'command':'SetSecretKey','data':_0x1d701a,'nKeyType':_0x5d3a01,'nKeyLen':_0x2ad3ed}),0x1;}},{'key':'PlayM4_SetDecodeFrameType','value':function value(_0x2043d4){return console['log']('PlayM4_SetDecodeFrameType\x20nFrameType:'+_0x2043d4),null==this['decodeWorker']||null==this['oSuperRender']?0x2:0x0!==_0x2043d4&&0x1!==_0x2043d4?0x0:(this['bJSPrintLog']&&console['log']('>>>JS\x20PlayM4_SetDecodeFrameType\x20:'+_0x2043d4),this['nDecFrameType']=_0x2043d4,this['decodeWorker']['postMessage']({'command':'SetDecodeFrameType','data':_0x2043d4}),0x1);}},{'key':'PlayM4_SetIFrameDecInterval','value':function value(_0x3a449b){return 0x1!==this['nDecFrameType']?0x2:_0x3a449b<0x0?0x0:(this['decodeWorker']['postMessage']({'command':'SetIFrameDecInterval','data':_0x3a449b}),0x1);}},{'key':'PlayM4_SetLostFrameMode','value':function value(_0x2f67e8){return _0x2f67e8<0x0||_0x2f67e8>0x1?0x0:(this['decodeWorker']['postMessage']({'command':'SetLostFrameMode','data':_0x2f67e8}),0x1);}},{'key':'PlayM4_SetDisplayRegion','value':function value(_0x2dc114,_0x45030a,_0x377819){if(!0x0===this['bJSPrintLog']&&console['log']('>>>>yff1020>>>>>\x20PlayM4_SetDisplayRegion\x20left:'+_0x2dc114['left']+',top:'+_0x2dc114['top']+',right:'+_0x2dc114['right']+',bottom:'+_0x2dc114['bottom']),null===this['decodeWorker']||!0x1===this['bPlay']||null===this['oSuperRender'])return 0x2;if(null===this['canvasId'])return 0x2;if(!0x0===_0x45030a){if(null==_0x2dc114)return 0x0;if('number'!=typeof _0x2dc114['left']||'number'!=typeof _0x2dc114['top']||'number'!=typeof _0x2dc114['right']||'number'!=typeof _0x2dc114['bottom'])return 0x0;if(_0x2dc114['right']<0x0||_0x2dc114['left']<0x0||_0x2dc114['top']<0x0||_0x2dc114['bottom']<0x0)return 0x0;var _0xc0c1e3=_0x2dc114['left'],_0x32fbbe=_0x2dc114['right'],_0xef7a23=_0x2dc114['top'],_0xa3ec83=_0x2dc114['bottom'],_0x39ff51=document['getElementById'](this['sCanvasId'])['getBoundingClientRect']();if(this['iCanvasWidth']=_0x39ff51['width'],this['iCanvasHeight']=_0x39ff51['height'],_0x32fbbe-_0xc0c1e3<0x10||_0xa3ec83-_0xef7a23<0x10||_0x32fbbe-_0xc0c1e3>this['iCanvasWidth']||_0xa3ec83-_0xef7a23>this['iCanvasHeight'])return 0x0;0x0!==this['iZoomNum']&&(_0xc0c1e3=Math['round'](_0xc0c1e3/this['iRatio_x'])+this['stDisplayRect']['left'],_0xef7a23=Math['round'](_0xef7a23/this['iRatio_y'])+this['stDisplayRect']['top'],_0x32fbbe=Math['round'](_0x32fbbe/this['iRatio_x'])+this['stDisplayRect']['left'],_0xa3ec83=Math['round'](_0xa3ec83/this['iRatio_y'])+this['stDisplayRect']['top']),this['stDisplayRect']={'top':_0xef7a23,'left':_0xc0c1e3,'right':_0x32fbbe,'bottom':_0xa3ec83};var _0xd2dd01=_0xa3ec83/this['iCanvasHeight']*this['nHeight'],_0x24b737=_0xc0c1e3/this['iCanvasWidth']*this['nWidth'],_0x465949=_0x32fbbe/this['iCanvasWidth']*this['nWidth'],_0x3592b9=_0xef7a23/this['iCanvasHeight']*this['nHeight'];this['oSuperRender']['SetDisplayRect'](_0x24b737,_0x3592b9,_0x465949-_0x24b737,_0xd2dd01-_0x3592b9),this['bDisRect']=!0x0;var _0x56e104=_0x32fbbe-_0xc0c1e3,_0x1d6c8b=_0xa3ec83-_0xef7a23;this['iRatio_x']=this['iCanvasWidth']/_0x56e104,this['iRatio_y']=this['iCanvasHeight']/_0x1d6c8b,_0x377819&&this['iZoomNum']++;}else this['oSuperRender']['SetDisplayRect'](0x0,0x0,this['iCanvasWidth'],this['iCanvasHeight']),this['iZoomNum']=0x0,this['bDisRect']=!0x1;if(this['bPause']||this['bOnebyOne']||this['bPlayRateChange']){var _0x42eef2={};_0x42eef2['nCropLeft']=this['nSPSCropLeft'],_0x42eef2['nCropRight']=this['nSPSCropRight'],_0x42eef2['nCropTop']=this['nSPSCropTop'],_0x42eef2['nCropBottom']=this['nSPSCropBottom'],_0x42eef2['nCodeWidth']=this['nWidth'],_0x42eef2['nCodeHeight']=this['nHeight'],this['bVideoCropInfo']?this['oSuperRender']['DisplayFrame'](new Uint8Array(this['aDisplayBuf']),this['nWidth']-this['nSPSCropLeft']-this['nSPSCropRight'],this['nHeight']-this['nSPSCropTop']-this['nSPSCropBottom'],this['timeStamp'],_0x42eef2,null):this['oSuperRender']['DisplayFrame'](new Uint8Array(this['aDisplayBuf']),this['nWidth'],this['nHeight'],this['timeStamp'],_0x42eef2,null);}return 0x1;}},{'key':'PlayM4_GetBMP','value':function value(_0x23e144){return this['getPic'](_0x23e144,'GetBMP');}},{'key':'PlayM4_GetJPEG','value':function value(_0x2918fc){return this['getPic'](_0x2918fc,'GetJPEG');}},{'key':'PlayM4_SetVolume','value':function value(_0x1ed99b){return null==this['decodeWorker']||null==this['audioRenderer']?0x2:_0x1ed99b<0x0||_0x1ed99b>0x64||''===_0x1ed99b?0x0:(this['Volume']=_0x1ed99b,this['audioRenderer']['SetVolume'](_0x1ed99b),0x1);}},{'key':'PlayM4_GetVolume','value':function value(_0x5b7ac4){if(null==this['decodeWorker'])return 0x2;if(null==this['audioRenderer'])return 0x2;if(_0x5b7ac4&&'function'==typeof _0x5b7ac4){var _0x23597f=this['audioRenderer']['GetVolume']();return null===_0x23597f?0x3f:(_0x5b7ac4(_0x23597f),0x1);}return 0x0;}},{'key':'PlayM4_GetOSDTime','value':function value(_0x4a9469){return null==this['decodeWorker']?0x2:this['bPlay']?_0x4a9469&&'function'==typeof _0x4a9469?(_0x4a9469(this['szOSDTime']),0x1):0x0:0x2;}},{'key':'PlayM4_SetFrameInfoCallBack','value':function value(_0x1f5219){return this['frameInfoFlag']=!!_0x1f5219,0x1;}},{'key':'PlayM4_GetFrameInfo','value':function value(){return this['displayFrameInfo'];}},{'key':'PlayM4_IsVisible','value':function value(_0x481ab4){return this['bVisibility']=_0x481ab4,0x1;}},{'key':'PlayM4_GetSdkVersion','value':function value(){return '07040006';}},{'key':'PlayM4_GetBuildDate','value':function value(){return '20230810';}},{'key':'PlayM4_GetInputBufSize','value':function value(){return this['aInputDataBuffer']['length'];}},{'key':'PlayM4_SetInputBufSize','value':function value(_0x2d0f5e){return _0x2d0f5e>0x0?(this['iInputMaxBufSize']=_0x2d0f5e,console['log']('>>JSBufferSize\x20SetInputBufSize:'+this['iInputMaxBufSize']),0x1):0x0;}},{'key':'PlayM4_GetYUVBufSize','value':function value(){return this['aVideoFrameBuffer']['length'];}},{'key':'PlayM4_GetFrameResolution','value':function value(_0x2acf80){return null==this['decodeWorker']?0x2:_0x2acf80&&'function'==typeof _0x2acf80?(_0x2acf80(this['nWidth'],this['nHeight']),0x1):0x0;}},{'key':'PlayM4_RegisterYUVBufSizeCB','value':function value(_0x1dbe95){return _0x1dbe95&&'function'==typeof _0x1dbe95?(this['YUVBufSizeCBFun']=_0x1dbe95,0x1):0x0;}},{'key':'PlayM4_UnRegisterYUVBufSizeCB','value':function value(){return null!=this['YUVBufSizeCBFun']&&(this['YUVBufSizeCBFun']=null),0x1;}},{'key':'PlayM4_ClearCanvas','value':function value(){if(null==this['oSuperRender'])return 0x2;var _0x5dcede={};return _0x5dcede['nCropLeft']=this['nSPSCropLeft'],_0x5dcede['nCropRight']=this['nSPSCropRight'],_0x5dcede['nCropTop']=this['nSPSCropTop'],_0x5dcede['nCropBottom']=this['nSPSCropBottom'],_0x5dcede['nCodeWidth']=this['nWidth'],_0x5dcede['nCodeHeight']=this['nHeight'],this['bVideoCropInfo']?this['oSuperRender']['DisplayFrame'](null,this['nWidth']-this['nSPSCropLeft']-this['nSPSCropRight'],this['nHeight']-this['nSPSCropTop']-this['nSPSCropBottom'],this['timeStamp'],_0x5dcede,null):this['oSuperRender']['DisplayFrame'](null,this['nWidth'],this['nHeight'],this['timeStamp'],_0x5dcede,null),0x1;}},{'key':'PlayM4_ReleaseInputBuffer','value':function value(){return null===this['aInputDataBuffer']?0x2:(this['aInputDataBuffer']['splice'](0x0,this['aInputDataBuffer']['length']),this['aInputDataLens']['splice'](0x0,this['aInputDataLens']['length']),0x1);}},{'key':'PlayM4_GetDecodeFrameType','value':function value(){return this['nDecFrameType'];}},{'key':'PlayM4_SetRunTimeInfoCallBackEx','value':function value(_0x33d265,_0x4a703b){return this['runtimeInfoCBFun']=_0x4a703b,null==this['decodeWorker']?0x2:(this['decodeWorker']['postMessage']({'command':'SetRunTimeInfoCB','nModuleType':_0x33d265}),0x1);}},{'key':'PlayM4_SetDemuxModel','value':function value(_0x32b3da,_0x9b9f0f){return null==this['decodeWorker']?0x2:(this['decodeWorker']['postMessage']({'command':'SetDemuxModel','nIdemuxType':_0x32b3da,'bTrue':_0x9b9f0f}),0x1);}},{'key':'PlayM4_SkipErrorData','value':function value(_0x53250a){return null==this['decodeWorker']?0x2:(this['decodeWorker']['postMessage']({'command':'SkipErrorData','bSkip':_0x53250a}),0x1);}},{'key':'PlayM4_SetDecodeERC','value':function value(_0x4192cd){return null==this['decodeWorker']?0x2:(this['decodeWorker']['postMessage']({'command':'SetDecodeERC','nLevel':_0x4192cd}),0x1);}},{'key':'PlayM4_SetANRParam','value':function value(_0x700af5,_0xf9ac11){return null==this['decodeWorker']?0x2:(this['decodeWorker']['postMessage']({'command':'SetANRParam','nEnable':_0x700af5,'nANRLevel':_0xf9ac11}),0x1);}},{'key':'PlayM4_SetResampleValue','value':function value(_0x1c880c,_0x2f1e70){return null==this['decodeWorker']?0x2:(this['decodeWorker']['postMessage']({'command':'SetResampleValue','nEnable':_0x1c880c,'resampleValue':_0x2f1e70}),0x1);}},{'key':'PlayM4_SetGlobalBaseTime','value':function value(_0xf17496,_0x3f9e4f,_0x2b5dfc,_0x2548fb,_0x196cef,_0xce73f0,_0x3956d3){return null==this['decodeWorker']?0x2:_0xf17496<0x7d0||_0xf17496>0xbb8||_0x3f9e4f<0x1||_0x3f9e4f>0xc||_0xf17496<0x0||_0x3f9e4f<0x0||_0x2b5dfc<0x0||_0x2548fb<0x0||_0x196cef<0x0||_0xce73f0<0x0||_0x3956d3<0x0?_0x2808d1:(this['decodeWorker']['postMessage']({'command':'SetGlobalBaseTime','year':_0xf17496,'month':_0x3f9e4f,'day':_0x2b5dfc,'hour':_0x2548fb,'min':_0x196cef,'sec':_0xce73f0,'ms':_0x3956d3}),0x1);}},{'key':'PlayM4_SetAudioDisplayBuf','value':function value(_0x8d545d){return _0x11f975=_0x8d545d,0x1;}},{'key':'PlayM4_GetCanvasCapture','value':function value(_0x1d002c){return null!=this['oSuperRender']?this['oSuperRender']['GetCanvasData'](_0x1d002c):0x1;}},{'key':'PlayM4_SetFirstFrameCallBack','value':function value(_0x43ab1b,_0x2dc450){return null!=_0x2dc450&&'function'!=typeof _0x2dc450?0x0:(_0x43ab1b&&(this['firstFrameCB']=_0x2dc450),0x1);}},{'key':'PlayM4_SetDecCBStream','value':function value(_0x493fc1){return this['decCBStream']=_0x493fc1,0x1;}},{'key':'PlayM4_SetCanvasSize','value':function value(_0x3fe856,_0x5481b5){return null!=this['oSuperRender']&&this['oSuperRender']['SetCanvasSize'](_0x3fe856,_0x5481b5);}},{'key':'PlayM4_GetCanvasSize','value':function value(){return null!=this['oSuperRender']&&this['oSuperRender']['GetCanvasSize']();}},{'key':'PlayM4_GetBufferValue','value':function value(){return this['iInputMaxBufSize'];}},{'key':'PlayM4_GetLastError','value':function value(){return this['errorCode'];}},{'key':'PlayM4_GetPlayedTimeEx','value':function value(_0x31798d){_0x31798d(this['timeStamp']-this['startTimeStamp']);}},{'key':'PlayM4_SetAntialias','value':function value(_0xc95563){return null!=this['oSuperRender']&&this['oSuperRender']['SetAntialias'](_0xc95563);}},{'key':'PlayM4_SetWaterMarkFont','value':function value(_0x336ccd){return null!=this['oSuperRender']&&this['oSuperRender']['SetWaterMarkFont'](_0x336ccd);}},{'key':'PlayM4_SetWaterMarkImage','value':function value(_0x48c569){return null!=this['oSuperRender']&&this['oSuperRender']['SetWaterMarkImage'](_0x48c569);}},{'key':'PlayM4_SetD3DPostProcess','value':function value(_0x4e3c6a,_0x16fe0d){return null!=this['oSuperRender']&&this['oSuperRender']['SetD3DPostProcess'](_0x4e3c6a,_0x16fe0d);}},{'key':'getScriptDirectory','value':function value(){var _0x538f3f=self['location']['href'];return _0x538f3f['substr'](0x0,_0x538f3f['lastIndexOf']('/')+0x1);}},{'key':'downloadFile','value':function value(_0x3bec56,_0x6275b6){var _0x1db661=_0x3bec56;_0x3bec56 instanceof Blob||_0x3bec56 instanceof File||(_0x1db661=new Blob([_0x3bec56]));var _0x352672=window['URL']['createObjectURL'](_0x1db661),_0x5821e0=window['document']['createElement']('a');_0x5821e0['href']=_0x352672,_0x5821e0['download']=_0x6275b6;var _0x3078f4=document['createEvent']('MouseEvents');_0x3078f4['initEvent']('click',!0x0,!0x0),_0x5821e0['dispatchEvent'](_0x3078f4);}}]),_0x135c19;}();var _0x29f958=/*#__PURE__*/function(){var _ref=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:return _context2.abrupt("return",WebAssembly['validate'](new Uint8Array([0x0,0x61,0x73,0x6d,0x1,0x0,0x0,0x0,0x1,0x5,0x1,0x60,0x0,0x1,0x7b,0x3,0x2,0x1,0x0,0xa,0xa,0x1,0x8,0x0,0x41,0x0,0xfd,0xf,0xfd,0x62,0xb])));case 1:case"end":return _context2.stop();}},_callee);}));return function _0x29f958(){return _ref.apply(this,arguments);};}();var _0x2dcdca={'bSupHardOrSoft':!0x0,'bSupHardDecAVC':!0x0,'bSupHardDecHEVC':!0x0,'cmd':null,'errorCode':0x0,'status':null},_0x32f0cc=function(){function _0xed4ebc(_0xad1c9b,_0x5a09b4,_0x18dc1c){var _0x64ba48=this,_0xa98117=arguments['length']>0x3&&void 0x0!==arguments[0x3]?arguments[0x3]:0x0,_0x52da2e=arguments['length']>0x4&&void 0x0!==arguments[0x4]?arguments[0x4]:'webgl',_0xc1ebe6=arguments['length']>0x5&&void 0x0!==arguments[0x5]?arguments[0x5]:0x0,_0x4c0d11=arguments['length']>0x6&&void 0x0!==arguments[0x6]?arguments[0x6]:-0x1;if(_0xa7bfb2(this,_0xed4ebc),console['log']('%c>>>JSPlayerInterface\x20wasmPathV3:%s,\x20wasmPathV1:%s,\x20chromeVersion:%d','color:\x20red',_0xad1c9b,_0x5a09b4,_getFExplore()),this['szBasePathV3']=_0xad1c9b,this['szBasePathV1']=_0x5a09b4,this['fnCallBack']=_0x18dc1c,this['nUser']=_0xa98117,this['renderEngine']=_0x52da2e,this['hasWebWorker']=_0xc1ebe6,this['setHasThread']=_0x4c0d11,this['decodeEngine']=0x1,this['streamOpenMode']=0x0,this['printfFlag']=!0x1,this['canvasID']='',this['FECcanvasIDArray']=[],this['aTotalBuffer']=[],this['iFrameNum']=0x0,this['bWriteData']=!0x0,this['downloadInputDataFlag']=!0x1,this['rtpDataNeedAdd4Size']=!0x1,this['aInputDataBuffer']=[],this['iInputMaxBufSize']=0x200000,this['audioDisplayBufSize']=0x0,this['decodeFrameType']=0x0,this['decInterval']=-0x1,this['volume']=0x0,this['displayBuf']=0x0,this['anrParamLevel']=0x0,this['anrParamFlag']=0x0,this['resampleRate']=0x0,this['resampleFlag']=0x0,this['decodeERCLevel']=0x0,this['skipErrorData']=0x0,this['demuxModelType']=0x0,this['demuxModeFlag']=0x0,this['needResetBuffer']=0x0,this['globalBaseTime']={},this['globalBaseTime']['year']=0x0,this['inputBufSize']=0x0,this['waterFontParam']=null,this['waterImageParam']=null,this['needSetFFCB']=!0x1,this['FFCBFlag']=0x0,this['firstFrameCB']=null,this['needSetSecretKey']=!0x1,this['keyData']=null,this['runtimeModule']=0x0,this['runtimeCBFun']=null,this['needSetRunTimeInfoCB']=!0x1,this['needPlaySound']=!0x1,this['oJSPlayerObj']=null,this['supportWebCodecs']=window['_getFSupportWebCodecs'](),this['supportSab']=!!window['SharedArrayBuffer'],this['offscreen']=!!window['OffscreenCanvas'],this['supportOffscreen']=!0x1,this['offscreen']){var _0x13bf74=new OffscreenCanvas(0x1,0x1),_0x47c629=_0x13bf74['getContext']('webgl');_0x47c629&&(this['supportOffscreen']=!0x0),_0x13bf74=null,_0x47c629=null;}this['securityContext']=!0x0,'https:'===window['location']['protocol']||'localhost'===location['hostname']?this['securityContext']=!0x0:this['securityContext']=!0x1,this['supportSIMD']=!0x1,this['callBackParameter']=_0x2dcdca,this['jsplayerVersion']=0x3,this['supportWebCodecs']&&this['securityContext']?this['jsplayerVersion']=0x3:this['supportSab']&&this['supportOffscreen']&&this['securityContext']?this['jsplayerVersion']=0x2:this['jsplayerVersion']=0x1,this['jsplayerVersion']<0x3&&(this['callBackParameter']['bSupHardDecAVC']=!0x1,this['callBackParameter']['bSupHardDecHEVC']=!0x1,this['callBackParameter']['bSupHardOrSoft']=!0x1),null===this['szBasePathV3']&&null!=this['szBasePathV1']?this['jsplayerVersion']=0x1:null!=this['szBasePathV3']&&null===this['szBasePathV1']?(console['info']('%c>>>>\x20szBasePathV1\x20is\x20null\x20','color:\x20red'),this['jsplayerVersion']=0x3):null===this['szBasePathV3']&&null===this['szBasePathV1']&&(console['info']('%c>>>>\x20szBasePathV3\x20and\x20szBasePathV1\x20are\x20null\x20','color:\x20red'),this['fnCallBack'](this['callBackParameter'])),_0x29f958()['then'](function(_0x127fce){_0x127fce?(this['supportSIMD']=!0x0,console['log']('%c>>>>your\x20browser\x20protocol\x20is\x20%s,\x20hostname:%s,\x20WebCodecs:%s,Sab:%s,Offscreen:%s,SIMD:%s,jsplayerVersion:%d','color:\x20red',window['location']['protocol'],location['hostname'],this['supportWebCodecs'],this['supportSab'],this['supportOffscreen'],this['supportSIMD'],this['jsplayerVersion'])):(this['supportSIMD']=!0x1,console['log']('%c>>>>your\x20browser\x20protocol\x20is\x20%s,\x20hostname:%s,\x20WebCodecs:%s,Sab:%s,Offscreen:%s,SIMD:%s,jsplayerVersion:%d','color:\x20red',window['location']['protocol'],location['hostname'],this['supportWebCodecs'],this['supportSab'],this['supportOffscreen'],this['supportSIMD'],this['jsplayerVersion']));}['bind'](this)),this['jsplayerVersion']>0x1?this['oJSPlayerObj']=new _0x4dc8d6(this,this['szBasePathV3'],function(_0x4407dc){var _0x493a3a=_0x4407dc['bSupHardOrSoft'],_0x1740e6=_0x4407dc['bSupHardDecAVC'],_0x412416=_0x4407dc['bSupHardDecHEVC'];_0x64ba48['callBackParameter']['bSupHardDecAVC']=_0x1740e6,_0x64ba48['callBackParameter']['bSupHardDecHEVC']=_0x412416,_0x64ba48['callBackParameter']['bSupHardOrSoft']=_0x493a3a,_0x64ba48['callBackParameter']['cmd']='loaded',_0x64ba48['fnCallBack'](_0x64ba48['callBackParameter']);},this['nUser'],this['renderEngine'],this['hasWebWorker'],this['setHasThread'],this['jsplayerVersion']):this['oJSPlayerObj']=new _0x10ed50(this,this['szBasePathV1'],function(_0x325066){_0x325066['instance'];var _0x51c093=_0x325066['cmd'],_0x33e4cb=_0x325066['errorCode'],_0x4f9689=_0x325066['status'];_0x64ba48['callBackParameter']['bSupHardDecAVC']=!0x1,_0x64ba48['callBackParameter']['bSupHardDecHEVC']=!0x1,_0x64ba48['callBackParameter']['bSupHardOrSoft']=!0x1,_0x64ba48['callBackParameter']['cmd']=_0x51c093,_0x64ba48['callBackParameter']['errorCode']=_0x33e4cb,_0x64ba48['callBackParameter']['status']=_0x4f9689,_0x64ba48['fnCallBack'](_0x64ba48['callBackParameter']);},0x0);}return _0x3e0d7c(_0xed4ebc,[{'key':'JSPlayM4_SetStreamEnd','value':function value(){return 0x0;}},{'key':'JSPlayM4_GetPort','value':function value(){return this['printfFlag']&&console['log']('>>>>>yff>>>\x20JSPlayM4_GetPort\x201'),null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetPort\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1&&this['oJSPlayerObj']['JSPlayM4_GetPort'](),0x1);}},{'key':'JSPlayM4_SetStreamOpenMode','value':function value(_0x135db7){return this['printfFlag']&&console['log']('>>>>>yff20230817>>>>>\x20JSPlayM4_SetStreamOpenMode\x201\x20mode:'+_0x135db7),this['streamOpenMode']=_0x135db7,null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetStreamOpenMode\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetStreamOpenMode'](_0x135db7):this['oJSPlayerObj']['PlayM4_SetStreamOpenMode'](_0x135db7),0x1);}},{'key':'JSPlayM4_OpenStream','value':function value(_0x466bc7,_0x137b64,_0x3917ad){if(this['printfFlag']&&console['log']('>>>>>yff20230817>>>>>\x20JSPlayM4_OpenStream\x201\x20:'+_0x466bc7),0x4===_0x466bc7[0x8]&&0x0===_0x466bc7[0x9]&&(this['rtpDataNeedAdd4Size']=!0x0),this['downloadInputDataFlag']){var _0x4d7112=new Uint8Array(_0x466bc7['buffer']);this['downloadRTPData'](_0x4d7112),console['log']('write\x2040\x20hik\x20head');}var _0x419ab6=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_OpenStream\x20this.oJSPlayerObj\x20is\x20null'),0x0):(_0x419ab6=this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_OpenStream'](_0x466bc7,_0x137b64,_0x3917ad):this['oJSPlayerObj']['PlayM4_OpenStream'](_0x466bc7,_0x137b64,_0x3917ad),this['HIK40Head']=_0x466bc7,this['HIKHeadSize']=_0x137b64,this['HIKPoolSize']=_0x3917ad,0x10===_0x419ab6&&this['_switchV3ToV1'](this['streamOpenMode'],_0x466bc7,_0x137b64,_0x3917ad,this['needPlay']),_0x419ab6);}},{'key':'_switchV3ToV1','value':function value(_0x92a36c,_0x2bd312,_0x3810e5,_0x92deca,_0x4fe73a){var _0x5d6e0e=this;console['log']('%c5>switch\x20V3\x20to\x20V1','color:\x20red'),this['jsplayerVersion']=0x1,this['oJSPlayerObj']['JSPlayM4_Stop'](),this['oJSPlayerObj']['JSPlayM4_CloseStream'](),this['oJSPlayerObj']['JSPlayM4_FreePort'](),this['oJSPlayerObj']=null;var _0xf0464=new _0x10ed50(this,this['szBasePathV1'],function(_0x3fd0c9){_0x3fd0c9['instance'];var _0x2ffcde=_0x3fd0c9['cmd'],_0x5c9316=_0x3fd0c9['errorCode'],_0x43430e=_0x3fd0c9['status'];if('loaded'===_0x2ffcde)_0x5d6e0e['oJSPlayerObj']=_0xf0464,_0x5d6e0e['callBackParameter']['cmd']=_0x2ffcde,_0x5d6e0e['callBackParameter']['errorCode']=_0x5c9316,_0x5d6e0e['callBackParameter']['status']=_0x43430e,_0x5d6e0e['JSPlayM4_SetStreamOpenMode'](_0x92a36c),_0x5d6e0e['JSPlayM4_OpenStream'](_0x2bd312,_0x3810e5,_0x92deca),(_0x4fe73a||_0x5d6e0e['needPlay'])&&_0x5d6e0e['JSPlayM4_Play'](_0x5d6e0e['canvasID']),_0x5d6e0e['_switchV3ToV1ResetParam']();},0x0);}},{'key':'_switchV3ToV1ResetParam','value':function value(){return this['needSetSecretKey']&&this['JSPlayM4_SetSecretKey'](this['keyData']),this['needSetFFCB']&&this['JSPlayM4_SetFirstFrameCallBack'](this['FFCBFlag'],this['firstFrameCB']),this['needSetRunTimeInfoCB']&&this['JSPlayM4_SetRunTimeInfoCallBackEx'](this['runtimeModule'],this['runtimeCBFun']),this['needPlaySound']&&this['JSPlayM4_PlaySound'](),0x0!=this['skipErrorData']&&this['oJSPlayerObj']['PlayM4_SkipErrorData'](this['skipErrorData']),0x0!=this['demuxModeFlag']&&this['oJSPlayerObj']['PlayM4_SetDemuxModel'](this['demuxModelType'],this['demuxModeFlag']),0x0!=this['globalBaseTime']['year']&&this['oJSPlayerObj']['PlayM4_SetGlobalBaseTime'](this['globalBaseTime']['year'],this['globalBaseTime']['month'],this['globalBaseTime']['day'],this['globalBaseTime']['hour'],this['globalBaseTime']['min'],this['globalBaseTime']['sec'],this['globalBaseTime']['ms']),-0x1!=this['decInterval']&&this['oJSPlayerObj']['PlayM4_SetIFrameDecInterval'](this['decInterval']),0x0!=this['decodeERCLevel']&&this['oJSPlayerObj']['PlayM4_SetDecodeERC'](this['decodeERCLevel']),0x0!=this['volume']&&this['JSPlayM4_SetVolume'](this['volume']),0x0!=this['anrParamFlag']&&this['oJSPlayerObj']['PlayM4_SetANRParam'](this['anrParamFlag'],this['anrParamLevel']),0x0!=this['resampleFlag']&&this['oJSPlayerObj']['PlayM4_SetResampleValue'](this['resampleFlag'],this['resampleRate']),0x0!=this['displayBuf']&&this['oJSPlayerObj']['PlayM4_SetDisplayBuf'](this['displayBuf']),null!=this['waterFontParam']&&this['oJSPlayerObj']['PlayM4_SetWaterMarkFont'](this['waterFontParam']),null!=this['waterImageParam']&&this['oJSPlayerObj']['PlayM4_SetWaterMarkImage'](this['waterImageParam']),0x0!=this['audioDisplayBufSize']&&this['oJSPlayerObj']['PlayM4_SetAudioDisplayBuf'](this['audioDisplayBufSize']),0x0!=this['decodeFrameType']&&this['JSPlayM4_SetDecodeFrameType'](this['decodeFrameType']),0x0!=this['needResetBuffer']&&this['oJSPlayerObj']['PlayM4_ReleaseInputBuffer'](),0x0!=this['inputBufSize']&&this['oJSPlayerObj']['PlayM4_SetInputBufSize'](this['inputBufSize']),0x1;}},{'key':'JSPlayM4_SetDecodeEngine','value':function value(_0x4bfbf2){if(this['printfFlag']&&console['log']('>>>>>yff20230817>>>>>\x20JSPlayM4_SetDecodeEngine\x201:'+_0x4bfbf2),0x0!=_0x4bfbf2&&0x1!=_0x4bfbf2)return console['log']('0\x20is\x20V3softDecode,\x201\x20is\x20V3hardDecoder,decodeEngine:'+_0x4bfbf2),0x0;this['decodeEngine']=_0x4bfbf2;var _0x3f2b8a=0x1;if(this['jsplayerVersion']>0x1){if(!this['supportSab'])return console['info']('%c3>JSPlayM4_SetDecodeEngine(0\x20is\x20soft,1\x20is\x20hard):%d,SharedArrayBuffer\x20Error\x20,\x20does\x20not\x20support\x20Soft\x20Decdoe!!!!!','color:\x20red',_0x4bfbf2),0x0;_0x3f2b8a=this['oJSPlayerObj']['JSPlayM4_SetDecodeEngine'](this['decodeEngine']);}return _0x3f2b8a;}},{'key':'JSPlayM4_DownloadData','value':function value(){return this['downloadInputDataFlag']=!0x0,0x1;}},{'key':'JSPlayM4_SetAudioDisplayBuf','value':function value(_0x2997bd){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetAudioDisplayBuf\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['audioDisplayBufSize']=_0x2997bd,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetAudioDisplayBuf'](_0x2997bd):this['oJSPlayerObj']['PlayM4_SetAudioDisplayBuf'](_0x2997bd));}},{'key':'JSPlayM4_Play','value':function value(){var _0x814eac=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null;this['canvasID']=_0x814eac;var _0x147d92=0x1;return this['printfFlag']&&console['log']('>>>>>yff20230817>>>>>\x20JSPlayM4_Play\x201\x20this.supportSab:'+this['supportSab']),null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_Play\x20this.oJSPlayerObj\x20is\x20null'),this['needPlay']=!0x0,0x0):(this['jsplayerVersion']>0x1?(_0x147d92=this['oJSPlayerObj']['JSPlayM4_Play'](_0x814eac),0x0!=this['aInputDataBuffer']['length']&&(this['oJSPlayerObj']['JSPlayM4_InputData'](new Uint8Array(this['aInputDataBuffer']),this['aInputDataBuffer']['length']),this['aInputDataBuffer']['splice'](0x0,this['aInputDataBuffer']['length']))):(_0x147d92=this['oJSPlayerObj']['PlayM4_Play'](_0x814eac),0x0!=this['aInputDataBuffer']['length']&&(this['oJSPlayerObj']['PlayM4_InputData'](new Uint8Array(this['aInputDataBuffer']),this['aInputDataBuffer']['length']),this['aInputDataBuffer']['splice'](0x0,this['aInputDataBuffer']['length']))),_0x147d92);}},{'key':'JSPlayM4_InputData','value':function value(_0x4b966e,_0x871e1a){var _0x24fcae=0x1;if(null===this['oJSPlayerObj']){var _0x60ac0=this['aInputDataBuffer']['length'];if(_0x60ac0+_0x871e1a>this['iInputMaxBufSize'])return console['log']('WasmPlayer\x20input\x20over'),0x0;for(var _0x2e1c8f=0x0;_0x2e1c8f<_0x871e1a;_0x2e1c8f++)this['aInputDataBuffer'][_0x60ac0+_0x2e1c8f]=_0x4b966e[_0x2e1c8f];return 0x0;}if(_0x24fcae=this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_InputData'](_0x4b966e,_0x871e1a):this['oJSPlayerObj']['PlayM4_InputData'](_0x4b966e,_0x871e1a),this['downloadInputDataFlag']){if(this['rtpDataNeedAdd4Size']){var _0xde5b49=null,_0x128801=_0x871e1a+0x4,_0x2e203e=new Uint32Array([_0x871e1a]),_0x116a9b=new Uint8Array(_0x2e203e['buffer']);(_0xde5b49=new Uint8Array(_0x128801))['set'](_0x116a9b,0x0),_0xde5b49['set'](_0x4b966e,0x4),this['downloadRTPData'](_0xde5b49);}else this['downloadRTPData'](_0x4b966e);}return _0x24fcae;}},{'key':'JSPlayM4_Stop','value':function value(){var _0x2c6bf8=!(arguments['length']>0x0&&void 0x0!==arguments[0x0])||arguments[0x0];if(null===this['oJSPlayerObj'])return console['log']('>>>>>yff>>>\x20JSPlayM4_Stop\x20this.oJSPlayerObj\x20is\x20null'),0x0;if(this['bWriteData']&&this['iFrameNum']>0x0){console['log']('download'+this['iFrameNum']+'Psdata');var _0x42966e=new Uint8Array(this['aTotalBuffer']);this['_downloadFile'](_0x42966e,'RTPRaw.data'),this['aTotalBuffer']['splice'](0x0,this['aTotalBuffer']['length']),this['bWriteData']=!0x1,this['iFrameNum']=0x0,_0x42966e=null;}return this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_Stop'](_0x2c6bf8):this['oJSPlayerObj']['PlayM4_Stop'](_0x2c6bf8);}},{'key':'JSPlayM4_CloseStream','value':function value(){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20\x20JSPlayM4_CloseStream\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_CloseStream']():this['oJSPlayerObj']['PlayM4_CloseStream']();}},{'key':'JSPlayM4_FreePort','value':function value(){var _0x3590e4=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FreePort\x20this.oJSPlayerObj\x20is\x20null'),0x0):(_0x3590e4=this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_FreePort']():this['oJSPlayerObj']['PlayM4_FreePort'](),this['oJSPlayerObj']=null,_0x3590e4);}},{'key':'JSPlayM4_SetDecodeFrameType','value':function value(_0x349e7f){var _0x90eb17=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDecodeFrameType\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['decodeFrameType']=_0x349e7f,this['jsplayerVersion']>0x1?_0x90eb17=this['oJSPlayerObj']['JSPlayM4_SetDecodeFrameType'](_0x349e7f):0x7==_0x349e7f?_0x90eb17=this['oJSPlayerObj']['PlayM4_SetLostFrameMode'](0x1):(_0x90eb17=this['oJSPlayerObj']['PlayM4_SetLostFrameMode'](0x0),_0x90eb17=this['oJSPlayerObj']['PlayM4_SetDecodeFrameType'](_0x349e7f)),_0x90eb17);}},{'key':'JSPlayM4_PlaySound','value':function value(){return this['needPlaySound']=!0x0,null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_PlaySound\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_PlaySound']():this['oJSPlayerObj']['PlayM4_PlaySound'](0x0);}},{'key':'JSPlayM4_GetJPEG','value':function value(){var _0x36c209=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null,_0x131ba3=!(arguments['length']>0x1&&void 0x0!==arguments[0x1])||arguments[0x1];return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetJPEG\x20this.oJSPlayerObj\x20is\x20null'),0x0):(console['log']('>>>1\x20JSPlayM4_GetJPEG\x20jpegDataCallback:'+_0x36c209+',downloadJPEG:'+_0x131ba3+',this.jsplayerVersion:'+this['jsplayerVersion']),this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetJPEG'](_0x36c209,_0x131ba3):this['oJSPlayerObj']['PlayM4_GetJPEG'](_0x36c209));}},{'key':'JSPlayM4_GetBMP','value':function value(){var _0x17afcf=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null,_0x226203=!(arguments['length']>0x1&&void 0x0!==arguments[0x1])||arguments[0x1];return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetBMP\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetBMP'](_0x17afcf,_0x226203):this['oJSPlayerObj']['PlayM4_GetBMP'](_0x17afcf);}},{'key':'JSPlayM4_GetCropJPEG','value':function value(){var _0x24f1bd=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetCropJPEG\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x24f1bd=this['oJSPlayerObj']['JSPlayM4_GetCropJPEG']():console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20GetCropJPEG','color:\x20red'),_0x24f1bd);}},{'key':'JSPlayM4_GetCropBMP','value':function value(){var _0x450a81=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetCropBMP\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x450a81=this['oJSPlayerObj']['JSPlayM4_GetCropBMP']():console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20GetCropBMP','color:\x20red'),_0x450a81);}},{'key':'JSPlayM4_GetCanvasCapture','value':function value(_0x26b68c){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetCanvasCapture\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetCanvasCapture'](_0x26b68c):this['oJSPlayerObj']['PlayM4_GetCanvasCapture'](_0x26b68c);}},{'key':'JSPlayM4_StopSound','value':function value(){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_StopSound\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_StopSound']():this['oJSPlayerObj']['PlayM4_StopSound']();}},{'key':'JSPlayM4_GetSDKVersion','value':function value(){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetSDKVersion\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetSDKVersion']():this['oJSPlayerObj']['PlayM4_GetSdkVersion']();}},{'key':'JSPlayM4_GetBuildDate','value':function value(){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetBuildDate\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetBuildDate']():this['oJSPlayerObj']['PlayM4_GetBuildDate']();}},{'key':'JSPlayM4_GetLastError','value':function value(){return null===this['oJSPlayerObj']?0x0:this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetLastError']():this['oJSPlayerObj']['PlayM4_GetLastError']();}},{'key':'JSPlayM4_Fast','value':function value(){var _0x438849=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_Fast\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1&&(_0x438849=this['oJSPlayerObj']['JSPlayM4_Fast']()),_0x438849);}},{'key':'JSPlayM4_Slow','value':function value(){var _0x11daaa=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_Slow\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1&&(_0x11daaa=this['oJSPlayerObj']['JSPlayM4_Slow']()),_0x11daaa);}},{'key':'JSPlayM4_SetIFrameDecInterval','value':function value(_0x409b57){return this['decInterval']=_0x409b57,null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetIFrameDecInterval\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetIFrameDecInterval'](_0x409b57):this['oJSPlayerObj']['PlayM4_SetIFrameDecInterval'](_0x409b57);}},{'key':'JSPlayM4_Pause','value':function value(_0x5bba4a){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_Pause\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_Pause'](_0x5bba4a):this['oJSPlayerObj']['PlayM4_Pause'](_0x5bba4a);}},{'key':'JSPlayM4_OneByOne','value':function value(){var _0xdaf5da=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_OneByOne\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_OneByOne']():this['oJSPlayerObj']['PlayM4_OneByOne'](_0xdaf5da);}},{'key':'JSPlayM4_OneByOneResume','value':function value(){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_OneByOneResume\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_OneByOneResume']():this['oJSPlayerObj']['PlayM4_Pause'](!0x1);}},{'key':'JSPlayM4_SetVolume','value':function value(_0x73220d){var _0x56f64e=0x1;if(null===this['oJSPlayerObj'])return console['log']('>>>>>yff>>>\x20JSPlayM4_SetVolume\x20this.oJSPlayerObj\x20is\x20null'),0x0;if(this['volume']=_0x73220d,this['jsplayerVersion']>0x1)_0x56f64e=this['oJSPlayerObj']['JSPlayM4_SetVolume'](_0x73220d);else {var _0x4d3af7=_0x73220d/0xffff*0x64;_0x56f64e=this['oJSPlayerObj']['PlayM4_SetVolume'](_0x4d3af7);}return _0x56f64e;}},{'key':'JSPlayM4_GetVolume','value':function value(){var _0x3a4354=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null,_0x12a0f8=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetVolume\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?(_0x12a0f8=this['oJSPlayerObj']['JSPlayM4_GetVolume'](),null!=_0x3a4354&&_0x3a4354(_0x12a0f8)):_0x12a0f8=this['oJSPlayerObj']['PlayM4_GetVolume'](function(_0x2cc04c){null!=_0x3a4354&&_0x3a4354(_0x2cc04c/0x64*0xffff);}),_0x12a0f8);}},{'key':'JSPlayM4_SetDisplayRegion','value':function value(_0x1f3ed0,_0x268fed,_0x4c72ee,_0x144c4c,_0x2a5287){var _0x2f29c4=arguments['length']>0x5&&void 0x0!==arguments[0x5]&&arguments[0x5],_0x731096=!(arguments['length']>0x6&&void 0x0!==arguments[0x6])||arguments[0x6],_0x4ed38e=0x1;if(null===this['oJSPlayerObj'])return console['log']('>>>>>yff>>>\x20JSPlayM4_SetDisplayRegion\x20this.oJSPlayerObj\x20is\x20null'),0x0;if(this['jsplayerVersion']>0x1)_0x4ed38e=this['oJSPlayerObj']['JSPlayM4_SetDisplayRegion'](_0x1f3ed0,_0x268fed,_0x4c72ee,_0x144c4c,_0x2a5287,_0x2f29c4,_0x731096);else {var _0x13d8f8={};_0x13d8f8['left']=_0x268fed,_0x13d8f8['right']=_0x4c72ee,_0x13d8f8['top']=_0x144c4c,_0x13d8f8['bottom']=_0x2a5287,_0x4ed38e=this['oJSPlayerObj']['PlayM4_SetDisplayRegion'](_0x13d8f8,!_0x2f29c4,_0x731096);}return _0x4ed38e;}},{'key':'JSPlayM4_SetPrintLogFlag','value':function value(_0x2aed1b){return this['printfFlag']=_0x2aed1b,null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetPrintLogFlag\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetPrintLogFlag'](_0x2aed1b):this['oJSPlayerObj']['PlayM4_OpenPlayerSDKPrintLog'](_0x2aed1b);}},{'key':'JSPlayM4_RenderPrivateData','value':function value(_0x4f6065,_0x806df1){var _0x3306f5=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_RenderPrivateData\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x3306f5=this['oJSPlayerObj']['JSPlayM4_RenderPrivateData'](_0x4f6065,_0x806df1):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20RenderPrivateData','color:\x20red'),_0x3306f5);}},{'key':'JSPlayM4_RenderPrivateDataEx','value':function value(_0x60e56,_0x5cd831,_0x385454){var _0x332f95=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_RenderPrivateDataEx\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x332f95=this['oJSPlayerObj']['JSPlayM4_RenderPrivateDataEx'](_0x60e56,_0x5cd831,_0x385454):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20RenderPrivateDataEx','color:\x20red'),_0x332f95);}},{'key':'JSPlayM4_SetCanvasSize','value':function value(_0x2379be,_0x5b0339){var _0x3bc18a=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetCanvasSize\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetCanvasSize'](_0x2379be,_0x5b0339,_0x3bc18a):this['oJSPlayerObj']['PlayM4_SetCanvasSize'](_0x2379be,_0x5b0339);}},{'key':'JSPlayM4_SetDisplayBuf','value':function value(_0x374cb0){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDisplayBuf\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['displayBuf']=_0x374cb0,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetDisplayBuf'](_0x374cb0):this['oJSPlayerObj']['PlayM4_SetDisplayBuf'](_0x374cb0));}},{'key':'JSPlayM4_GetSourceBufferRemain','value':function value(){return null===this['oJSPlayerObj']?0x0:this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetSourceBufferRemain']():this['oJSPlayerObj']['PlayM4_GetInputBufSize']();}},{'key':'JSPlayM4_GetBufferValue','value':function value(_0x5d6217){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetBufferValue\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetBufferValue'](_0x5d6217):this['oJSPlayerObj']['PlayM4_GetBufferValue'](_0x5d6217);}},{'key':'JSPlayM4_ReversePlay','value':function value(){var _0x623ca6=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_ReversePlay\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x623ca6=this['oJSPlayerObj']['JSPlayM4_ReversePlay']():console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20ReversePlay','color:\x20red'),_0x623ca6);}},{'key':'JSPlayM4_SetDecodeThreadNum','value':function value(_0x219d3a){var _0x20064c=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDecodeThreadNum\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x20064c=this['oJSPlayerObj']['JSPlayM4_SetDecodeThreadNum'](_0x219d3a):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SetDecodeThreadNum,\x20V1.X\x20decocde\x20only\x201\x20thread','color:\x20red'),_0x20064c);}},{'key':'JSPlayM4_GetCanvasSize','value':function value(){var _0x1856f7=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:0x0;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetCanvasSize\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetCanvasSize'](_0x1856f7):this['oJSPlayerObj']['PlayM4_GetCanvasSize']();}},{'key':'JSPlayM4_DisplayLostFrames','value':function value(_0x457d51,_0x322e8f,_0x38688d){var _0x35e4d7=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_DisplayLostFrames\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x35e4d7=this['oJSPlayerObj']['JSPlayM4_DisplayLostFrames'](_0x457d51,_0x322e8f,_0x38688d):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20DisplayLostFrames','color:\x20red'),_0x35e4d7);}},{'key':'JSPlayM4_SetANRParam','value':function value(_0x21683f,_0x4a49a8){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetANRParam\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['anrParamLevel']=_0x4a49a8,this['anrParamFlag']=_0x21683f,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetANRParam'](_0x21683f,_0x4a49a8):this['oJSPlayerObj']['PlayM4_SetANRParam'](_0x21683f,_0x4a49a8));}},{'key':'JSPlayM4_SetResampleValue','value':function value(_0x57e4b2,_0x514493){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetResampleValue\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['resampleRate']=_0x514493,this['resampleFlag']=_0x57e4b2,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetResampleValue'](_0x57e4b2,_0x514493):this['oJSPlayerObj']['PlayM4_SetResampleValue'](_0x57e4b2,_0x514493));}},{'key':'JSPlayM4_SetAntialias','value':function value(_0x5a3b25){var _0x5e87fa=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetAntialias\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x5e87fa=this['oJSPlayerObj']['JSPlayM4_SetAntialias'](_0x5a3b25):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20JSPlayM4_SetAntialias\x2020230922','color:\x20red'),_0x5e87fa);}},{'key':'JSPlayM4_SyncToAudio','value':function value(_0x43c017){var _0x3ab586=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SyncToAudio\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x3ab586=this['oJSPlayerObj']['JSPlayM4_SyncToAudio'](_0x43c017):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SyncToAudio','color:\x20red'),_0x3ab586);}},{'key':'JSPlayM4_SetAudioThreadModel','value':function value(_0xe14a49){var _0x1497ac=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetAudioThreadModel\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x1497ac=this['oJSPlayerObj']['JSPlayM4_SetAudioThreadModel'](_0xe14a49):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SetAudioThreadModel','color:\x20red'),_0x1497ac);}},{'key':'JSPlayM4_SetDecodeERC','value':function value(_0x3f8183){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDecodeERC\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['decodeERCLevel']=_0x3f8183,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetDecodeERC'](_0x3f8183):this['oJSPlayerObj']['PlayM4_SetDecodeERC'](_0x3f8183));}},{'key':'JSPlayM4_SkipErrorData','value':function value(_0x38bbbe){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SkipErrorData\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['skipErrorData']=_0x38bbbe,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SkipErrorData'](_0x38bbbe):this['oJSPlayerObj']['PlayM4_SkipErrorData'](_0x38bbbe));}},{'key':'JSPlayM4_SetDemuxModel','value':function value(_0x5b4e4c,_0x3ee0bb){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDemuxModel\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['demuxModelType']=_0x5b4e4c,this['demuxModeFlag']=_0x3ee0bb,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetDemuxModel'](_0x5b4e4c,_0x3ee0bb):this['oJSPlayerObj']['PlayM4_SetDemuxModel'](_0x5b4e4c,_0x3ee0bb));}},{'key':'JSPlayM4_SetD3DPostProcess','value':function value(_0x47a36e,_0x2653f9){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetD3DPostProcess\x20this.oJSPlayerObj\x20is\x20null'),0x0):'number'!=typeof _0x47a36e||'number'!=typeof _0x2653f9?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetD3DPostProcess\x20nPostType\x20or\x20fValue\x20is\x20not\x20number'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetD3DPostProcess'](_0x47a36e,_0x2653f9):this['oJSPlayerObj']['PlayM4_SetD3DPostProcess'](_0x47a36e,_0x2653f9);}},{'key':'JSPlayM4_SetFirstFrameCallBack','value':function value(_0x41f4b4,_0x1620c3){return this['needSetFFCB']=!0x0,this['FFCBFlag']=_0x41f4b4,this['firstFrameCB']=_0x1620c3,null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetFirstFrameCallBack\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetFirstFrameCallBack'](_0x41f4b4,_0x1620c3):this['oJSPlayerObj']['PlayM4_SetFirstFrameCallBack'](_0x41f4b4,_0x1620c3);}},{'key':'JSPlayM4_SetDecCallBack','value':function value(_0x2094f6,_0x12f667){return null===this['oJSPlayerObj']||'function'!=typeof _0x12f667?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDecCallBack\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetDecCallBack'](_0x2094f6,_0x12f667):this['oJSPlayerObj']['PlayM4_SetDecCallBack'](_0x2094f6,_0x12f667);}},{'key':'JSPlayM4_SetDisplayCallBack','value':function value(_0x5a7fa2,_0x48eeb0){return null===this['oJSPlayerObj']||'function'!=typeof _0x48eeb0?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDisplayCallBack\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetDisplayCallBack'](_0x5a7fa2,_0x48eeb0):this['oJSPlayerObj']['PlayM4_SetDisplayCallBack'](_0x48eeb0);}},{'key':'JSPlayM4_SetFrameInfoCallBack','value':function value(_0x1813ed){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetFrameInfoCallBack\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetFrameInfoCallBack'](_0x1813ed):this['oJSPlayerObj']['PlayM4_SetFrameInfoCallBack'](_0x1813ed);}},{'key':'JSPlayM4_SetDecCBStream','value':function value(_0x283b6c){return null===this['oJSPlayerObj']||_0x283b6c<0x1||_0x283b6c>0x3?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetDecCBStream\x20this.oJSPlayerObj\x20is\x20null\x20stream:'+_0x283b6c),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetDecCBStream'](_0x283b6c):this['oJSPlayerObj']['PlayM4_SetDecCBStream'](_0x283b6c);}},{'key':'JSPlayM4_GetFrameInfo','value':function value(){if(null===this['oJSPlayerObj'])return console['log']('>>>>>yff>>>\x20JSPlayM4_GetFrameInfo\x20this.oJSPlayerObj\x20is\x20null'),0x0;return this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetFrameInfo']():this['oJSPlayerObj']['PlayM4_GetFrameInfo']();}},{'key':'JSPlayM4_GetAdditionData','value':function value(){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetAdditionData\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetAdditionData']():(console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20GetAdditionData','color:\x20red'),0x0);}},{'key':'JSPlayM4_SetAdditionDataCallBack','value':function value(_0x3019cc,_0x3ad618,_0x37a9c2){var _0x10bf14=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetAdditionDataCallBack\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x10bf14=this['oJSPlayerObj']['JSPlayM4_SetAdditionDataCallBack'](_0x3019cc,_0x3ad618,_0x37a9c2):(console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SetAdditionDataCallBack','color:\x20red'),_0x10bf14=0x0),_0x10bf14);}},{'key':'JSPlayM4_GetPlayedTimeEx','value':function value(_0x4f89ce){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetPlayedTimeEx\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_GetPlayedTimeEx'](_0x4f89ce):this['oJSPlayerObj']['PlayM4_GetPlayedTimeEx'](_0x4f89ce);}},{'key':'JSPlayM4_GetFileTime','value':function value(){var _0x156b82=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetFileTime\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x156b82=this['oJSPlayerObj']['JSPlayM4_GetFileTime']():console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20GetPlayedTimeEx','color:\x20red'),_0x156b82);}},{'key':'JSPlayM4_GetMpOffset','value':function value(_0x3e9a37){var _0x561415=-0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetMpOffset\x20this.oJSPlayerObj\x20is\x20null'),-0x1):(this['jsplayerVersion']>0x1?_0x561415=this['oJSPlayerObj']['JSPlayM4_GetMpOffset'](_0x3e9a37):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20GetMpOffset','color:\x20red'),_0x561415);}},{'key':'JSPlayM4_ResetBuffer','value':function value(_0x5f26b6){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_ResetBuffer\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['needResetBuffer']=!0x0,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_ResetBuffer'](_0x5f26b6):this['oJSPlayerObj']['PlayM4_ReleaseInputBuffer']());}},{'key':'JSPlayM4_SetGlobalBaseTime','value':function value(_0x337cf4,_0x3e169d,_0x50b63f,_0x400c6e,_0x2faf9c,_0x48971c,_0x134ebc){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetGlobalBaseTime\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['globalBaseTime']={'year':_0x337cf4,'month':_0x3e169d,'day':_0x50b63f,'hour':_0x400c6e,'min':_0x2faf9c,'sec':_0x48971c,'ms':_0x134ebc},this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetGlobalBaseTime'](_0x337cf4,_0x3e169d,_0x50b63f,_0x400c6e,_0x2faf9c,_0x48971c,_0x134ebc):this['oJSPlayerObj']['PlayM4_SetGlobalBaseTime'](_0x337cf4,_0x3e169d,_0x50b63f,_0x400c6e,_0x2faf9c,_0x48971c,_0x134ebc));}},{'key':'JSPlayM4_SetSecretKey','value':function value(_0x24f5ab){return this['needSetSecretKey']=!0x0,this['keyData']=_0x24f5ab,null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetSecretKey\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetSecretKey'](_0x24f5ab):this['oJSPlayerObj']['PlayM4_SetSecretKey'](0x1,_0x24f5ab,0x80);}},{'key':'JSPlayM4_SetRunTimeInfoCallBackEx','value':function value(_0x5606fd,_0x1fccd4){return this['runtimeModule']=_0x5606fd,this['runtimeCBFun']=_0x1fccd4,this['needSetRunTimeInfoCB']=!0x0,null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetRunTimeInfoCallBackEx\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetRunTimeInfoCallBackEx'](_0x5606fd,_0x1fccd4):this['oJSPlayerObj']['PlayM4_SetRunTimeInfoCallBackEx'](_0x5606fd,_0x1fccd4);}},{'key':'JSPlayM4_SetPlayOrBackSwitchMode','value':function value(_0x6fbc40){var _0x27b568=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetPlayOrBackSwitchMode\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x27b568=this['oJSPlayerObj']['JSPlayM4_SetPlayOrBackSwitchMode'](_0x6fbc40):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SetPlayOrBackSwitchMode','color:\x20red'),_0x27b568);}},{'key':'JSPlayM4_SetStretchPlay','value':function value(_0x4de19f,_0x5acea8){var _0x3b9958=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetStretchPlay\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x3b9958=this['oJSPlayerObj']['JSPlayM4_SetStretchPlay'](_0x4de19f,_0x5acea8):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SetStretchPlay','color:\x20red'),_0x3b9958);}},{'key':'JSPlayM4_SetAutoSmoothPlay','value':function value(_0x5aa22d){var _0x45c6cd=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetAutoSmoothPlay\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x45c6cd=this['oJSPlayerObj']['JSPlayM4_SetAutoSmoothPlay'](_0x5aa22d):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SetAutoSmoothPlay','color:\x20red'),_0x45c6cd);}},{'key':'JSPlayM4_KeepPlaySpeed','value':function value(_0x121e8e){var _0x26b886=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_KeepPlaySpeed\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x26b886=this['oJSPlayerObj']['JSPlayM4_KeepPlaySpeed'](_0x121e8e):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20KeepPlaySpeed','color:\x20red'),_0x26b886);}},{'key':'JSPlayM4_IgnoreHeaderAudioDefine','value':function value(_0xc99d35){var _0x4661a7=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_IgnoreHeaderAudioDefine\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x4661a7=this['oJSPlayerObj']['JSPlayM4_IgnoreHeaderAudioDefine'](_0xc99d35):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20IgnoreHeaderAudioDefine','color:\x20red'),_0x4661a7);}},{'key':'JSPlayM4_SetSycGroup','value':function value(_0x10eb6b){var _0x1e9a02=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetSycGroup\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x1e9a02=this['oJSPlayerObj']['JSPlayM4_SetSycGroup'](_0x10eb6b):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20SetSycGroup','color:\x20red'),_0x1e9a02);}},{'key':'JSPlayM4_FEC_SetCanvasID','value':function value(){var _0x2445f7=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:null,_0x55807c=0x1;return this['FECcanvasIDArray']=_0x2445f7['split'](','),null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_SetCanvasID\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x55807c=this['oJSPlayerObj']['JSPlayM4_FEC_SetCanvasID'](_0x2445f7):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x55807c);}},{'key':'JSPlayM4_FEC_ResetCorrectType','value':function value(_0x195a05,_0x158703,_0x66d2f9){var _0x3e963=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_ResetCorrectType\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x3e963=this['oJSPlayerObj']['JSPlayM4_FEC_ResetCorrectType'](_0x195a05,_0x158703,_0x66d2f9):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x3e963);}},{'key':'JSPlayM4_FEC_GetPort','value':function value(_0x2a28d1,_0x2947be){var _0x256a5f=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:null;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_GetPort\x20this.oJSPlayerObj\x20is\x20null'),-0x1):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_FEC_GetPort'](_0x2a28d1,_0x2947be,_0x256a5f):-0x1;}},{'key':'JSPlayM4_FEC_Enable','value':function value(_0x2b1150){var _0x4b7cd8=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_Enable\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x4b7cd8=this['oJSPlayerObj']['JSPlayM4_FEC_Enable'](_0x2b1150):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20\x20FEC\x2020230922','color:\x20red'),_0x4b7cd8);}},{'key':'JSPlayM4_FEC_SetParam','value':function value(_0x912fec,_0x10d9c1){var _0x6a97e1=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_SetParam\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x6a97e1=this['oJSPlayerObj']['JSPlayM4_FEC_SetParam'](_0x912fec,_0x10d9c1):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20\x20FEC\x2020230922','color:\x20red'),_0x6a97e1);}},{'key':'JSPlayM4_FEC_GetParam','value':function value(_0x10c7ac){var _0x3fe714=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:null;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_GetParam\x20this.oJSPlayerObj\x20is\x20null'),0x0):this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_FEC_GetParam'](_0x10c7ac,_0x3fe714):(console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20\x20FEC\x2020230922','color:\x20red'),0x1);}},{'key':'JSPlayM4_FEC_SetViewParam','value':function value(_0x460b2f,_0x3e0948,_0x14237b){var _0x535d10=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_SetViewParam\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x535d10=this['oJSPlayerObj']['JSPlayM4_FEC_SetViewParam'](_0x460b2f,_0x3e0948,_0x14237b):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20\x20FEC\x2020230922','color:\x20red'),_0x535d10);}},{'key':'JSPlayM4_FEC_GetViewParam','value':function value(_0x1f2034,_0x28ac9b,_0x2f308c){var _0x57209a=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_GetViewParam\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x57209a=this['oJSPlayerObj']['JSPlayM4_FEC_GetViewParam'](_0x1f2034,_0x28ac9b,_0x2f308c):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20\x20FEC\x2020230922','color:\x20red'),_0x57209a);}},{'key':'JSPlayM4_FEC_SetWnd','value':function value(_0x58951a,_0x29afd9){var _0x3801f=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_SetWnd\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x3801f=this['oJSPlayerObj']['JSPlayM4_FEC_SetWnd'](_0x58951a,_0x29afd9):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x3801f);}},{'key':'JSPlayM4_FEC_Disable','value':function value(){var _0x4b6163=arguments['length']>0x0&&void 0x0!==arguments[0x0]?arguments[0x0]:0x0,_0x23d1c7=!(arguments['length']>0x1&&void 0x0!==arguments[0x1])||arguments[0x1],_0x470eaf=arguments['length']>0x2&&void 0x0!==arguments[0x2]&&arguments[0x2],_0x1d7c5a=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_Disable\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x1d7c5a=this['oJSPlayerObj']['JSPlayM4_FEC_Disable'](_0x4b6163,_0x23d1c7,_0x470eaf):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x1d7c5a);}},{'key':'JSPlayM4_FEC_DelPort','value':function value(_0xf07514){var _0x352b8e=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_DelPort\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x352b8e=this['oJSPlayerObj']['JSPlayM4_FEC_DelPort'](_0xf07514):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x352b8e);}},{'key':'JSPlayM4_FEC_SetDisplayRegion','value':function value(_0x4a9761){var _0x204f29=arguments['length']>0x1&&void 0x0!==arguments[0x1]?arguments[0x1]:0x0,_0x5c3e29=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x2d637d=arguments['length']>0x3?arguments[0x3]:void 0x0,_0x450f32=arguments['length']>0x4&&void 0x0!==arguments[0x4]?arguments[0x4]:null,_0x44fbc4=arguments['length']>0x5?arguments[0x5]:void 0x0,_0x2769c5=arguments['length']>0x6?arguments[0x6]:void 0x0,_0x8b7f41=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_SetDisplayRegion\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x8b7f41=this['oJSPlayerObj']['JSPlayM4_FEC_SetDisplayRegion'](_0x4a9761,_0x204f29,_0x5c3e29,_0x2d637d,_0x450f32,_0x44fbc4,_0x2769c5):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x8b7f41);}},{'key':'JSPlayM4_FEC_SetBackCilling','value':function value(_0x4921fa,_0x19425e){var _0x3d0fd3=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_SetBackCilling\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x3d0fd3=this['oJSPlayerObj']['JSPlayM4_FEC_SetBackCilling'](_0x4921fa,_0x19425e):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x3d0fd3);}},{'key':'JSPlayM4_FEC_GetPTZPort','value':function value(_0x1c73d0,_0x1b7560){var _0x117014=arguments['length']>0x2&&void 0x0!==arguments[0x2]?arguments[0x2]:0x0,_0x5bcc29=arguments['length']>0x3&&void 0x0!==arguments[0x3]?arguments[0x3]:null,_0x1db2e4=-0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_GetPTZPort\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x1db2e4=this['oJSPlayerObj']['JSPlayM4_FEC_GetPTZPort'](_0x1c73d0,_0x1b7560,_0x117014,_0x5bcc29):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x1db2e4);}},{'key':'JSPlayM4_FEC_SetPTZDisplayMode','value':function value(_0x44a175){var _0x5324b0=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_FEC_SetPTZDisplayMode\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?_0x5324b0=this['oJSPlayerObj']['JSPlayM4_FEC_SetPTZDisplayMode'](_0x44a175):console['log']('%c1>JSPlayerV1.X\x20does\x20not\x20support\x20FEC\x2020230922','color:\x20red'),_0x5324b0);}},{'key':'JSPlayM4_SetVideoCropInfo','value':function value(_0x2b8b16){var _0xe7d9be=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetVideoCropInfo\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?console['log']('%c1>JSPlayerV3.X\x20does\x20not\x20support\x20SetVideoCropInfo,','color:\x20red'):_0xe7d9be=this['oJSPlayerObj']['PlayM4_SetVideoCropInfo'](_0x2b8b16),_0xe7d9be);}},{'key':'JSPlayM4_IsVisible','value':function value(_0x261f57){var _0x436b7d=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_IsVisible\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?console['log']('%c1>JSPlayerV3.X\x20does\x20not\x20support\x20IsVisible,','color:\x20red'):_0x436b7d=this['oJSPlayerObj']['PlayM4_IsVisible'](_0x261f57),_0x436b7d);}},{'key':'JSPlayM4_SetInputBufSize','value':function value(_0x322f3b){var _0x18f812=0x1;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetInputBufSize\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['inputBufSize']=_0x322f3b,this['jsplayerVersion']>0x1?console['log']('%c1>JSPlayerV3.X\x20does\x20not\x20support\x20SetInputBufSize,','color:\x20red'):_0x18f812=this['oJSPlayerObj']['PlayM4_SetInputBufSize'](_0x322f3b),_0x18f812);}},{'key':'JSPlayM4_GetYUVBufSize','value':function value(){var _0xddad03=0x0;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetYUVBufSize\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?console['log']('%c1>JSPlayerV3.X\x20does\x20not\x20support\x20GetYUVBufSize,','color:\x20red'):_0xddad03=this['oJSPlayerObj']['PlayM4_GetYUVBufSize'](),_0xddad03);}},{'key':'JSPlayM4_ClearCanvas','value':function value(){var _0x39abf5=0x0;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_ClearCanvas\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?console['log']('%c1>JSPlayerV3.X\x20does\x20not\x20support\x20ClearCanvas,','color:\x20red'):_0x39abf5=this['oJSPlayerObj']['PlayM4_ClearCanvas'](),_0x39abf5);}},{'key':'JSPlayM4_ReleaseInputBuffer','value':function value(){var _0x483168=0x0;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_ReleaseInputBuffer\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?console['log']('%c1>JSPlayerV3.X\x20does\x20not\x20support\x20ReleaseInputBuffer,','color:\x20red'):_0x483168=this['oJSPlayerObj']['PlayM4_ReleaseInputBuffer'](),_0x483168);}},{'key':'JSPlayM4_GetDecodeFrameType','value':function value(){var _0x457949=0x0;return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_GetDecodeFrameType\x20this.oJSPlayerObj\x20is\x20null'),0x0):(this['jsplayerVersion']>0x1?console['log']('%c1>JSPlayerV3.X\x20does\x20not\x20support\x20GetDecodeFrameType,','color:\x20red'):_0x457949=this['oJSPlayerObj']['PlayM4_GetDecodeFrameType'](),_0x457949);}},{'key':'JSPlayM4_SetWaterMarkFont','value':function value(_0x1c8909){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetWaterMarkFont\x20this.oJSPlayerObj\x20is\x20null'),0x0):void 0x0===_0x1c8909['pFontString']||null==_0x1c8909['pstStartPos']||null==_0x1c8909['pstFontColor']||null==_0x1c8909['pstFontSize']||null==_0x1c8909['pstFontRotate']||null==_0x1c8909['pFontFamily']||null==_0x1c8909['pstStartPos']['fX']||null==_0x1c8909['pstStartPos']['fY']||null==_0x1c8909['pstFontColor']['fR']||null==_0x1c8909['pstFontColor']['fG']||null==_0x1c8909['pstFontColor']['fB']||null==_0x1c8909['pstFontColor']['fA']||null==_0x1c8909['pstFontSize']['nFontWidth']||null==_0x1c8909['pstFontSize']['nFontHeight']||null==_0x1c8909['pstFontRotate']['fRotateAngle']||null==_0x1c8909['pstFontRotate']['fFillFullScreen']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetWaterMarkFont\x20pFontParam\x20undefined'),0x0):_0x1c8909['pstStartPos']['fX']>0x1||_0x1c8909['pstStartPos']['fX']<0x0||_0x1c8909['pstStartPos']['fY']>0x1||_0x1c8909['pstStartPos']['fY']<0x0||_0x1c8909['pstFontColor']['fR']>0x1||_0x1c8909['pstFontColor']['fR']<0x0||_0x1c8909['pstFontColor']['fG']>0x1||_0x1c8909['pstFontColor']['fG']<0x0||_0x1c8909['pstFontColor']['fB']>0x1||_0x1c8909['pstFontColor']['fB']<0x0||_0x1c8909['pstFontColor']['fA']>0x1||_0x1c8909['pstFontColor']['fA']<0x0?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetWaterMarkFont\x20pFontParam\x20f*\x20is\x200~1'),0x0):0x1!=_0x1c8909['pstFontRotate']['fFillFullScreen']&&0x0!=_0x1c8909['pstFontRotate']?(console['log']('>>>>>yff>>>\x20pFontParam.pstFontRotate.fFillFullScreen\x20is\x20true\x20or\x20false'),0x0):'string'!=typeof _0x1c8909['pFontFamily']?(console['log']('>>>>>yff>>>\x20pFontParam.pFontFamily\x20is\x20not\x20string'),0x0):(this['waterFontParam']=_0x1c8909,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetWaterMarkFont'](_0x1c8909):this['oJSPlayerObj']['PlayM4_SetWaterMarkFont'](_0x1c8909));}},{'key':'JSPlayM4_SetWaterMarkImage','value':function value(_0x25fce9){return null===this['oJSPlayerObj']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetWaterMarkImage\x20this.oJSPlayerObj\x20is\x20null'),0x0):'ImageDecoder'in window?void 0x0===_0x25fce9['pImageData']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetWaterMarkImage\x20pImageParam.pImageData\x20undefined'),0x0):void 0x0===_0x25fce9['pImageType']||'jpg'!=_0x25fce9['pImageType']&&'jpeg'!=_0x25fce9['pImageType']&&'png'!=_0x25fce9['pImageType']&&'gif'!=_0x25fce9['pImageType']&&'bmp'!=_0x25fce9['pImageType']&&'webp'!=_0x25fce9['pImageType']?(console['log']('>>>>>yff>>>\x20JSPlayM4_SetWaterMarkImage\x20pImageParam.pImageType:'+_0x25fce9['pImageType']+'\x20error'),0x0):((void 0x0===_0x25fce9['pstRectPos']||_0x25fce9['fLeft']<0x0||_0x25fce9['fLeft']>0x1||_0x25fce9['fRight']<0x0||_0x25fce9['fRight']>0x1||_0x25fce9['fTop']<0x0||_0x25fce9['fTop']>0x1||_0x25fce9['fBottom']<0x0||_0x25fce9['fBottom']>0x1)&&(_0x25fce9['pstRectPos']={'fLeft':0x0,'fRight':0.1,'fTop':0x0,'fBottom':0.1}),(void 0x0===_0x25fce9['fAlpha']||_0x25fce9['fAlpha']<0x0||_0x25fce9['fAlpha']>0x1)&&(_0x25fce9['fAlpha']=0x1),this['waterImageParam']=_0x25fce9,this['jsplayerVersion']>0x1?this['oJSPlayerObj']['JSPlayM4_SetWaterMarkImage'](_0x25fce9):this['oJSPlayerObj']['PlayM4_SetWaterMarkImage'](_0x25fce9)):(console['log']('>>>>>yff>>>\x20window\x20not\x20support\x20ImageDecoder'),0x10);}},{'key':'_downloadFile','value':function value(_0x37f9c1,_0x1eab69){var _0x368c39=_0x37f9c1;_0x37f9c1 instanceof Blob||_0x37f9c1 instanceof File||(_0x368c39=new Blob([_0x37f9c1]));var _0x2874f7=window['URL']['createObjectURL'](_0x368c39),_0xfb373e=window['document']['createElement']('a');_0xfb373e['href']=_0x2874f7,_0xfb373e['download']=_0x1eab69;var _0x2437b6=document['createEvent']('MouseEvents');_0x2437b6['initEvent']('click',!0x0,!0x0),_0xfb373e['dispatchEvent'](_0x2437b6);}},{'key':'downloadRTPData','value':function value(_0x51d1a5){if(this['bWriteData']){var _0x7ffe47=_0x51d1a5,_0x339500=this['aTotalBuffer']['length'];console['log']('totalLength:'+_0x339500);for(var _0xe044=0x0,_0x4688dd=_0x7ffe47['length'];_0xe044<_0x4688dd;_0xe044++)this['aTotalBuffer'][_0x339500+_0xe044]=_0x7ffe47[_0xe044];this['iFrameNum']++,_0x7ffe47=null,console['log']('download600RTPdata\x20iFrameNum:'+this['iFrameNum']);}if(this['bWriteData']&&this['iFrameNum']>=0x258){console['log']('download600RawData');var _0x3d65f9=new Uint8Array(this['aTotalBuffer']);this['_downloadFile'](_0x3d65f9,'Raw600.data'),this['aTotalBuffer']['splice'](0x0,this['aTotalBuffer']['length']),this['bWriteData']=!0x1,this['iFrameNum']=0x0,_0x3d65f9=null;}}}]),_0xed4ebc;}();window['_getFExplore']=function(){var _0x1682fb,_0x5d42ce={},_0x491221=navigator['userAgent']['toLowerCase']();if((_0x1682fb=_0x491221['match'](/rv:([\d.]+)\) like gecko/))||(_0x1682fb=_0x491221['match'](/msie ([\d\.]+)/))?_0x5d42ce['ie']=_0x1682fb[0x1]:(_0x1682fb=_0x491221['match'](/edge\/([\d\.]+)/))?_0x5d42ce['edge']=_0x1682fb[0x1]:(_0x1682fb=_0x491221['match'](/firefox\/([\d\.]+)/))?_0x5d42ce['firefox']=_0x1682fb[0x1]:(_0x1682fb=_0x491221['match'](/(?:opera|opr).([\d\.]+)/))?_0x5d42ce['opera']=_0x1682fb[0x1]:(_0x1682fb=_0x491221['match'](/chrome\/([\d\.]+)/))?_0x5d42ce['chrome']=_0x1682fb[0x1]:(_0x1682fb=_0x491221['match'](/version\/([\d\.]+).*safari/))&&(_0x5d42ce['safari']=_0x1682fb[0x1]),_0x5d42ce['chrome']){var _0x56af5b=_0x5d42ce['chrome'],_0x80ad38=_0x56af5b['indexOf']('.');return Number(_0x56af5b['substring'](0x0,_0x80ad38));}return _0x5d42ce['ie']?console['info']('%c1>your\x20browser\x20is\x20IE\x20,it\x20does\x20not\x20support\x20play\x20without\x20plugin','color:\x20red'):_0x5d42ce['safari']?console['info']('%c1>your\x20browser\x20is\x20safari','color:\x20red'):_0x5d42ce['firefox']?console['info']('%c1>your\x20browser\x20is\x20Firefox','color:\x20red'):console['info']('%c1>your\x20browser\x20does\x20not\x20support\x20play\x20without\x20plugin','color:\x20red'),-0x1;},window['_getFSupportWebCodecs']=function(){return 'undefined'!=typeof MediaMetadata&&'undefined'!=typeof MediaRecorder&&'undefined'!=typeof VideoDecoder;},window['_getFSupportSIMD']=function(){return new Promise(function(_0x3b365d,_0x17ec3c){_0x29f958()['then'](function(_0x596639){_0x596639?_0x3b365d():_0x17ec3c();});});};}(),_0x4d6d3f;}();});})(wasmplayer_min);var wasmplayer_minExports=wasmplayer_min.exports;var Tool=/*#__PURE__*/function(){function Tool(){_classCallCheck$1(this,Tool);//to do
  this._keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";}_createClass$1(Tool,[{key:"$",value:function $(strExpr){var idExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;var classExpr=/^(?:\s*(<[\w\W]+>)[^>]*|.([\w-]*))$/;if(idExpr.test(strExpr)){var idMatch=idExpr.exec(strExpr);return document.getElementById(idMatch[2]);}else if(classExpr.test(strExpr)){var classMatch=classExpr.exec(strExpr);var allElement=document.getElementsByTagName("*");var ClassMatch=[];for(var i=0,l=allElement.length;i<l;i++){if(allElement[i].className.match(new RegExp("(\\s|^)"+classMatch[2]+"(\\s|$)"))){ClassMatch.push(allElement[i]);}}return ClassMatch;}}/**
  		   * @synopsis 时间日期格式化
  		   *
  		   * @param {objcet} oDate 时间
  		   * @param {string} fmt 格式 yyyy-MM-dd
  		   *
  		   * @returns {string} 格式化后的时间
  		   */},{key:"dateFormat",value:function dateFormat(oDate,fmt){var o={"M+":oDate.getMonth()+1,//月份
  "d+":oDate.getDate(),//日
  "h+":oDate.getHours(),//小时
  "m+":oDate.getMinutes(),//分
  "s+":oDate.getSeconds(),//秒
  "q+":Math.floor((oDate.getMonth()+3)/3),//季度
  "S":oDate.getMilliseconds()//毫秒
  };if(/(y+)/.test(fmt)){fmt=fmt.replace(RegExp.$1,(oDate.getFullYear()+"").substr(4-RegExp.$1.length));}for(var k in o){if(new RegExp("("+k+")").test(fmt)){fmt=fmt.replace(RegExp.$1,RegExp.$1.length===1?o[k]:("00"+o[k]).substr((""+o[k]).length));}}return fmt;}/**
  		   * @synopsis 下载文件
  		   *
  		   * @param {object} oData 数据 File对象或者Blob对象或者ArrayBuffer对象
  		   * @param {string} szName 下载文件名
  		   * @returns {none} 无返回
  		   */},{key:"downloadFile",value:function downloadFile(oData,szName){var oBlob=oData;if(!(oData instanceof Blob||oData instanceof File)){oBlob=new Blob([oData]);}var szFileUrl=window.URL.createObjectURL(oBlob);var oLink=window.document.createElement("a");oLink.href=szFileUrl;oLink.download=szName;var oClick=document.createEvent("MouseEvents");oClick.initEvent("click",true,true);oLink.dispatchEvent(oClick);}//创建xml DOM对象
  },{key:"createxmlDoc",value:function createxmlDoc(){var xmlDoc;var aVersions=["MSXML2.DOMDocument","MSXML2.DOMDocument.5.0","MSXML2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","Microsoft.XmlDom"];for(var i=0,len=aVersions.length;i<len;i++){try{xmlDoc=new ActiveXObject(aVersions[i]);break;}catch(e){xmlDoc=document.implementation.createDocument("","",null);break;}}xmlDoc.async="false";return xmlDoc;}//从xml字符串中解析xml
  },{key:"parseXmlFromStr",value:function parseXmlFromStr(szXml){if(null===szXml||''===szXml){return null;}var xmlDoc=this.createxmlDoc();if(navigator.appName==="Netscape"||navigator.appName==="Opera"){var oParser=new DOMParser();xmlDoc=oParser.parseFromString(szXml,"text/xml");}else {xmlDoc.loadXML(szXml);}return xmlDoc;}// public method for encoding
  },{key:"encode",value:function encode(input){var output="";var chr1;var chr2;var chr3;var enc1;var enc2;var enc3;var enc4;var i=0;input=this._utf8_encode(input);while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}output=output+this._keyStr.charAt(enc1)+this._keyStr.charAt(enc2)+this._keyStr.charAt(enc3)+this._keyStr.charAt(enc4);}return output;}// public method for decoding
  },{key:"decode",value:function decode(input){var output="";var chr1;var chr2;var chr3;var enc1;var enc2;var enc3;var enc4;var i=0;input=input.replace(/[^A-Za-z0-9+/=]/g,"");while(i<input.length){enc1=this._keyStr.indexOf(input.charAt(i++));enc2=this._keyStr.indexOf(input.charAt(i++));enc3=this._keyStr.indexOf(input.charAt(i++));enc4=this._keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!==64){output=output+String.fromCharCode(chr2);}if(enc4!==64){output=output+String.fromCharCode(chr3);}}output=this._utf8_decode(output);return output;}// private method for UTF-8 encoding
  },{key:"_utf8_encode",value:function _utf8_encode(string){string=string.replace(/\r\n/g,"\n");var utftext="";for(var n=0;n<string.length;n++){var c=string.charCodeAt(n);if(c<128){utftext+=String.fromCharCode(c);}else if(c>127&&c<2048){utftext+=String.fromCharCode(c>>6|192);utftext+=String.fromCharCode(c&63|128);}else {utftext+=String.fromCharCode(c>>12|224);utftext+=String.fromCharCode(c>>6&63|128);utftext+=String.fromCharCode(c&63|128);}}return utftext;}// private method for UTF-8 decoding
  },{key:"_utf8_decode",value:function _utf8_decode(utftext){var string="";var i=0;var c=0;//var c1 = 0;
  var c2=0;while(i<utftext.length){c=utftext.charCodeAt(i);if(c<128){string+=String.fromCharCode(c);i++;}else if(c>191&&c<224){c2=utftext.charCodeAt(i+1);string+=String.fromCharCode((c&31)<<6|c2&63);i+=2;}else {c2=utftext.charCodeAt(i+1);var c3=utftext.charCodeAt(i+2);string+=String.fromCharCode((c&15)<<12|(c2&63)<<6|c3&63);i+=3;}}return string;}},{key:"isFirefox",value:function isFirefox(){var bRet=false;var szUserAgent=navigator.userAgent.toLowerCase();var szBrowserVersion="";var iBrowserVersion=-1;if(szUserAgent.match(/firefox\/([\d.]+)/)){szBrowserVersion=szUserAgent.match(/firefox\/([\d.]+)/)[1];iBrowserVersion=parseInt(szBrowserVersion.split(".")[0],10);if(iBrowserVersion>-1){bRet=true;}}return bRet;}},{key:"isSafari",value:function isSafari(){var bRet=false;var szUserAgent=navigator.userAgent.toLowerCase();var szBrowserVersion="";var iBrowserVersion=-1;if(szUserAgent.match(/version\/([\d.]+).safari./)){szBrowserVersion=szUserAgent.match(/version\/([\d.]+).safari./)[1];iBrowserVersion=parseInt(szBrowserVersion.split(".")[0],10);if(iBrowserVersion>-1){bRet=true;}}/*if (/safari/.test(szUserAgent) && !/chrome/.test(szUserAgent)) {
  		        bRet = true;
  		    }*/return bRet;}},{key:"isEdge",value:function isEdge(){return navigator.userAgent.toLowerCase().indexOf("edge")>-1;}},{key:"isIOS",value:function isIOS(){var u=navigator.userAgent;var bIOS=!!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return bIOS;}}]);return Tool;}();var oTool=new Tool();var FEC_CORRECT_PTZ=0x0100;// PTZ
  var FEC_CORRECT_180=0x0200;// 180度矫正
  var FEC_CORRECT_360=0x0300;// 360全景矫正
  var FEC_CORRECT_CYLINDER=0x0600;// 
  var defaultCoors={port:0,start:{x:0,y:0},total:{x:0,y:0},diff:{x:0,y:0},startPTZPosition:{x:0,y:0},lastCorrdsY:0,param2d:{upDateType:0x4,//类型设置：4表示360旋转角度设置
  fValue:0,//360角度设置（0~2PI）
  fPTZParam:{fPTZPositionX:0,fPTZPositionY:0},fPTZZoom:0}};var JSPluginV3=/*#__PURE__*/function(){function JSPluginV3(props){_classCallCheck$1(this,JSPluginV3);//宽、高
  this.nWidth=0;this.nHeight=0;this.useHardDev=typeof props.useHardDev!=='undefined'?props.useHardDev:false;//是否启用硬解(默认启用)
  this.isSharedArrayBuffer=props.isSharedArrayBuffer||false;//是否开启共享内存模式（默认关闭）
  this.bGpuSupHardDecHEVC=false;//GPU是否支持H265硬解
  this.oStreamClient=new streamClient1_2_0_minExports.StreamClient();this.oStorageManager=new StorageManager("./transform",{staticPath:"https://open.ys7.com/assets/ezuikit_v4.0"});this.aHead=[];this.pCanvasData=null;this.bPlaySound=-1;this.szStorageUUID='';this.szStreamUUID='';this.g_port=null;this.szId=props.szId;this.iWidth=props.iWidth;this.iHeight=props.iHeight;this.iRate=1;this.decoderVersion='2.0';this.staticPath=props.staticPath||"https://open.ys7.com/assets/ezuikit_v5.0";this.bPause=false;this.bPlay=false;this.bInit=false;// this.portAvailable = true; // 端口可用状态，可以用来判断播放停止状态。
  this.esCanvas=null;//视频叠加绘制画布初始化
  this.b3DZoom=false;this.oJSPlugin=null;this.bPauseDate=null;/** 鱼眼分屏的id 字符串列表 */this.FECSplitIds='';this.canvasFECSubPort=new Map();this.correctType=null;//this.staticPath = "http://localhost:9090";
  document.getElementById(props.szId).style="display:inline-block;width:".concat(props.iWidth,"px;height:").concat(props.iHeight,"px;background:#000000;background-size:100% 100%;vertical-align:top;");this.JS_Init();this.oStyle=Object.assign({border:"#000000",borderSelect:"#FFCC00",background:"#4C4B4B"},props.oStyle);//获取jsplugin对象
  if(typeof props.szId==="string"){this.oJSPlugin=$("#"+props.szId);}else {this.oJSPlugin=props.szId;}this.createWindows();this.esCanvas=new ESCanvas(this.szId+"canvas_draw0");var that=this;this.oJSPlugin.find("."+props.szId+"parent-wnd").eq(0).children().each(function(i){var self=this;$(self).bind("mouseenter",function(e){$('#'+props.szId+'canvas_draw0').css('pointer-events','all');if(that.b3DZoom){console.log('e',e);console.log('id:',props.szId);that.esCanvas=null;$("."+props.szId+"draw-window").unbind();that.esCanvas=new ESCanvas(props.szId+"canvas_draw0");that.esCanvas.setShapeType("Rect");that.esCanvas.setDrawStyle("#ff0000","",0);that.esCanvas.setDrawStatus(true,function(oRECT){that.fCallback&&that.fCallback(oRECT);});}else {$('#'+props.szId+'canvas_draw0').css('pointer-events','none');}});$(self).bind("mouseleave",function(e){$('#'+props.szId+'canvas_draw0').css('pointer-events','none');});});}//创建插件播放窗口
  _createClass$1(JSPluginV3,[{key:"createWindows",value:function createWindows(iWidth,iHeight){var that=this;if(iWidth&&iHeight){that.iWidth=iWidth;that.iHeight=iHeight;}//计算单个窗口宽高且修正
  var iFixWidth=that.iWidth;var iFixHeight=that.iHeight;var iPerWidth=that.iWidth-iFixWidth-2*2;var iPerHeight=that.iHeight-iFixHeight-2*2;var iWndWidth=that.iWidth-iFixWidth;var iWndHeight=that.iHeight-iFixHeight;var iType=1;if(typeof this.szId==="string"){that.oJSPlugin=$("#"+this.szId);}else {that.oJSPlugin=this.szId;}//构造页面dom
  var szHtml='<div class="'+this.szId+'parent-wnd" style="overflow:hidden;width:100%; height:100%; position: relative;">';navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);// if (isNeedScale) {
  //   for (let i = 0; i < 1; i++) {
  //     iWidth = iPerWidth + ((i % iType === (iType - 1)) ? iFixWidth : 0);
  //     iHeight = iPerHeight + (((i + iType) >= Math.pow(iType, 2)) ? iFixHeight : 0);
  //     let iPlayWndWidth = iWndWidth + ((i % iType === (iType - 1)) ? iFixWidth : 0);
  //     let iPlayWndHeight = iWndHeight + (((i + iType) >= Math.pow(iType, 2)) ? iFixHeight : 0);
  //     iPlayWndWidth = iPlayWndWidth * 2;
  //     iPlayWndHeight = iPlayWndHeight * 2;
  //     szHtml += '<div id="' + this.szId + '-container-' + i + '" style="transform: scale(0.5);-webkit-transform: scale(0.5);-webkit-transform-origin:0 0;text-align:left;transform-origin:0 0; width:' + iPlayWndWidth + 'px;height:' + iPlayWndHeight + 'px;"><div style="float:left; background-color: ' + this.oStyle.background + '; position: relative; width:100%; height:100%;">'
  //       + '<canvas id="' + this.szId + '-player' + '" class="' + this.szId + 'play-window" wid="' + i + '" width="' + iPlayWndWidth + '" height="' + iPlayWndHeight + '"></canvas>'
  //       + (i === 0 ? '<img style="display:none;" id="playImg' + i + '" src="">' : '')
  //       + '<canvas id="' + this.szId + 'canvas_draw' + i + '"  class="' + this.szId + 'draw-window" style="position:absolute; top:0; left:0;" wid="' + i + '" width=' + iWidth + ' height=' + iHeight + '></canvas>'
  //       + '</div></div>';
  //   }
  // } else {
  //   for (let i = 0; i < 1; i++) {
  //     iWidth = iPerWidth + ((i % iType === (iType - 1)) ? iFixWidth : 0);
  //     iHeight = iPerHeight + (((i + iType) >= Math.pow(iType, 2)) ? iFixHeight : 0);
  //     let iPlayWndWidth = iWndWidth + ((i % iType === (iType - 1)) ? iFixWidth : 0);
  //     let iPlayWndHeight = iWndHeight + (((i + iType) >= Math.pow(iType, 2)) ? iFixHeight : 0);
  //     szHtml += '<div id="' + this.szId + '-container-' + i + '" style="float:left; background-color: ' + this.oStyle.background + '; position: relative; width: ' + iPlayWndWidth + 'px; height: ' + iPlayWndHeight + 'px;">'
  //       + '<canvas id="' + this.szId + '-player' + '" class="' + this.szId + 'play-window" wid="' + i + '" width="' + iPlayWndWidth + '" height="' + iPlayWndHeight + '"></canvas>'
  //       + (i === 0 ? '<img style="display:none;" id="playImg' + i + '" src="">' : '')
  //       + '<canvas id="' + this.szId + 'canvas_draw' + i + '"  class="' + this.szId + 'draw-window" style="position:absolute; top:0; left:0;" wid="' + i + '" width=' + iWidth + ' height=' + iHeight + '></canvas>'
  //       + '</div>';
  //   }
  // }
  for(var _i13=0;_i13<1;_i13++){iWidth=iPerWidth+(_i13%iType===iType-1?iFixWidth:0);iHeight=iPerHeight+(_i13+iType>=Math.pow(iType,2)?iFixHeight:0);var iPlayWndWidth=iWndWidth+(_i13%iType===iType-1?iFixWidth:0);var iPlayWndHeight=iWndHeight+(_i13+iType>=Math.pow(iType,2)?iFixHeight:0);szHtml+='<div id="'+this.szId+'-container-'+_i13+'" style="float:left; background-color: '+this.oStyle.background+'; position: relative; width: '+iPlayWndWidth+'px; height: '+iPlayWndHeight+'px;">'+'<canvas id="'+this.szId+'-player'+'" class="'+this.szId+'play-window" wid="'+_i13+'" width="'+iPlayWndWidth+'" height="'+iPlayWndHeight+'"></canvas>'+(_i13===0?'<img style="display:none;" id="playImg'+_i13+'" src="">':'')+'<canvas id="'+this.szId+'canvas_draw'+_i13+'"  class="'+this.szId+'draw-window" style="position:absolute; top:0; left:0;" wid="'+_i13+'" width='+iWidth+' height='+iHeight+'></canvas>'+'</div>';}szHtml+="</div>";that.oJSPlugin.html(szHtml);}},{key:"JS_Init",value:function JS_Init(){var _this7=this;var that=this;if(that.initIng){//多个实例同时初始化，判断已有实例正在加载
  return;}that.initIng=true;var that=this;if(this.bPlay){return false;}var promise=new Promise(function(resolve,reject){if(window["wasmplayer-".concat(_this7.szId)]){// 实例已经加载过，不需要再次加载
  that.bInit=true;resolve();}var isNeedScale=navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);var wasmPathV3="".concat(that.staticPath,"/js/PlayCtrlWasm/playCtrl3/").concat(_this7.isSharedArrayBuffer?'hasWorker/HasSIMD':'noWorker',"/Decoder.js");var wasmPathV1="".concat(that.staticPath,"/js/PlayCtrlWasm/playCtrl1/HasSIMD/Decoder.js");var InitWasm=function InitWasm(){//初始化时传入两个版本解码库
  var wasmplayer=new wasmplayer_minExports.JSPlayCtrl(isNeedScale?null:wasmPathV3,wasmPathV1,function(_ref2){_ref2.bSupHardOrSoft;_ref2.bSupHardDecAVC;_ref2.bSupHardDecHEVC;var cmd=_ref2.cmd;_ref2.errorCode;_ref2.status;switch(cmd){case'loaded':that.bInit=true;window.JSPlayerModuleLoaded=true;that.initIng=false;break;}},0,'webgl');window["wasmplayer-".concat(that.szId)]=wasmplayer;resolve();};window._getFSupportSIMD().then(function(){//支持指令集
  InitWasm();},function(){//不支持指令集，库需要换成不支持的版本
  wasmPathV3="".concat(that.staticPath,"/js/PlayCtrlWasm/playCtrl3/").concat(_this7.isSharedArrayBuffer?'hasWorker/NoSIMD':'noWorker',"/Decoder.js");wasmPathV1="".concat(that.staticPath,"/js/PlayCtrlWasm/playCtrl1/NoSIMD/Decoder.js");InitWasm();});});return promise;}},{key:"PlayM4_openStream",value:function PlayM4_openStream(fileHead){var wasmplayer=window["wasmplayer-".concat(this.szId)];var that=this;new Uint8Array(fileHead.buffer);var resO=wasmplayer.JSPlayM4_OpenStream(fileHead,40,4*1024*1024);//首帧回调
  wasmplayer.JSPlayM4_SetFirstFrameCallBack(1,function(){console.log("%cfirst frame display end:"+new Date().getMinutes()+":"+new Date().getSeconds()+"."+new Date().getMilliseconds(),'color:blue');});//错实时信息回调(用于监听密钥设置错误)
  wasmplayer.JSPlayM4_SetRunTimeInfoCallBackEx(1,function(nRunTimeModule,nStrVersion,nFrameTimeStamp,nFrameNum,nErrorCode){if(that.EventCallback&&that.EventCallback.setRunTimeInfoCallBack){that.EventCallback.setRunTimeInfoCallBack(nRunTimeModule,nStrVersion,nFrameTimeStamp,nFrameNum,nErrorCode);}});console.log("3.打开流 resO:"+resO);}//执行播放方法
  },{key:"_doPlay",value:function _doPlay(szUrl,oParams,iWndNum,szStartTime,szStopTime){var _this8=this;var wasmplayer=window["wasmplayer-".concat(this.szId)];// if(this.bPlay || this.bPlayIng) {
  //   return false;
  // }
  this.bPlayIng=true;var _this=this;_this.playURL=oParams.playURL;_this.szUrl=szUrl;// 创建canvas
  if(!document.getElementById(_this.szId+'-player')){var canvasList=document.getElementById(_this.szId+'-container-0');var canvas=document.createElement('canvas');canvasList?.appendChild(canvas);if(document.getElementById(_this.szId)){canvas.width=document.getElementById(_this.szId).offsetWidth;canvas.height=document.getElementById(_this.szId).offsetHeight;}else {canvas.width=_this.iWidth;canvas.height=_this.iHeight;}canvas.id=_this.szId+'-player';}else {var _canvasList=document.getElementById(_this.szId+'-container-0');var oldcanv=document.getElementById(this.szId+'-player');oldcanv.style="position: absolute;";oldcanv.parentNode.removeChild(oldcanv);var _canvas=document.createElement('canvas');if(document.getElementById(_this.szId)){_canvas.width=document.getElementById(_this.szId).offsetWidth;_canvas.height=document.getElementById(_this.szId).offsetHeight;}else {_canvas.width=_this.iWidth;_canvas.height=_this.iHeight;}_canvas.id=_this.szId+'-player';_canvasList.appendChild(_canvas);}var promise=new Promise(function(resolve,reject){// 先停止所有流
  _this8.oStreamClient.stopAll();//获取端口号
  if(_this.g_port===null){_this.g_port=wasmplayer.JSPlayM4_GetPort();console.log("1.获取播放库端口号 g_port:"+_this.g_port);}// // 端口已经使用，设置为不可用状态
  // this.portAvailable = false;
  //xuehb 开始取流 4
  if(_this.EventCallback&&_this.EventCallback.openStreamCallback){console.log('开始取流-----v2');_this.EventCallback.openStreamCallback();}_this.oStreamClient.openStream(szUrl,oParams,function(data){_this8.oParams=oParams;if(data.errorCode&&data.errorCode!='1'){//推流异常时触发errorHandler
  if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(iWndNum,data.errorCode,data);}}if(data.bHead){//判断是否开启预览，用于初始化播放库，回放跳片段是会返回媒体头，不能只判断是否为媒体头
  //xuehb 完成取流返回流头 5 
  if(_this.EventCallback&&_this.EventCallback.getStreamHeaderCallback){console.log('完成取流返回流头');_this.EventCallback.getStreamHeaderCallback();}_this.PlayM4_openStream(data.buf);_this.aHead=new Uint8Array(data.buf);if(!!_this.secretKey){wasmplayer.JSPlayM4_SetSecretKey(_this.secretKey);}try{var getQueryString=function getQueryString(name,url){var reg=new RegExp('(^|&)'+name+'=([^&]*)(&|$)','i');var r=url.match(reg);if(r!=null){return unescape(r[2]);}return null;};var date=getQueryString('begin',oParams.playURL);var year=parseInt(date.slice(0,4));var month=parseInt(date.slice(4,6));var day=parseInt(date.slice(6,8));var hour=parseInt(date.slice(9,11));var min=parseInt(date.slice(11,13));var second=parseInt(date.slice(13,15))+3;var setRes=wasmplayer.JSPlayM4_SetGlobalBaseTime(year,month,day,hour,min,second,0);console.log('设置OSD时间: ',year+':'+month+':'+day+':'+hour+':'+min+':'+second+':'+0);console.log('设置OSD时间res:',setRes);}catch(error){console.log('JSPlayM4_SetGlobalBaseTime:',error);}_this.bPlay=true;_this.bPlayIng=false;// 设置一系列回调
  var resFCB=wasmplayer.JSPlayM4_SetFrameInfoCallBack(1);//帧信息回调
  if(resFCB!=1){var resFrameInfoError=wasmplayer.JSPlayM4_GetLastError();console.log("resFrameInfoError:"+resFrameInfoError);}wasmplayer.JSPlayM4_RenderPrivateData(4,1);_this8.firstFlag=true;_this8.firstGetData=true;// 异步添加的canvas id
  wasmplayer.JSPlayM4_FEC_SetCanvasID(_this8.FECSplitIds);var resP=wasmplayer.JSPlayM4_Play("".concat(_this.szId,"-player"));//pCanvasString或pCanvasData
  _this8.canvasFECSubPort.set("".concat(_this.szId,"-player"),_objectSpread2({},defaultCoors));console.log("4.开始播放 resP:"+resP,"".concat(_this.szId,"-player"));resolve(resP);}else {if(_this8.firstGetData){// 第一次获取数据
  _this8.firstGetData=false;//xuehb 返回视频流(首次) 6
  if(_this.EventCallback&&_this.EventCallback.getVideoStreamCallback){_this.EventCallback.getVideoStreamCallback();}}if(_this8.firstFlag){var oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();var nWidth=oFrameInfo.width;var nHeight=oFrameInfo.height;_this8.nWidth=nWidth;_this8.nHeight=nHeight;if(nWidth){//xuehb 首屏展示 7
  if(_this.EventCallback&&_this.EventCallback.appearFirstFrameCallback){console.log('出现首帧画面（播放成功）------多线程');_this.EventCallback.appearFirstFrameCallback();}//xuehb 平均成功取流的出流耗时 8
  if(_this.EventCallback&&_this.EventCallback.averageStreamSuccessCallback){_this.EventCallback.averageStreamSuccessCallback();}console.log("首帧展示",nWidth,nHeight);_this8.firstFlag=false;}}var aBuffer=new Uint8Array(data.buf);//拷贝一份数据进行使
  // 监听数据错误
  if(data.statusString){if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(0,1001,data);}}else if(data.type&&data.type==="exception"){if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(0,1002,data);}}wasmplayer.JSPlayM4_InputData(aBuffer,aBuffer.length);aBuffer=null;}// 录制
  if(_this.szStorageUUID){_this.oStorageManager.inputData(_this.szStorageUUID,data.buf);}// data = null;
  },function(){if(_this.bPlay){if(_this.EventCallback&&_this.EventCallback.pluginErrorHandler){_this.EventCallback.pluginErrorHandler(0,1003);}}_this.bPlayIng=false;reject();}).then(function(id){//websocket onopen事件触发
  _this.szStreamUUID=id;_this.oStreamClient.startPlay(id).then(function(){var resSSOM=wasmplayer.JSPlayM4_SetStreamOpenMode(1);console.log("2.设置流模式 resSSOM:"+resSSOM);})["catch"](function(err){console.log("err",err);_this.bPlayIng=false;reject(err.oError);});},function(oError){//websocekt 未进入onopen
  _this.bPlayIng=false;_this._doRelease();reject(oError);});});return promise;}},{key:"JSPlayM4_SetDecodeEngine",value:function JSPlayM4_SetDecodeEngine(useHard){this.useHard=useHard;}/**
  		   * 
  		   * @param {*} szUrl  "示例：wss://jsdecoder-aeye.hwwt2.com:443"
  		   * @param {*} oParams  "示例： {playURL: "/live?dev=F99467170&chn=9&stream=1&ssn=ot.9oovv27v00lck3ft0krfw61n8ugr4j5b-1ao1cqq1fm-1od8d0d-h1lnhi0w0&auth=1&biz=4&cln=100"}"
  		   * @param {*} iWndNum 
  		   * @param {*} szStartTime 
  		   * @param {*} szStopTime 
  		   * @returns 
  		   */},{key:"JS_Play",value:function JS_Play(){var _this9=this;var szUrl=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"";var oParams=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{playURL:""};var iWndNum=arguments.length>2?arguments[2]:undefined;var szStartTime=arguments.length>3?arguments[3]:undefined;var szStopTime=arguments.length>4?arguments[4]:undefined;return new Promise(function(resolve,reject){var loadWasmTimer=setInterval(function(){if(window.JSPlayerModuleLoaded){clearInterval(loadWasmTimer);_this9._doPlay(szUrl,oParams,iWndNum,szStartTime,szStopTime).then(function(data){resolve(data);})["catch"](function(err){reject(err);});}},50);});}},{key:"JS_SetSecretKey",value:function JS_SetSecretKey(iWndNum,secretKey){var wasmplayer=window["wasmplayer-".concat(this.szId)];console.log('secretKey:::',secretKey);this.secretKey=secretKey;var resS=wasmplayer.JSPlayM4_SetSecretKey(secretKey);console.log("resSetSecretKey："+resS);}},{key:"JS_OpenSound",value:function JS_OpenSound(){var wasmplayer=window["wasmplayer-".concat(this.szId)];var resPS=wasmplayer.JSPlayM4_PlaySound();if(resPS===1){this.bPlaySound=1;}return resPS;}},{key:"JS_CloseSound",value:function JS_CloseSound(){var wasmplayer=window["wasmplayer-".concat(this.szId)];var resPS=wasmplayer.JSPlayM4_StopSound();if(resPS===1){this.bPlaySound=-1;}return resPS;}/**
  		   * @synopsis 打开3D放大
  		   *
  		   * @param {function} fCallback 回调函数
  		   *
  		   * @returns {none} 无
  		  */},{key:"JS_Enable3DZoom",value:function JS_Enable3DZoom(iWin,fCallback){if(!this.bPlay){return -1;}var wasmplayer=window["wasmplayer-".concat(this.szId)];var info=wasmplayer.JSPlayM4_GetFrameInfo();this.JSPlayM4_SetDisplayRegion(0,info.width,0,info.height);$("."+this.szId+"draw-window").unbind();this.fCallback=fCallback;this.esCanvas=new ESCanvas(this.szId+"canvas_draw0");this.esCanvas.setShapeType("Rect");this.esCanvas.setDrawStyle("#ff0000","",0);this.esCanvas.setDrawStatus(true,function(oRECT){fCallback(oRECT);});this.b3DZoom=true;return 0;}/**
  		   * @synopsis 关闭3D放大
  		   *
  		   * @returns {none} 无
  		   */},{key:"JS_Disable3DZoom",value:function JS_Disable3DZoom(){if(!this.bPlay){return -1;}this.esCanvas.setDrawStatus(false);this.b3DZoom=false;return 0;}},{key:"JS_StartSave",value:function JS_StartSave(g_port){var _this10=this;var fileName=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"".concat(new Date().getTime());// this.szStorageUUID =  `11111111`;
  var promise=new Promise(function(resolve,reject){_this10.oStorageManager.startRecord("".concat(fileName,".mp4"),_this10.aHead,2,0,{cbEventHandler:function cbEventHandler(iErrorType){console.log("录制错误",iErrorType);reject("\u5F55\u5236\u9519\u8BEF ".concat(iErrorType,"}"));},iPackage:0}).then(function(szUUID){_this10.szStorageUUID=szUUID;resolve();},function(){reject();});});return promise;}},{key:"JS_StopSave",value:function JS_StopSave(){var _this11=this;var promise=new Promise(function(resolve,reject){_this11.oStorageManager.stopRecord(_this11.szStorageUUID).then(function(){_this11.szStorageUUID="";//关闭录像  删除存储ID
  resolve();},function(iError){console.log("iError",iError);reject(iError);});});return promise;}},{key:"_JSPlayM4_GetFrameInfo",value:function _JSPlayM4_GetFrameInfo(){var wasmplayer=window["wasmplayer-".concat(this.szId)];var oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();var width=oFrameInfo.width;var height=oFrameInfo.height;console.log("width:"+width+",height:"+height);var year=oFrameInfo.year;var month=oFrameInfo.month;var day=oFrameInfo.day;var hour=oFrameInfo.hour;var minute=oFrameInfo.minute;var second=oFrameInfo.second;var milliseconds=oFrameInfo.milliseconds;console.log("OSD时间："+year+"-"+month+"-"+day+"-"+hour+"-"+minute+"-"+second+"-"+milliseconds);return {width:width,height:height,year:year,month:month,day:day,hour:hour,minute:minute,second:second};}},{key:"_JSPlayM4_SetDisplayRegion",value:function _JSPlayM4_SetDisplayRegion(left,right,top,bottom){var _this12=this;var flag=arguments.length>4&&arguments[4]!==undefined?arguments[4]:true;var isFullScreen=arguments.length>5?arguments[5]:undefined;var that=this;new Promise(function(resolve,reject){var wasmplayer=window["wasmplayer-".concat(_this12.szId)];var resDR;if(flag){resDR=wasmplayer.JSPlayM4_SetDisplayRegion(null,0,0,0,0,1);resolve({code:0,data:resDR});}if(isFullScreen){resDR=wasmplayer.JSPlayM4_SetDisplayRegion("".concat(_this12.szId,"-player"),left*that.iWidth/rt.nHeight,top*that.iHeight/rt.nWidth,right*that.iWidth/rt.nHeight,bottom*that.iHeight/rt.nWidth,false,false);}else {resDR=wasmplayer.JSPlayM4_SetDisplayRegion("".concat(_this12.szId,"-player"),that.iWidth*left/that.nWidth,that.iWidth*right/that.nWidth,that.iHeight*top/that.nHeight,that.iHeight*bottom/that.nHeight,false,false);}resolve({code:0,data:resDR});});}},{key:"JS_SetFrameInfoCallBack",value:function JS_SetFrameInfoCallBack(value){var wasmplayer=window["wasmplayer-".concat(this.szId)];var resFCB=wasmplayer.JSPlayM4_SetFrameInfoCallBack(this.g_port,value);//帧信息回调
  if(resFCB!=1){var resFrameInfoError=wasmplayer.JSPlayM4_GetLastError(this.g_port);console.log("resFrameInfoError:"+resFrameInfoError);}console.log("resFCB:"+resFCB);}},{key:"JS_CapturePicture",value:function JS_CapturePicture(port,fileName,format,callback,flag){var wasmplayer=window["wasmplayer-".concat(this.szId)];var arrayBufferToBase64Img=function arrayBufferToBase64Img(buffer){var arr=new Uint8Array(buffer);var str="";for(var _i14=0;_i14<arr.length;_i14++){str+=String.fromCharCode(arr[_i14]);}return "data:image/jpeg;base64,".concat(window.btoa(str));};function doCapturePicture(aJpegData){if(fileName.indexOf(".jpeg")===-1){fileName+='.jpeg';}if(callback){callback({fileName:fileName,fileUint8Array:aJpegData,base64:arrayBufferToBase64Img(aJpegData)});}}//未播放，暂停状态且有缓冲数据
  if(!this.bPlay&&this.bPause&&this.tmpCapturePictureData){reject({code:-1,msg:'暂停状态下无法截图'});}var oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();this.nWidth=oFrameInfo.width;this.nHeight=oFrameInfo.height;var promise=new Promise(function(resolve,reject){var JPEGRes=wasmplayer.JSPlayM4_GetJPEG(function(jpegData,jpegDataSize){if(!!jpegData){var jpegdatabuffer=new Uint8Array(jpegDataSize);jpegdatabuffer.set(jpegData.subarray(0,jpegDataSize));doCapturePicture(jpegData);// if (!callback) {
  //   //未传入回调函数，直接下载截图
  //   wasmplayer._downloadFile(jpegdatabuffer, `${fileName || 'capturePicture.jpeg'}`);
  // }
  resolve({code:1,data:{fileName:fileName,fileUint8Array:jpegData,base64:arrayBufferToBase64Img(jpegData)}});}},1);if(JPEGRes!==1){reject({code:-1,msg:'截图失败'});}});return promise;}},{key:"JS_GetOSDTime",value:function JS_GetOSDTime(){var wasmplayer=window["wasmplayer-".concat(this.szId)];var promise=new Promise(function(resolve,reject){var oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();var year=oFrameInfo.year;var month=oFrameInfo.month;var day=oFrameInfo.day;var hour=oFrameInfo.hour;var minute=oFrameInfo.minute;var second=oFrameInfo.second;// 兼容，safari浏览器时间需要用“/”分隔
  var time=new Date(oTool.isIOS()||oTool.isSafari()||oTool.isEdge()?"".concat(year,"/").concat(month,"/").concat(day," ").concat(hour,":").concat(minute,":").concat(second):"".concat(year,"-").concat(month,"-").concat(day," ").concat(hour,":").concat(minute,":").concat(second)).getTime()/1000;resolve(time);});return promise;}},{key:"JS_Resize",value:function JS_Resize(width,height){var wasmplayer=window["wasmplayer-".concat(this.szId)];console.log("width:"+width+",height:"+height);var resSet=wasmplayer.JSPlayM4_SetCanvasSize(width,height);this.iWidth=width;this.iHeight=height;if(document.getElementById(this.szId))document.getElementById(this.szId).style.height=height+"px";if(document.getElementById(this.szId))document.getElementById(this.szId).style.width=width+"px";var oldcanv=document.getElementById(this.szId+'-player');if(oldcanv){oldcanv.style.height=height+"px";oldcanv.style.width=width+"px";}var container=document.getElementById(this.szId+'-container-0');if(container){container.style.height=height+"px";container.style.width=width+"px";}var drawer=document.getElementById(this.szId+'-drawer0');if(drawer){drawer.style.height=height+"px";drawer.style.width=width+"px";}console.log("resSet:"+resSet);}},{key:"JS_GetSDKVersion",value:function JS_GetSDKVersion(){var wasmplayer=window["wasmplayer-".concat(this.szId)];var res=wasmplayer.JSPlayM4_GetSDKVersion();return res.toString(16);}},{key:"_doRelease",value:function _doRelease(){var wasmplayer=window["wasmplayer-".concat(this.szId)];wasmplayer.JSPlayM4_CloseStream();// let resFP = wasmplayer.JSPlayM4_FreePort();
  // if (resFP === 1) {
  //   // 端口是否已经被释放，设置为可用状态。
  //   this.portAvailable = true;
  // }
  // console.log("doRelease", resCS, resFP)
  // if (this.pCanvasData !== null) {
  //   wasmplayer._free(this.pCanvasData);
  //   this.pCanvasData = null;
  // }
  // this.pCanvasString = null;
  // this.pCanvasString = null;
  console.log("stop end");this.bPlay=false;this.bPlayIng=false;}},{key:"JS_Stop",value:function JS_Stop(){var _this13=this;var szStreamUUID=this.szStreamUUID;var wasmplayer=window["wasmplayer-".concat(this.szId)];if(this.szStorageUUID){this.JS_StopSave();}var arrayBufferToBase64Img=function arrayBufferToBase64Img(buffer){var arr=new Uint8Array(buffer);var str="";for(var _i15=0;_i15<arr.length;_i15++){str+=String.fromCharCode(arr[_i15]);}return "data:image/jpeg;base64,".concat(window.btoa(str));};var promise=new Promise(function(resolve,reject){try{var JPEGRes=wasmplayer.JSPlayM4_GetJPEG(function(jpegData,jpegDataSize){var canvasList=document.getElementById(_this13.szId+'-container-0');var oldcanv=document.getElementById(_this13.szId+'-player');if(oldcanv){canvasList?.removeChild(oldcanv);}var jpegdatabuffer=new Uint8Array(jpegDataSize);jpegdatabuffer.set(jpegData.subarray(0,jpegDataSize));_this13.tmpCapturePictureData=jpegData;// TODO: 鱼眼模式下 不设置背景 和 APP 保持一致
  if(_this13.correctType===null){if(canvasList)canvasList.style.backgroundImage="url(".concat(arrayBufferToBase64Img(jpegData),")");}else {if(canvasList)canvasList.style.backgroundImage='';}if(canvasList)canvasList.style.backgroundSize="100% 100%";},0);}catch(error){console.log('获取末尾帧失败：',error);}setTimeout(function(){var stopStreamPromise=_this13.oStreamClient.stopAll(szStreamUUID);stopStreamPromise.then(function(data){console.log("防抖 停止取流成功");// 关闭和删除鱼眼矫正子端口
  _this13._colseFECAllSubWnd();var resS=wasmplayer.JSPlayM4_Stop(false);if(resS==1){_this13._doRelease();resolve({resS:resS});}else {var jsPluginErrorCode=wasmplayer.JSPlayM4_GetLastError();if(jsPluginErrorCode==35){var timer10=setInterval(function(){if(!resS){resS=wasmplayer.JSPlayM4_Stop(false);if(resS==1){_this13._doRelease();resolve({resS:resS});}else {jsPluginErrorCode=wasmplayer.JSPlayM4_GetLastError();console.log("stop error ",jsPluginErrorCode);// 停止失败，持续停止
  }}else {clearInterval(timer10);}},50);}else {console.log("stop - other error, still resolve",jsPluginErrorCode,resS);_this13._doRelease();resolve({resS:resS,jsPluginErrorCode:jsPluginErrorCode});}}})["catch"](function(err){console.log("停止取流失败_jsPluginErrorCode",err);_this13._doRelease();var jsPluginErrorCode=wasmplayer.JSPlayM4_GetLastError();console.log("停止取流失败_jsPluginErrorCode",jsPluginErrorCode);resolve({jsPluginErrorCode:jsPluginErrorCode});});resolve();},300);});return promise;}},{key:"JS_DestroyWorker",value:function JS_DestroyWorker(){var wasmplayer=window["wasmplayer-".concat(this.szId)];this._colseFECAllSubWnd();//销毁canvas资源
  var canvasList=document.getElementById(this.szId+'-container-0');var oldcanv=document.getElementById(this.szId+'-player');if(oldcanv){canvasList?.removeChild(oldcanv);}if(this.pCanvasData!==null){wasmplayer._free(this.pCanvasData);this.pCanvasData=null;}this.pCanvasString=null;console.log("stop end");}},{key:"JS_Fast",value:function JS_Fast(iWind,next){var nextRate=this.iRate;var wasmplayer=window["wasmplayer-".concat(this.szId)];if(next){switch(next){case 1:case 2:case 4:nextRate=next;break;case 3:nextRate=0.5;break;default:nextRate=this.iRate;break;}}else {switch(this.iRate){case 1:nextRate=2;break;case 2:nextRate=4;break;default:nextRate=this.iRate;break;}}this.oStreamClient.setPlayRate(this.szStreamUUID,nextRate);this.iRate=nextRate;console.log("开启倍速播放,多线程倍速，全解",nextRate);if(nextRate==4){// 用户启动4倍速，执行4线程解码。
  var SetDecodeThreadNumRes=wasmplayer.JSPlayM4_SetDecodeThreadNum(4);console.log("SetDecodeThreadNumRes",SetDecodeThreadNumRes);}var res=wasmplayer.JSPlayM4_Fast();console.log("res",res);}},{key:"JS_Slow",value:function JS_Slow(){var nextRate=this.iRate;switch(this.iRate){case 2:nextRate=1;break;case 4:nextRate=2;break;default:nextRate=this.iRate;break;}this.oStreamClient.setPlayRate(this.szStreamUUID,nextRate);this.iRate=nextRate;console.log("开启倍速播放",nextRate);}},{key:"JS_Speed",value:function JS_Speed(nextRate){var wasmplayer=window["wasmplayer-".concat(this.szId)];this.oStreamClient.setPlayRate(this.szStreamUUID,nextRate!==3?nextRate:0.5);if(this.iRate===3){if(nextRate===1){// 0.5 -> 1
  wasmplayer.JSPlayM4_Fast();}if(nextRate===2){// 0.5 -> 2
  wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast();}if(nextRate===4){// 0.5 -> 4
  wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast();}}if(this.iRate===1){if(nextRate===3){// 1 -> 0.5
  wasmplayer.JSPlayM4_Slow();}if(nextRate===2){// 1 -> 2
  wasmplayer.JSPlayM4_Fast();}if(nextRate===4){// 1 -> 4
  wasmplayer.JSPlayM4_Fast();wasmplayer.JSPlayM4_Fast();}}if(this.iRate===2){if(nextRate===1){// 2 -> 1
  wasmplayer.JSPlayM4_Slow();}if(nextRate===3){// 2 -> 0.5
  wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow();}if(nextRate===4){// 2 -> 4
  wasmplayer.JSPlayM4_Fast();}}if(this.iRate===4){if(nextRate===1){// 4 -> 1
  wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow();}if(nextRate===2){// 4 -> 2
  wasmplayer.JSPlayM4_Slow();}if(nextRate===3){// 4 -> 0.5
  wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow();wasmplayer.JSPlayM4_Slow();}}if(nextRate==4){// 4倍速执行4线程解码。
  wasmplayer.JSPlayM4_SetDecodeThreadNum(4);}this.iRate=nextRate;console.log("开启倍速播放",nextRate);}},{key:"JS_Seek",value:function JS_Seek(iWndNum,szStartTime,szStopTime){var _this14=this;var oPromise=new Promise(function(resolve,reject){var wasmplayer=window["wasmplayer-".concat(_this14.szId)];var res=wasmplayer.JSPlayM4_ResetBuffer(1);console.log("seek 清理缓存",res);_this14.oStreamClient.seek(_this14.szStreamUUID,szStartTime,szStopTime);resolve();});return oPromise;}},{key:"JSPlayM4_SetPrintLogFlag",value:function JSPlayM4_SetPrintLogFlag(){var wasmplayer=window["wasmplayer-".concat(this.szId)];var resDR=wasmplayer.JSPlayM4_SetPrintLogFlag(2);console.log("LogValue:"+2+",resDR:"+resDR);}},{key:"JSPlayM4_SetDisplayRegion",value:function JSPlayM4_SetDisplayRegion(left,right,top,bottom){var _this15=this;new Promise(function(resolve,reject){var wasmplayer=window["wasmplayer-".concat(_this15.szId)];var resDR=wasmplayer.JSPlayM4_SetDisplayRegion("".concat(_this15.szId,"-player"),left,right,top,bottom,false,true);resolve({code:0,data:resDR});});}/**
  		     * @synopsis 暂停
  		     *
  		     * @param {number} iWndNum 窗口号
  		     *
  		     * @returns {none} 无
  		     */},{key:"JS_Pause",value:function JS_Pause(iWndNum,date){var _this16=this;if(!this.bPlay){console.log("当前不是播放状态，无法暂停");return new Promise(function(resolve,reject){reject({code:0,msg:"当前不是播放状态，不需要暂停"});});}var that=this;var wasmplayer=window["wasmplayer-".concat(that.szId)];var oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();var year=oFrameInfo.year;var month=oFrameInfo.month;var day=oFrameInfo.day;var hour=oFrameInfo.hour;var minute=oFrameInfo.minute;var second=oFrameInfo.second;// 兼容，safari浏览器时间需要用“/”分隔
  var time=new Date(oTool.isIOS()||oTool.isSafari()||oTool.isEdge()?"".concat(year,"/").concat(month,"/").concat(day," ").concat(hour,":").concat(minute,":").concat(second):"".concat(year,"-").concat(month,"-").concat(day," ").concat(hour,":").concat(minute,":").concat(second)).getTime()/1000;var pauseDate=new Date(time*1000);that.bPauseDate=pauseDate.valueOf();that.bPauseTime="".concat(year)+(month>9?month:"0".concat(month))+(day>9?day:"0".concat(day))+(hour>9?hour:"0".concat(hour))+(minute>9?minute:"0".concat(minute))+(second>9?second:"0".concat(second));console.log('this.bPauseDate:::',that.bPauseDate);console.log('this.bPauseTime:::',that.bPauseTime);var promise=new Promise(function(resolve,reject){if(date){that.JS_Stop().then(function(){that.bPlay=false;// 停止后暂停状态需要复原
  that.bPause=true;that.bPauseDate=date.valueOf();resolve({code:1,msg:"暂停成功",pauseDate:pauseDate});})["catch"](function(err){reject({code:0,msg:"暂停失败"});console.log("err",err);});}else {that.oStreamClient.stopAll();var res=wasmplayer.JSPlayM4_Pause(1);if(res){that.bPlay=false;that.bPlayIng=false;that.bPause=true;if(that.szStorageUUID){_this16.JS_StopSave();}resolve({pauseDate:pauseDate});}else {reject();}}});return promise;}/**
  		   * @synopsis 恢复
  		   *
  		   * @param {number} iWndNum 窗口号
  		   *
  		   * @returns {none} 无
  		   */},{key:"JS_Resume",value:function JS_Resume(resumeTime){var _this17=this;var that=this;var wasmplayer=window["wasmplayer-".concat(that.szId)];var promise=new Promise(function(resolve,reject){if(resumeTime){if(_this17.bPauseTime){_this17.bPauseTime=_this17.bPauseTime.slice(0,14-resumeTime.length)+resumeTime;}else {_this17.bPauseTime=resumeTime;}}if(that.playURL.indexOf("playback")!==-1){that.playURL=that.playURL.replace(/begin=[0-9]{8}T[0-9]{6}Z/gi,"begin=".concat(that.bPauseTime.slice(0,8),"T").concat(that.bPauseTime.slice(8,14),"Z"));}if(that.playURL.indexOf("cloudplayback")!==-1){that.playURL=that.playURL.replace(/"startTime":[0-9]{13}/gi,"\"startTime\":".concat(that.bPauseDate));}if(resumeTime){that.JS_Play(that.szUrl,{playURL:that.playURL}).then(function(data){resolve(data);})["catch"](function(err){reject(err);});}else {var url=that.szUrl;if(url.indexOf("playback")!==-1){url=url.replace(/begin=[0-9]{8}T[0-9]{6}Z/gi,"begin=".concat(that.bPauseTime.slice(0,8),"T").concat(that.bPauseTime.slice(8,14),"Z"));}if(url.indexOf("cloudplayback")!==-1){url=url.replace(/"startTime":[0-9]{13}/gi,"\"startTime\":".concat(that.bPauseDate));}that.oStreamClient.openStream(url,{playURL:that.playURL},function(data){if(data.errorCode&&data.errorCode!='1'){//推流异常时触发errorHandler
  if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(that.g_port,data.errorCode,data);}reject();}if(data.bHead){//判断是否开启预览，用于初始化播放库，回放跳片段是会返回媒体头，不能只判断是否为媒体头
  if(that.EventCallback&&that.EventCallback.getStreamHeaderCallback){that.EventCallback.getStreamHeaderCallback();}that.aHead=new Uint8Array(data.buf);if(!!that.secretKey){wasmplayer.JSPlayM4_SetSecretKey(that.secretKey);}}else {if(that.firstGetData){// 第一次获取数据
  that.firstGetData=false;if(that.EventCallback&&that.EventCallback.getVideoStreamCallback){that.EventCallback.getVideoStreamCallback();}}if(that.firstFlag){var oFrameInfo=wasmplayer.JSPlayM4_GetFrameInfo();var nWidth=oFrameInfo.width;var nHeight=oFrameInfo.height;that.nWidth=nWidth;that.nHeight=nHeight;if(nWidth){if(that.EventCallback&&that.EventCallback.appearFirstFrameCallback){that.EventCallback.appearFirstFrameCallback();}if(that.EventCallback&&that.EventCallback.averageStreamSuccessCallback){that.EventCallback.averageStreamSuccessCallback();}that.firstFlag=false;}}var aBuffer=new Uint8Array(data.buf);//拷贝一份数据进行使
  // 监听数据错误
  if(data.statusString){if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(0,1001,data);}}else if(data.type&&data.type==="exception"){if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(0,1002,data);}}wasmplayer.JSPlayM4_InputData(aBuffer,aBuffer.length);aBuffer=null;}// 录制
  if(that.szStorageUUID){that.oStorageManager.inputData(that.szStorageUUID,data.buf);}},function(){if(that.bPlay){if(that.EventCallback&&that.EventCallback.pluginErrorHandler){that.EventCallback.pluginErrorHandler(0,1003);}}that.bPlayIng=false;reject();}).then(function(id){//websocket onopen事件触发
  that.szStreamUUID=id;that.oStreamClient.startPlay(id).then(function(){var res=wasmplayer.JSPlayM4_Pause(0);if(res){that.bPlay=true;that.bPlayIng=true;that.bPause=false;that.bPauseDate=null;resolve(res);}else {reject();}})["catch"](function(err){// that._doRelease();
  // const rt = wasmplayer.JSPlayM4_GetInputBufSize();
  // console.log('JSPlayM4_GetInputBufSize:::', rt);
  that.bPlayIng=false;reject(err.oError);});},function(oError){//websocekt 未进入onopen
  that.bPlayIng=false;that._doRelease();reject(oError);});}});return promise;}/**
  		   * @description 
  		   * @param {Object} type 矫正类型  参考 src/ezopen/constants.js
  		   * @param {string} ids 如果分屏矫正，需要传入分屏canvas的id字符串列表 如 canvas1,canvas2,canvas3
  		   * @returns {Array<{code: number, msg: string, port: number, id: string}>} // code= 0 成功， -1 失败
  		   */},{key:"JS_FECCorrectType",value:function JS_FECCorrectType(type,ids){var _this18=this;this.FECSplitIds=ids;this.correctType=type;return new Promise(function(resolve,reject){/** @type {Array<{code: number, msg: string, port: number, id: string}>} */var res=_this18._createSplitVideos(type,ids);var hasErr=res.find(function(item){return item.code===-1;});if(hasErr||res.length===0){reject(res);}else {resolve(res);}});}/**
  		   * @description 设置 2D 鱼眼矫正旋转参数
  		   * @param {number} fishSubPort 鱼眼端口 主屏默认为 0
  		   * @param {Object} param2d 
  		   */},{key:"JS_FECSetParam2D",value:function JS_FECSetParam2D(fishSubPort,param2d){var wasmplayer=window["wasmplayer-".concat(this.szId)];return wasmplayer.JSPlayM4_FEC_SetParam(fishSubPort,param2d);}/**
  		   * 
  		   * @param {*} type 
  		   * @param {string} ids 
  		   * @returns 
  		   */},{key:"_createSplitVideos",value:function _createSplitVideos(type,ids){var that=this;var mainCanvasID="".concat(that.szId,"-player");ids=mainCanvasID+','+ids;var idsArr=ids?ids.split(','):[];var wasmplayer=window["wasmplayer-".concat(that.szId)];var result=[];if(type.correctList&&type.correctList.length>0){// 有分屏
  for(var _i16=0;_i16<type.correctList.length;_i16++){if(_i16===0&&type.correctList[_i16].hidden){// 隐藏主屏
  // .....
  continue;}// 主屏
  if(_i16===0){setMainCorrectType(type.correctList[0]);continue;}if(!idsArr[_i16]||!document.getElementById(idsArr[_i16])||document.getElementById(idsArr[_i16]).nodeName!=='CANVAS'){// id 不存在
  return [];}var fishSubPort=wasmplayer.JSPlayM4_FEC_GetPort(type.place,type.correctList[_i16].correctType);//矫正类型
  //2.启动该子port下（该canvas）的鱼眼矫正
  var resE=wasmplayer.JSPlayM4_FEC_Enable(fishSubPort);//3.设置鱼眼窗口
  var resFECSW=wasmplayer.JSPlayM4_FEC_SetWnd(fishSubPort,idsArr[_i16]);//设置窗口
  //4.设置鱼眼矫正参数
  var param2d={upDateType:that._matchUpDateType(type.correctList[_i16].correctType),// 类型设置：4表示360矫正; 2表示PTZZoom; = 0x8; 更新 PTZ 矫正的参数
  fValue:0,// (0-2*PI) 旋转角度
  fPTZParam:{fPTZPositionX:type.correctList[_i16].x||0,fPTZPositionY:type.correctList[_i16].y||0},fPTZZoom:0.00001};var resParam=that.JS_FECSetParam2D(fishSubPort,param2d);if(resE===0||resFECSW===0||resParam===0){result.push({code:-1,msg:'失败',port:fishSubPort,id:idsArr[_i16]});}else {// 成功
  result.push({code:0,msg:'成功',port:fishSubPort,id:idsArr[_i16]});that.canvasFECSubPort.set(idsArr[_i16],_objectSpread2(_objectSpread2({},defaultCoors),{},{port:fishSubPort,param2d:param2d,startPTZPosition:{x:param2d.fPTZParam.fPTZPositionX,y:param2d.fPTZParam.fPTZPositionY}}));document.getElementById(idsArr[_i16]).setAttribute('data-port',fishSubPort);that._spliceCanvasMouseEvents(idsArr[_i16],type.correctList[_i16]);}}}else {// 主屏
  setMainCorrectType(type);}/**
  		     * @param {Object} typeItem 矫正类型
  		     * @returns 
  		     */function setMainCorrectType(typeItem){var param2d={upDateType:that._matchUpDateType(typeItem.correctType),// 类型设置：4 表示360矫正; 2 表示PTZZoom; 0x8 更新 PTZ 矫正的参数
  fValue:0,// (0-2*PI) 旋转角度
  fPTZParam:{fPTZPositionX:typeItem.x||0,fPTZPositionY:typeItem.y||0},fPTZZoom:0.00001};// console.log(`%c---------------------------------------------`, 'color: blue', typeItem )
  // 主屏
  var _that$canvasFECSubPor=that.canvasFECSubPort.get(mainCanvasID),port=_that$canvasFECSubPor.port;if(port===undefined){console.log("this canvas not display");return result;}// 在 `JSPlayM4_OpenStream` 之后。`JSPlayM4_Play` 之前之后均可调用。
  var mainRes=wasmplayer.JSPlayM4_FEC_ResetCorrectType(port,type.place,typeItem.correctType);if(mainRes===1){result.push({code:0,msg:'成功',port:port,id:mainCanvasID});}else {result.push({code:-1,msg:'失败',port:port,id:mainCanvasID});return;}if(typeItem.correctType<=FEC_CORRECT_360)// 设置 2D 鱼眼矫正旋转参数
  that.JS_FECSetParam2D(port,param2d);else {// 3D拖动（AR半球或圆柱)
  if(typeItem.viewParam){// 
  setTimeout(function(){if(typeof typeItem.viewParam.x==='number'&&typeof typeItem.viewParam.y==='number'){// 1 是垂直旋转、2 是水平旋转、
  wasmplayer.JSPlayM4_FEC_SetViewParam(port,2,typeItem.viewParam.x);wasmplayer.JSPlayM4_FEC_SetViewParam(port,1,typeItem.viewParam.y);}if(typeof typeItem.viewParam.zoom==='number'){// 3为缩放
  wasmplayer.JSPlayM4_FEC_SetViewParam(port,3,typeItem.viewParam.zoom);}},200);}}that.canvasFECSubPort.set(mainCanvasID,_objectSpread2(_objectSpread2({},defaultCoors),{},{port:port,param2d:param2d,startPTZPosition:{x:param2d.fPTZParam.fPTZPositionX,y:param2d.fPTZParam.fPTZPositionY}}));that._spliceCanvasMouseEvents(mainCanvasID,typeItem);}return result;}},{key:"_matchUpDateType",value:function _matchUpDateType(correctType){// 类型设置：0x4 表示360矫正; 0x2 表示PTZZoom; 0x8 更新PTZ 矫正的参数
  switch(correctType){case FEC_CORRECT_360:return 0x4;case FEC_CORRECT_PTZ:return 0x8;}// 
  return 0x2;}/**
  		   * @description 给分屏添加mouse事件
  		   * @param {string} canvasId 
  		   * @param {{correctType: string}} type 
  		   * @returns 
  		   */},{key:"_spliceCanvasMouseEvents",value:function _spliceCanvasMouseEvents(canvasId,type){if(canvasId===undefined){return;}/** @type {HTMLCanvasElement} */var canvas=document.getElementById(canvasId);if(canvas===null){return;}var that=this;var wasmplayer=window["wasmplayer-".concat(that.szId)];var canvasID=canvas.getAttribute('id');var coords=that.canvasFECSubPort.get(canvasID);//获取canvasID对应的fishSubPort
  if(coords.port===undefined){return;}var canvasWidth=canvas.width;var canvasHeight=canvas.height;function showCoords(e){var arCoords=[e.clientX,e.clientY];//1、Y轴移动的距离
  coords.diff.y=arCoords[1]-coords.start.y;var inputYValue=(coords.total.y+coords.diff.y)/canvasHeight*2*Math.PI;//0~2PI,旋转的角度
  //PTZ纵向移动计算
  var moveLenY=(arCoords[1]-coords.lastCorrdsY)/(canvasHeight*2);var alpha=Math.atan2(coords.startPTZPosition.y-0.5,coords.startPTZPosition.x-0.5);var PTZPositionX1=coords.startPTZPosition.x+moveLenY*Math.cos(alpha);var PTZPositionY1=coords.startPTZPosition.y+moveLenY*Math.sin(alpha);//2、X轴移动的距离
  coords.diff.x=arCoords[0]-coords.start.x;var inputXValue=(coords.total.x+coords.diff.x)/canvasWidth*2*Math.PI;//0~2PI,旋转的角度
  //PTZ横向移动角度计算
  var R=Math.sqrt(Math.pow(PTZPositionX1-0.5,2)+Math.pow(PTZPositionY1-0.5,2));var theta=-inputXValue;var PTZPositionX=0.5+R*Math.cos(theta);var PTZPositionY=0.5+R*Math.sin(theta);if(type.correctType<=FEC_CORRECT_360){// 2D矫正
  switch(type.correctType){case FEC_CORRECT_360:coords.param2d.upDateType=0x4;break;case FEC_CORRECT_180:coords.param2d.upDateType=0x4;break;case FEC_CORRECT_PTZ:coords.param2d.upDateType=0x8;var len=Math.sqrt(Math.pow(PTZPositionX-0.5,2)+Math.pow(PTZPositionY-0.5,2));if(len>0.4){return;}break;}coords.param2d.fValue=inputXValue;// 360角度设置（0~2PI）
  coords.param2d.fPTZParam.fPTZPositionX=PTZPositionX;// 中心坐标X
  coords.param2d.fPTZParam.fPTZPositionY=PTZPositionY;// 中心坐标Y
  //2D拖动
  wasmplayer.JSPlayM4_FEC_SetParam(coords.port,coords.param2d);}else if(type.correctType===FEC_CORRECT_CYLINDER){// 暂时支持圆柱 ， 不支持广角
  //3D拖动（圆柱）
  wasmplayer.JSPlayM4_FEC_SetViewParam(coords.port,2,inputXValue);wasmplayer.JSPlayM4_FEC_SetViewParam(coords.port,1,inputYValue);}}// 局部变量，用来存储鼠标移动事件， 用于移除事件
  var _moveFn=function _moveFn(){};function _canvasMouseDown(event){coords.start.x=event.pageX;coords.start.y=event.pageY;coords.lastCorrdsY=event.pageY;_moveFn=function _moveFn(e){showCoords(e);};canvas.addEventListener('mousemove',_moveFn);}canvas.addEventListener('mousedown',_canvasMouseDown);var removeMoveEvent=function removeMoveEvent(){if(_moveFn!==null){canvas.removeEventListener('mousemove',_moveFn);_moveFn=null;coords.total.x+=coords.diff.x;coords.total.y+=coords.diff.y;}};// 移除 move 事件
  canvas.addEventListener('mouseup',removeMoveEvent);canvas.addEventListener('mouseleave',removeMoveEvent);canvas.addEventListener('mouseout',removeMoveEvent);}/**
  		   * @description 清空所有鱼眼子端口 不包括主窗口
  		   */},{key:"_colseFECAllSubWnd",value:function _colseFECAllSubWnd(){if(this.FECSplitIds&&this.canvasFECSubPort){var ids=this.FECSplitIds.split(",");var _iterator=_createForOfIteratorHelper(ids),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var id=_step.value;if(id){var canvasFECSubPortItem=this.canvasFECSubPort.get(id);//获取canvasID对应的fishSubPort
  if(canvasFECSubPortItem===undefined||canvasFECSubPortItem.port===undefined){continue;}this.canvasFECSubPort["delete"](id);var wasmplayer=window["wasmplayer-".concat(this.szId)];wasmplayer.JSPlayM4_FEC_Disable(canvasFECSubPortItem.port,true);wasmplayer.JSPlayM4_FEC_DelPort(canvasFECSubPortItem.port);}}}catch(err){_iterator.e(err);}finally{_iterator.f();}}}/**
  		   * @description 设置 3D 矫正视角参数
  		   * @param {FECViewParam} param 
  		   * @returns {Promise<boolean>}  true: 成功  false: 失败  undefined: 不支持
  		   */},{key:"FEC_Set3DViewParam",value:function FEC_Set3DViewParam(param){// 
  var wasmplayer=window["wasmplayer-".concat(this.szId)];if(this.FECSplitIds&&this.canvasFECSubPort&&this.correctType){// FIXME: 成功失败都返回1， 待研究院更新
  var res=wasmplayer.JSPlayM4_FEC_SetViewParam(param.port,param.upDateType,param.fValue);if(res===1){return Promise.resolve(true);}else {return Promise.reject(false);}}return Promise.reject(undefined);}/**
  		   * @description  获取 3D 矫正视角参数
  		   * @param {FECGetViewParam} param 
  		   * @returns {Promise<object>}
  		   */},{key:"FEC_Get3DViewParam",value:function FEC_Get3DViewParam(param){var _this19=this;var wasmplayer=window["wasmplayer-".concat(this.szId)];return new Promise(function(resolve,reject){var cb=function cb(Param3D){resolve(Param3D);};if(_this19.FECSplitIds&&_this19.canvasFECSubPort&&_this19.correctType){var res=wasmplayer.JSPlayM4_FEC_GetViewParam(param.port,param.upDateType,cb);if(res!==1){return reject(false);}}return reject(undefined);});}}]);return JSPluginV3;}();window.JSPluginV3=JSPluginV3;return JSPluginV3;});})(jsPluginV31_0_0_min);

  /**
   * Created by wangweijie5 on 2016/12/16.
   */


  var _createClass = function () {
    function defineProperties(target, props) {
      for (var i = 0; i < props.length; i++) {
        var descriptor = props[i];
        descriptor.enumerable = descriptor.enumerable || false;
        descriptor.configurable = true;
        if ("value" in descriptor) descriptor.writable = true;
        Object.defineProperty(target, descriptor.key, descriptor);
      }
    }
    return function (Constructor, protoProps, staticProps) {
      if (protoProps) defineProperties(Constructor.prototype, protoProps);
      if (staticProps) defineProperties(Constructor, staticProps);
      return Constructor;
    };
  }();
  function _classCallCheck(instance, Constructor) {
    if (!(instance instanceof Constructor)) {
      throw new TypeError("Cannot call a class as a function");
    }
  }
  var __instance = function () {
    var instance = void 0;
    return function (newInstance) {
      if (newInstance) instance = newInstance;
      return instance;
    };
  }();
  (function () {
    function AudioRenderer() {
      _classCallCheck(this, AudioRenderer);
      if (__instance()) return __instance();

      // 确保只有单例
      if (AudioRenderer.unique !== undefined) {
        return AudioRenderer.unique;
      }
      AudioRenderer.unique = this;
      this.oAudioContext = null;
      this.currentVolume = 80; // 初始音量
      this.bSetVolume = false;
      this.gainNode = null;
      this.iWndNum = -1; // 窗口号
      this.mVolumes = new Map(); // 用于存储所有音量

      // Init AudioContext
      var AudioContext = window.AudioContext || window.webkitAudioContext;
      this.oAudioContext = new AudioContext();
      this.writeString = function (view, offset, string) {
        for (var i = 0; i < string.length; i++) {
          view.setUint8(offset + i, string.charCodeAt(i));
        }
      };
      this.setBufferToDataview = function (output, offset, input) {
        for (var i = 0; i < input.length; i++, offset++) {
          output.setUint8(offset, input[i]);
        }
      };
      __instance(this);
    }

    /**
     * @synopsis 音频播放
     *
     *  @param dataBuf [IN] 音频缓存
     *  @param dataLen [IN] 缓存长度
     *  @param audioInfo [IN] 音频参数
     *
     * @returns 状态码
     */

    _createClass(AudioRenderer, [{
      key: "Play",
      value: function Play(dataBuf, dataLen, audioInfo) {
        var bufferData = new ArrayBuffer(44 + dataLen);
        var viewTalk = new DataView(bufferData);
        var sampleRates = audioInfo.samplesPerSec;
        var channels = audioInfo.channels;
        var bitsPerSample = audioInfo.bitsPerSample;

        //console.log("audiorender sampleRates"+sampleRates+"channels:"+channels+"bitsPerSample:"+bitsPerSample);

        /* RIFF identifier */
        this.writeString(viewTalk, 0, "RIFF");
        /* file length */
        viewTalk.setUint32(4, 32 + dataLen * 2, true);
        /* RIFF type */
        this.writeString(viewTalk, 8, "WAVE");
        /* format chunk identifier */
        this.writeString(viewTalk, 12, "fmt ");
        /* format chunk length */
        viewTalk.setUint32(16, 16, true);
        /* sample format (raw) */
        viewTalk.setUint16(20, 1, true);
        /* channel count */
        viewTalk.setUint16(22, channels, true);
        /* sample rate */
        viewTalk.setUint32(24, sampleRates, true);
        /* byte rate (sample rate * block align) */
        viewTalk.setUint32(28, sampleRates * 2, true);
        /* block align (channel count * bytes per sample)/8 */
        viewTalk.setUint16(32, channels * bitsPerSample / 8, true);
        /* bits per sample */
        viewTalk.setUint16(34, bitsPerSample, true);
        /* data chunk identifier */
        this.writeString(viewTalk, 36, "data");
        /* data chunk length */
        viewTalk.setUint32(40, dataLen, true);
        this.setBufferToDataview(viewTalk, 44, dataBuf);
        var self = this;
        this.oAudioContext.decodeAudioData(viewTalk.buffer, function (buffer) {
          var bufferSource = self.oAudioContext.createBufferSource();
          if (bufferSource == null) {
            return -1;
          }
          bufferSource.buffer = buffer;
          bufferSource.start(0);
          if (self.gainNode == null || self.bSetVolume) {
            self.gainNode = self.oAudioContext.createGain();
            // self.gainNode.gain.value = self.currentVolume;
            // // self.currentVolume = self.gainNode.gain.value;
            // self.gainNode.connect(self.oAudioContext.destination);

            self.bSetVolume = false;
          }
          self.gainNode.gain.value = self.currentVolume / 100;
          // self.currentVolume = self.gainNode.gain.value;
          self.gainNode.connect(self.oAudioContext.destination);
          bufferSource.connect(self.gainNode);
        }, function (e) {
          console.log("decode error");
          return -1;
        });
        return 0;
      }

      /**
       * @synopsis 停止播放
       *
       * @returns 返回音量
       */
    }, {
      key: "Stop",
      value: function Stop() {
        if (this.gainNode != null) {
          this.gainNode.disconnect();
          this.gainNode = null;
        }

        // this.oAudioContext.close();

        // AudioRenderer.unique = undefined;
        // __instance() = null;
        return true;
      }

      /**
       * @synopsis 设置音量
       *
       *  @param iVolume [IN] 音量
       *
       * @returns 状态码
       */
    }, {
      key: "SetVolume",
      value: function SetVolume(iVolume) {
        this.bSetVolume = true;
        this.currentVolume = iVolume;

        // 储存当前窗口设置音量值
        this.mVolumes.set(this.iWndNum, this.currentVolume);
        return true;
      }

      /**
       * @synopsis 设置窗口号
       *
       *  @param iWndNum [IN] 窗口号
       *
       * @returns 状态码
       */
    }, {
      key: "SetWndNum",
      value: function SetWndNum(iWndNum) {
        this.iWndNum = iWndNum;

        // 获取当前窗口设置音量值
        var iVolume = this.mVolumes.get(iWndNum);
        if (iVolume == undefined) {
          iVolume = 80; // 默认音量
        }

        this.currentVolume = iVolume;
        return true;
      }

      /**
       * @synopsis 获取音量
       *
       * @returns 返回音量
       */
    }, {
      key: "GetVolume",
      value: function GetVolume() {
        // 获取当前窗口设置音量值
        var iVolume = this.mVolumes.get(this.iWndNum);
        if (iVolume == undefined) {
          iVolume = 80; // 默认音量
        }

        return iVolume;
      }
    }]);
    window.AudioRenderer = AudioRenderer;
    return AudioRenderer;
  })();

  //顶点着色器
  //attribute修饰符用于声明由浏览器（javascript）传输给顶点着色器的变量值；
  // vertexPos即我们定义的顶点坐标；
  // gl_Position是一个内建的传出变量。
  var vertexYUVShader = ['attribute vec4 vertexPos;', 'attribute vec2 texturePos;', 'varying vec2 textureCoord;', 'void main()', '{', 'gl_Position = vertexPos;', 'textureCoord = texturePos;', '}'].join('\n');
  //像素着色器(yuv->rgb)
  var fragmentYUVShader = ['precision highp float;', 'varying highp vec2 textureCoord;', 'uniform sampler2D ySampler;', 'uniform sampler2D uSampler;', 'uniform sampler2D vSampler;', 'const mat4 YUV2RGB = mat4', '(', '1.1643828125, 0, 1.59602734375, -.87078515625,', '1.1643828125, -.39176171875, -.81296875, .52959375,', '1.1643828125, 2.017234375, 0, -1.081390625,', '0, 0, 0, 1', ');', 'void main(void) {', 'highp float y = texture2D(ySampler,  textureCoord).r;', 'highp float u = texture2D(uSampler,  textureCoord).r;', 'highp float v = texture2D(vSampler,  textureCoord).r;', 'gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;', '}'].join('\n');
  (function (root, factory) {
    window.SuperRender = factory();
  })(undefined, function () {
    function RenderManager(canvas) {
      this.canvasElement = document.getElementById(canvas);
      this.initContextGL();
      if (this.contextGL) {
        this.YUVProgram = this.initProgram(vertexYUVShader, fragmentYUVShader);
        this.initBuffers();
        this.initTextures();
      }
    }

    /**
     * 初始化WebGL上下文
     */
    RenderManager.prototype.initContextGL = function () {
      var canvas = this.canvasElement;
      var gl = null;
      try {
        gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
      } catch (e) {
        gl = null;
      }
      if (!gl || typeof gl.getParameter !== "function") {
        gl = null;
      }
      this.contextGL = gl;
      console.log("WebGL1.0");
    };

    /**
     * 初始化着色器程序
     * @param vertexShaderScript    顶点着色器脚本
     * @param fragmentShaderScript  片段着色器脚本
     */
    RenderManager.prototype.initProgram = function (vertexShaderScript, fragmentShaderScript) {
      var gl = this.contextGL;
      var vertexShader = gl.createShader(gl.VERTEX_SHADER); //创建定点着色器
      gl.shaderSource(vertexShader, vertexShaderScript);
      gl.compileShader(vertexShader);
      if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
        console.log('Vertex shader failed to compile: ' + gl.getShaderInfoLog(vertexShader));
      }
      var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);
      gl.shaderSource(fragmentShader, fragmentShaderScript);
      gl.compileShader(fragmentShader);
      if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
        console.log('Fragment shader failed to compile: ' + gl.getShaderInfoLog(fragmentShader));
      }
      var program = gl.createProgram();
      gl.attachShader(program, vertexShader);
      gl.attachShader(program, fragmentShader);
      gl.linkProgram(program);
      if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
        console.log('Program failed to compile: ' + gl.getProgramInfoLog(program));
      }
      gl.deleteShader(vertexShader);
      gl.deleteShader(fragmentShader);
      return program;
    };

    /**
     * 初始化数据缓存
     */
    RenderManager.prototype.initBuffers = function () {
      var gl = this.contextGL;
      var vertexPosBuffer = gl.createBuffer();
      gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);
      gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, -1, 1, 1, -1, -1, -1]), gl.STATIC_DRAW);
      gl.bindBuffer(gl.ARRAY_BUFFER, null);
      var texturePosBuffer = gl.createBuffer();
      gl.bindBuffer(gl.ARRAY_BUFFER, texturePosBuffer);
      gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]), gl.DYNAMIC_DRAW);
      gl.bindBuffer(gl.ARRAY_BUFFER, null);
      this.vertexPosBuffer = vertexPosBuffer;
      this.texturePosBuffer = texturePosBuffer;
    };

    /**
     * 创建纹理
     */
    RenderManager.prototype.initTexture = function () {
      var gl = this.contextGL;
      var textureRef = gl.createTexture();
      gl.bindTexture(gl.TEXTURE_2D, textureRef);
      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
      gl.bindTexture(gl.TEXTURE_2D, null);
      return textureRef;
    };

    /**
     * 初始化YUV纹理
     */
    RenderManager.prototype.initTextures = function () {
      var gl = this.contextGL;
      var program = this.YUVProgram;
      gl.useProgram(program);
      var yTextureRef = this.initTexture();
      var ySamplerRef = gl.getUniformLocation(program, 'ySampler');
      gl.uniform1i(ySamplerRef, 0);
      this.yTextureRef = yTextureRef;
      var uTextureRef = this.initTexture();
      var uSamplerRef = gl.getUniformLocation(program, 'uSampler');
      gl.uniform1i(uSamplerRef, 1);
      this.uTextureRef = uTextureRef;
      var vTextureRef = this.initTexture();
      var vSamplerRef = gl.getUniformLocation(program, 'vSampler');
      gl.uniform1i(vSamplerRef, 2);
      this.vTextureRef = vTextureRef;
      gl.useProgram(null);
    };

    /**
     * 显示帧数据
     * @param nWidth    宽度
     * @param nHeight   高度
     * @param nHeight   帧数据
     */
    RenderManager.prototype.SR_DisplayFrameData = function (nWidth, nHeight, pData, dWidth, dHeight) {
      if (nWidth <= 0 || nHeight <= 0) {
        return;
      }
      var gl = this.contextGL;
      if (null == pData) {
        gl.clearColor(0.0, 0.0, 0.0, 0.0);
        gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
        return;
      }
      var canvas = this.canvasElement;
      this.nWindowWidth = canvas.width;
      this.nWindowHeight = canvas.height;
      var nWindowWidth = this.nWindowWidth;
      var nWindowHeight = this.nWindowHeight;
      gl.clearColor(0.8, 0.8, 1.0, 1.0);
      gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
      gl.viewport(0, 0, nWindowWidth, nWindowHeight);
      this.updateFrameData(nWidth, nHeight, pData, dWidth, dHeight);
      var program = this.YUVProgram;
      gl.useProgram(program);
      var vertexPosBuffer = this.vertexPosBuffer;
      gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);
      var vertexPosRef = gl.getAttribLocation(program, 'vertexPos');
      gl.enableVertexAttribArray(vertexPosRef);
      gl.vertexAttribPointer(vertexPosRef, 2, gl.FLOAT, false, 0, 0);
      gl.bindBuffer(gl.ARRAY_BUFFER, null);
      var texturePosBuffer = this.texturePosBuffer;
      gl.bindBuffer(gl.ARRAY_BUFFER, texturePosBuffer);
      var texturePosRef = gl.getAttribLocation(program, 'texturePos');
      gl.enableVertexAttribArray(texturePosRef);
      gl.vertexAttribPointer(texturePosRef, 2, gl.FLOAT, false, 0, 0);
      gl.bindBuffer(gl.ARRAY_BUFFER, null);
      gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
      gl.disableVertexAttribArray(vertexPosRef);
      gl.disableVertexAttribArray(texturePosRef);
      gl.useProgram(null);
    };

    /**
     * 上传YUV数据到纹理
     * @param nWidth    宽度
     * @param nHeight   高度
     * @param nHeight   帧数据
     */
    RenderManager.prototype.updateFrameData = function (width, height, data, dWidth, dHeight) {
      var gl = this.contextGL;
      var yTextureRef = this.yTextureRef;
      var uTextureRef = this.uTextureRef;
      var vTextureRef = this.vTextureRef;
      var i420Data = data;
      // debugger;
      if (width == dWidth && height == dHeight) {
        var yDataLength = width * height;
        var yData = i420Data.subarray(0, yDataLength);
        gl.activeTexture(gl.TEXTURE0);
        gl.bindTexture(gl.TEXTURE_2D, yTextureRef);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, width, height, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, yData);
        var cbDataLength = width / 2 * height / 2;
        var cbData = i420Data.subarray(width * height, width * height + cbDataLength);
        gl.activeTexture(gl.TEXTURE2);
        gl.bindTexture(gl.TEXTURE_2D, vTextureRef);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, width / 2, height / 2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, cbData);
        var crDataLength = cbDataLength;
        var crData = i420Data.subarray(width * height + width * height / 4, width * height + width * height / 4 + crDataLength);
        gl.activeTexture(gl.TEXTURE1);
        gl.bindTexture(gl.TEXTURE_2D, uTextureRef);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, width / 2, height / 2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, crData);
      } else {
        // //裁剪宽
        var yDataLength = dWidth * dHeight;
        var yData = new Uint8Array(yDataLength);
        for (var i = 0; i < dHeight; i++) {
          //var ySonData=new Uint8Array(dWidth) ;
          var ySonData = i420Data.subarray(i * width, i * width + dWidth);
          for (var j = 0; j < dWidth; j++) {
            yData[i * dWidth + j] = ySonData[j];
          }
        }
        gl.activeTexture(gl.TEXTURE0);
        gl.bindTexture(gl.TEXTURE_2D, yTextureRef);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, dWidth, dHeight, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, yData);
        yData = null;
        ySonData = null;
        var cbDataLength = dWidth / 2 * dHeight / 2;
        var cbData = new Uint8Array(cbDataLength);
        //var cbSonData=new Uint8Array(dWidth/2) ;
        for (var i = 0; i < dHeight / 2; i++) {
          var cbSonData = i420Data.subarray(width * height + i * width / 2, width * height + i * width / 2 + dWidth / 2);
          for (var j = 0; j < dWidth / 2; j++) {
            cbData[i * dWidth / 2 + j] = cbSonData[j];
          }
        }
        gl.activeTexture(gl.TEXTURE2);
        gl.bindTexture(gl.TEXTURE_2D, vTextureRef);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, dWidth / 2, dHeight / 2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, cbData);
        cbData = null;
        cbSonData = null;
        var crDataLength = cbDataLength;
        var crData = new Uint8Array(crDataLength);
        for (var i = 0; i < dHeight / 2; i++) {
          var crSonData = i420Data.subarray(width * height * 5 / 4 + i * width / 2, width * height * 5 / 4 + i * width / 2 + dWidth / 2);
          for (var j = 0; j < dWidth / 2; j++) {
            crData[i * dWidth / 2 + j] = crSonData[j];
          }
        }
        gl.activeTexture(gl.TEXTURE1);
        gl.bindTexture(gl.TEXTURE_2D, uTextureRef);
        gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, dWidth / 2, dHeight / 2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, crData);
        crData = null;
        crSonData = null;
      }
    };

    /**
     * 设置显示区域
     * @param stDisplayRect    显示区域
     */
    RenderManager.prototype.SR_SetDisplayRect = function (stDisplayRect) {
      var gl = this.contextGL;
      var nWindowWidth = this.nWindowWidth;
      var nWindowHeight = this.nWindowHeight;
      var texturePosValues = null;
      if (stDisplayRect && nWindowWidth > 0 && nWindowHeight > 0) {
        var fLeft = stDisplayRect.left / nWindowWidth;
        var fTop = stDisplayRect.top / nWindowHeight;
        var fRight = stDisplayRect.right / nWindowWidth;
        var fBottom = stDisplayRect.bottom / nWindowHeight;
        texturePosValues = new Float32Array([fRight, fTop, fLeft, fTop, fRight, fBottom, fLeft, fBottom]);
      } else {
        texturePosValues = new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]);
      }
      var texturePosBuffer = this.texturePosBuffer;
      gl.bindBuffer(gl.ARRAY_BUFFER, texturePosBuffer);
      gl.bufferSubData(gl.ARRAY_BUFFER, 0, texturePosValues);
      gl.bindBuffer(gl.ARRAY_BUFFER, null);
    };

    /**
     * 释放显示资源
     */
    RenderManager.prototype.SR_Destroy = function () {
      var gl = this.contextGL;
      var YUVProgram = this.YUVProgram;
      gl.deleteProgram(YUVProgram);
      var vertexPosBuffer = this.vertexPosBuffer;
      var texturePosBuffer = this.texturePosBuffer;
      gl.deleteBuffer(vertexPosBuffer);
      gl.deleteBuffer(texturePosBuffer);
      var yTextureRef = this.yTextureRef;
      var uTextureRef = this.uTextureRef;
      var vTextureRef = this.vTextureRef;
      gl.deleteTexture(yTextureRef);
      gl.deleteTexture(uTextureRef);
      gl.deleteTexture(vTextureRef);
      //gl.getExtension('WEBGL_lose_context').loseContext();
    };

    return RenderManager;
  });

  // 插件资源静态域名
  var uikitStaticDomain = 'https://openstatic.ys7.com';
  // const uikitStaticDomain = 'https://test12openstatic.ys7.com';
  var uikitStaticPathV3 = "".concat(uikitStaticDomain, "/ezuikit_js/v1.2.32/ezuikit_static/v65/v3");

  /**
   * @description iframe模板 - 兼容旧版本
   * @private 
   * @param {string=} templateName 模版名称
   * @param {EZUIKitPlayerParams} params EZUIKitPlayer params
   * @returns {{templateType: 'themeData' | 'local'| 'remote' | 'iframe' | 'invalid', templateId: string}}
   */
  var matchTemplate = function matchTemplate(templateName, params) {
    var IFRAMETEMPLATE = ['theme', 'standard'];
    var LOCALTEMPLATE = ['pcLive', 'pcRec', 'mobileLive', 'mobileRec', 'noData', 'security', 'voice', 'simple', 'mobileCall', 'miniRec'];
    if (typeof templateName === 'undefined') {
      if (params.themeData) {
        return {
          templateType: 'themeData',
          templateId: 'themeData'
        };
      }
      return {
        templateType: 'local',
        templateId: ''
      };
    }
    if (typeof templateName === 'string') {
      if (templateName.length === 32) {
        return {
          templateType: 'remote',
          templateId: templateName
        };
      } else if (IFRAMETEMPLATE.indexOf(templateName) !== -1) {
        // 精简版且不使用头部，底部，仅播放视频，建议使用按需加载避免iframe内存额外消耗
        if (templateName === 'simple' && typeof params.header === 'undefined' && typeof params.footer === 'undefined') {
          return {
            templateType: 'local',
            templateId: ''
          };
        }
        return {
          templateType: 'iframe',
          templateId: templateName
        };
      } else if (LOCALTEMPLATE.indexOf(templateName) !== -1) {
        // 特殊处理回放的模板
        if (params.url.indexOf('rec') != -1 && params.template != 'simple' && params.id != 'miniRec') {
          return {
            templateType: 'local',
            templateId: isMobile() ? 'mobileRec' : 'pcRec'
          };
        }
        return {
          templateType: 'local',
          templateId: templateName
        };
      } else {
        // 无效id
        if (!!params && params.isCall) {
          return {
            templateType: 'invalid',
            templateId: templateName
          };
        }
      }
    }
  };

  /**
   * @description 是否多进程可用
   * @private
   * @returns {boolean}
   */
  var isVersion2Available = function isVersion2Available() {
    var ua = window.navigator.userAgent.toLowerCase(); // 获取用户端信息
    var info = {
      sa: /version.*safari/.test(ua),
      // 匹配Safari浏览器
      ch: /chrome/.test(ua),
      // 匹配Chrome浏览器
      ff: /gecko/.test(ua) && !/webkit/.test(ua) // 匹配Firefox浏览器
    };

    if (isMobile()) {
      return false;
    } else if (info.ch) {
      var getChromeVersion = function getChromeVersion() {
        var arr = window.navigator.userAgent.split(' ');
        var chromeVersion = '';
        for (var i = 0; i < arr.length; i++) {
          if (/chrome/i.test(arr[i])) chromeVersion = arr[i];
        }
        if (chromeVersion) {
          return Number(chromeVersion.split('/')[1].split('.')[0]);
        } else {
          return false;
        }
      };
      return getChromeVersion() > 91 && !!window.SharedArrayBuffer;
    }
    return false;
  };

  /**
   * @description EZUIKit播放器
   * @class EZUIKitPlayer
   * @classdesc EZUIKit播放器
   * @public
   * @param {EZUIKitPlayerParams} params
   */
  var EZUIKitPlayer = /*#__PURE__*/function () {
    /**
     * @constructor
     * @param {EZUIKitPlayerParams} params  EZUIKitPlayer Params
     */
    function EZUIKitPlayer(params) {
      var _this = this;
      _classCallCheck$1(this, EZUIKitPlayer);
      this.isStoping = false; // 是否在播放前 stop 执行过程中
      var _params$autoplay = params.autoplay,
        autoplay = _params$autoplay === void 0 ? true : _params$autoplay;
      // 如果设置了模板（除精简版），此处不自动播放，根据模板判断是否执行自动播放:
      if (params.template || params.themeData) {
        autoplay = false;
      }
      this.params = params;
      this.autoplay = autoplay;
      this.talkChannelNo = params.talkChannelNo || null; //对讲通道号
      this.eventEmitter = new EventEmitter(); //事件监听模块
      window.EZUIKit[params.id] = {
        state: {
          EZUIKitPlayer: {
            init: window.EZUIKit[params.id] && window.EZUIKit[params.id].state && window.EZUIKit[params.id].state.EZUIKitPlayer.init || false,
            themeInit: window.EZUIKit[params.id] && window.EZUIKit[params.id].state && window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit || false,
            talkInit: window.EZUIKit[params.id] && window.EZUIKit[params.id].state && window.EZUIKit[params.id].state.EZUIKitPlayer.talkInit || false
          }
        }
      };
      if (matchTemplate(this.params.template, params).templateType !== 'iframe') {
        this.id = params.id;
        this.width = params.width;
        this.height = params.height;
        this.fullScreenWidth = 0;
        this.fullScreenHeight = 0;
        this.isCall = params.isCall || false; // 是否呼叫模板
        this.isWebConsole = params.isWebConsole || false; // 是否控制台使用
        this.callTime = params.callTime || null; // 呼叫模板呼叫时间
        this.hangUpCallback = params.hangUpCallback || null; // 呼叫模板挂断回调
        this.isNeedBellRing = params.isNeedBellRing === false ? false : true; // 是否需要铃声
        this.url = params.url;
        this.accessToken = params.accessToken;
        this.deviceSerial = matchEzopenUrl(params.url).deviceSerial;
        this.channelNo = matchEzopenUrl(params.url).channelNo;
        this.themeId = matchTemplate(params.template, params).templateId; //当前主题
        this.sourceThemeId = matchTemplate(params.template, params).templateId; //初始化时传入的主题
        this.id = params.id;
        this.audio = true;
        this.poster = params.poster;
        this.speed = 1;
        this.disabledTimeLine = false;
        this.disabledPTZ = false;
        this.enableSharedArrayBufferGuide = false;
        this.capacity = null;
        this.playTimer = null; // 播放定时器，限制至少1秒触发播放
        this.env = {
          domain: "https://open.ys7.com"
        };
        this.isMobile = isMobile();
        this.support3DZoom = false; // 是否支持3D定位功能
        this.use3DZoom = false; // 是否开启3D定位功能
        this.is3DZooming = false; // 是否正在使用3D定位功能
        this.useHardDev = typeof params.useHardDev !== 'undefined' ? params.useHardDev : false; //是否使用硬解码模式（默认使用）
        this.host = 'open.ys7.com';

        // 巡检模板新增参数
        this.isInspect = params.isInspect || false; //是否巡检模板模板
        this.inspectRecordingDuration = params.inspectRecordingDuration || 4 * 60 * 60 * 1000; //巡检录像时长，默认4小时
        this.inspectVideoWidth = params.inspectVideoWidth || 290; //巡检视频和总视频宽度的差值（右侧巡检事件列表的宽度）
        this.inspectVideoHeight = params.inspectVideoHeight || 170; //巡检视频和总视频高度的差值(视频窗口外上下元素的高度)

        // 鱼眼矫正
        this._FECCorrectType = null;
        this._FECSplitIds = '';

        // 兼容多次初始化
        if (document.getElementById("".concat(this.id, "-wrap"))) {
          document.getElementById("".concat(this.id, "-wrap")).innerHTML = "";
          document.getElementById("".concat(this.id, "-wrap")).id = this.id;
        }
        this.staticPath = uikitStaticPathV3;
        var isV3 = !this.useHardDev && isVersion2Available() || this.useHardDev && !this._IsSupHardDecAVC() && !this._IsSupHardDecHEVC() && isVersion2Available() || this.useHardDev && (this._IsSupHardDecAVC() || this._IsSupHardDecHEVC() || isVersion2Available());
        this.isV3 = isV3;
        if (typeof params.staticPath === 'string') {
          if (params.staticPath.startsWith("http")) {
            this.staticPath = params.staticPath;
          } else {
            this.staticPath = window.location.protocol + '//' + window.location.host + params.staticPath;
          }
          this.staticPath += '/v3';
        }
        if (typeof params.audio !== 'undefined') {
          this.audio = params.audio;
        }
        if (typeof params.env !== 'undefined') {
          this.env = Object.assign(this.env, params.env);
        }
        if (typeof params.host !== 'undefined') {
          this.host = params.host;
        }
        if (typeof params.isMobile !== 'undefined') {
          this.isMobile = params.isMobile;
        }
        if (typeof params.disabledTimeLine !== 'undefined') {
          this.disabledTimeLine = params.disabledTimeLine;
        }
        if (typeof params.disabledPTZ !== 'undefined') {
          this.disabledPTZ = params.disabledPTZ;
        }
        if (typeof params.enableSharedArrayBufferGuide !== 'undefined') {
          this.enableSharedArrayBufferGuide = params.enableSharedArrayBufferGuide;
        }
        // 执行初始化；
        var doInit = function doInit() {
          if (isVersion2Available()) {
            console.log("启用多线程解析视频");
          } else {
            // 是否引导用户开启谷歌实验室 Google Labs 特性
            // enableSharedArrayBufferGuide
            var getChromeVersion = function getChromeVersion() {
              var arr = navigator.userAgent.split(' ');
              var chromeVersion = '';
              for (var i = 0; i < arr.length; i++) {
                if (/chrome/i.test(arr[i])) {
                  chromeVersion = arr[i];
                }
              }
              if (chromeVersion) {
                return Number(chromeVersion.split('/')[1].split('.')[0]);
              }
              return false;
            };
            // pc端 谷歌浏览器 版本 > 91
            if (!isMobile && 91 < getChromeVersion && _this.enableSharedArrayBufferGuide) {
              console.log("提示用户开启谷歌实验室特性");
              var wapDomId = "".concat(_this.id, "-wrap");
              var guideDom = document.createElement("div");
              var guideSpan = document.createElement("span");
              guideSpan.innerHTML = "您当前浏览器可以开启谷歌实验室多线程特性，获取更好播放体验，避免浏览器卡顿及崩溃,详见";
              guideDom.appendChild(guideSpan);
              var guideLink = document.createElement("a");
              guideLink.href = "https://open.ys7.com/help/384";
              guideLink.setAttribute("target", "_blank");
              guideDom.appendChild(guideLink);
              guideLink.innerHTML = "开启说明";
              //guideDom.innerHTML = "您的浏览器当前使用单进程播放视频，可能因内存占用过高导致浏览器卡顿,您可参考·谷歌浏览器开启多线程（链接）·开启谷歌实验室多线程特性，获取更好播放体验";
              guideDom.id = "".concat(_this.id, "-guide");
              guideDom.style = "font-size:12px;color:red;";
              setTimeout(function () {
                if (document.getElementById(wapDomId)) {
                  document.getElementById(wapDomId).insertBefore(guideDom, document.getElementById(_this.id));
                }
              }, 5000);
            }
          }
          _this.pluginStatus = new Status(_this, _this.id);
          _this.videoInitTime = Date.now();
          _this.videoPlayState = 1; // 播放状态 1 初始化 2 播放成功 3 播放失败 4 切换播放地址 5 播放中失败

          window.monitorExtendsInfo = {
            protocol: 'ezopen',
            url: _this.url,
            serial: _this.deviceSerial,
            no: _this.channelNo,
            env: _this.env.domain,
            type: matchEzopenUrl(_this.url).type
          };
          window.ezuikitMonitor.report({
            action: 1,
            logInfo: {
              pluginVersion: isV3 ? 'v3' : 'v1',
              params: params
            }
          });
          _this.initTime = new Date().getTime();
          if (_this.autoplay) {
            var initEZUIKitPlayerPromise = _this.initEZUIKitPlayer(params);
            var getRealUrlPromise = _this._getRealUrlPromise(params.accessToken, params.url);
            Promise.all([initEZUIKitPlayerPromise, getRealUrlPromise]).then(function (values) {
              if (values[1]) {
                _this.playStartTime = new Date().getTime();
                _this._pluginPlay(values[1], function () {
                  // 自动播放成功埋点上报 此时不执行 JS_STOP 所以 stopTime = 0
                  if (_this.videoPlayState === 1 || _this.videoPlayState === 4) {
                    _this.videoPlayState = 2;
                    var now = Date.now();
                    window.ezuikitMonitor.report({
                      action: 2,
                      logInfo: {
                        pluginVersion: _this.isV3 ? 'v3' : 'v1',
                        loadTime: now - _this.videoInitTime,
                        // 加载耗时详情 initTime 初始化时间  stopTime 停止时间（播放前需要先执行停止）  getWsTime 获取ws地址时间  createWsTime 创建ws到播放的时间
                        loadTimeDesc: {
                          initTime: _this.playStartTime - _this.videoInitTime,
                          stopTime: 0,
                          getWsTime: _this.doCreateWsTime - _this.playStartTime,
                          createWsTime: now - _this.doCreateWsTime
                        }
                      }
                    });
                  }
                  console.log("自动播放成功");
                }, function () {
                  console.log("自动播放失败");
                });
              } else {
                console.log("promise of one", values);
              }
              window.EZUIKit[params.id].state.EZUIKitPlayer.init = true;
              if (document.getElementById("".concat(params.id, "canvas_draw0"))) {
                document.getElementById("".concat(params.id, "canvas_draw0")).style.border = "none";
              }
            })["catch"](function (err) {
              console.log("err", err);
              if (_this.videoPlayState === 1 || _this.videoPlayState === 4) {
                _this.videoPlayState = 3;
                var now = Date.now();
                window.ezuikitMonitor.report({
                  action: 3,
                  logInfo: {
                    pluginVersion: _this.isV3 ? 'v3' : 'v1',
                    loadTime: now - _this.videoInitTime,
                    err: err
                  }
                });
              }
              if (_this.Theme) {
                _this.Theme.setDisabled(true);
              }
              _this.pluginStatus.loadingClear();
              if (_this.isInspect) {
                _this.pluginStatus.loadingSetTextWithBtn({
                  mask: true,
                  maskStyle: "url(".concat(_this.staticPath, "/imgs/bg.svg) no-repeat 100%/cover"),
                  text: err && err.msg,
                  btnName: '重试',
                  type: 1
                });
                _this.Theme.jSPlugin.Zoom && _this.Theme.jSPlugin.Zoom.stopZoom();
                _this.Theme && _this.Theme.inspect && _this.Theme.inspect.InspectEvent && _this.Theme.inspect.InspectEvent.disableEvidenceBtn();
              } else {
                _this.pluginStatus.loadingSetText({
                  text: err && err.msg || "获取播放地址失败",
                  color: 'red'
                });
              }
            });
          } else {
            var initEZUIKitPlayerPromise = _this.initEZUIKitPlayer(params);
            initEZUIKitPlayerPromise.then(function (data) {
              console.log("初始化成功", data);
              window.EZUIKit[params.id].state.EZUIKitPlayer.init = true;
              if (document.getElementById("".concat(params.id, "canvas_draw0"))) {
                document.getElementById("".concat(params.id, "canvas_draw0")).style.border = "none";
              }
              // xuehb 初始化成功 2
              _this.initSuccessTime = new Date().getTime();
            });
          }
          if (params.plugin && params.plugin.indexOf("talk") !== -1) {
            _this.Talk = new Talk(_this);
            window.EZUIKit[params.id].state.EZUIKitPlayer.talkInit = true;
          }
          _this.getDeviceCapacity();
        };
        doInit();
      } else {
        return new EZUIKitV3$1.EZUIKitPlayer(params);
      }
      this.play = debounce(function (options) {
        return _this._play(options);
      }, 500, true);
      this.resume = debounce(function (time) {
        return _this._resume(time);
      }, 500, true);
      this.changePlayUrl = debounce(function (options, callback, reSetTheme) {
        return _this._changePlayUrl(options, callback, reSetTheme);
      }, 500);
      // 监听到页面退出
      // 研究院反馈，播放过程中退出页面需要执行停止视频，否则可能导致浏览器崩溃
      window.addEventListener("beforeunload", function () {
        console.log("退出页面，停止视频流");
        _this.stop();
      });
    }
    //判断当前环境是否是Chrome浏览器
    _createClass$1(EZUIKitPlayer, [{
      key: "_getExplore",
      value: function _getExplore() {
        var Sys = {};
        var ua = navigator.userAgent.toLowerCase();
        var s;
        (s = ua.match(/rv:([\d.]+)\) like gecko/)) ? Sys.ie = s[1] : (s = ua.match(/msie ([\d\.]+)/)) ? Sys.ie = s[1] : (s = ua.match(/edge\/([\d\.]+)/)) ? Sys.edge = s[1] : (s = ua.match(/firefox\/([\d\.]+)/)) ? Sys.firefox = s[1] : (s = ua.match(/(?:opera|opr).([\d\.]+)/)) ? Sys.opera = s[1] : (s = ua.match(/chrome\/([\d\.]+)/)) ? Sys.chrome = s[1] : (s = ua.match(/version\/([\d\.]+).*safari/)) ? Sys.safari = s[1] : 0;
        // 根据关系进行判断
        if (Sys.chrome) {
          var chromeStr = Sys.chrome;
          var startIndex = chromeStr.indexOf('.');
          var sn = Number(chromeStr.substring(0, startIndex));
          return sn;
        } else if (Sys.ie) {
          console.info("%c1>your browser is IE ,it does not support play without plugin", 'color: red');
        } else if (Sys.safari) {
          console.info("%c1>your browser is safari ,it does not support softV2.0 or hard decode", 'color: red');
        } else if (Sys.firefox) {
          console.info("%c1>your browser is Firefox ,it only support soft decode", 'color: red');
        } else {
          console.info("%c1>your browser does not support play without plugin", 'color: red');
        }
        return -1;
      }
      //判断是否支持硬解264(AVC就是264)
    }, {
      key: "_IsSupHardDecAVC",
      value: function _IsSupHardDecAVC(callback) {
        var chromeVersion = this._getExplore(); //获取浏览器类型
        if (chromeVersion >= 94) {
          callback && callback(true);
          return true; //支持264
        }

        callback && callback(false);
        return false; //不支持264
      }
      //判断是否支持硬解265
    }, {
      key: "_IsSupHardDecHEVC",
      value: function _IsSupHardDecHEVC(callback) {
        var bSupHardDecHEVC = false; //HEVC即265
        var chromeVersion = this._getExplore(); //获取浏览器类型
        if (chromeVersion >= 107) {
          var config = {
            codec: "hvc1.1.6.L123.00",
            hardwareAcceleration: "prefer-hardware"
          };
          VideoDecoder && VideoDecoder.isConfigSupported(config).then(function (configInfo) {
            if (configInfo.supported) {
              bSupHardDecHEVC = true;
              callback && callback({
                bSupHardDecHEVC: bSupHardDecHEVC
              }); //265
            } else {
              callback && callback({
                bSupHardDecHEVC: bSupHardDecHEVC
              }); //不支持265
            }
          });
        } else {
          callback && callback({
            bSupHardDecHEVC: bSupHardDecHEVC
          }); //不支持265
        }
      }

      /**
       * @description 初始化 EZUIKitPlayer
       * @private
       * @param {EZUIKitPlayerParams} params 
       * @returns {Promise<any>}
       */
    }, {
      key: "initEZUIKitPlayer",
      value: function initEZUIKitPlayer(params) {
        var _this2 = this;
        var id = params.id,
          _params$width = params.width,
          width = _params$width === void 0 ? 600 : _params$width,
          _params$height = params.height,
          height = _params$height === void 0 ? 400 : _params$height;
        if (!params.width || !params.height) {
          var videoDOMBounding = document.getElementById(id).getBoundingClientRect();
          if (!params.width && videoDOMBounding.width > 0) {
            width = videoDOMBounding.width;
          }
          if (!params.height && videoDOMBounding.height > 0) {
            height = videoDOMBounding.height;
          }
        }
        if (!document.getElementById("".concat(id, "-wrap"))) {
          var wapDom = document.createElement("div");
          wapDom.id = "".concat(id, "-wrap");
          wapDom.style = "display:inline-block;width:".concat(width, "px;position:relative;vertical-align: bottom;");
          document.getElementById(id).parentNode.insertBefore(wapDom, document.getElementById(id));
          document.getElementById(id).parentNode.removeChild(document.getElementById(id));
          if (this.isInspect) {
            wapDom.style.height = "".concat(height, "px");
            this.width -= this.inspectVideoWidth;
            this.height -= this.inspectVideoHeight;
            width = this.width;
            height = this.height;
          }
          wapDom.innerHTML = "<div id=".concat(id, "></div>");
          document.getElementById(id).style = "display:inline-block;width:".concat(width, "px;height:").concat(height, "px;");
          document.getElementById(id).style.verticalAlign = "top";
        }
        if (Array.isArray(window.recTimer)) {
          window.recTimer.map(function (item) {
            clearInterval(item);
          });
        }
        if (this.themeId) {
          console.log(this.themeId);
          // 判断是否呼叫模板 todo
          if (params.isCall == true) {
            this.Theme = new CallTheme(this, params.id);
          } else if (params.isInspect == true) {
            //判断是否巡检模板
            this.Theme = new InspectTheme(this);
          } else {
            this.Theme = new Theme(this, params.id);
          }
          window.EZUIKit[params.id].state.EZUIKitPlayer.themeInit = true;
          if (typeof this.params.handleThemeChange === 'function') {
            this.handleThemeChange = this.params.handleThemeChange;
          }
        }
        // 初始化Message模块
        var pluginMessage = new Message$1(this, id);
        this.Message = pluginMessage;
        var initDecoder = function initDecoder(resolve, reject) {
          console.log('开始初始化decoder：', new Date().getTime());
          var that = _this2;
          _this2.randomNum = Math.random();
          window.randomNum = _this2.randomNum;
          var jSPlugin = new window.JSPluginV3({
            szId: id,
            iType: 2,
            iWidth: width,
            iHeight: height,
            iMaxSplit: 1,
            iCurrentSplit: 1,
            szBasePath: "",
            useHardDev: _this2.useHardDev,
            isHardH264: _this2._IsSupHardDecAVC(),
            isHardH265: _this2._IsSupHardDecHEVC(),
            isSharedArrayBuffer: isVersion2Available(),
            staticPath: _this2.staticPath,
            oStyle: {
              border: "none",
              background: "#000000"
            }
          });
          _this2.pluginStatus.loadingStart(id);
          if (!!_this2.isCall || !!_this2.isInspect) {
            _this2.pluginStatus.loadingSetText({
              text: '视频加载中'
            });
          } else if (_this2.themeId == 'miniRec') {
            _this2.pluginStatus.loadingSetText({
              text: ''
            });
          } else {
            _this2.pluginStatus.loadingSetText({
              text: '初始化播放器完成'
            });
          }
          var RunTimeInfoFlag = false;
          jSPlugin.EventCallback = {
            // xuehb 开启取流  4
            openStreamCallback: function openStreamCallback() {
              console.log("开启取流---v1");
              _this2.openStreamTime = new Date().getTime();
              RunTimeInfoFlag = false;
            },
            // xuehb 完成取流返回流头  5
            getStreamHeaderCallback: function getStreamHeaderCallback() {
              console.log("完成取流返回流头");
              _this2.getStreamHeaderTime = new Date().getTime();
              RunTimeInfoFlag = false;
            },
            // xuehb 返回视频流  6
            getVideoStreamCallback: function getVideoStreamCallback() {
              console.log("返回视频流(首次)");
              _this2.getVideoStreamTime = new Date().getTime();
              // 呼叫模板挂断/拒绝状态
              if (_this2.isCall && _this2.Theme && _this2.Theme.decoderState && _this2.Theme.decoderState.state.rejection) {
                console.log("挂断/拒绝状态------------stop");
                _this2.stop(function () {
                  _this2.pluginStatus.loadingClear();
                  _this2.pluginStatus.loadingSetTextWithBtn({
                    text: '通话已结束',
                    color: 'white',
                    isMobile: _this2.isMobile,
                    type: 2
                  });
                });
              }
              if (_this2.isInspect && _this2.Theme.decoderState.state.play) {
                if (_this2.Theme.inspectMode !== 'map' && _this2.Theme.jSPlugin.Zoom) {
                  setTimeout(function () {
                    _this2.Theme.jSPlugin.Zoom.startZoom();
                  }, 1000);
                }
                _this2.Theme && _this2.Theme.inspect && _this2.Theme.inspect.InspectEvent && _this2.Theme.inspect.InspectEvent.enableEvidenceBtn();
              }
            },
            // xuehb 出现首帧画面（播放成功）  7
            appearFirstFrameCallback: function appearFirstFrameCallback() {
              console.log("出现首帧画面（播放成功）");
              _this2.appearFirstFrameTime = new Date().getTime();
            },
            // xuehb 平均成功取流的出流耗时  8
            averageStreamSuccessCallback: function averageStreamSuccessCallback() {
              _this2.Zoom = new Zoom(_this2);
              _this2.averageStreamSuccessTime = _this2.initSuccessTime - _this2.initTime + (_this2.gotWsUrlTime - _this2.startGetWsUrlTime) + (_this2.appearFirstFrameTime - _this2.openStreamTime);
              console.log("平均成功取流的出流耗时:", _this2.averageStreamSuccessTime);
            },
            loadEventHandler: function loadEventHandler() {},
            zoomEventResponse: function zoomEventResponse( /*iMode, aPoint*/
            ) {// 电子放大回调
            },
            windowEventSelect: function windowEventSelect(iWndIndex) {// 插件选中窗口回调
            },
            pluginErrorHandler: function pluginErrorHandler(iWndIndex, iErrorCode, oError) {
              // 插件错误回调
              // console.log(iWndIndex, iErrorCode, oError);
              // console.log('---------------------pluginErrorHandler')

              // 呼叫模板挂断/拒绝状态
              if (_this2.isCall && _this2.Theme && _this2.Theme.decoderState && _this2.Theme.decoderState.state.rejection) {
                return;
              }
              if (iErrorCode === 1003) {
                console.log("断流");
                if (_this2.Theme) {
                  _this2.Theme.setDecoderState({
                    play: false
                  });
                }
                _this2.pluginStatus.setPlayStatus({
                  play: false
                });
                if (!jSPlugin.bPlay) {
                  _this2.pluginStatus.loadingClear();
                  if (_this2.isCall) {
                    _this2.pluginStatus.loadingSetTextWithBtn({
                      text: "连接断开，请重试",
                      color: 'white',
                      btnName: _this2.isMobile ? '重试' : '重新加载',
                      isMobile: _this2.isMobile,
                      type: _this2.isCall ? 1 : 2
                    });
                  } else if (_this2.isInspect) {
                    _this2.pluginStatus.loadingSetTextWithBtn({
                      mask: true,
                      // maskStyle: `url(${this.staticPath}/imgs/bg.svg) no-repeat 100%/cover`,
                      text: "连接断开，请重试",
                      btnName: '重试',
                      type: 1
                    });
                    _this2.Theme.jSPlugin.Zoom && _this2.Theme.jSPlugin.Zoom.stopZoom();
                    _this2.Theme && _this2.Theme.inspect && _this2.Theme.inspect.InspectEvent && _this2.Theme.inspect.InspectEvent.disableEvidenceBtn();
                  } else {
                    _this2.pluginStatus.loadingSetText({
                      text: "连接断开，请重试",
                      color: 'red'
                    });
                  }
                }
                if (typeof _this2.params.handleError === 'function') {
                  _this2.params.handleError({
                    msg: "连接断开，请重试",
                    retcode: 1003,
                    id: _this2.params.id,
                    type: "handleError"
                  });
                }
              } else {
                // 推流异常时展示响应提示
                if (oError.errorCode != 1) {
                  var now = Date.now();
                  if (_this2.videoPlayState === 1 || _this2.videoPlayState === 4) {
                    _this2.videoPlayState = 3;
                    window.ezuikitMonitor.report({
                      // protocol: 'ezopen',
                      // url: this.url,
                      // serial: this.deviceSerial,
                      // no: this.channelNo,
                      // env: this.env.domain,
                      action: 3,
                      logInfo: {
                        pluginVersion: _this2.isV3 ? 'v3' : 'v1',
                        err: oError,
                        loadTime: now - _this2.videoInitTime
                      }
                    });
                  } else if (_this2.videoPlayState === 2) {
                    _this2.videoPlayState = 5;
                    window.ezuikitMonitor.report({
                      // protocol: 'ezopen',
                      // url: this.url,
                      // serial: this.deviceSerial,
                      // no: this.channelNo,
                      // env: this.env.domain,
                      action: 5,
                      logInfo: {
                        pluginVersion: _this2.isV3 ? 'v3' : 'v1',
                        err: oError,
                        loadTime: now - _this2.videoInitTime
                      }
                    });
                  }
                  console.log('errorCode----------', oError.errorCode);
                  var errorInfo = _this2.errorHander.matchErrorInfo(oError.errorCode);
                  var msg = '连接断开，请重试';
                  if (errorInfo && errorInfo.msg) {
                    msg = errorInfo.msg;
                  } else if (errorInfo && errorInfo.description) {
                    msg = errorInfo.description;
                  }
                  if (_this2.Theme) {
                    _this2.Theme.setDecoderState({
                      play: false
                    });
                  }
                  _this2.pluginStatus.setPlayStatus({
                    play: false
                  });
                  _this2.pluginStatus.loadingClear();
                  if (_this2.isCall) {
                    _this2.pluginStatus.loadingSetTextWithBtn({
                      text: msg,
                      color: 'white',
                      btnName: _this2.isMobile ? '重试' : '重新加载',
                      isMobile: _this2.isMobile
                    });
                  } else if (_this2.isInspect) {
                    _this2.Theme.jSPlugin.Zoom && _this2.Theme.jSPlugin.Zoom.stopZoom();
                    _this2.pluginStatus.loadingSetTextWithBtn({
                      mask: true,
                      // maskStyle: `url(${this.staticPath}/imgs/bg.svg) no-repeat 100%/cover`,
                      text: msg,
                      btnName: '重试',
                      type: 1
                    });
                    _this2.Theme && _this2.Theme.inspect && _this2.Theme.inspect.InspectEvent && _this2.Theme.inspect.InspectEvent.disableEvidenceBtn();
                  } else {
                    _this2.pluginStatus.loadingSetText({
                      text: msg,
                      color: 'red'
                    });
                  }
                  if (typeof _this2.params.handleError === 'function') {
                    _this2.params.handleError({
                      msg: msg,
                      retcode: oError.errorCode,
                      id: _this2.params.id,
                      type: "handleError"
                    });
                  }
                } else {
                  _this2.pluginStatus.loadingClear();
                  if (_this2.Theme) {
                    _this2.Theme.setDisabled(false);
                  }
                }
              }
            },
            windowEventOver: function windowEventOver(iWndIndex) {},
            windowEventOut: function windowEventOut(iWndIndex) {},
            windowEventUp: function windowEventUp(iWndIndex) {},
            windowFullCcreenChange: function windowFullCcreenChange(bFull) {},
            firstFrameDisplay: function firstFrameDisplay(iWndIndex, iWidth, iHeight) {
              console.log(iWidth, iHeight);
              jSPlugin.JS_SetCanFullScreen(false);
            },
            performanceLack: function performanceLack() {},
            mouseEvent: function mouseEvent(iMouseEventType, iMouseX, iMouseY) {},
            setRunTimeInfoCallBack: function setRunTimeInfoCallBack(nRunTimeModule, nStrVersion, nFrameTimeStamp, nFrameNum, nErrorCode) {
              //实时信息回调
              if (nErrorCode === 5) {
                //code为5表示密钥错误
                if (that.isInspect) {
                  that.pluginStatus.loadingClear();
                  that.Theme.jSPlugin.Zoom && that.Theme.jSPlugin.Zoom.stopZoom();
                  that.pluginStatus.loadingSetTextWithBtn({
                    mask: true,
                    maskStyle: "url(".concat(_this2.staticPath, "/imgs/bg.svg) no-repeat 100%/cover"),
                    text: "设备已加密",
                    color: 'white',
                    btnName: '重试',
                    type: 1
                  });
                } else {
                  var textElement = document.getElementById("".concat(_this2.id, "-loading-item-txt"));
                  if (_this2.Theme.decoderState.state.play && (textElement === null || textElement.innerHTML.indexOf('设备已加密') === -1)) {
                    that.pluginStatus.loadingClear();
                    that.pluginStatus.loadingSetText({
                      text: "设备已加密",
                      color: 'red'
                    });
                  }
                }
              }

              // nRunTimeModule == 1 && nErrorCode == 5 SecretKey error !!!
              if (typeof _this2.params.handleError === 'function' && !RunTimeInfoFlag) {
                params.handleError({
                  retcode: -1,
                  data: {
                    nRunTimeModule: nRunTimeModule,
                    nStrVersion: nStrVersion,
                    nFrameTimeStamp: nFrameTimeStamp,
                    nFrameNum: nFrameNum,
                    nErrorCode: nErrorCode
                  },
                  id: _this2.params.id,
                  type: "handleRunTimeInfoError"
                });
              }
              RunTimeInfoFlag = true;
            }
          };
          if (typeof params.handleTalkSuccess !== 'undefined') {
            _this2.handleTalkSuccess = params.handleTalkSuccess;
          }
          if (typeof params.handleTalkError !== 'undefined') {
            _this2.handleTalkError = params.handleTalkError;
          }
          _this2.errorHander = new Code();
          _this2.jSPlugin = jSPlugin;
          var checkTimer = setInterval(function () {
            //轮询是否加载解码库成功
            if (window.JSPlayerModuleLoaded) {
              clearInterval(checkTimer);
              if (typeof _this2.params.handleInitSuccess === 'function') {
                _this2.params.handleInitSuccess({
                  retcode: 0,
                  id: _this2.params.id,
                  type: "handleInitSuccess"
                });
              }
              resolve({
                meta: {
                  retcode: 200,
                  msg: "初始化成功"
                }
              });
            }
          }, 50);
        };
        var initDecoderPromise = new Promise(initDecoder);
        return initDecoderPromise;
      }

      /**
       * @description 获取真实播放地址, url地址包含 live, playback。 live: 直播, playback: 回放
       * @private 
       * @param {string} accessToken 访问令牌
       * @param {string} url 播放地址
       * @returns {Promise<string, { retcode: number, msg: string}>}
       */
    }, {
      key: "_getRealUrlPromise",
      value: function _getRealUrlPromise(accessToken, url) {
        var _this3 = this;
        console.log("\u5F00\u59CB\u83B7\u53D6ws\u64AD\u653E\u5730\u5740\uFF1A url => ".concat(url, " ").concat(this.accessToken));
        this.startGetWsTime = Date.now();
        //xuehb 开始获取wsurl
        this.startGetWsUrlTime = new Date().getTime();
        var apiDomain = this.env.domain;
        if (this.env) {
          apiDomain = this.env.domain;
        }
        var getRealUrlPromise = function getRealUrlPromise(resolve, reject) {
          var realUrl = '';
          var apiUrl = apiDomain + "/api/lapp/live/url/ezopen";
          var data = new FormData();
          data.append("ezopen", url);
          data.append("isFlv", 'false');
          data.append("userAgent", window.navigator.userAgent);
          data.append("isHttp", 'false');
          data.append("accessToken", accessToken);
          //扩展参数拼接
          if (_this3.params.extraParams && _this3.params.extraParams.ezopenParams) {
            if (_typeof(_this3.params.extraParams.ezopenParams) === 'object') {
              for (var key in _this3.params.extraParams.ezopenParams) {
                data.append(key, _this3.params.extraParams.ezopenParams[key]);
              }
            }
          }
          fetch(apiUrl, {
            method: "POST",
            // headers: {
            //   'Content-Type': 'application/json'
            // },
            body: data
          }).then(function (response) {
            return response.json();
          }).then(function (data) {
            if (data.code == 200 || data.retcode == 0) {
              var playUrl = "";
              var stream = "";
              if (data.ext && data.ext.token) {
                realUrl += data.data;
                stream = data.ext.token;
                playUrl = data.data;
              } else if (data.data && data.data.token) {
                realUrl += data.data.url;
                stream = data.data.token;
                playUrl = data.data.url;
              }
              var type = url.indexOf('live') !== -1 ? 'live' : 'playback';
              if (type === 'live') {
                realUrl = realUrl + '&ssn=' + stream + '&auth=1&biz=4&cln=100';
              } else {
                realUrl = realUrl + '&ssn=' + stream + '&auth=1&cln=100';
              }
              console.log(realUrl);
              // 设置秘钥 - 如果地址中包含秘钥参数，播放前配置到JSPlugin对应实例中
              var validateCode = getQueryString('checkCode', realUrl);
              if (validateCode) {
                if (typeof _this3.jSPlugin.decoderVersion !== 'undefined' && _this3.jSPlugin.decoderVersion === '2.0') {
                  _this3.validateCode = validateCode;
                } else {
                  console.log("设置密钥", validateCode);
                  _this3.validateCode = validateCode;
                  _this3.jSPlugin.JS_SetSecretKey(0, validateCode);
                }
              }
              //扩展参数拼接
              if (_this3.params.extraParams && _this3.params.extraParams.wsParams) {
                if (typeof _this3.params.extraParams.wsParams === 'string') {
                  realUrl += '&' + _this3.params.extraParams.wsParams;
                } else if (_typeof(_this3.params.extraParams.wsParams) === 'object') {
                  for (var key in _this3.params.extraParams.wsParams) {
                    realUrl += '&' + key + '=' + _this3.params.extraParams.wsParams[key];
                  }
                }
              }
              // 回放处理
              if (realUrl.indexOf('playback') !== -1) {
                var wsBegin = getQueryString('begin', playUrl) || getQueryString('begin', url);
                var wsEnd = getQueryString('end', playUrl) || getQueryString('end', url);
                // 兼容各种时间格式
                if (!wsBegin) {
                  var defaultDate = new Date();
                  realUrl = realUrl + '&begin=' + defaultDate.Format('yyyyMMdd') + 'T000000Z';
                } else {
                  realUrl = realUrl.replace('&begin=' + getQueryString('begin', playUrl), '&begin=' + formatRecTime(wsBegin, '000000'));
                  if (!getQueryString('begin', realUrl)) {
                    realUrl += '&begin=' + formatRecTime(wsBegin, '000000');
                  }
                }
                if (!wsEnd) {
                  realUrl = realUrl + '&end=' + formatRecTime(getQueryString('begin', realUrl).substr(0, 8), '235959');
                } else {
                  realUrl = realUrl.replace('&end=' + getQueryString('end', playUrl), '&end=' + formatRecTime(wsEnd, '235959'));
                  if (!getQueryString('end', realUrl)) {
                    realUrl += '&end=' + formatRecTime(wsEnd, '235959');
                  }
                }
                // api错误处理
                if (!getQueryString('stream', playUrl)) {
                  realUrl = realUrl.replace('stream', '&stream');
                }
                if (url.indexOf('.cloud') !== -1) {
                  var recAPISuccess = function recAPISuccess(data) {
                    if (data.code == 200) {
                      var recSliceArr = [];
                      if (data.data && data.data.files && data.data.files.length > 0) {
                        var dataArr = data.data.files;
                        var nextFileTime = new Date().getTime();
                        var isAll = data.data.isAll;
                        // mock
                        // var number = 0;
                        // isAll = false;
                        if (isAll) {
                          recSliceArr = recSliceArrFun(dataArr);
                          var recSliceArrJSON = JSON.stringify(recSliceArr).replace('\\', '');
                          realUrl += '&recSlice=' + recSliceArrJSON.replace('\\', '') + '&r=' + Math.random();
                          resolve(realUrl);
                        } else {
                          // 云存储回调事务
                          var recTransaction = function recTransaction() {
                            function recAPIV2Success(data) {
                              if (data.data && data.data.files && data.data.files.length > 0) {
                                // if(number < 2 ) {
                                if (data.data.isAll == false) {
                                  if (data.data.files) {
                                    dataArr = dataArr.concat(data.data.files);
                                  }
                                  nextFileTime = data.data.nextFileTime > 0 ? data.data.nextFileTime : new Date().getTime();
                                  recTransaction();
                                } else {
                                  recSliceArr = recSliceArrFun(dataArr);
                                  var recSliceArrJSON = JSON.stringify(recSliceArr).replace('\\', '');
                                  realUrl += '&recSlice=' + recSliceArrJSON.replace('\\', '') + '&r=' + Math.random();
                                  resolve(realUrl);
                                }
                                // mock
                                // number = number + 1;
                              } else {
                                recSliceArr = recSliceArrFun(dataArr);
                                var recSliceArrJSON = JSON.stringify(recSliceArr).replace('\\', '');
                                realUrl += '&recSlice=' + recSliceArrJSON.replace('\\', '') + '&r=' + Math.random();
                                resolve(realUrl);
                              }
                            }
                            recSliceParams.startTime = nextFileTime;
                            request(recSliceUrl, 'POST', recSliceParams, '', recAPIV2Success);
                          };
                          recTransaction();
                        }
                      } else {
                        reject({
                          retcode: -1,
                          msg: "未找到录像片段"
                        });
                      }
                    } else {
                      reject({
                        retcode: -1,
                        msg: "未找到录像片段"
                      });
                    }
                    function recSliceArrFun(data) {
                      var downloadPathArr = [];
                      data.forEach(function (item, index) {
                        if (downloadPathArr.length == 0 || item.downloadPath !== downloadPathArr[downloadPathArr.length - 1].downloadPath) {
                          downloadPathArr.push({
                            downloadPath: item.downloadPath,
                            ownerId: item.ownerId,
                            iStorageVersion: item.iStorageVersion,
                            videoType: item.videoType,
                            iPlaySpeed: 0,
                            startTime: item.startTime,
                            endTime: item.endTime
                          });
                        } else {
                          downloadPathArr[downloadPathArr.length - 1].endTime = item.endTime;
                        }
                      });
                      return downloadPathArr;
                    }
                  };
                  // 云存储回放
                  // 调用回放API接口获取回放片段 - start
                  var recBegin = reRormatRecTime(getQueryString('begin', realUrl));
                  var recEnd = reRormatRecTime(getQueryString('end', realUrl));
                  var deviceSerial = getQueryString('serial', realUrl);
                  var channelNo = getQueryString('chn', realUrl);
                  var recSliceUrl = apiDomain + "/api/lapp/video/by/time";
                  var recSliceParams = {
                    accessToken: _this3.accessToken,
                    recType: 1,
                    deviceSerial: deviceSerial,
                    channelNo: channelNo,
                    startTime: recBegin,
                    endTime: recEnd,
                    version: '2.0'
                  };
                  request(recSliceUrl, 'POST', recSliceParams, '', recAPISuccess);
                } else {
                  // 本地回放
                  // alarm rec - start
                  if (url.indexOf('alarmId') !== -1) {
                    var _recAPISuccess = function _recAPISuccess(data) {
                      if (data.code == 200) {
                        var recSliceArr = [];
                        if (data.data) {
                          recSliceArr = recSliceArrFun([data.data]);
                          var recSliceArrJSON = JSON.stringify(recSliceArr).replace('\\', '');
                          realUrl += '&recSlice=' + recSliceArrJSON.replace('\\', '');
                          console.log("realUrl", realUrl, data.data.recType);
                          if (data.data.recType == 1) {
                            realUrl = realUrl.replace('/playback', '/cloudplayback');
                          } else {
                            realUrl = realUrl.replace('/cloudplayback', '/playback');
                          }
                          // _this.opt.sources[0] = realUrl;
                          resolve(realUrl);
                          // request(nodeUrl, 'GET', '', '', nodeSuccess, nodeError);
                        }
                      }
                      function recSliceArrFun(data) {
                        var downloadPathArr = [];
                        data.forEach(function (item, index) {
                          if (downloadPathArr.length == 0 || item.downloadPath !== downloadPathArr[downloadPathArr.length - 1].downloadPath) {
                            downloadPathArr.push({
                              downloadPath: item.downloadPath,
                              ownerId: item.ownerId,
                              iStorageVersion: item.iStorageVersion,
                              videoType: item.videoType,
                              iPlaySpeed: 0,
                              startTime: item.startTime,
                              endTime: item.endTime
                            });
                          } else {
                            downloadPathArr[downloadPathArr.length - 1].endTime = item.endTime;
                          }
                        });
                        console.log("downloadPathArr", downloadPathArr);
                        return downloadPathArr;
                      }
                    };
                    console.log("进入alarmId回放");
                    // 调用回放API接口获取回放片段 - start
                    var alarmId = getQueryString('alarmId', realUrl);
                    var recBegin = reRormatRecTime(getQueryString('begin', realUrl));
                    var recEnd = reRormatRecTime(getQueryString('end', realUrl));
                    var deviceSerial = getQueryString('serial', realUrl);
                    var channelNo = getQueryString('chn', realUrl);
                    var recSliceUrl = apiDomain + "/api/lapp/video/by/id";
                    var recSliceParams = {
                      accessToken: _this3.accessToken,
                      // recType: 1,
                      deviceSerial: deviceSerial,
                      channelNo: channelNo,
                      alarmId: alarmId
                      // startTime:recBegin,
                      // endTime:recEnd
                    };

                    request(recSliceUrl, 'POST', recSliceParams, '', _recAPISuccess);
                  } else {
                    // arlar rec - end
                    // request(nodeUrl, 'GET', '', '', nodeSuccess, nodeError);
                    resolve(realUrl);
                  }
                }
              } else {
                resolve(realUrl);
              }
            } else {
              if (_this3.Theme) {
                _this3.Theme.setDisabled(true);
                _this3.Theme.setDecoderState({
                  play: false
                });
              }
              _this3.pluginStatus.setPlayStatus({
                play: false
              });
              _this3.pluginStatus.loadingClear();
              if (_this3.isInspect) {
                _this3.Theme.jSPlugin.Zoom && _this3.Theme.jSPlugin.Zoom.stopZoom();
                _this3.pluginStatus.loadingSetTextWithBtn({
                  mask: true,
                  maskStyle: "url(".concat(_this3.staticPath, "/imgs/bg.svg) no-repeat 100%/cover"),
                  text: data.msg,
                  color: 'white',
                  btnName: '重试',
                  type: 1
                });
                _this3.Theme && _this3.Theme.inspect && _this3.Theme.inspect.InspectEvent && _this3.Theme.inspect.InspectEvent.disableEvidenceBtn();
              } else {
                _this3.pluginStatus.loadingSetText({
                  text: data.msg,
                  color: 'red'
                });
              }
              if (typeof _this3.params.handleError === 'function') {
                _this3.params.handleError({
                  retcode: data.code,
                  msg: data.msg,
                  id: _this3.params.id,
                  type: "handleError"
                });
              }
              reject(data);
            }

            // fetch real url end
          });
        };

        return new Promise(function (resolve, reject) {
          return getRealUrlPromise(resolve, reject);
        });

        // 格式化回放时间
        /**
         * @description 格式化回放时间
         * @param {string} time 
         * @param {string} defaultTime 
         * @returns {string}
         */
        function formatRecTime(time, defaultTime) {
          // 用户格式 无需更改 => 20182626T000000Z
          // return time
          // 用户格式需要更改
          //用户时间长度为 14 20181226000000  =》 20181226000000
          // 用户长度为12     201812260000    =》 201812260000 + defaultTime后面2位
          // 用户长度为10     2018122600      =》 201812260000 + defaultTime后面4位
          // 用户长度为8     20181226         =》 201812260000 + defaultTime后面6位
          // 结果 20181226000000 14位
          // 插入 TZ
          var reg = /^[0-9]{8}T[0-9]{6}Z$/;
          if (reg.test(time)) {
            // 用户格式 无需更改 => 20182626T000000Z
            return time;
          } else if (/[0-9]{8,14}/.test(time)) {
            var start = 6 - (14 - time.length);
            var end = defaultTime.length;
            var standardTime = time + defaultTime.substring(start, end);
            return standardTime.slice(0, 8) + 'T' + standardTime.slice(8) + 'Z';
          }
          throw new Error('回放时间格式有误，请确认');
        }

        /**
         * @description 重新格式化重新计时
         * @param {string} time 
         * @returns {number}
         */
        function reRormatRecTime(time) {
          var year = time.slice(0, 4);
          var month = time.slice(4, 6);
          var day = time.slice(6, 8);
          var hour = time.slice(9, 11);
          var minute = time.slice(11, 13);
          var second = time.slice(13, 15);
          var date = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
          // if (_this.opt.domain !== 'open') {
          //   return new Date(date.replace(/-/g, '/')).getTime() + (8 * 60 * 60 * 1000);
          // }
          return new Date(date.replace(/-/g, '/')).getTime();
        }
      }

      /**
       * @private
       * @param {string} data 真实的播放地址
       * @param {Function} successCallback 成功回调
       * @param {Function} errorCallback 错误回调
       * @returns {boolean}
       */
    }, {
      key: "_pluginPlay",
      value: function _pluginPlay(data, successCallback, errorCallback) {
        var _this4 = this;
        console.log("执行播放 _pluginPlay", data);
        if (!data) {
          return false;
        }
        function getPlayParams(url) {
          var websocketConnectUrl = url.split('?')[0].replace('/live', '').replace('/playback', '');
          var websocketStreamingParam = (url.indexOf('/live') === -1 ? url.indexOf('cloudplayback') !== -1 ? '/cloudplayback?' : '/playback?' : '/live?') + url.split('?')[1];
          if (websocketStreamingParam.indexOf('/playback') !== -1) {
            websocketStreamingParam = websocketStreamingParam.replace("stream=2", 'stream=1');
          }
          // 本地回放仅支持主码流
          return {
            websocketConnectUrl: websocketConnectUrl,
            websocketStreamingParam: websocketStreamingParam
          };
        }
        var wsUrl = getPlayParams(data).websocketConnectUrl;
        if (this.env && this.env.wsUrl) {
          wsUrl = this.env.wsUrl;
        }
        this.doCreateWsTime = Date.now();
        // xuehb 完成获取URL 3
        this.gotWsUrlTime = new Date().getTime();
        var wsParams = {
          playURL: getPlayParams(data).websocketStreamingParam
        };
        console.log('播放前 stop 阶段 结束');
        this.isStoping = false;
        var now = Date.now();
        console.log('执行播放 ... this.jSPlugin.JS_Play at ', now);
        this.jSPlugin.JS_Play(wsUrl, wsParams, 0).then(function () {
          console.log("执行播放 ... this.jSPlugin.JS_Play 播放成功", wsUrl, wsParams);
          console.log("执行播放耗时 ", Date.now() - now);
          if (_this4.isStoping) {
            console.log('现在在播放前 stop 阶段，此次应为无效播放成功触发。不执行后续回调， 此次耗时无效');
            return;
          }
          if (_this4.validateCode && typeof _this4.jSPlugin.decoderVersion !== 'undefined' && _this4.jSPlugin.decoderVersion === '2.0') {
            _this4.jSPlugin.JS_SetSecretKey(0, _this4.validateCode);
          }
          _this4.pluginStatus.loadingClear();
          _this4.pluginStatus.setPlayStatus({
            play: true,
            loading: false
          });
          if (_this4.Theme) {
            _this4.Theme.setDecoderState({
              play: true
            });
            if (!_this4.isCall && Object.keys(_this4.Theme.themeData).length > 0) {
              var isOpenSound = _.findIndex(_this4.Theme.themeData.footer.btnList, function (v) {
                return v.iconId === 'sound' && v.isrender === 1 && v.defaultActive === 1;
              }) > -1;
            }
            _this4.audio = isOpenSound;
          }
          if (_this4.audio) {
            setTimeout(function () {
              _this4.openSound();
            }, 100);
          }
          if (typeof _this4.params.handleSuccess === 'function') {
            _this4.params.handleSuccess({
              retcode: 0,
              id: _this4.params.id,
              type: "handleSuccess"
            });
          }
          successCallback(wsParams);
        }, function (err) {
          console.log("err", err);
          var msg = '播放失败，请检查设备及客户端网络';
          var retcode = -1;
          if (_this4.jSPlugin.bPlay) {
            return false;
          }
          if (err && err.errorCode) {
            var errorInfo = _this4.errorHander.matchErrorInfo(err.errorCode);
            if (_this4.Theme) {
              _this4.Theme.setDisabled(true);
            }
            if (errorInfo && errorInfo.msg) {
              msg = errorInfo.msg;
            } else if (errorInfo && errorInfo.description) {
              msg = errorInfo.description;
            } else {
              msg = '播放失败，请检查设备及客户端网络';
            }
            retcode = err.errorCode;
          }
          if (_this4.isCall) {
            // 呼叫模板挂断/拒绝状态
            if (_this4.Theme && _this4.Theme.decoderState && _this4.Theme.decoderState.state.rejection) ; else {
              _this4.pluginStatus.loadingClear();
              _this4.pluginStatus.loadingSetTextWithBtn({
                text: msg,
                color: 'white',
                btnName: _this4.isMobile ? '重试' : '重新加载',
                isMobile: _this4.isMobile
              });
            }
          } else {
            _this4.pluginStatus.loadingClear();
            if (_this4.isInspect) {
              _this4.Theme.jSPlugin.Zoom && _this4.Theme.jSPlugin.Zoom.stopZoom();
              // 巡检过程中设备不在线，提示“巡检已结束”
              if (retcode === 5404) {
                if (!document.getElementById("".concat(_this4.id, "-no-inspect-box"))) {
                  _this4.Theme && _this4.Theme.inspectEnding();
                }
              } else {
                _this4.pluginStatus.loadingSetTextWithBtn({
                  mask: true,
                  // maskStyle: `url(${this.staticPath}/imgs/bg.svg) no-repeat 100%/cover`,
                  text: msg,
                  color: 'white',
                  btnName: '重试',
                  type: 1
                });
              }
              _this4.Theme && _this4.Theme.inspect && _this4.Theme.inspect.InspectEvent && _this4.Theme.inspect.InspectEvent.disableEvidenceBtn();
            } else {
              _this4.pluginStatus.loadingSetText({
                text: msg,
                color: 'red'
              });
            }
          }
          if (typeof _this4.params.handleError === 'function') {
            _this4.params.handleError({
              retcode: retcode,
              msg: msg,
              id: _this4.params.id,
              type: "handleError"
            });
          }
          errorCallback();
        });
      }

      /**
       * @description 播放
       * @private
       * @param {string | object} options  string: 播放地址； object: {url: string, accessToken: string}
       * @returns {Promise<any>}
       */
    }, {
      key: "_play",
      value: function _play(options) {
        var _this5 = this;
        console.log("\u6267\u884C\u64AD\u653E play options.url =>", options);
        this.pluginStatus.setPlayStatus({
          play: false,
          loading: true
        });
        this.playStartTime = new Date().getTime();
        if (options) {
          if (typeof options === 'string') {
            this.url = options;
          }
          if (typeof options.url === 'string') {
            this.url = options.url;
          }
          if (typeof options.accessToken === 'string') {
            this.accessToken = options.accessToken;
          }
          if (typeof matchEzopenUrl(this.url).deviceSerial === 'string') {
            this.deviceSerial = matchEzopenUrl(this.url).deviceSerial;
          }
          if (typeof matchEzopenUrl(this.url).channelNo === 'string') {
            this.channelNo = matchEzopenUrl(this.url).channelNo;
          }
          if (this.Theme && (typeof options.url === 'string' || typeof options.accessToken === 'string')) {
            this.Theme.getDeviceInfo(function (data) {});
          }
        }
        var promise = new Promise(function (resolve, reject) {
          console.log('执行 播放前 stop');
          _this5.isStoping = true;
          _this5.jSPlugin.JS_Stop(0).then(function () {
            _this5.stopTime = Date.now();
            console.log("\u64AD\u653E\u524D stop \u6267\u884C\u6210\u529F this.url => ".concat(_this5.url, " ").concat(_this5.accessToken));
            _this5._getRealUrlPromise(_this5.accessToken, _this5.url).then(function (data) {
              _this5._pluginPlay(data, function (params) {
                console.log('---------------------播放成功回调');
                console.log('this.videoPlayState', _this5.videoPlayState);
                if (_this5.eventEmitter) {
                  _this5.eventEmitter.emit('play', {
                    eventType: 'play',
                    code: 0,
                    target: _this5,
                    msg: '播放成功'
                  });
                }
                if (_this5.videoPlayState === 1 || _this5.videoPlayState === 4) {
                  _this5.videoPlayState = 2;
                  var now = Date.now();
                  window.ezuikitMonitor.report({
                    // protocol: 'ezopen',
                    // url: this.url,
                    // serial: this.deviceSerial,
                    // no: this.channelNo,
                    // env: this.env.domain,
                    action: 2,
                    logInfo: {
                      pluginVersion: _this5.isV3 ? 'v3' : 'v1',
                      loadTime: now - _this5.videoInitTime,
                      // 加载耗时详情 initTime 初始化时间  stopTime 停止时间（播放前需要先执行停止）  getWsTime 获取ws地址时间  createWsTime 创建ws到播放的时间
                      loadTimeDesc: {
                        initTime: _this5.playStartTime - _this5.videoInitTime,
                        stopTime: _this5.stopTime - _this5.playStartTime,
                        getWsTime: _this5.doCreateWsTime - _this5.stopTime,
                        createWsTime: now - _this5.doCreateWsTime
                      }
                    }
                  });
                }
                setTimeout(function () {
                  _this5.pluginStatus.loadingClear();
                  // 呼叫模板挂断/拒绝状态
                  if (_this5.isCall && _this5.Theme && _this5.Theme.decoderState && _this5.Theme.decoderState.state.rejection) {
                    console.log("挂断/拒绝状态------------stop");
                    _this5.stop(function () {
                      _this5.pluginStatus.loadingClear();
                      _this5.pluginStatus.loadingSetTextWithBtn({
                        text: '通话已结束',
                        color: 'white',
                        isMobile: _this5.isMobile,
                        type: 2
                      });
                    });
                  }
                }, 500);

                // 鱼眼矫正
                if (_this5.jSPlugin && _this5._FECSplitIds && _this5._FECCorrectType) {
                  _this5.jSPlugin.JS_FECCorrectType(_this5._FECCorrectType, _this5._FECSplitIds);
                }
                resolve(true);
              }, function () {
                return reject(false);
              });
            })["catch"](function (err) {
              var now = Date.now();
              if (_this5.videoPlayState === 1 || _this5.videoPlayState === 4) {
                _this5.videoPlayState = 3;
                window.ezuikitMonitor.report({
                  // protocol: 'ezopen',
                  // url: this.url,
                  // serial: this.deviceSerial,
                  // no: this.channelNo,
                  // env: this.env.domain,
                  action: 3,
                  logInfo: {
                    pluginVersion: _this5.isV3 ? 'v3' : 'v1',
                    err: err,
                    loadTime: now - _this5.videoInitTime
                  }
                });
              } else if (_this5.videoPlayState === 2) {
                _this5.videoPlayState = 5;
                window.ezuikitMonitor.report({
                  // protocol: 'ezopen',
                  // url: this.url,
                  // serial: this.deviceSerial,
                  // no: this.channelNo,
                  // env: this.env.domain,
                  action: 5,
                  logInfo: {
                    pluginVersion: _this5.isV3 ? 'v3' : 'v1',
                    err: err,
                    loadTime: now - _this5.videoInitTime
                  }
                });
              }
              var msg = err.msg ? err.msg : '播放失败，请检查设备及客户端网络';
              if (_this5.Theme) {
                _this5.Theme.setDisabled(true);
              }
              if (_this5.isCall) {
                // 呼叫模板挂断/拒绝状态
                if (_this5.Theme && _this5.Theme.decoderState && _this5.Theme.decoderState.state.rejection) {
                  if (err && err.code == 20018) {
                    // 该用户不拥有该设备
                    _this5.pluginStatus.loadingSetTextWithBtn({
                      text: '该用户不拥有该设备',
                      color: 'white',
                      isMobile: _this5.isMobile,
                      type: 2
                    });
                  } else {
                    _this5.pluginStatus.loadingSetTextWithBtn({
                      text: '通话已结束',
                      color: 'white',
                      isMobile: _this5.isMobile,
                      type: 2
                    });
                  }
                } else {
                  if (err && err.code == 20018) {
                    // 该用户不拥有该设备
                    _this5.pluginStatus.loadingSetTextWithBtn({
                      text: '该用户不拥有该设备',
                      color: 'white',
                      isMobile: _this5.isMobile,
                      type: 2
                    });
                    if (!_this5.isWebConsole && _this5.Theme && !!_this5.Theme.call) {
                      _this5.Theme.call.userNoDevice();
                    }
                  } else {
                    _this5.pluginStatus.loadingSetTextWithBtn({
                      text: msg,
                      color: 'white',
                      btnName: _this5.isMobile ? '重试' : '重新加载',
                      isMobile: _this5.isMobile
                    });
                  }
                }
              } else if (_this5.isInspect) {
                _this5.Theme.jSPlugin.Zoom && _this5.Theme.jSPlugin.Zoom.stopZoom();
                _this5.pluginStatus.loadingSetTextWithBtn({
                  mask: true,
                  maskStyle: "url(".concat(_this5.staticPath, "/imgs/bg.svg) no-repeat 100%/cover"),
                  text: msg,
                  color: 'white',
                  btnName: '重试',
                  type: 1
                });
                _this5.Theme && _this5.Theme.inspect && _this5.Theme.inspect.InspectEvent && _this5.Theme.inspect.InspectEvent.disableEvidenceBtn();
              } else {
                _this5.pluginStatus.loadingSetText({
                  text: msg,
                  color: 'red'
                });
              }
              if (typeof _this5.params.handleError === 'function') {
                _this5.params.handleError({
                  retcode: err.oError ? err.oError.errorCode : -1,
                  msg: msg,
                  id: _this5.params.id,
                  type: "handleError"
                });
              }
              if (_this5.eventEmitter) {
                _this5.eventEmitter.emit('play', {
                  eventType: 'play',
                  code: err.oError ? err.oError.errorCode : -1,
                  target: _this5,
                  msg: err.msg ? err.msg : '播放失败，请检查设备及客户端网络'
                });
              }
              reject({
                retcode: err.oError ? err.oError.errorCode : -1,
                msg: msg,
                id: _this5.params.id,
                type: "handleError"
              });
            });
          });
        });
        return promise;
      }

      /**
       * @description 停止 
       * @param {Function} callBack 成功回调函数
       * @returns {Promise<any>}
       */
    }, {
      key: "stop",
      value: function stop() {
        var _this6 = this;
        var callBack = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : function () {};
        this.pluginStatus.setPlayStatus({
          loading: true
        });
        this.reSetTheme();
        return this.jSPlugin.JS_Stop(0).then(function () {
          console.log("停止成功");
          _this6.pluginStatus.setPlayStatus({
            play: false,
            loading: false
          });
          if (_this6.Theme) {
            _this6.Theme.setDecoderState({
              play: false
            });
          }
          if (_this6.eventEmitter) {
            _this6.eventEmitter.emit('stop', {
              eventType: 'stop',
              code: 0,
              target: _this6,
              msg: '停止成功'
            });
          }
          callBack();
        });
      }

      /**
       * @description 通过level改变播放地址改变清晰度
       * @param {number | object} definition 1 高清 |  0 标清 | {streamType: number}
       * @returns {Promise<any>}
       * 
       * @example
       * 
       * const definition = player.getDefinitionList()
       * player.changeVideoLevel(definition[0])
       * 
       */
    }, {
      key: "changeVideoLevel",
      value: function changeVideoLevel(definition) {
        var initUrl = this.url;
        var url = initUrl;

        // TODO: 主子码流的切换实际上是url的切换，当url中带有hd,则由`/api/lapp/live/url/ezopen`接口返回的wss播放地址带有 stream=1,反之则带有stream=2

        // 兼容旧版本
        if (typeof definition === 'number') {
          url = definition === 1 ? initUrl.replace(".live", ".hd.live") : initUrl.replace(".hd.live", ".live");
          this.jSPlugin.playURL = definition ? this.jSPlugin.playURL.replace("stream=2", "stream=1") : this.jSPlugin.playURL.replace("stream=1", "stream=2");
          // console.log("changeVideoLevel", url, this.jSPlugin.playURL);
          console.warn("changeVideoLevel", "该方法将不在支持传入number类型的参数，建议使用对象类型的参数");
        }
        if (_typeof(definition) === 'object') {
          if (typeof definition.streamType === "number" && ['sd', 'hd'].includes(definition.level)) {
            url = definition.level === 'hd' ? initUrl.replace(".live", ".hd.live") : initUrl.replace(".hd.live", ".live");
          }
          this.jSPlugin.playURL = definition.streamType === 1 ? this.jSPlugin.playURL.replace("stream=2", "stream=1") : this.jSPlugin.playURL.replace("stream=1", "stream=2");
          // console.log("changeVideoLevel", url, this.jSPlugin.playURL);
        }

        this.url = url;
        var changeRT = this.changePlayUrl({
          url: url
        }, function () {}, false);
        if (this.eventEmitter) {
          this.eventEmitter.emit('changeVideoLevel', {
            eventType: 'changeVideoLevel',
            code: 0,
            target: this,
            data: definition,
            msg: '切换清晰度'
          });
        }
        if (isPromise(changeRT)) {
          return changeRT;
        }
        return new Promise(function (resolve) {
          resolve(changeRT);
        });
        // const promise = new Promise((resolve, reject) => {
        //   this.pause()
        //     .then(() => {
        //       console.log("暂停成功");
        //       this.resume()
        //         .then((data) => {
        //           console.log("恢复成功")
        //         })
        //     })
        //     .catch(() => {
        //       console.log("暂停失败");
        //       this.resume()
        //         .then((data) => {
        //           console.log("恢复成功")
        //         })
        //     })
        // });
        // return promise;
      }

      /** 
       * @description 重置主题状态 
       * @param {string[]} [resetList=[]]  重置列表
       * 
       * @returns {void}
       */
    }, {
      key: "reSetTheme",
      value: function reSetTheme() {
        var resetList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
        // 云台初始化
        if (this.Theme && this.Theme.Ptz && this.Theme.decoderState.state.pantile) {
          this.Theme.setDecoderState({
            pantile: false
          });
          this.Theme.Ptz.hide();
        }
        // 录制初始化
        if (this.Theme) {
          if (this.Theme.decoderState.state.recordvideo) {
            this.Theme.setDecoderState({
              recordvideo: false
            });
          }
        }
        // 3D定位初始化
        if (resetList.indexOf('zoom') > -1) {
          if (this.use3DZoom) {
            this.is3DZooming = false;
            this.close3DZoom();
          } else {
            if (this.Zoom && this.Zoom.currentScale > 1) {
              this.Zoom.stopZoom();
            }
            if (this.Theme) {
              this.Theme.setDecoderState({
                zoom: false
              });
            }
          }
        }
        // 对讲初始化
        if (this.Theme && this.Theme.decoderState.state.talk) {
          this.stopTalk();
          this.Theme.setDecoderState({
            talk: false
          });
        }
        // 回放日期选择
        if (this.Theme && this.Theme.Rec && !this.Theme.isMobile) {
          this.Theme.Rec.datepickerHide();
        }
        // 回放倍速
        if (this.Theme && this.Theme.Rec) {
          this.Theme.changeRecSpeed(1);
          this.Theme.nextRate = 1;
          this.speed = 1;
          this.Theme.setDecoderState({
            speed: false
          });
        }
        if (this.eventEmitter) {
          this.eventEmitter.emit('reSetTheme', {
            eventType: 'reSetTheme',
            code: 0,
            target: this,
            msg: '重置主题'
          });
        }
      }

      /**
       * xuehb 添加回调
       * @private
       * @param {object} options // {accessToken: string, url: string, type: string, deviceSerial: string, channelNo: string, validCode: string, hd: boolean, begin: string, end: string}
       * @param {Function} callback
       * @returns {Promise<string, string>}  
       */
    }, {
      key: "_changePlayUrl",
      value: function _changePlayUrl(options) {
        var _this7 = this;
        var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
        var reSetTheme = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
        var that = this;
        if (this.Theme) {
          this.Theme.setDecoderState({
            play: false
          });
          this.Theme.setDisabled(true);
        }
        setTimeout(function () {
          _this7.pluginStatus.loadingClear();
          _this7.pluginStatus.loadingStart(_this7.id);
          _this7.pluginStatus.loadingSetText({
            text: '加载中，请稍后'
          });
        }, 100);
        this.reSetTheme(['zoom']);
        this.getDeviceCapacity({
          accessToken: options.accessToken || this.accessToken,
          deviceSerial: options.deviceSerial || this.deviceSerial
        });
        var initUrl = this.url;
        var url = matchUrl(initUrl, options);
        if (options.accessToken) {
          this.accessToken = options.accessToken;
          this.deviceSerial = options.deviceSerial;
          this.channelNo = options.channelNo;
        }
        this.url = url;

        // 切换播放地址会重新初始化，所以重置初始化时间
        this.videoInitTime = Date.now();
        this.videoPlayState = 1; // 播放状态 1 初始化 2 播放成功 3 播放失败 4 切换播放地址 5 播放中失败

        window.monitorExtendsInfo = {
          protocol: 'ezopen',
          url: this.url,
          serial: this.deviceSerial,
          no: this.channelNo,
          env: this.env.domain,
          type: matchEzopenUrl(this.url).type
        };
        window.ezuikitMonitor.report({
          action: 4,
          logInfo: {
            pluginVersion: this.isV3 ? 'v3' : 'v1',
            type: matchEzopenUrl(this.url).type,
            params: options
          }
        });

        //xuehb
        callback();
        var promise = new Promise(function (resolve, reject) {
          var changePlayUrlParams = {
            url: url
          };
          if (options.accessToken) {
            changePlayUrlParams["accessToken"] = options.accessToken;
          }
          console.log("切换播放地址 参数 ", changePlayUrlParams);
          return _this7.play(changePlayUrlParams).then(function () {
            console.log("切换播放地址 play 执行成功 ", _this7.url, _this7.accessToken);
            if (reSetTheme) {
              if (options.type) {
                if (_this7.Theme) {
                  if (options.type == 'rec' || options.type == 'cloud.rec') {
                    _this7.Theme.changeTheme(_this7.isMobile ? "mobileRec" : "pcRec");
                  } else if (options.type == 'miniRec') {
                    _this7.Theme.changeTheme('miniRec');
                  } else {
                    _this7.Theme.changeTheme(_this7.isMobile ? "mobileLive" : "pcLive");
                    _this7.Theme.Rec.unSyncTimeLine();
                  }
                }
              } else {
                if (_this7.Theme) {
                  if (_this7.url.indexOf('.rec') > -1) {
                    _this7.Theme.changeTheme(_this7.isMobile ? "mobileRec" : "pcRec");
                  } else {
                    if (_this7.isCall) {
                      _this7.Theme.changeTheme(_this7.isMobile ? "mobileCall" : "webCall");
                    } else {
                      _this7.Theme.changeTheme(_this7.themeId);
                    }
                    _this7.Theme.Rec.unSyncTimeLine();
                  }
                }
              }
            }
            if (options && options.begin && options.deviceSerial && _this7.Theme) {
              _this7.Theme.Rec.setDatepickerDate(options.begin);
            }
            if (_this7.Theme) {
              _this7.Theme.setDisabled(false);
            }
            if (_this7.eventEmitter) {
              _this7.eventEmitter.emit('changePlayUrl', {
                eventType: 'changePlayUrl',
                code: 0,
                target: _this7,
                msg: '切换播放地址成功'
              });
            }
            resolve(url);
          })["catch"](function (err) {
            reject(url);
            if (_this7.eventEmitter) {
              _this7.eventEmitter.emit('changePlayUrl', {
                eventType: 'changePlayUrl',
                code: -1,
                target: _this7,
                msg: err && err.msg ? err.msg : '切换播放地址失败'
              });
            }
            if (err && err.msg) {
              _this7.pluginStatus.loadingClear();
              if (_this7.isInspect) {
                _this7.Theme.jSPlugin.Zoom && _this7.Theme.jSPlugin.Zoom.stopZoom();
                _this7.pluginStatus.loadingSetTextWithBtn({
                  mask: true,
                  maskStyle: "url(".concat(_this7.staticPath, "/imgs/bg.svg) no-repeat 100%/cover"),
                  text: err.msg,
                  color: 'white',
                  btnName: '重试',
                  type: 1
                });
                _this7.Theme && _this7.Theme.inspect && _this7.Theme.inspect.InspectEvent && _this7.Theme.inspect.InspectEvent.disableEvidenceBtn();
              } else {
                _this7.pluginStatus.loadingSetText({
                  text: err.msg,
                  color: 'red'
                });
              }
            }
          });
        });

        /**
          * 匹配播放地址 用户播放地址切换
          * options
          * type | string | live,rec
          * hd | boolean | true,false
          * deviceSerial
          * channelNO
          * begin
          * end
          * @param {string} matchInitUrl
          * @param {{url: string, type: string, deviceSerial: string, channelNo: string, validCode: string, hd: boolean, begin: string, end: string}} matchOptions
          * @returns {string}
          */
        function matchUrl(matchInitUrl, matchOptions) {
          if (matchOptions.url) {
            return matchOptions.url;
          }
          console.log('--------------matchInitUrl', matchInitUrl);
          var type = matchInitUrl.split("/")[4].split(".")[matchInitUrl.split("/")[4].split(".").length - 1].split("?")[0];
          if (type === 'rec' && matchInitUrl.indexOf(".cloud.rec") !== -1) {
            type = 'cloud.rec';
          }
          if (matchOptions.type) {
            type = matchOptions.type == 'miniRec' ? 'rec' : matchOptions.type;
          }
          var deviceSerial = matchInitUrl.split("/")[3];
          if (matchOptions.deviceSerial) {
            deviceSerial = matchOptions.deviceSerial;
          }
          var channelNo = matchInitUrl.split("/")[4].split(".")[0];
          if (matchOptions.channelNo) {
            channelNo = matchOptions.channelNo;
          }
          // 如果切换设备，之前设备有验证码，新设备无验证码，建议传空验证码,清理验证码（降低解码消耗）
          var validCode = matchInitUrl.split("/")[2].split("@").length === 2 ? matchInitUrl.split("/")[2].split("@")[0] : "";
          if (typeof matchOptions.validCode !== 'undefined') {
            validCode = matchOptions.validCode;
          }
          var hd = typeof matchOptions.hd === 'undefined' ? matchInitUrl.indexOf('.hd') !== -1 : matchOptions.hd;
          var result = "ezopen://".concat(validCode ? "".concat(validCode, "@") : "").concat(that.host, "/").concat(deviceSerial, "/").concat(channelNo).concat(hd ? '.hd' : '', ".").concat(type);
          if (type === 'live') {
            return result;
          }
          result = "ezopen://".concat(validCode ? "".concat(validCode, "@") : "").concat(that.host, "/").concat(deviceSerial, "/").concat(channelNo, ".").concat(type);
          if (matchOptions.begin && matchOptions.end) {
            result += "?begin=".concat(matchOptions.begin, "&end=").concat(matchOptions.end);
          } else if (matchOptions.begin) {
            result += "?begin=".concat(matchOptions.begin);
          } else if (getQueryString("begin", matchInitUrl) && getQueryString("end", matchInitUrl)) {
            result += "?begin=".concat(getQueryString("begin", matchInitUrl), "&end=").concat(getQueryString("end", matchInitUrl));
          } else if (getQueryString("begin", matchInitUrl)) {
            result += "?begin=".concat(getQueryString("begin", matchInitUrl));
          }
          return result;
        }
        return promise;
      }

      /**
       * @typedef GetOSDTimeResult
       * @property {number} code 0 成功， -1 失败
       * @property {number} retcode 
       * @property {*} data 
       */

      /** 
       * @description 获取基准时间
       * @returns {Promise<GetOSDTimeResult>}
       */
    }, {
      key: "getOSDTime",
      value: function getOSDTime() {
        var _this8 = this;
        var promise = new Promise(function (resolve, reject) {
          _this8.jSPlugin.JS_GetOSDTime(0).then(function (data) {
            if (_this8.eventEmitter) {
              _this8.eventEmitter.emit('getOSDTime', {
                eventType: 'getOSDTime',
                code: 0,
                target: _this8,
                data: data,
                msg: '获取OSD时间'
              });
            }
            resolve({
              code: 0,
              retcode: 0,
              data: data
            });
            // 兼容旧版本callback
            if (typeof _this8.params.getOSDTimeCallBack === 'function') {
              _this8.params.getOSDTimeCallBack({
                id: _this8.id,
                type: 'getOSDTime',
                code: 0,
                data: data
              });
            }
          })["catch"](function (err) {
            if (_this8.eventEmitter) {
              _this8.eventEmitter.emit('getOSDTime', {
                eventType: 'getOSDTime',
                code: -1,
                target: _this8,
                msg: err || '获取OSD时间失败'
              });
            }
            reject({
              code: -1,
              retcode: -1,
              data: err
            });
            // 兼容旧版本callback
            if (typeof _this8.params.getOSDTimeCallBack === 'function') {
              _this8.params.getOSDTimeCallBack({
                id: _this8.id,
                type: 'getOSDTime',
                code: -1,
                data: -1
              });
            }
          });
        });
        return promise;
      }

      /**
       * @description 截图
       * @param {string} name 图片名
       * @param {Function} callback 回调 (data: CapturePictureResult) => void
       * @returns {Promise<CapturePictureResult>}
       */
    }, {
      key: "capturePicture",
      value: function capturePicture(name) {
        var _this9 = this;
        var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
        /** @type {Promise<{code: 1, data: CapturePictureResult}>} */
        var capturePictureRT = this.jSPlugin.JS_CapturePicture(0, name || new Date().getTime(), "JPEG", callback, !!callback);
        if (isPromise(capturePictureRT)) {
          return new Promise(function (resolve, reject) {
            capturePictureRT.then(function (res) {
              // 兼容旧版本callback
              if (typeof _this9.params.capturePictureCallBack === 'function') {
                _this9.params.capturePictureCallBack({
                  id: _this9.id,
                  type: 'capturePicture',
                  code: 0
                });
              }
              var result = {
                id: _this9.id,
                code: 0,
                data: res.data,
                type: 'handleCapturePicture'
              };
              if (_this9.eventEmitter) {
                _this9.eventEmitter.emit('capturePicture', {
                  eventType: 'capturePicture',
                  code: 0,
                  target: _this9,
                  data: res.data,
                  msg: '截图成功'
                });
              }
              // 抓图事件回调
              // http://nvwa.hikvision.com.cn/pages/viewpage.action?pageId=661310692
              if (typeof _this9.params.handleCapturePicture === 'function') _this9.params.handleCapturePicture(result);
              resolve(result);
            }, function (err) {
              // 兼容旧版本callback
              if (typeof _this9.params.capturePictureCallBack === 'function') {
                _this9.params.capturePictureCallBack({
                  id: _this9.id,
                  type: 'capturePicture',
                  code: -1
                });
              }
              if (_this9.eventEmitter) {
                _this9.eventEmitter.emit('capturePicture', {
                  eventType: 'capturePicture',
                  code: -1,
                  target: _this9,
                  msg: err || '截图失败'
                });
              }
              var result = Object.assign({
                id: _this9.id,
                type: 'handleCapturePicture',
                code: -1
              }, err);
              // 抓图事件回调
              // http://nvwa.hikvision.com.cn/pages/viewpage.action?pageId=661310692
              if (typeof _this9.params.handleCapturePicture === 'function') _this9.params.handleCapturePicture(result);
              reject(result);
            });
          });
        }
      }

      /**
       * @description 开始录制
       * @requires jsPlugin解码库
       * 
       * @param {string} name 文件名
       * @returns {Promise<undefined>}
       */
    }, {
      key: "startSave",
      value: function startSave(name) {
        var startSaveRT = this.jSPlugin.JS_StartSave(0, name);
        var that = this;
        if (isPromise(startSaveRT)) {
          startSaveRT.then(function () {
            if (typeof that.params.startSaveCallBack === 'function') {
              // 兼容旧版本callback
              that.params.startSaveCallBack({
                id: that.id,
                type: 'startSave',
                code: 0
              });
            }
            if (that.eventEmitter) {
              that.eventEmitter.emit('startSave', {
                eventType: 'startSave',
                code: 0,
                target: that,
                msg: '开始录像成功'
              });
            }
          })["catch"](function () {
            if (that.eventEmitter) {
              that.eventEmitter.emit('startSave', {
                eventType: 'startSave',
                code: -1,
                target: that,
                msg: '开始录像失败'
              });
            }
            if (typeof that.params.startSaveCallBack === 'function') {
              that.params.startSaveCallBack({
                id: that.id,
                type: 'startSave',
                code: -1
              });
            }
          });
          return startSaveRT;
        }
        if (this.Theme) {
          this.Theme.setDecoderState({
            recordvideo: true
          });
        }
        return new Promise(function (resolve) {
          resolve(startSaveRT);
        });
      }

      /**
       * @description 结束录制
       * 
       * @requires jsPlugin解码库
       * @returns {Promise<any>}
       */
    }, {
      key: "stopSave",
      value: function stopSave() {
        var stopSaveRT = this.jSPlugin.JS_StopSave(0);
        var that = this;
        if (isPromise(stopSaveRT)) {
          stopSaveRT.then(function () {
            if (that.eventEmitter) {
              that.eventEmitter.emit('stopSave', {
                eventType: 'stopSave',
                code: 0,
                target: that,
                msg: '停止录像成功'
              });
            }
            if (typeof that.params.stopSaveCallBack === 'function') {
              // 兼容旧版本callback
              that.params.stopSaveCallBack({
                id: that.id,
                type: 'stopSave',
                code: 0
              });
            }
          })["catch"](function () {
            if (that.eventEmitter) {
              that.eventEmitter.emit('stopSave', {
                eventType: 'stopSave',
                code: -1,
                target: that,
                msg: '停止录像失败'
              });
            }
            if (typeof that.params.stopSaveCallBack === 'function') {
              // 兼容旧版本callback
              that.params.stopSaveCallBack({
                id: that.id,
                type: 'stopSave',
                code: -1
              });
            }
          });
          return stopSaveRT;
        }
        if (this.Theme) {
          this.Theme.setDecoderState({
            recordvideo: false
          });
        }
        return new Promise(function (resolve) {
          resolve(stopSaveRT);
        });
      }

      /**
       * @description 开启声音
       * 
       * @requires jsPlugin解码库
       * @returns {Promise<number>}
       */
    }, {
      key: "openSound",
      value: function openSound() {
        /** @type {number} */
        var openSoundRT = this.jSPlugin.JS_OpenSound(0);
        console.log("打开声音", openSoundRT);
        if (this.eventEmitter) {
          this.eventEmitter.emit('openSound', {
            eventType: 'openSound',
            code: openSoundRT,
            target: this,
            msg: '打开声音'
          });
        }
        if (isPromise(openSoundRT)) {
          return openSoundRT;
        }
        if (this.Theme) {
          this.Theme.setDecoderState({
            sound: true
          });
        }
        // 兼容旧版本callback
        if (typeof this.params.openSoundCallBack === 'function') {
          this.params.openSoundCallBack({
            id: this.id,
            type: 'openSound',
            code: openSoundRT
          });
        }
        return new Promise(function (resolve) {
          resolve(openSoundRT);
        });
      }

      /**
       * @description 关闭声音
       * 
       * @requires jsPlugin解码库
       * @returns {Promise<number>}
       */
    }, {
      key: "closeSound",
      value: function closeSound() {
        /** @type {number} */
        var closeSoundRT = this.jSPlugin.JS_CloseSound(0);
        if (this.eventEmitter) {
          this.eventEmitter.emit('closeSound', {
            eventType: 'closeSound',
            code: closeSoundRT,
            target: this,
            msg: '关闭声音'
          });
        }
        if (isPromise(closeSoundRT)) {
          return closeSoundRT;
        }
        if (this.Theme) {
          this.Theme.setDecoderState({
            sound: false
          });
        }
        // 兼容旧版本callback
        if (typeof this.params.closeSoundCallBack === 'function') {
          this.params.closeSoundCallBack({
            id: this.id,
            type: 'closeSound',
            code: closeSoundRT
          });
        }
        return new Promise(function (resolve) {
          resolve(closeSoundRT);
        });
      }

      /**
       * @description 开启电子放大
       * @returns {Promise<number>}
       */
    }, {
      key: "enableZoom",
      value: function enableZoom() {
        /** @type {number} */
        var enableZoomRT = this.jSPlugin.JS_EnableZoom(0);
        if (this.eventEmitter) {
          this.eventEmitter.emit('startZoom', {
            eventType: 'startZoom',
            code: enableZoomRT,
            target: this,
            msg: '开启电子放大'
          });
        }
        if (isPromise(enableZoomRT)) {
          return enableZoomRT;
        }
        return new Promise(function (resolve) {
          resolve(enableZoomRT);
        });
      }

      /**
       * @description 关闭电子放大
       * @returns {Promise<number>}
       */
    }, {
      key: "closeZoom",
      value: function closeZoom() {
        /** @type {number} */
        var closeZoomRT = this.jSPlugin.JS_DisableZoom(0);
        if (this.eventEmitter) {
          this.eventEmitter.emit('closeZoom', {
            eventType: 'closeZoom',
            code: closeZoomRT,
            target: this,
            msg: '关闭电子放大'
          });
        }
        if (isPromise(closeZoomRT)) {
          return closeZoomRT;
        }
        return new Promise(function (resolve) {
          resolve(closeZoomRT);
        });
      }

      /**
       * @description 执行放大
       * @returns {Promise<number>}
       */
    }, {
      key: "zoomAdd",
      value: function zoomAdd(scale) {
        if (this.eventEmitter) {
          this.eventEmitter.emit('zoomAdd', {
            eventType: 'zoomAdd',
            code: 1,
            target: this,
            msg: '执行放大'
          });
        }
        this.Zoom && this.Zoom.addScale(scale);
      }

      /**
       * @description 执行缩小
       * @returns {Promise<number>}
       */
    }, {
      key: "zoomSub",
      value: function zoomSub(scale) {
        if (this.eventEmitter) {
          this.eventEmitter.emit('zoomSub', {
            eventType: 'zoomSub',
            code: 1,
            target: this,
            msg: '执行缩小'
          });
        }
        this.Zoom && this.Zoom.subScale(scale);
      }

      /**
       * @description 开启3D定位
       * 
       * @requires jsPlugin解码库
       * @requires ESCanvas绘图模块
       * @returns {Promise<number>} 0 | -1
       */
    }, {
      key: "enable3DZoom",
      value: function enable3DZoom() {
        var _this10 = this;
        if (!this.use3DZoom) {
          return new Promise(function (resolve, reject) {
            if (this.eventEmitter) {
              this.eventEmitter.emit('enable3DZoom', {
                eventType: 'enable3DZoom',
                code: -1,
                target: this,
                msg: '未启用3D定位功能'
              });
            }
            reject({
              code: -1,
              msg: '未启用3D定位功能'
            });
          });
        }

        /**
         * @description 判断3D定位手势操作
         * @param {Object.<string, number[]>} rect {startPos:[number,number], endPos:[number,number]} startPos起点xy坐标:[x,y], endPos终点xy坐标:[x,y]
         * @param {boolean} isTrans
         * @return {number} 0:缩小,1:放大,-1:无效操作
        */
        function getZoomDirection(rect, isTrans) {
          if (!rect || !rect.startPos || !rect.endPos) {
            return -1;
          }
          var startX = rect.startPos[0];
          var startY = rect.startPos[1];
          var endX = rect.endPos[0];
          var endY = rect.endPos[1];
          if (isTrans) {
            if (endX > startX && endY < startY) {
              return 1;
            } else if (endX < startX && endY > startY) {
              return 0;
            } else {
              return -1;
            }
          } else {
            if (endX > startX && endY > startY) {
              return 1;
            } else if (endX < startX && endY < startY) {
              return 0;
            } else {
              return -1;
            }
          }
        }

        /**
         * @typedef GetZoomMultipleResult
         * @property {number} startPointX 起点x坐标
         * @property {number} startPointY 起点y坐标
         * @property {number} endPointX 终点x坐标
         * @property {number} endPointY 终点y坐标
         * @property {number} zoomRate 缩放倍率
         * @property {number} targetCenterX 拉框中心点x坐标
         * @property {number} targetCenterY 拉框中心点y坐标
         * @property {number} targetWidth 拉框宽度
         * @property {number} targetHeight 拉框宽度
         */

        /**
         * @description 计算缩放倍数，获取拉框中心点坐标，原点默认为播放器左上角
         * 
         * @param {number} width 视窗宽度
         * @param {number} height 视窗高度
         * @param {Object.<string, number[]>} rect {startPos:[number,number], endPos:[number,number]} startPos起点xy坐标:[x,y], endPos终点xy坐标:[x,y]
         * @param {number} maxRate 最大缩放倍数默认值5
         * @returns {GetZoomMultipleResult}
         */
        function getZoomMultiple(width, height, rect) {
          var maxRate = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 5;
          if (!width || !height || !rect || !rect.startPos || !rect.endPos) {
            return -1;
          }
          var startX = rect.startPos[0];
          var startY = rect.startPos[1];
          var endX = rect.endPos[0];
          var endY = rect.endPos[1];
          var targetWidth = Math.abs(endX - startX);
          var targetHeight = Math.abs(endY - startY);
          var targetCenterX = parseInt((startX + endX) / 2);
          var targetCenterY = parseInt((startY + endY) / 2);
          // const zoomRate = Math.round((1 - ((targetWidth * targetHeight) / (width * height))) * maxRate);
          var zoomRate = Math.round(width * height / (targetWidth * targetHeight));
          console.log('最大缩放倍数：', maxRate);
          console.log('计算缩放倍数：', width * height / (targetWidth * targetHeight));
          console.log('下发缩放倍数：', zoomRate > maxRate ? maxRate : zoomRate);
          return {
            startPointX: parseInt(startX / width * 256),
            startPointY: parseInt(startY / height * 256),
            endPointX: parseInt(endX / width * 256),
            endPointY: parseInt(endY / height * 256),
            zoomRate: zoomRate > maxRate ? maxRate : zoomRate,
            targetCenterX: targetCenterX,
            targetCenterY: targetCenterY,
            targetWidth: targetWidth,
            targetHeight: targetHeight
          };
        }
        if (!this.is3DZooming) {
          if (!this.isMobile) {
            if (this.Zoom) {
              this.Zoom.stopZoom();
            }
            if (this.Theme) {
              this.Theme.setDecoderState({
                zoom: false
              });
            }
          }
          if (this.support3DZoom) {
            this.is3DZooming = true;
            if (this.Theme) {
              this.Theme.setDecoderState({
                zoom: true
              });
            }
            if (document.getElementById("".concat(this.id, "-zoom-content"))) {
              document.getElementById("".concat(this.id, "-zoom-content")).title = '3D定位';
            }
            var enable3DZoomRT = this.jSPlugin.JS_Enable3DZoom(0, function (r) {
              var screenWidth = _this10.Theme && _this10.Theme.decoderState.state.expend && _this10.isMobile ? _this10.fullScreenWidth : _this10.width;
              var screenHeight = _this10.Theme && _this10.Theme.decoderState.state.expend && _this10.isMobile ? _this10.fullScreenHeight : _this10.height;
              var zoomDirection = getZoomDirection(r, _this10.Theme && _this10.Theme.decoderState.state.expend);
              if (zoomDirection > -1) {
                try {
                  var param = getZoomMultiple(screenWidth, screenHeight, r, _this10.capacity && _this10.capacity.support_zoomOut_maxTime ? _this10.capacity.support_zoomOut_maxTime : 5);
                  var apiUrl = _this10.env.domain + "/api/v3/das/device/3d/zoom?accessToken=".concat(_this10.accessToken, "&deviceSerial=").concat(matchEzopenUrl(_this10.url).deviceSerial, "&channelNo=").concat(matchEzopenUrl(_this10.url).channelNo, "&command=").concat(zoomDirection == 0 ? 9 : 8, "&zoomTimes=").concat(param.zoomRate, "&startPointX=").concat(param.startPointX, "&startPointY=").concat(param.startPointY, "&endPointX=").concat(param.endPointX, "&endPointY=").concat(param.endPointY, "&length=").concat(parseInt(screenHeight), "&width=").concat(parseInt(screenWidth), "&midPointX=").concat(param.targetCenterX, "&midPointY=").concat(param.targetCenterY, "&lengthX=").concat(param.targetWidth, "&lengthY=").concat(param.targetHeight);
                  fetch(apiUrl, {
                    method: "POST"
                  }).then(function (response) {
                    return response.json();
                  }).then(function (res) {
                    if (res.code != 200) {
                      _this10.pluginStatus.loadingSetText({
                        text: res.msg,
                        color: 'red',
                        delayClear: 2000
                      });
                    }
                  })["catch"](function (error) {
                    _this10.pluginStatus.loadingSetText({
                      text: '3D定位失败，请重试',
                      color: 'red',
                      delayClear: 2000
                    });
                  });
                } catch (error) {
                  _this10.pluginStatus.loadingSetText({
                    text: '3D定位失败，请重试',
                    color: 'red',
                    delayClear: 2000
                  });
                }
              }
            });
            this.Zoom = new Zoom(this);
            if (this.eventEmitter) {
              this.eventEmitter.emit('enable3DZoom', {
                eventType: 'enable3DZoom',
                code: enable3DZoomRT,
                target: this,
                msg: '开启3D定位'
              });
            }
            if (isPromise(enable3DZoomRT)) {
              return enable3DZoomRT;
            }
            return new Promise(function (resolve) {
              resolve(enable3DZoomRT);
            });
          } else {
            this.is3DZooming = false;
            if (document.getElementById("".concat(this.id, "-zoom-content"))) {
              document.getElementById("".concat(this.id, "-zoom-content")).title = '电子放大';
            }
            return new Promise(function (resolve, reject) {
              if (this.eventEmitter) {
                this.eventEmitter.emit('enable3DZoom', {
                  eventType: 'enable3DZoom',
                  code: -1,
                  target: this,
                  msg: '当前设备不支持3D定位功能'
                });
              }
              reject({
                code: -1,
                msg: '当前设备不支持3D定位功能'
              });
            });
          }
        } else {
          return new Promise(function (resolve, reject) {
            if (this.eventEmitter) {
              this.eventEmitter.emit('enable3DZoom', {
                eventType: 'enable3DZoom',
                code: -1,
                target: this,
                msg: '3D定位已处于开启状态'
              });
            }
            reject({
              code: -1,
              msg: '3D定位已处于开启状态'
            });
          });
        }
      }

      /**
       * @description 关闭3D定位
       * @returns {Promise<number>} 0 | -1
       */
    }, {
      key: "close3DZoom",
      value: function close3DZoom() {
        var that = this;
        if (!this.use3DZoom) {
          return new Promise(function (resolve, reject) {
            if (that.eventEmitter) {
              that.eventEmitter.emit('close3DZoom', {
                eventType: 'close3DZoom',
                code: -1,
                target: that,
                msg: '未启用3D定位功能'
              });
            }
            reject({
              code: -1,
              msg: '未启用3D定位功能'
            });
          });
        }
        if (this.is3DZooming) {
          if (this.Theme) {
            this.Theme.setDecoderState({
              zoom: false
            });
          }
          var close3DZoomRT = this.jSPlugin.JS_Disable3DZoom(0);
          this.Zoom = new Zoom(this);
          this.is3DZooming = false;
          if (this.eventEmitter) {
            this.eventEmitter.emit('close3DZoom', {
              eventType: 'close3DZoom',
              code: close3DZoomRT,
              target: this,
              msg: '关闭3D定位'
            });
          }
          if (isPromise(close3DZoomRT)) {
            return close3DZoomRT;
          }
          return new Promise(function (resolve) {
            resolve(close3DZoomRT);
          });
        } else {
          return new Promise(function (resolve, reject) {
            if (this.eventEmitter) {
              this.eventEmitter.emit('close3DZoom', {
                eventType: 'close3DZoom',
                code: -1,
                target: this,
                msg: '3D定位已处于关闭状态'
              });
            }
            reject({
              code: -1,
              msg: '3D定位已处于关闭状态'
            });
          });
        }
      }

      /**
       * @description 改变zoom 类型 2D 和 3D 切换
       * @param {boolean} flag 
       * @returns {undefined | object}
       */
    }, {
      key: "changeZoomType",
      value: function changeZoomType(flag) {
        var _this11 = this;
        if (flag && this.capacity && !this.support3DZoom) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('changeZoomType', {
              eventType: 'changeZoomType',
              code: -1,
              target: this,
              msg: '当前设备不支持开启3D定位功能'
            });
          }
          return {
            code: -1,
            msg: '当前设备不支持开启3D定位功能'
          };
        }
        //切换缩放模式
        if (this.is3DZooming) {
          this.close3DZoom();
        } else if (this.Theme && this.Theme.decoderState.state.zoom) {
          this.Zoom && this.Zoom.stopZoom();
        }
        if (this.Theme) {
          this.Theme.setDecoderState({
            zoom: false
          });
        }
        this.use3DZoom = flag;
        this.Zoom = new Zoom(this);
        setTimeout(function () {
          if (flag) {
            if (document.getElementById("".concat(_this11.id, "-zoom-content"))) {
              document.getElementById("".concat(_this11.id, "-zoom-content")).title = '3D定位';
            }
          } else {
            if (document.getElementById("".concat(_this11.id, "-zoom-content"))) {
              document.getElementById("".concat(_this11.id, "-zoom-content")).title = '电子放大';
            }
          }
          //移动端切换缩放模式后自动开启对应缩放功能
          if (_this11.isMobile && flag) {
            _this11.enable3DZoom();
          }
          if (_this11.eventEmitter) {
            _this11.eventEmitter.emit('changeZoomType', {
              eventType: 'changeZoomType',
              code: 0,
              target: _this11,
              msg: '改变缩放模式'
            });
          }
        }, 500);
      }

      /**
       * @description 设置播放器封面
       * 
       * @param {string} url 封面url
       * @returns {void}
       */
    }, {
      key: "setPoster",
      value: function setPoster(url) {
        // this.pluginStatus.setPoster(url);
        if (isVersion2Available()) {
          if (document.getElementById("".concat(this.id))) {
            document.getElementById("".concat(this.id)).style.backgroundImage = "url(".concat(url, ")");
            document.getElementById("".concat(this.id)).style.backgroundSize = "100% 100%";
          }
        } else {
          if (document.getElementById("".concat(this.id, "canvas0"))) {
            document.getElementById("".concat(this.id, "canvas0")).style.backgroundImage = "url(".concat(url, ")");
            document.getElementById("".concat(this.id, "canvas0")).style.backgroundSize = "cover";
          }
        }
        if (this.eventEmitter) {
          this.eventEmitter.emit('setPoster', {
            eventType: 'setPoster',
            code: 0,
            target: this,
            msg: '设置播放器封面'
          });
        }
      }

      /**
       * @description 调整播放器尺寸
       * 
       * @param {number} width 播放器宽
       * @param {number} height 播放器高
       * @returns {void}
       */
    }, {
      key: "reSize",
      value: function reSize(width, height) {
        var headerHeight = 0;
        var timeLineHeight = 0;
        this.params.height = height;
        this.params.width = width;
        //总体高度包含模板
        if (this.Theme && this.Theme.isNeedRenderHeader && document.getElementById("".concat(this.id, "-headControl"))) {
          headerHeight = parseInt(document.getElementById("".concat(this.id, "-headControl")).style.height, 10);
        }
        if (this.Theme && this.Theme.isNeedRenderTimeLine && !this.isMobile) {
          timeLineHeight = 48;
        }
        height = height - headerHeight - timeLineHeight;
        this.width = width;
        this.height = height;
        if(document.getElementById("".concat(this.id, "-wrap")))document.getElementById("".concat(this.id, "-wrap")).style = "width:".concat(width, "px;position:relative;display:inline-block;vertical-align: bottom;");
        if(document.getElementById("".concat(this.id)))document.getElementById("".concat(this.id)).style.width = width + 'px';
        if(document.getElementById("".concat(this.id)))document.getElementById("".concat(this.id)).style.height = height + 'px';
        if (this.jSPlugin && this.jSPlugin.bPlay) {
          if (this.jSPlugin) {
            this.jSPlugin.iHeight = height;
            this.jSPlugin.iWidth = width;
          }
          this.jSPlugin.JS_Resize(width, height);
        } else {
          if (document.getElementById("".concat(this.id, "-player"))) {
            document.getElementById("".concat(this.id, "-player")).width = width;
            document.getElementById("".concat(this.id, "-player")).height = height;
            document.getElementById("".concat(this.id, "-player")).style.width = width + "px";
            document.getElementById("".concat(this.id, "-player")).style.height = height + "px";
            document.getElementById("".concat(this.id, "-container-0")).style.height = height + "px";
          }
          var scale = 1;
          if (document.getElementById("".concat(this.id, "canvas0"))) {
            var isNeedScale = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
            if (isNeedScale) {
              scale = 2;
            }
            document.getElementById("".concat(this.id, "canvas0")).style.width = width * scale + "px";
            document.getElementById("".concat(this.id, "canvas0")).style.height = height * scale + "px";
            document.getElementById("".concat(this.id, "canvas0")).width = width * scale;
            document.getElementById("".concat(this.id, "canvas0")).height = height * scale;
            document.getElementById("".concat(this.id, "canvas0")).parentNode.style.width = width * scale + "px";
            document.getElementById("".concat(this.id, "canvas0")).parentNode.style.height = height * scale + "px";
            document.getElementById("".concat(this.id, "canvas_draw0")).height = height * scale;
          }
          if (this.jSPlugin) {
            this.jSPlugin.iHeight = height * scale;
            this.jSPlugin.iWidth = width * scale;
          }
        }
        if (this.isInspect) {
          document.getElementById("".concat(this.id, "-wrap")).style = "width:".concat(width, "px; height:").concat(height, "px;position:relative;display:inline-block;vertical-align: bottom;");
          this.width -= this.inspectVideoWidth;
          this.height -= this.inspectVideoHeight;
          width = this.width;
          height = this.height;
          this.width = width;
          this.height = height;
          this.Theme.inspect.reSize(width, height);
        }
        if (this.eventEmitter) {
          this.eventEmitter.emit('reSize', {
            eventType: 'reSize',
            code: 0,
            target: this,
            msg: '调整播放器尺寸'
          });
        }
      }

      /**
       * @typedef PlaySpeedFastSlowResult
       * 
       * @property {number} code 0 成功， -1 失败
       * @property {Object} data
       * @property {number} data.speed
       * @property {string=} data.result
       */

      /**
       * @description 快放
       * @param {number} next 
       * @returns {Promise<PlaySpeedFastSlowResult>}  
       */
    }, {
      key: "fast",
      value: function fast(next) {
        var _this12 = this;
        var speed = this.speed;
        if (next) {
          var fastRT = this.jSPlugin.JS_Speed(next);
          if (this.Theme) {
            this.Theme.changeRecSpeed(next);
            this.Theme.nextRate = next;
          }
        } else {
          if (speed === 1) {
            speed = 2;
          } else if (speed === 2) {
            speed = 4;
          } else {
            console.log('当前已经是最大播放倍数');
            if (typeof this.params.handleError === 'function') {
              this.params.handleError({
                msg: "播放速度最大为4倍速度",
                retcode: 1003,
                id: this.id,
                type: "handleError"
              });
            }
            return new Promise(function (resolve, reject) {
              _this12.speed = speed;
              reject({
                code: -1,
                data: {
                  speed: speed,
                  result: "播放速度最大为4倍速度"
                }
              });
            });
          }
          var fastRT = this.jSPlugin.JS_Speed(speed);
          if (this.Theme) {
            this.Theme.changeRecSpeed(speed);
            this.Theme.nextRate = speed;
          }
        }
        return new Promise(function (resolve) {
          _this12.speed = speed;
          if (_this12.eventEmitter) {
            _this12.eventEmitter.emit('fast', {
              eventType: 'fast',
              code: 0,
              data: speed,
              target: _this12,
              msg: '倍速播放'
            });
          }
          resolve({
            code: 0,
            data: {
              speed: speed,
              result: fastRT
            }
          });
        });
      }

      /**
       * @description 慢放
       * @returns {Promise<PlaySpeedFastSlowResult>}
       */
    }, {
      key: "slow",
      value: function slow() {
        var _this13 = this;
        var speed = this.speed;
        if (speed === 4) {
          speed = 2;
        } else if (speed === 2) {
          speed = 1;
        } else {
          console.log('当前已经是最小播放倍数');
          if (typeof this.params.handleError === 'function') {
            this.params.handleError({
              msg: "播放速度最小为1倍速度",
              retcode: 1003,
              id: this.id,
              type: "handleError"
            });
          }
          return new Promise(function (resolve, reject) {
            _this13.speed = speed;
            reject({
              code: -1,
              data: {
                speed: speed,
                result: "播放速度最小为1倍速度"
              }
            });
          });
        }
        var slowRT = this.jSPlugin.JS_Speed(speed);
        return new Promise(function (resolve) {
          _this13.speed = speed;
          if (_this13.eventEmitter) {
            _this13.eventEmitter.emit('slow', {
              eventType: 'slow',
              code: 0,
              data: speed,
              target: _this13,
              msg: '倍速播放'
            });
          }
          resolve({
            code: 0,
            data: {
              speed: speed,
              result: slowRT
            }
          });
        });
      }

      /**
       * @param {string} startTime 
       * @param {string=} endTime 
       * @returns  {Promise<any>}   
       */
    }, {
      key: "seek",
      value: function seek(startTime, endTime) {
        var url = this.url;
        /** @type {string} */
        var currentDay = (getQueryString('begin', url) || new Date().Format('yyyyMMdd')).substr(0, 8);
        endTime = formatRecTime(currentDay, '235959');
        if (startTime.length === 6) {
          startTime = formatRecTime(currentDay, startTime);
        } else if (startTime.length === 16) {
          if (startTime.substr(0, 8) !== currentDay) {
            if (typeof this.params.handleError === 'function') {
              if (this.eventEmitter) {
                this.eventEmitter.emit('seek', {
                  eventType: 'seek',
                  code: -1,
                  target: this,
                  msg: 'seek时间不能跨日期'
                });
              }
              this.params.handleError({
                msg: "seek时间不能跨日期",
                retcode: -1,
                id: this.id,
                type: "handleError"
              });
            }
            return false;
          }
        } else {
          if (typeof this.params.handleError === 'function') {
            if (this.eventEmitter) {
              this.eventEmitter.emit('seek', {
                eventType: 'seek',
                code: -2,
                target: this,
                msg: 'seek时间格式错误'
              });
            }
            this.params.handleError({
              msg: "seek时间格式错误",
              retcode: -1,
              id: this.id,
              type: "handleError"
            });
          }
          return false;
        }

        /**
         * @description 格式化回放时间
         * @param {string} time 
         * @param {string} defaultTime 
         * @returns {string}
         */
        function formatRecTime(time, defaultTime) {
          // 用户格式 无需更改 => 20182626T000000Z
          // return time
          // 用户格式需要更改
          //用户时间长度为 14 20181226000000  =》 20181226000000
          // 用户长度为12     201812260000    =》 201812260000 + defaultTime后面2位
          // 用户长度为10     2018122600      =》 201812260000 + defaultTime后面4位
          // 用户长度为8     20181226         =》 201812260000 + defaultTime后面6位
          // 结果 20181226000000 14位
          // 插入 TZ
          var reg = /^[0-9]{8}T[0-9]{6}Z$/;
          if (reg.test(time)) {
            // 用户格式 无需更改 => 20182626T000000Z
            return time;
          } else if (/[0-9]{8,14}/.test(time)) {
            var start = 6 - (14 - time.length);
            var end = defaultTime.length;
            var standardTime = time + defaultTime.substring(start, end);
            return standardTime.slice(0, 8) + 'T' + standardTime.slice(8) + 'Z';
          }
          throw new Error('回放时间格式有误，请确认');
        }
        var seekRT = this.jSPlugin.JS_Seek(0, startTime, endTime);
        console.log("seekRT", seekRT);
        if (isPromise(seekRT)) {
          return seekRT;
        }
        return new Promise(function (resolve) {
          resolve(seekRT);
        });
      }

      /**
       * @description 全局全屏
       * @requires jsPlugin解码库
       * @returns {void}
       */
    }, {
      key: "fullScreen",
      value: function fullScreen() {
        var _this14 = this;
        var promise = requestFullScreenPromise(document.getElementById("".concat(this.id)));
        promise.then(function (data) {
          console.log("全屏promise", window.screen.availWidth);
          _this14.jSPlugin.JS_Resize(window.screen.availWidth, window.screen.availHeight);
          if (_this14.eventEmitter) {
            _this14.eventEmitter.emit('fullScreen', {
              eventType: 'fullScreen',
              code: 0,
              target: _this14,
              msg: '全局全屏'
            });
          }
          // 兼容旧版本callback
          if (typeof _this14.params.fullScreenCallBack === 'function') {
            _this14.params.fullScreenCallBack({
              id: _this14.id,
              type: 'fullScreen',
              code: 0
            });
          }
        });
        //  监听全屏事件触发
        var fullscreenchange = function fullscreenchange() {
          var isFullScreen = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
          if (!isFullScreen) {
            _this14.jSPlugin.JS_Resize(_this14.width, _this14.height);
          }
          // 兼容旧版本callback
          if (typeof _this14.params.fullScreenChangeCallBack === 'function') {
            _this14.params.fullScreenChangeCallBack({
              id: _this14.id,
              type: 'fullScreen',
              code: isFullScreen
            });
          }
        };
        ['fullscreenchange', 'webkitfullscreenchange', 'mozfullscreenchange'].forEach(function (item) {
          window.addEventListener(item, function (data) {
            return fullscreenchange();
          });
        });
      }

      /**
       * @description 退出全局全屏
       * @requires jsPlugin解码库
       * @returns {void}
       */
    }, {
      key: "cancelFullScreen",
      value: function cancelFullScreen() {
        var _this15 = this;
        var cancelPromise = cancelFullScreenPromise();
        cancelPromise.then(function (data) {
          console.log("取消全屏", data, _this15.jSPlugin);
          _this15.jSPlugin.JS_Resize(_this15.width, _this15.height);
          if (_this15.eventEmitter) {
            _this15.eventEmitter.emit('cancelFullScreen', {
              eventType: 'cancelFullScreen',
              code: 0,
              target: _this15,
              msg: '退出全局全屏'
            });
          }
        });
      }

      /**
       * @description 开启对讲
       * @returns {void}
       */
    }, {
      key: "startTalk",
      value: function startTalk() {
        this.Talk.startTalk();
      }

      /** 
       * @description 关闭对讲 
       * 
       * @returns {void}
       * 
       */
    }, {
      key: "stopTalk",
      value: function stopTalk() {
        this.Talk.stopTalk();
      }

      /** 
       * @description 销毁
       * 
       * @returns {void}
       */
    }, {
      key: "destroy",
      value: function destroy() {
        if (this.Theme) {
          if (this.Theme.decoderState.state.play) {
            //正在播放时先停止播放
            this.stop();
          }
          this.Theme = null;
          window.EZUIKit[this.params.id].state.EZUIKitPlayer.themeInit = false;
        }
        var destroyRT = this.jSPlugin.JS_DestroyWorker(0);
        if (this.eventEmitter) {
          this.eventEmitter.emit('destroy', {
            eventType: 'destroy',
            code: 0,
            target: this,
            msg: '销毁'
          });
        }
        if (isPromise(destroyRT)) {
          return destroyRT;
        }
        return new Promise(function (resolve) {
          resolve(destroyRT);
        });
      }

      /** 
       * 
       * @description 获取设备能力级 
       * 
       * @returns {void}
       */
    }, {
      key: "getDeviceCapacity",
      value: function getDeviceCapacity(params) {
        var _this16 = this;
        var apiDomain = this.env.domain;
        this.capacity = {};
        if (this.env) {
          apiDomain = this.env.domain;
        }
        var capacityUrl = apiDomain + "/api/lapp/device/capacity";
        var capacitySuccess = function capacitySuccess(data) {
          _this16.support3DZoom = false;
          if (document.getElementById("".concat(_this16.id, "-zoom-content"))) {
            document.getElementById("".concat(_this16.id, "-zoom-content")).title = '电子放大';
          }
          if (data.code == 200 && data.data) {
            _this16.capacity = data.data;
            if (_this16.isMobile && _this16.isCall) {
              if (!_this16.capacity['support_doorcall_playback'] || _this16.capacity['support_doorcall_playback'] != 1) {
                console.log('小窗口initMiniRec-------------设备能力集失败');
                if (!!_this16.isWebConsole) {
                  //控制台不执行
                  return;
                }
                setTimeout(function () {
                  if (document.getElementById("".concat(_this16.jSPlugin.id, "-wrap")) && document.getElementById("miniRecbox")) {
                    document.getElementById("".concat(_this16.jSPlugin.id, "-wrap")).removeChild(document.getElementById("miniClose"));
                    document.getElementById("".concat(_this16.jSPlugin.id, "-wrap")).removeChild(document.getElementById("miniRecbox"));
                    // document.getElementById(`${this.jSPlugin.id}-wrap`).removeChild(document.getElementById(`miniSwitch`))
                  }
                }, 1500);
              }
            }
            if (_this16.capacity && _this16.capacity.support_3d_position == '1' && _this16.url.indexOf('.live') > -1) {
              //判断是否支持3D定位
              _this16.support3DZoom = true;
              if (_this16.params.use3DZoom) {
                _this16.use3DZoom = true;
                if (document.getElementById("".concat(_this16.id, "-zoom-content"))) {
                  document.getElementById("".concat(_this16.id, "-zoom-content")).title = '3D定位';
                }
              }
            }
            if (_this16.eventEmitter) {
              _this16.eventEmitter.emit('getDeviceCapacity', {
                eventType: 'getDeviceCapacity',
                code: 0,
                data: data,
                target: _this16,
                msg: '获取设备能力级'
              });
            }
          }
        };
        var capacityParams = params || {
          accessToken: this.accessToken,
          deviceSerial: matchEzopenUrl(this.url).deviceSerial
        };
        request(capacityUrl, 'POST', capacityParams, '', capacitySuccess);
      }

      /**
       * @description 暂停
       * @param {boolean=} date 
       * @returns {Promise<any>}
       */
    }, {
      key: "pause",
      value: function pause(date) {
        var _this17 = this;
        // return this.jSPlugin.JS_Pause(0);
        // this.reSetTheme();
        return new Promise(function (resolve, reject) {
          // 兼容单线程未关闭声音无法再次开启声音问题
          _this17.jSPlugin.JS_CloseSound(0);
          _this17.jSPlugin.JS_Pause(0, date).then(function (data) {
            if (_this17.eventEmitter) {
              _this17.eventEmitter.emit('pause', {
                eventType: 'pause',
                code: 0,
                target: _this17,
                msg: '暂停'
              });
            }
            // 暂停成功
            if (_this17.Theme) {
              _this17.Theme.setDecoderState({
                play: false,
                pauseDate: data.pauseDate
              });
            }
            resolve();
          })["catch"](function (err) {
            // 暂停失败
            if (_this17.eventEmitter) {
              _this17.eventEmitter.emit('pause', {
                eventType: 'pause',
                code: -1,
                target: _this17,
                msg: err || '暂停失败'
              });
            }
            console.log(err);
            reject(err);
          });
        });
      }

      /**
       * @description 恢复
       * 
       * @private 
       * @param {number} time 
       * @returns {Promise<any>}  
       */
    }, {
      key: "_resume",
      value: function _resume(time) {
        var _this18 = this;
        return new Promise(function (resolve, reject) {
          _this18.pluginStatus.setPlayStatus({
            play: false,
            loading: true
          });
          if (_this18.validateCode && _this18.validateCode != '') {
            _this18.jSPlugin.JS_SetSecretKey(0, _this18.validateCode);
          }
          _this18.jSPlugin.JS_Resume(time).then(function (data) {
            setTimeout(function () {
              // 暂停恢复后，保持倍速
              if (_this18.url.indexOf(".rec") !== -1 && _this18.speed != 1) {
                _this18.jSPlugin.JS_Speed(_this18.speed);
              }
            }, 500);
            // 主题播放状态及声音状态
            if (_this18.Theme) {
              _this18.Theme.setDecoderState({
                play: true
              });
              _this18.fast(_this18.speed);
              var isOpenSound = _this18.Theme.decoderState.state.sound;
              if (isOpenSound) {
                setTimeout(function () {
                  _this18.openSound();
                }, 500);
              }
            }
            if (_this18.eventEmitter) {
              _this18.eventEmitter.emit('resume', {
                eventType: 'resume',
                code: 0,
                target: _this18,
                msg: '恢复播放'
              });
            }
            resolve(data);
          })["catch"](function (err) {
            console.log("resume err", err);
            if (_this18.eventEmitter) {
              _this18.eventEmitter.emit('resume', {
                eventType: 'resume',
                code: -1,
                target: _this18,
                msg: err || '恢复播放失败'
              });
            }
            reject(err);
          });
        });
        // return this.jSPlugin.JS_Resume(time);
      }

      /**********2.2.2新增API**********/

      /**
       * @description 获取设备支持的清晰度列表
       * 
       * @returns {Array<object>}
       */
    }, {
      key: "getDefinitionList",
      value: function getDefinitionList() {
        if (this.eventEmitter) {
          this.eventEmitter.emit('getDefinitionList', {
            eventType: 'getDefinitionList',
            code: 0,
            data: this.Theme ? this.Theme.decoderState.state.hdList : [],
            target: this,
            msg: '获取设备支持的清晰度列表'
          });
        }
        if (this.Theme) {
          return this.Theme.decoderState.state.hdList;
        } else {
          return [];
        }
      }

      /**
       * @description 获取当前清晰度
       * 
       * @warn 呼叫模版无法获取正确的清晰度， 获取的值不能当做切换清晰度的参数
       * @version 7.5.0
       * @returns {false | object}
       */
    }, {
      key: "getDefinition",
      value: function getDefinition() {
        if (this.eventEmitter) {
          this.eventEmitter.emit('getDefinition', {
            eventType: 'getDefinition',
            code: 0,
            data: this.Theme ? this.Theme.decoderState.state.hd : false,
            target: this,
            msg: '获取设备支持的清晰度列表'
          });
        }
        if (this.Theme) {
          return this.Theme.decoderState.state.hd;
        } else {
          return false;
        }
      }

      /**
      * @description 切换清晰度
      * 
      * @version 7.5.0
      * 
      * @param {'hd'| 'sd' | object} type 
      * @returns {void}
      */
    }, {
      key: "setDefinition",
      value: function setDefinition(type) {
        var definition = this.getDefinitionList().find(function (item) {
          if (typeof type === 'string') {
            return item.level === type;
          }
          if (_typeof(type) === 'object') {
            return item.level === type.level;
          }
        });
        if (!definition) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('setDefinition', {
              eventType: 'setDefinition',
              code: -1,
              target: this,
              msg: '请输入正确的清晰度'
            });
          }
          console.log('请输入正确的清晰度');
          return;
        }
        this.changeVideoLevel(definition);
        if (this.Theme) {
          this.Theme.setDecoderState({
            hd: definition
          });
          this.Theme.resetMobileZoomStatus();
        }

        //切换清晰度时停止录像并关闭录像计时
        if (this.Theme && this.Theme.decoderState.state.recordvideo) {
          this.Theme.setDecoderState({
            recordvideo: false
          });
        }
        if (this.eventEmitter) {
          this.eventEmitter.emit('setDefinition', {
            eventType: 'setDefinition',
            code: 0,
            target: this,
            msg: '切换清晰度'
          });
        }
      }

      /**
      * @description 获取当前云台状态, 是否开启
      * @version 7.5.0
      * @returns {boolean}
      */
    }, {
      key: "getPtzStatus",
      value: function getPtzStatus() {
        if (this.Theme) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('getPtzStatus', {
              eventType: 'getPtzStatus',
              code: 0,
              data: this.Theme ? this.Theme.Ptz.showPtz : false,
              target: this,
              msg: '获取当前云台状态'
            });
          }
          console.log('当前是否开启云台：', this.Theme.Ptz.showPtz);
          return this.Theme.Ptz.showPtz;
        } else {
          if (this.eventEmitter) {
            this.eventEmitter.emit('getPtzStatus', {
              eventType: 'getPtzStatus',
              code: -1,
              data: this.Theme ? this.Theme.Ptz.showPtz : false,
              target: this,
              msg: '未加载Theme模块，无法获取云台状态'
            });
          }
        }
      }

      /**
       * @description 开启云台
       * @version 7.5.0
       * @returns {boolean | ReturnResult}
       */
    }, {
      key: "openPtz",
      value: function openPtz() {
        if (this.Theme) {
          if (this.isMobile && this.Theme && !this.Theme.decoderState.state.expend) {
            console.log("移动端，非全屏状态不展示云台");
            // 移动端，非全屏状态不展示云台
            if (this.eventEmitter) {
              this.eventEmitter.emit('openPtz', {
                eventType: 'openPtz',
                code: -1,
                target: this,
                msg: '移动端，非全屏状态不展示云台'
              });
            }
            return false;
          }
          console.log('显示云台');
          this.Theme.setDecoderState({
            pantile: true
          });
          this.Theme.Ptz.show();
        } else {
          if (this.eventEmitter) {
            this.eventEmitter.emit('openPtz', {
              eventType: 'openPtz',
              code: -1,
              target: this,
              msg: '未加载Theme模块，无法操作云台'
            });
          }
          return {
            code: -1,
            msg: "未加载Theme模块，无法操作云台"
          };
        }
      }

      /**
       * @description 关闭云台
       * @version 7.5.0
       * @returns {ReturnResult=}
       */
    }, {
      key: "closePtz",
      value: function closePtz() {
        if (this.Theme) {
          console.log('隐藏云台');
          this.Theme.setDecoderState({
            pantile: false
          });
          this.Theme.Ptz.hide();
        } else {
          if (this.eventEmitter) {
            this.eventEmitter.emit('closePtz', {
              eventType: 'closePtz',
              code: -1,
              target: this,
              msg: '未加载Theme模块，无法操作云台'
            });
          }
          return {
            code: -1,
            msg: "未加载Theme模块，无法操作云台"
          };
        }
      }

      /**
       * @description 获取浏览器网页全屏状态
       * 
       * @version 7.5.0
       * 
       * @returns {boolean}
       */
    }, {
      key: "isBrowserFullscreen",
      value: function isBrowserFullscreen() {
        if (this.Theme) {
          console.log('当前是否为浏览器全屏状态：', this.Theme.decoderState.state.webExpend);
          if (this.eventEmitter) {
            this.eventEmitter.emit('isBrowserFullscreen', {
              eventType: 'isBrowserFullscreen',
              code: 0,
              target: this,
              data: this.Theme.decoderState.state.webExpend,
              msg: '获取浏览器网页全屏状态'
            });
          }
          return this.Theme.decoderState.state.webExpend;
        }
      }

      /**
       * @description 开启网页全屏
       * 
       * @version 7.5.0
       * 
       * @returns {void}
       */
    }, {
      key: "browserFullscreen",
      value: function browserFullscreen() {
        if (this.Theme) {
          this.Theme.webExpend();
          this.Theme.setDecoderState({
            webExpend: true
          });
          if (this.eventEmitter) {
            this.eventEmitter.emit('browserFullscreen', {
              eventType: 'browserFullscreen',
              code: 0,
              target: this,
              msg: '开启网页全屏'
            });
          }
        }
      }

      /**
      * @description 退出网页全屏
      * 
      * @version 7.5.0
      * 
      * @param {number} width 播放器宽
      * @param {number} height 播放器高 
      * @returns {void}
      */
    }, {
      key: "exitBrowserFullscreen",
      value: function exitBrowserFullscreen(width, height) {
        var _this19 = this;
        var cancelPromise = cancelFullScreenPromise();
        cancelPromise.then(function (data) {
          _this19.jSPlugin.JS_Resize(width ? width : _this19.width, height ? height : _this19.height);
          if (_this19.Theme) {
            if (_this19.Theme.Rec) {
              _this19.Theme.Rec.recAutoSize();
            }
            _this19.Theme.setDecoderState({
              webExpend: false
            });
          }
          if (_this19.eventEmitter) {
            _this19.eventEmitter.emit('exitBrowserFullscreen', {
              eventType: 'exitBrowserFullscreen',
              code: 0,
              target: _this19,
              msg: '退出网页全屏'
            });
          }
        });
      }

      /**
       * @description 获取当前播放速率
       * 
       * @version 7.5.0
       * 
       * @returns {number}
       */
    }, {
      key: "getPlayRate",
      value: function getPlayRate() {
        console.log('当前播放速度：', this.speed);
        if (this.eventEmitter) {
          this.eventEmitter.emit('getPlayRate', {
            eventType: 'getPlayRate',
            code: 0,
            data: this.speed,
            target: this,
            msg: '获取当前播放速率'
          });
        }
        return this.speed;
      }

      //  @param {number} command  // 0-上下, 1-左右, 2-中心
      /**
       * @description 镜像翻转
       * @since 7.6.7
       * @returns {Promise}
       */
    }, {
      key: "setMiooroFlip",
      value: function setMiooroFlip(command) {
        if (typeof command !== 'number') {
          if (this.eventEmitter) {
            this.eventEmitter.emit('setMiooroFlip', {
              eventType: 'setMiooroFlip',
              code: -1,
              target: this,
              msg: '翻转参数类型错误'
            });
          }
          return Promise.reject({
            code: -1,
            msg: '翻转参数类型错误'
          });
        }
        if (this.eventEmitter) {
          this.eventEmitter.emit('setMiooroFlip', {
            eventType: 'setMiooroFlip',
            code: 0,
            target: this,
            msg: '镜像翻转'
          });
        }
        return postDevicePtzMirror(this.env.domain, this.accessToken, this.deviceSerial, this.channelNo, command);
      }

      /**
       * @description 设置鱼眼矫正类型
       * @public
       * @since 7.7.2
       * 
       * @example
       * player.setFECCorrectType({place: 1, type: 2}, 'canvas1,canvas2,canvas3,canvas4'); //  壁装4分屏
       * 
       * @param {FECCorrectType} type 鱼眼矫正类型 
       * @param {string=} ids 分屏的画布id列表，逗号分隔,如'canvas1,canvas2,canvas3,canvas4', 如果有分屏这个是必填项
       * 
       * @returns {Promise<boolean>}
       */
    }, {
      key: "setFECCorrectType",
      value: function setFECCorrectType(type, ids) {
        var _this20 = this;
        // 注意 support_fisheye_mode 返回是字符串
        if (!this.capacity || this.capacity && this.capacity.support_fisheye_mode !== "1") {
          if (this.eventEmitter) {
            this.eventEmitter.emit('setFECCorrectType', {
              eventType: 'setFECCorrectType',
              code: -1,
              target: this,
              msg: '设备不支持鱼眼模式'
            });
          }
          return Promise.reject({
            code: -1,
            msg: '设备不支持鱼眼模式'
          });
        }

        // 1. 判断是不是v3  2. 判断是不是硬解
        if (!this.jSPlugin.JS_FECCorrectType || (this.jSPlugin.isHardH264 || this.jSPlugin.isHardH265) && this.jSPlugin.useHardDev) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('setFECCorrectType', {
              eventType: 'setFECCorrectType',
              code: -1,
              target: this,
              msg: '现只有V3软解支持鱼眼矫正'
            });
          }
          return Promise.reject({
            code: -1,
            msg: '现只有V3软解支持鱼眼矫正'
          });
        }
        var list = type.place === 1 ? FEC_PLACE_WALL_CORRECT_TYPE_LIST : type.place === 3 ? FEC_PLACE_CEILING_CORRECT_TYPE_LIST : [];
        var correctType = list.find(function (item) {
          return item.type === type.type && item.place === type.place;
        });
        if (!correctType) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('setFECCorrectType', {
              eventType: 'setFECCorrectType',
              code: -1,
              target: this,
              msg: '鱼眼矫正类型暂时不支持'
            });
          }
          return Promise.reject({
            code: -1,
            msg: '鱼眼矫正类型暂时不支持'
          });
        }

        // TODO: 需要分屏时 但是使用没有传ids
        if (correctType.split > 0 && _typeof(ids) === undefined) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('setFECCorrectType', {
              eventType: 'setFECCorrectType',
              code: -1,
              target: this,
              msg: "\u9C7C\u773C\u77EB\u6B63\u7C7B\u578B\u9700\u8981\u5206\u5C4F\uFF0C\u4F46\u662F\u6CA1\u6709\u4F20".concat(correctType.split - 1, "\u4E2A\u5206\u5C4F\u7684canvas id")
            });
          }
          return Promise.reject({
            code: -1,
            msg: "\u9C7C\u773C\u77EB\u6B63\u7C7B\u578B\u9700\u8981\u5206\u5C4F\uFF0C\u4F46\u662F\u6CA1\u6709\u4F20".concat(correctType.split - 1, "\u4E2A\u5206\u5C4F\u7684canvas id")
          });
        }
        this.jSPlugin.FECSplitIds = ids;
        this.jSPlugin.correctType = correctType;
        this._FECCorrectType = correctType;
        this._FECSplitIds = ids;

        // 先暂停 然后在播放
        return this.stop().then(function () {
          return _this20.play().then(function (res) {
            // 
            if (!(correctType.place === 1 && correctType.correctType === 0 || correctType.place === 3 && correctType.correctType === 0)) {
              _this20.Theme.disabledFECBtn();
            } else {
              _this20.Theme.resumeFECBtn();
            }
            if (_this20.eventEmitter) {
              _this20.eventEmitter.emit('setFECCorrectType', {
                eventType: 'setFECCorrectType',
                code: 0,
                target: _this20,
                msg: '切换鱼眼矫正类型'
              });
            }
            return res;
          });
        });
      }

      /**
       * @description 设置 3D 矫正视角参数
       * @since 7.7.2
       * @param {FECViewParam} param 3D矫正视角参数
       * @returns {Promise<boolean | undefined>}  true: 成功  false: 失败  undefined: 不支持
       */
    }, {
      key: "setFEC3DViewParam",
      value: function setFEC3DViewParam(param) {
        if (!this._FECCorrectType || (this.jSPlugin.isHardH264 || this.jSPlugin.isHardH265) && this.jSPlugin.useHardDev) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('setFEC3DViewParam', {
              eventType: 'setFEC3DViewParam',
              code: -1,
              target: this,
              msg: '现只有V3软解支持鱼眼矫正'
            });
          }
          return Promise.reject({
            code: -1,
            msg: '现只有V3软解支持鱼眼矫正'
          });
        }
        // 现在限定 顶装-圆柱和壁装广角， 如有新的请自行添加
        if (this.jSPlugin.FEC_Set3DViewParam && this._FECCorrectType && (this._FECCorrectType.place === 3 && this._FECCorrectType.correctType === FEC_CORRECT_CYLINDER || this._FECCorrectType.place === 1 && this._FECCorrectType.correctType === FEC_CORRECT_ARCSPHERE_HORIZONTAL)) {
          // 3D
          if (this.eventEmitter) {
            this.eventEmitter.emit('setFEC3DViewParam', {
              eventType: 'setFEC3DViewParam',
              code: 0,
              target: this,
              msg: '设置3D矫正视角参数'
            });
          }
          return this.jSPlugin.FEC_Set3DViewParam(param);
        }
        if (this.eventEmitter) {
          this.eventEmitter.emit('setFEC3DViewParam', {
            eventType: 'setFEC3DViewParam',
            code: -1,
            target: this,
            msg: '该矫正类型不能设置3D矫正视角参数'
          });
        }
        return Promise.reject({
          code: -1,
          msg: '该矫正类型不能设置3D矫正视角参数'
        });
      }

      /**
      * @description 获取 3D 矫正视角参数
      * @since 7.7.2
      * @param {FECGetViewParam} param 3D矫正视角参数
      * @returns {Promise<object>} 
      */
    }, {
      key: "getFEC3DViewParam",
      value: function getFEC3DViewParam(param) {
        if (!this._FECCorrectType || (this.jSPlugin.isHardH264 || this.jSPlugin.isHardH265) && this.jSPlugin.useHardDev) {
          if (this.eventEmitter) {
            this.eventEmitter.emit('getFEC3DViewParam', {
              eventType: 'getFEC3DViewParam',
              code: -1,
              target: this,
              msg: '现只有V3软解支持鱼眼矫正获取3D矫正视角参数'
            });
          }
          return Promise.reject({
            code: -1,
            msg: '现只有V3软解支持鱼眼矫正获取3D矫正视角参数'
          });
        }
        // 现在限定 顶装-圆柱和壁装广角， 如有新的请自行添加
        if (this.jSPlugin.FEC_Set3DViewParam && this._FECCorrectType && (this._FECCorrectType.place === 3 && this._FECCorrectType.correctType === FEC_CORRECT_CYLINDER || this._FECCorrectType.place === 1 && this._FECCorrectType.correctType === FEC_CORRECT_ARCSPHERE_HORIZONTAL)) {
          // 3D
          if (this.eventEmitter) {
            this.eventEmitter.emit('getFEC3DViewParam', {
              eventType: 'getFEC3DViewParam',
              code: 0,
              target: this,
              data: this.jSPlugin.FEC_Get3DViewParam(param),
              msg: '获取3D矫正视角参数'
            });
          }
          return this.jSPlugin.FEC_Get3DViewParam(param);
        }
        if (this.eventEmitter) {
          this.eventEmitter.emit('getFEC3DViewParam', {
            eventType: 'getFEC3DViewParam',
            code: -1,
            target: this,
            msg: '该矫正类型不能获取3D矫正视角参数'
          });
        }
        return Promise.reject({
          code: -1,
          msg: '该矫正类型不能获取3D矫正视角参数'
        });
      }

      /**
      * @description 切换对讲模式
      * @param {object} params 切换对讲模式参数
      * talkMode：目标对讲模式
      * @returns {Promise<object>} 
      */
    }, {
      key: "switchTalkMode",
      value: function switchTalkMode(talkMode) {
        //获取当前设备对讲模式
        fetch().then(function (res) {
          if (res.mode == 1) {
            //如果当前是半双工模式，则切换为全双工
            fetch().then(function (res) {
              if (res.code == 200) {
                console.log('切换为全双工模式成功');
              } else {
                console.log('切换为全双工模式失败');
              }
            });
          } else {
            console.log('当前是全双工模式，无法切换');
          }
        });
      }

      /**
      * @description 获取当前对讲模式
      * @param {object} null
      * @returns {Promise<object>} 
      */
    }, {
      key: "getTalkMode",
      value: function getTalkMode() {
        fetch().then(function (res) {
          if (res.code == 200) {
            if (res.talkMode == 1) {
              console.log('当前是全双工模式');
            } else {
              console.log('当前是半双工模式');
            }
          } else {
            console.log('获取当前设备对讲模式失败');
          }
        });
      }
    }]);
    return EZUIKitPlayer;
  }();

  var oWebControl = null;
  // var accessToken = '';

  /**
   * video 初始化及配置
   * @param {*video挂载的dom id} id
   * @param {*连接成功的回调} cbConnectSuccess
   * @param {*连接报错的回调} cbConnectError
   * @param {*连接关闭的回调} cbConnectClose
   */
  function WebControlInit(id, cbConnectSuccess, cbConnectError, cbConnectClose) {
    return new WebControl({
      szPluginContainer: id,
      iServicePortStart: 14510,
      // 对应 LocalServiceConfig.xml 中的ServicePortStart值
      iServicePortEnd: 14519,
      // 对应 LocalServiceConfig.xml 中的ServicePortEnd值
      cbConnectSuccess: cbConnectSuccess,
      cbConnectError: cbConnectError,
      cbConnectClose: cbConnectClose
    });
  }
  /**
   * 离开页面时调用 断开链接的方法
   * @param {*视频插件实例} oWebControl
   */
  function WebControlDistory() {
    if (oWebControl != null) {
      oWebControl.JS_DestroyWnd().then(function () {
        console.log('JS_DestroyWnd');
      }, function () {});
      oWebControl.JS_StopService('window').then(function () {
        oWebControl.JS_Disconnect().then(function () {
          console.log('JS_Disconnect');
        }, function () {});
      });
    }
  }
  // 监听视频控件的事件-todo
  function cbIntegrationCallBack(oData) {
    if (oData.responseMsg.eventName === 'FireTransFunction') ;

    // if (typeof onHDCallbackMessage === 'function' && oData && oData.responseMsg) {
    //   onHDCallbackMessage(oData.responseMsg)
    // }
    console.log(oData.responseMsg);
  }
  function cbConnectSuccess() {
    // 设置窗口控制回调
    oWebControl.JS_SetWindowControlCallback({
      cbIntegrationCallBack: cbIntegrationCallBack
    });
    //创建视频窗口
    oWebControl.JS_StartService('window', {
      dllPath: './chain/cloudTransform.dll'
    }).then(function () {
      oWebControl.JS_CreateWnd('playWnd', 900, 500).then(function () {
        console.log('JS_CreateWnd success');
      });
    });
  }
  function cbConnectError() {
    console.log('cbConnectError');
    oWebControl = null;
    console.error('确认本地进程是否已安装并开启成功！');
  }
  function cbConnectClose(bNormalClose) {
    // 连接异常断开：bNormalClose = false
    // JS_Disconnect正常断开：bNormalClose = true
    console.log('cbConnectClose');
    oWebControl = null;
  }

  // //销毁视频控件
  // function WebControlDistory() {
  //   // var bIE = !!window.ActiveXObject || 'ActiveXObject' in window // 是否为IE浏览器
  //   if (oWebControl != null) {
  //     oWebControl.JS_DestroyWnd().then(
  //       function () {
  //         console.log('JS_DestroyWnd');
  //       },
  //       function () { }
  //     );
  //     oWebControl.JS_StopService('window').then(function () {
  //       oWebControl.JS_Disconnect().then(
  //         function () {
  //           console.log('JS_Disconnect');
  //         },
  //         function () { }
  //       );
  //     });
  //   }
  // }
  window.onscroll = function () {
    if (oWebControl != null) {
      oWebControl.JS_Resize(900, 500);
    }
  };
  window.onresize = function () {
    if (oWebControl != null) {
      oWebControl.JS_Resize(900, 500);
    }
  };
  window.onunload = function () {
    try {
      oWebControl.JS_HideWnd();
      WebControlDistory();
    } catch (error) {
      console.error(error);
    }
  };
  window.onpagehide = function () {
    try {
      oWebControl.JS_HideWnd();
    } catch (error) {
      console.error(error);
    }
  };
  var EZUIKitHD = /*#__PURE__*/function () {
    function EZUIKitHD(params) {
      var _this = this;
      _classCallCheck$1(this, EZUIKitHD);
      /**
       * 切换模式
       * @param {*} num  0： 预览 1：回放
       */
      _defineProperty(this, "changeModel", function (num, playParams) {
        var self = _this;
        _this.switchVideo = parseInt(num);
        // if (num == 0) {
        //   this.setLayout(this.layout);
        // } else {
        //   this.setLayout(1)
        // }

        if (oWebControl) {
          oWebControl.JS_RequestInterface({
            funcName: 'ChangeModel',
            arguments: encodeURI(JSON.stringify({
              model: num
            }))
          }).then(function (oData) {
            // self.play();
            if (num == 0) {
              // 预览
              self.play({
                deviceSerial: playParams.deviceSerial,
                channelNo: playParams.channelNo,
                validateCode: playParams.validateCode
              });
            } else {
              // 回放
              self.play({
                deviceSerial: playParams.deviceSerial,
                channelNo: playParams.channelNo,
                validateCode: playParams.validateCode,
                startTime: playParams.startTime,
                endTime: playParams.endTime
              });
            }
          });
        }
      });
      /**
       * 设置视频初始化参数
       */
      _defineProperty(this, "init", function (initParams) {
        var _argumentsPram;
        var self = _this;
        if (!initParams.appKey || !initParams.accessToken) {
          self.showTips(false, '请输入appkey和token');
          return;
        }
        if (typeof initParams.appKey !== 'undefined') {
          _this.appKey = initParams.appKey;
        }
        if (typeof initParams.accessToken !== 'undefined') {
          _this.accessToken = initParams.accessToken;
        }
        if (typeof initParams.platformId !== 'undefined') {
          _this.platformId = initParams.platformId;
        }

        // const onHDCallbackMessage = typeof initParams.onCallbackMessage === 'function';
        // if (onHDCallbackMessage) {
        //   onHDCallbackMessage = initParams.onHDCallbackMessage
        // }

        // 初始化入参
        var argumentsPram = (_argumentsPram = {
          layout: +self.layout,
          userName: "",
          waterMark: ""
        }, _defineProperty(_argumentsPram, "waterMark", "1"), _defineProperty(_argumentsPram, "iWndType", 0), _defineProperty(_argumentsPram, "intelligenceEnable", 1), _defineProperty(_argumentsPram, "isRecord", 1), _defineProperty(_argumentsPram, "isSetPos", 1), _defineProperty(_argumentsPram, "motionDetectEnable", 0), _defineProperty(_argumentsPram, "playBackAlarmOverlyingEnable", 0), _defineProperty(_argumentsPram, "response", {
          code: 0,
          message: null,
          data: {
            appKey: initParams.appKey,
            ezvizToken: initParams.accessToken,
            videoLevel: 0,
            logLevel: 3,
            showMainTool: 1,
            showSubTool: 1,
            waterMark: "1",
            userName: "openteam",
            platformId: initParams.platformId
          }
        }), _argumentsPram);
        console.log('初始化入参', argumentsPram);
        window.ezuikitMonitor.report({
          protocol: 'hd',
          appKey: initParams.appKey,
          action: 1,
          logInfo: {
            argumentsPram: argumentsPram
          }
        });
        // 调用视频控件初始化方法
        oWebControl.JS_RequestInterface({
          funcName: 'Init',
          arguments: encodeURI(JSON.stringify(argumentsPram))
        }).then(function (oData) {
          console.log(oData.responseMsg);
          self.showTips(true, '视频初始化成功！');
        });
      });
      /**
       * 播放门店视频
       */
      _defineProperty(this, "play", function (playParams) {
        var self = _this;
        if (!playParams.deviceSerial || !playParams.channelNo) {
          return;
        }
        if (typeof playParams.deviceSerial !== 'undefined') {
          _this.deviceSerial = playParams.deviceSerial;
        }
        if (typeof playParams.channelNo !== 'undefined') {
          _this.channelNo = playParams.channelNo;
        }
        if (typeof playParams.startTime !== 'undefined' && playParams.startTime) {
          _this.startTime = playParams.startTime + ' 00:00:00';
        }
        if (typeof playParams.endTime !== 'undefined' && playParams.endTime) {
          _this.endTime = playParams.endTime + ' 23:59:59';
        }
        if (typeof playParams.validateCode !== 'undefined' && playParams.validateCode) {
          _this.validateCode = playParams.validateCode;
        }
        // 预览入参
        var argumentsPram = {
          response: {
            code: 0,
            message: null,
            data: {
              deviceSerial: playParams.deviceSerial,
              channelCode: playParams.channelNo,
              channelNo: +playParams.channelNo,
              codeIsEncrypt: 0,
              validateCode: playParams.validateCode,
              deviceClass: self.deviceClass,
              deviceType: "10222",
              //deviceType:"10240",
              channelId: "2222222222",
              channelName: "channelNameTest",
              storeName: "storeName",
              storeId: "storeid",
              // startTime: '2022-09-13 20:00:00',
              // endTime: '2022-09-13 21:40:00',
              startTime: _this.startTime,
              endTime: _this.endTime

              //Limited_start:limitStart,
              //Limited_end:limitEnd,
            }
          }
        };

        if (self.deviceClass === '1') {
          // 国标协议对应的两个字段
          argumentsPram.response.data.channelCode = self.channelNo;
          argumentsPram.response.data.platformId = self.platformId;
        } else {
          // 海康协议对应的一个字段
          argumentsPram.response.data.channelNo = +self.channelNo;
        }
        // 回放时对应的两个字段
        if (_this.switchVideo === 1) {
          if (_this.startTime) argumentsPram.response.data.startTime = _this.startTime;
          if (_this.endTime) argumentsPram.response.data.endTime = _this.endTime;
        }
        console.log('预览/回放入参', argumentsPram);
        // 调用视频控件预览方法
        oWebControl.JS_RequestInterface({
          funcName: _this.switchVideo === 0 ? 'StartPreview' : 'StartPlayback',
          arguments: encodeURI(JSON.stringify(argumentsPram))
        }).then(function (oData) {
          console.log(oData.responseMsg);
          self.showTips(true, '预览/回放成功！');
          // 这个回调不能确定为播放成功
          // window.ezuikitMonitor.report({
          //   protocol: 'hd',
          //   serial: playParams.deviceSerial,
          //   no: playParams.channelNo,
          //   action: 2,
          //   logInfo: {
          //     playParams: playParams
          //   }
          // });
        })["catch"](function (res) {
          console.log('开始播放：', res);
        });
      });
      /**
       * 设置事件回调信息
       */
      _defineProperty(this, "showCBInfo", function (message) {
        _this.callbackMessage = _this.callbackMessage + JSON.stringify(message) + '\n\n';
        console.log(_this.callbackMessage);
      });
      _defineProperty(this, "showTips", function (status, message) {
        // let self = this;
        // this.successTip = status;
        // this.tips = message;
        // this.tipsShow = true;
        // setTimeout(() => {
        //   self.tipsShow = false;
        // }, 1000);
      });
      /**
       * 隐藏视频
       */
      _defineProperty(this, "hideVideo", function () {
        oWebControl.JS_HideWnd();
      });
      /**
       * 显示视频
       */
      _defineProperty(this, "showVideo", function () {
        oWebControl.JS_ShowWnd();
      });
      /**
       * 获取窗口数
       */
      _defineProperty(this, "GetLayout", function () {
        var data = null;
        oWebControl.JS_RequestInterface({
          funcName: 'GetLayout',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: data
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      /**
       * 抓图
       */
      _defineProperty(this, "capturePicture", function (wndId) {
        var data = null;
        oWebControl.JS_RequestInterface({
          funcName: 'CaptureJPGEx',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: data
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "stop", function () {
        var wndId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
        oWebControl.JS_RequestInterface({
          funcName: 'StopPlay',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: parseInt(wndId) //传入1表示停止窗口1，传入-1表示停止当前活动窗口
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "setLayout", function (num) {
        var layout = parseInt(num);
        if (isNaN(layout) || layout == 0 || layout >= 13) {
          console.log('不支持实际布局大于16的窗口数');
          return;
        }
        _this.layout = layout;
        oWebControl.JS_RequestInterface({
          funcName: 'SetLayout',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                layout: layout //参数int为布局编号，其定义参见控件初始化函数 init方法中指定的编号。
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "setSoundVolumn", function () {
        var wndId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : -1;
        var num = arguments.length > 1 ? arguments[1] : undefined;
        oWebControl.JS_RequestInterface({
          funcName: 'SoundVolumn',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: parseInt(wndId),
                //传入1表示停止窗口1，传入-1表示停止当前活动窗口
                volumn: parseInt(num)
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "testMute", function () {
        var num = parseInt(prompt('请输入窗口ID'));
        oWebControl.JS_RequestInterface({
          funcName: 'MuteOnOff',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: num
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "testSelectWnd", function () {
        var num = parseInt(prompt('请输入窗口ID'));
        oWebControl.JS_RequestInterface({
          funcName: 'SelectPlayWnd',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: num
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "setVideoLevel", function (wndId, level) {
        oWebControl.JS_RequestInterface({
          funcName: 'SetVideoLevel',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: _this.switchVideo == 1 ? 0 : parseInt(wndId),
                level: parseInt(level, 10) //0：流畅 1：均衡 2：高品质 3：超清
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "startTalk", function (wndId) {
        oWebControl.JS_RequestInterface({
          funcName: 'StartTalk',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: parseInt(wndId)
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "stopTalk", function (wndId) {
        oWebControl.JS_RequestInterface({
          funcName: 'StopTalk',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: parseInt(wndId)
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "startSave", function (wndId) {
        oWebControl.JS_RequestInterface({
          funcName: 'StartRecord',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: parseInt(wndId)
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      _defineProperty(this, "stopSave", function (wndId) {
        oWebControl.JS_RequestInterface({
          funcName: 'StopRecord',
          arguments: encodeURI(JSON.stringify({
            response: {
              code: 0,
              message: null,
              data: {
                wndId: parseInt(wndId)
              }
            }
          }))
        }).then(function (oData) {
          console.log(JSON.stringify(oData.responseMsg));
          console.log(oData.responseMsg);
        });
      });
      this.appKey = 'b9a3ad6e8026410095d8252169fa430a', this.accessToken = 'at.2vtum8873rrcwbrv431qb6pn94dkbv23-8dw2twn355-1u3x014-wrthellzk', this.deviceSerial = 'C33368372', this.channelNo = '1', this.validateCode = ''; // 设备验证码
      this.deviceClass = '0';
      this.platformId = '';
      this.startTime = '';
      this.endTime = '';
      this.layout = 2;
      this.switchVideo = 0; // 0实时预览 1录像回放

      this.tips = '调用成功';
      this.successTip = false;
      this.tipsShow = false;
      oWebControl = WebControlInit('playWnd', cbConnectSuccess, cbConnectError, cbConnectClose);
    }
    _createClass$1(EZUIKitHD, [{
      key: "alarmMsg",
      value: function alarmMsg() {
        var res = {
          "request": {
            "body": {
              "alarmTypes": [10800, 0, 0, 0, 0],
              "channelId": "066dde0465dd4abaab6afe355baf9d0b",
              "endTime": "1621007999000",
              "startTime": "1620921600000"
            },
            "callBack": "GetAlarmMsgOrders",
            "majorKey": "",
            "method": "POST",
            "storeId": "",
            "url": "/videoplugin/message/getMessageByTypes"
          },
          "response": {
            "code": 0,
            "message": null,
            "data": [{
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620921217000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620920678000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620920586000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620919513000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620919483000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620919333000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620918913000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620918616000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620918305000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620917858000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620917658000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620917244000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620917064000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620916994000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620916668000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620916571000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620916529000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620916343000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620916081000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620915825000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620915676000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620915531000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620915394000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620915197000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620914971000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620914644000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620914533000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620914457000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620914376000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620914284000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620913973000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620913431000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620912834000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620912771000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620912354000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620912275000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620912093000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620912024000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620911890000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620911839000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620911807000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620911760000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620911682000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620911270000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620911184000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910982000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910931000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910851000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910781000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910727000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910677000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910647000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910588000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910544000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910484000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910410000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910350000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910278000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910217000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620910124000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909976000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909939000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909847000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909817000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909736000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909664000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909605000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909575000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909346000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909247000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909216000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909149000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909120000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620909028000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908999000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908969000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908909000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908880000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908835000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908750000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908720000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908652000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908612000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908582000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908552000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908456000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908426000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908299000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908268000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620908050000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620907918000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620907758000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620907625000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620907386000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620907292000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620907127000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906864000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906828000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906797000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906747000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906717000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906632000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906501000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906412000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906368000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906329000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906142000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906112000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620906013000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905946000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905823000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905697000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905622000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905571000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905541000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905511000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905481000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905442000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905412000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905382000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905352000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905322000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905262000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905196000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620905150000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904994000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904931000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904813000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904730000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904700000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904618000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904286000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904173000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904143000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904112000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904053000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620904023000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903854000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903789000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903723000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903643000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903612000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903573000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903505000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903383000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903329000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903299000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903268000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903200000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903149000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620903120000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902977000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902860000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902770000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902639000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902609000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902517000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902373000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902320000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902253000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902198000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620902132000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901940000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901850000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901789000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901746000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901685000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901638000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901520000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901489000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901424000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901271000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901233000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620901157000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900915000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900834000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900774000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900744000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900650000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900440000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900409000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900175000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900134000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900069000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620900016000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899976000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899908000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899879000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899826000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899756000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899599000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899559000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899467000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899406000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899265000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899211000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899140000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899110000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620899050000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898991000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898926000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898834000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898785000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898746000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898697000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898666000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898507000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898293000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898248000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898218000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898157000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898088000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620898020000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897960000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897850000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897807000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897771000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897719000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897690000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897630000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897600000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897570000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897540000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897475000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897412000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897369000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897339000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897279000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897237000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897207000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897172000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897142000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897112000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620897024000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896985000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896874000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896843000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896814000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896783000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896736000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896621000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896478000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896447000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896358000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896307000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896277000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896247000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896214000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620896040000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895953000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895921000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895868000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895770000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895704000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895590000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895559000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895480000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895442000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895377000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895347000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895293000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895171000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895136000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620895017000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894926000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894896000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894864000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894834000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894738000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894599000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894539000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894426000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894359000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894297000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894213000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894183000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620894051000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893964000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893934000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893843000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893754000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893676000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893606000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893530000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893452000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893423000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893357000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893288000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893143000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893051000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620893006000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892904000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892824000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892764000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892541000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892479000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892412000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892311000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892281000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892209000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620892063000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891991000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891931000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891870000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891810000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891708000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891655000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891585000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891531000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891501000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891401000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891297000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891257000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891216000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891178000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891128000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620891033000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890973000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890940000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890879000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890794000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890714000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890616000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890586000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890469000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890414000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890346000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890288000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890179000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890108000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890041000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620890011000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889937000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889719000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889635000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889481000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889451000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889317000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889227000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889139000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620889034000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888973000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888902000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888837000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888767000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888737000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888706000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888633000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888571000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888413000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888353000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888323000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888249000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888162000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620888000000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887859000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887776000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887734000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887692000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887619000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887501000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887355000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887320000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887289000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887126000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887066000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620887034000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886970000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886884000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886804000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886728000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886609000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886538000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886478000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886396000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886334000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886246000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886111000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620886011000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885956000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885894000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885696000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885514000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885484000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885414000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885383000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885341000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885306000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885276000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885216000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885186000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885114000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885037000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620885006000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620884975000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620884945000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620884911000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620884851000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620884780000
            }, {
              "alarmType": 10800,
              "alarmName": "移动侦测报警",
              "alarmTime": 1620884696000
            }],
            "success": true
          }
        };
        console.log(res);

        //let res = {"request":{"body":{"alarmTypes":[10800,0,0,0,0],"channelId":"066dde0465dd4abaab6afe355baf9d0b","endTime":"1621007999000","startTime":"1620921600000"},"callBack":"GetAlarmMsgOrders","majorKey":"","method":"POST","storeId":"","url":"/videoplugin/message/getMessageByTypes"},"response":{"code":0,"message":null,"data":[{"alarmType":10800,"alarmName":"移动侦测报警","alarmTime":1620864635000},{"alarmType":10800,"alarmName":"移动侦测报警","alarmTime":1620840908000}],"success":true}}
        oWebControl.JS_RequestInterface({
          funcName: 'TransFunctionResult',
          arguments: encodeURI(JSON.stringify(res))
        });

        //.JS_RequestInterface({funcName: 'TransFunctionResult', arguments: {
        //  response: res
        //}})
      }
    }]);
    return EZUIKitHD;
  }();

  /*
  	The MIT License (MIT)

  	Copyright (c) 2016 Meetecho

  	Permission is hereby granted, free of charge, to any person obtaining
  	a copy of this software and associated documentation files (the "Software"),
  	to deal in the Software without restriction, including without limitation
  	the rights to use, copy, modify, merge, publish, distribute, sublicense,
  	and/or sell copies of the Software, and to permit persons to whom the
  	Software is furnished to do so, subject to the following conditions:

  	The above copyright notice and this permission notice shall be included
  	in all copies or substantial portions of the Software.

  	THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  	OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  	FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  	THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  	OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  	ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  	OTHER DEALINGS IN THE SOFTWARE.
   */

  // List of sessions
  Janus$1.sessions = {};
  Janus$1.isExtensionEnabled = function () {
    if (navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia) {
      // No need for the extension, getDisplayMedia is supported
      return true;
    }
    if (window.navigator.userAgent.match('Chrome')) {
      var chromever = parseInt(window.navigator.userAgent.match(/Chrome\/(.*) /)[1], 10);
      var maxver = 33;
      if (window.navigator.userAgent.match('Linux')) maxver = 35; // "known" crash in chrome 34 and 35 on linux
      if (chromever >= 26 && chromever <= maxver) {
        // Older versions of Chrome don't support this extension-based approach, so lie
        return true;
      }
      return Janus$1.extension.isInstalled();
    } else {
      // Firefox of others, no need for the extension (but this doesn't mean it will work)
      return true;
    }
  };
  var defaultExtension = {
    // Screensharing Chrome Extension ID
    extensionId: 'hapfgfdkleiggjjpfpenajgdnfckjpaj',
    isInstalled: function isInstalled() {
      return document.querySelector('#janus-extension-installed') !== null;
    },
    getScreen: function getScreen(callback) {
      var pending = window.setTimeout(function () {
        var error = new Error('NavigatorUserMediaError');
        error.name = 'The required Chrome extension is not installed: click <a href="#">here</a> to install it. (NOTE: this will need you to refresh the page)';
        return callback(error);
      }, 1000);
      this.cache[pending] = callback;
      window.postMessage({
        type: 'janusGetScreen',
        id: pending
      }, '*');
    },
    init: function init() {
      var cache = {};
      this.cache = cache;
      // Wait for events from the Chrome Extension
      window.addEventListener('message', function (event) {
        if (event.origin != window.location.origin) return;
        if (event.data.type == 'janusGotScreen' && cache[event.data.id]) {
          var callback = cache[event.data.id];
          delete cache[event.data.id];
          if (event.data.sourceId === '') {
            // user canceled
            var error = new Error('NavigatorUserMediaError');
            error.name = 'You cancelled the request for permission, giving up...';
            callback(error);
          } else {
            callback(null, event.data.sourceId);
          }
        } else if (event.data.type == 'janusGetScreenPending') {
          console.log('clearing ', event.data.id);
          window.clearTimeout(event.data.id);
        }
      });
    }
  };
  Janus$1.useDefaultDependencies = function (deps) {
    var f = deps && deps.fetch || fetch;
    var p = deps && deps.Promise || Promise;
    var socketCls = deps && deps.WebSocket || WebSocket;
    return {
      newWebSocket: function newWebSocket(server, proto) {
        return new socketCls(server, proto);
      },
      extension: deps && deps.extension || defaultExtension,
      isArray: function isArray(arr) {
        return Array.isArray(arr);
      },
      webRTCAdapter: deps && deps.adapter || adapter,
      httpAPICall: function httpAPICall(url, options) {
        var fetchOptions = {
          method: options.verb,
          headers: {
            'Accept': 'application/json, text/plain, */*'
          },
          cache: 'no-cache'
        };
        if (options.verb === "POST") {
          fetchOptions.headers['Content-Type'] = 'application/json';
        }
        if (options.withCredentials !== undefined) {
          fetchOptions.credentials = options.withCredentials === true ? 'include' : options.withCredentials ? options.withCredentials : 'omit';
        }
        if (options.body !== undefined) {
          fetchOptions.body = JSON.stringify(options.body);
        }
        var fetching = f(url, fetchOptions)["catch"](function (error) {
          return p.reject({
            message: 'Probably a network error, is the server down?',
            error: error
          });
        });

        /*
         * fetch() does not natively support timeouts.
         * Work around this by starting a timeout manually, and racing it agains the fetch() to see which thing resolves first.
         */

        if (options.timeout !== undefined) {
          var timeout = new p(function (resolve, reject) {
            var timerId = setTimeout(function () {
              clearTimeout(timerId);
              return reject({
                message: 'Request timed out',
                timeout: options.timeout
              });
            }, options.timeout);
          });
          fetching = p.race([fetching, timeout]);
        }
        fetching.then(function (response) {
          if (response.ok) {
            if (_typeof(options.success) === _typeof(Janus$1.noop)) {
              return response.json().then(function (parsed) {
                options.success(parsed);
              })["catch"](function (error) {
                return p.reject({
                  message: 'Failed to parse response body',
                  error: error,
                  response: response
                });
              });
            }
          } else {
            return p.reject({
              message: 'API call failed',
              response: response
            });
          }
        })["catch"](function (error) {
          if (_typeof(options.error) === _typeof(Janus$1.noop)) {
            options.error(error.message || '<< internal error >>', error);
          }
        });
        return fetching;
      }
    };
  };
  Janus$1.useOldDependencies = function (deps) {
    var jq = deps && deps.jQuery || jQuery;
    var socketCls = deps && deps.WebSocket || WebSocket;
    return {
      newWebSocket: function newWebSocket(server, proto) {
        return new socketCls(server, proto);
      },
      isArray: function isArray(arr) {
        return jq.isArray(arr);
      },
      extension: deps && deps.extension || defaultExtension,
      webRTCAdapter: deps && deps.adapter || adapter,
      httpAPICall: function httpAPICall(url, options) {
        var payload = options.body !== undefined ? {
          contentType: 'application/json',
          data: JSON.stringify(options.body)
        } : {};
        var credentials = options.withCredentials !== undefined ? {
          xhrFields: {
            withCredentials: options.withCredentials
          }
        } : {};
        return jq.ajax(jq.extend(payload, credentials, {
          url: url,
          type: options.verb,
          cache: false,
          dataType: 'json',
          async: options.async,
          timeout: options.timeout,
          success: function success(result) {
            if (_typeof(options.success) === _typeof(Janus$1.noop)) {
              options.success(result);
            }
          },
          error: function error(xhr, status, err) {
            if (_typeof(options.error) === _typeof(Janus$1.noop)) {
              options.error(status, err);
            }
          }
        }));
      }
    };
  };
  Janus$1.noop = function () {};
  Janus$1.dataChanDefaultLabel = "JanusDataChannel";

  // Note: in the future we may want to change this, e.g., as was
  // attempted in https://github.com/meetecho/janus-gateway/issues/1670
  Janus$1.endOfCandidates = null;

  // Initialization
  Janus$1.init = function (options) {
    options = options || {};
    options.callback = typeof options.callback == "function" ? options.callback : Janus$1.noop;
    if (Janus$1.initDone === true) {
      // Already initialized
      options.callback();
    } else {
      if (typeof console == "undefined" || typeof console.log == "undefined") console = {
        log: function log() {}
      };
      // Console logging (all debugging disabled by default)
      Janus$1.trace = Janus$1.noop;
      Janus$1.debug = Janus$1.noop;
      Janus$1.vdebug = Janus$1.noop;
      Janus$1.log = Janus$1.noop;
      Janus$1.warn = Janus$1.noop;
      Janus$1.error = Janus$1.noop;
      if (options.debug === true || options.debug === "all") {
        // Enable all debugging levels
        Janus$1.trace = console.trace.bind(console);
        Janus$1.debug = console.debug.bind(console);
        Janus$1.vdebug = console.debug.bind(console);
        Janus$1.log = console.log.bind(console);
        Janus$1.warn = console.warn.bind(console);
        Janus$1.error = console.error.bind(console);
      } else if (Array.isArray(options.debug)) {
        for (var i in options.debug) {
          var d = options.debug[i];
          switch (d) {
            case "trace":
              Janus$1.trace = console.trace.bind(console);
              break;
            case "debug":
              Janus$1.debug = console.debug.bind(console);
              break;
            case "vdebug":
              Janus$1.vdebug = console.debug.bind(console);
              break;
            case "log":
              Janus$1.log = console.log.bind(console);
              break;
            case "warn":
              Janus$1.warn = console.warn.bind(console);
              break;
            case "error":
              Janus$1.error = console.error.bind(console);
              break;
            default:
              console.error("Unknown debugging option '" + d + "' (supported: 'trace', 'debug', 'vdebug', 'log', warn', 'error')");
              break;
          }
        }
      }
      Janus$1.log("Initializing library");
      var usedDependencies = options.dependencies || Janus$1.useDefaultDependencies();
      Janus$1.isArray = usedDependencies.isArray;
      Janus$1.webRTCAdapter = usedDependencies.webRTCAdapter;
      Janus$1.httpAPICall = usedDependencies.httpAPICall;
      Janus$1.newWebSocket = usedDependencies.newWebSocket;
      Janus$1.extension = usedDependencies.extension;
      Janus$1.extension.init();

      // Helper method to enumerate devices
      Janus$1.listDevices = function (callback, config) {
        callback = typeof callback == "function" ? callback : Janus$1.noop;
        if (config == null) config = {
          audio: true,
          video: true
        };
        if (Janus$1.isGetUserMediaAvailable()) {
          navigator.mediaDevices.getUserMedia(config).then(function (stream) {
            navigator.mediaDevices.enumerateDevices().then(function (devices) {
              Janus$1.debug(devices);
              callback(devices);
              // Get rid of the now useless stream
              try {
                var tracks = stream.getTracks();
                for (var i in tracks) {
                  var mst = tracks[i];
                  if (mst !== null && mst !== undefined) mst.stop();
                }
              } catch (e) {}
            });
          })["catch"](function (err) {
            Janus$1.error(err);
            callback([]);
          });
        } else {
          Janus$1.warn("navigator.mediaDevices unavailable");
          callback([]);
        }
      };
      // Helper methods to attach/reattach a stream to a video element (previously part of adapter.js)
      Janus$1.attachMediaStream = function (element, stream) {
        if (Janus$1.webRTCAdapter.browserDetails.browser === 'chrome') {
          var chromever = Janus$1.webRTCAdapter.browserDetails.version;
          if (chromever >= 52) {
            element.srcObject = stream;
          } else if (typeof element.src !== 'undefined') {
            element.src = URL.createObjectURL(stream);
          } else {
            Janus$1.error("Error attaching stream to element");
          }
        } else {
          element.srcObject = stream;
        }
      };
      Janus$1.reattachMediaStream = function (to, from) {
        if (Janus$1.webRTCAdapter.browserDetails.browser === 'chrome') {
          var chromever = Janus$1.webRTCAdapter.browserDetails.version;
          if (chromever >= 52) {
            to.srcObject = from.srcObject;
          } else if (typeof to.src !== 'undefined') {
            to.src = from.src;
          } else {
            Janus$1.error("Error reattaching stream to element");
          }
        } else {
          to.srcObject = from.srcObject;
        }
      };
      // Detect tab close: make sure we don't loose existing onbeforeunload handlers
      // (note: for iOS we need to subscribe to a different event, 'pagehide', see
      // https://gist.github.com/thehunmonkgroup/6bee8941a49b86be31a787fe8f4b8cfe)
      var iOS = ['iPad', 'iPhone', 'iPod'].indexOf(navigator.platform) >= 0;
      var eventName = iOS ? 'pagehide' : 'beforeunload';
      var oldOBF = window["on" + eventName];
      window.addEventListener(eventName, function (event) {
        Janus$1.log("Closing window");
        for (var s in Janus$1.sessions) {
          if (Janus$1.sessions[s] !== null && Janus$1.sessions[s] !== undefined && Janus$1.sessions[s].destroyOnUnload) {
            Janus$1.log("Destroying session " + s);
            Janus$1.sessions[s].destroy({
              asyncRequest: false,
              notifyDestroyed: false
            });
          }
        }
        if (oldOBF && typeof oldOBF == "function") oldOBF();
      });
      // If this is a Safari Technology Preview, check if VP8 is supported
      Janus$1.safariVp8 = false;
      if (Janus$1.webRTCAdapter.browserDetails.browser === 'safari' && Janus$1.webRTCAdapter.browserDetails.version >= 605) {
        // Let's see if RTCRtpSender.getCapabilities() is there
        if (RTCRtpSender && RTCRtpSender.getCapabilities && RTCRtpSender.getCapabilities("video") && RTCRtpSender.getCapabilities("video").codecs && RTCRtpSender.getCapabilities("video").codecs.length) {
          for (var i in RTCRtpSender.getCapabilities("video").codecs) {
            var codec = RTCRtpSender.getCapabilities("video").codecs[i];
            if (codec && codec.mimeType && codec.mimeType.toLowerCase() === "video/vp8") {
              Janus$1.safariVp8 = true;
              break;
            }
          }
          if (Janus$1.safariVp8) {
            Janus$1.log("This version of Safari supports VP8");
          } else {
            Janus$1.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, " + "try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu");
          }
        } else {
          // We do it in a very ugly way, as there's no alternative...
          // We create a PeerConnection to see if VP8 is in an offer
          var testpc = new RTCPeerConnection({}, {});
          testpc.createOffer({
            offerToReceiveVideo: true
          }).then(function (offer) {
            Janus$1.safariVp8 = offer.sdp.indexOf("VP8") !== -1;
            if (Janus$1.safariVp8) {
              Janus$1.log("This version of Safari supports VP8");
            } else {
              Janus$1.warn("This version of Safari does NOT support VP8: if you're using a Technology Preview, " + "try enabling the 'WebRTC VP8 codec' setting in the 'Experimental Features' Develop menu");
            }
            testpc.close();
            testpc = null;
          });
        }
      }
      // Check if this browser supports Unified Plan and transceivers
      // Based on https://codepen.io/anon/pen/ZqLwWV?editors=0010
      Janus$1.unifiedPlan = false;
      if (Janus$1.webRTCAdapter.browserDetails.browser === 'firefox' && Janus$1.webRTCAdapter.browserDetails.version >= 59) {
        // Firefox definitely does, starting from version 59
        Janus$1.unifiedPlan = true;
      } else if (Janus$1.webRTCAdapter.browserDetails.browser === 'chrome' && Janus$1.webRTCAdapter.browserDetails.version < 72) {
        // Chrome does, but it's only usable from version 72 on
        Janus$1.unifiedPlan = false;
      } else if (!('currentDirection' in RTCRtpTransceiver.prototype)) {
        // Safari supports addTransceiver() but not Unified Plan when
        // currentDirection is not defined (see codepen above)
        Janus$1.unifiedPlan = false;
      } else {
        // Check if addTransceiver() throws an exception
        var tempPc = new RTCPeerConnection();
        try {
          tempPc.addTransceiver('audio');
          Janus$1.unifiedPlan = true;
        } catch (e) {}
        tempPc.close();
      }
      Janus$1.initDone = true;
      options.callback();
    }
  };

  // Helper method to check whether WebRTC is supported by this browser
  Janus$1.isWebrtcSupported = function () {
    return window.RTCPeerConnection !== undefined && window.RTCPeerConnection !== null;
  };
  // Helper method to check whether devices can be accessed by this browser (e.g., not possible via plain HTTP)
  Janus$1.isGetUserMediaAvailable = function () {
    return navigator.mediaDevices !== undefined && navigator.mediaDevices !== null && navigator.mediaDevices.getUserMedia !== undefined && navigator.mediaDevices.getUserMedia !== null;
  };

  // Helper method to create random identifiers (e.g., transaction)
  Janus$1.randomString = function (len) {
    var charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
    var randomString = '';
    for (var i = 0; i < len; i++) {
      var randomPoz = Math.floor(Math.random() * charSet.length);
      randomString += charSet.substring(randomPoz, randomPoz + 1);
    }
    return randomString;
  };
  function Janus$1(gatewayCallbacks, requestOpt) {
    if (Janus$1.initDone === undefined) {
      gatewayCallbacks.error("Library not initialized");
      return {};
    }
    if (!Janus$1.isWebrtcSupported()) {
      gatewayCallbacks.error("WebRTC not supported by this browser");
      return {};
    }
    Janus$1.log("Library initialized: " + Janus$1.initDone);
    gatewayCallbacks = gatewayCallbacks || {};
    gatewayCallbacks.success = typeof gatewayCallbacks.success == "function" ? gatewayCallbacks.success : Janus$1.noop;
    gatewayCallbacks.error = typeof gatewayCallbacks.error == "function" ? gatewayCallbacks.error : Janus$1.noop;
    gatewayCallbacks.destroyed = typeof gatewayCallbacks.destroyed == "function" ? gatewayCallbacks.destroyed : Janus$1.noop;
    if (gatewayCallbacks.server === null || gatewayCallbacks.server === undefined) {
      gatewayCallbacks.error("Invalid server url");
      return {};
    }
    var websockets = false;
    var ws = null;
    var wsHandlers = {};
    var wsKeepaliveTimeoutId = null;
    var servers = null,
      serversIndex = 0;
    var server = gatewayCallbacks.server;
    if (Janus$1.isArray(server)) {
      Janus$1.log("Multiple servers provided (" + server.length + "), will use the first that works");
      server = null;
      servers = gatewayCallbacks.server;
      Janus$1.debug(servers);
    } else {
      if (server.indexOf("ws") === 0) {
        websockets = true;
        Janus$1.log("Using WebSockets to contact Janus: " + server);
      } else {
        websockets = false;
        Janus$1.log("Using REST API to contact Janus: " + server);
      }
    }
    var iceServers = gatewayCallbacks.iceServers;
    if (iceServers === undefined || iceServers === null) iceServers = [{
      urls: "stun:stun.l.google.com:19302"
    }];
    var iceTransportPolicy = gatewayCallbacks.iceTransportPolicy;
    var bundlePolicy = gatewayCallbacks.bundlePolicy;
    // Whether IPv6 candidates should be gathered
    var ipv6Support = gatewayCallbacks.ipv6;
    if (ipv6Support === undefined || ipv6Support === null) ipv6Support = false;
    // Whether we should enable the withCredentials flag for XHR requests
    var withCredentials = false;
    if (gatewayCallbacks.withCredentials !== undefined && gatewayCallbacks.withCredentials !== null) withCredentials = gatewayCallbacks.withCredentials === true;
    // Optional max events
    var maxev = 10;
    if (gatewayCallbacks.max_poll_events !== undefined && gatewayCallbacks.max_poll_events !== null) maxev = gatewayCallbacks.max_poll_events;
    if (maxev < 1) maxev = 1;
    // Token to use (only if the token based authentication mechanism is enabled)
    var token = null;
    if (gatewayCallbacks.token !== undefined && gatewayCallbacks.token !== null) token = gatewayCallbacks.token;
    // API secret to use (only if the shared API secret is enabled)
    var apisecret = null;
    if (gatewayCallbacks.apisecret !== undefined && gatewayCallbacks.apisecret !== null) apisecret = gatewayCallbacks.apisecret;
    // Whether we should destroy this session when onbeforeunload is called
    this.destroyOnUnload = true;
    if (gatewayCallbacks.destroyOnUnload !== undefined && gatewayCallbacks.destroyOnUnload !== null) this.destroyOnUnload = gatewayCallbacks.destroyOnUnload === true;
    // Some timeout-related values
    var keepAlivePeriod = 25000;
    if (gatewayCallbacks.keepAlivePeriod !== undefined && gatewayCallbacks.keepAlivePeriod !== null) keepAlivePeriod = gatewayCallbacks.keepAlivePeriod;
    if (isNaN(keepAlivePeriod)) keepAlivePeriod = 25000;
    var longPollTimeout = 60000;
    if (gatewayCallbacks.longPollTimeout !== undefined && gatewayCallbacks.longPollTimeout !== null) longPollTimeout = gatewayCallbacks.longPollTimeout;
    if (isNaN(longPollTimeout)) longPollTimeout = 60000;

    // overrides for default maxBitrate values for simulcasting
    function getMaxBitrates(simulcastMaxBitrates) {
      var maxBitrates = {
        high: 900000,
        medium: 300000,
        low: 100000
      };
      if (simulcastMaxBitrates !== undefined && simulcastMaxBitrates !== null) {
        if (simulcastMaxBitrates.high) maxBitrates.high = simulcastMaxBitrates.high;
        if (simulcastMaxBitrates.medium) maxBitrates.medium = simulcastMaxBitrates.medium;
        if (simulcastMaxBitrates.low) maxBitrates.low = simulcastMaxBitrates.low;
      }
      return maxBitrates;
    }
    var connected = false;
    var sessionId = null;
    var pluginHandles = {};
    var that = this;
    var retries = 0;
    var transactions = {};
    createSession(gatewayCallbacks);

    // Public methods
    this.getServer = function () {
      return server;
    };
    this.isConnected = function () {
      return connected;
    };
    this.reconnect = function (callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      callbacks["reconnect"] = true;
      createSession(callbacks);
    };
    this.getSessionId = function () {
      return sessionId;
    };
    this.destroy = function (callbacks) {
      destroySession(callbacks);
    };
    this.attach = function (callbacks) {
      createHandle(callbacks);
    };
    function eventHandler() {
      if (sessionId == null) return;
      Janus$1.debug('Long poll...');
      if (!connected) {
        Janus$1.warn("Is the server down? (connected=false)");
        return;
      }
      var longpoll = server + "/" + sessionId + "?rid=" + new Date().getTime();
      if (maxev !== undefined && maxev !== null) longpoll = longpoll + "&maxev=" + maxev;
      if (token !== null && token !== undefined) longpoll = longpoll + "&token=" + encodeURIComponent(token);
      if (apisecret !== null && apisecret !== undefined) longpoll = longpoll + "&apisecret=" + encodeURIComponent(apisecret);
      Janus$1.httpAPICall(longpoll, {
        verb: 'GET',
        withCredentials: withCredentials,
        success: handleEvent,
        timeout: longPollTimeout,
        error: function error(textStatus, errorThrown) {
          Janus$1.error(textStatus + ":", errorThrown);
          retries++;
          if (retries > 3) {
            // Did we just lose the server? :-(
            connected = false;
            gatewayCallbacks.error("Lost connection to the server (is it down?)");
            return;
          }
          eventHandler();
        }
      });
    }

    // Private event handler: this will trigger plugin callbacks, if set
    function handleEvent(json, skipTimeout) {
      retries = 0;
      if (!websockets && sessionId !== undefined && sessionId !== null && skipTimeout !== true) eventHandler();
      if (!websockets && Janus$1.isArray(json)) {
        // We got an array: it means we passed a maxev > 1, iterate on all objects
        for (var i = 0; i < json.length; i++) {
          handleEvent(json[i], true);
        }
        return;
      }
      if (json["rtcgw"] === "keepalive") {
        // Nothing happened
        Janus$1.vdebug("Got a keepalive on session " + sessionId);
        return;
      } else if (json["rtcgw"] === "ack") {
        // Just an ack, we can probably ignore
        Janus$1.debug("Got an ack on session " + sessionId);
        Janus$1.debug(json);
        var transaction = json["transaction"];
        if (transaction !== null && transaction !== undefined) {
          var reportSuccess = transactions[transaction];
          if (reportSuccess !== null && reportSuccess !== undefined) {
            reportSuccess(json);
          }
          delete transactions[transaction];
        }
        return;
      } else if (json["rtcgw"] === "success") {
        // Success!
        Janus$1.debug("Got a success on session " + sessionId);
        Janus$1.debug(json);
        var transaction = json["transaction"];
        if (transaction !== null && transaction !== undefined) {
          var reportSuccess = transactions[transaction];
          if (reportSuccess !== null && reportSuccess !== undefined) {
            reportSuccess(json);
          }
          delete transactions[transaction];
        }
        return;
      } else if (json["rtcgw"] === "trickle") {
        // We got a trickle candidate from Janus
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$1.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$1.debug("This handle is not attached to this session");
          return;
        }
        var candidate = json["candidate"];
        Janus$1.debug("Got a trickled candidate on session " + sessionId);
        Janus$1.debug(candidate);
        var config = pluginHandle.webrtcStuff;
        if (config.pc && config.remoteSdp) {
          // Add candidate right now
          Janus$1.debug("Adding remote candidate:", candidate);
          if (!candidate || candidate.completed === true) {
            // end-of-candidates
            config.pc.addIceCandidate(Janus$1.endOfCandidates);
          } else {
            // New candidate
            config.pc.addIceCandidate(candidate);
          }
        } else {
          // We didn't do setRemoteDescription (trickle got here before the offer?)
          Janus$1.debug("We didn't do setRemoteDescription (trickle got here before the offer?), caching candidate");
          if (!config.candidates) config.candidates = [];
          config.candidates.push(candidate);
          Janus$1.debug(config.candidates);
        }
      } else if (json["rtcgw"] === "webrtcup") {
        // The PeerConnection with the server is up! Notify this
        Janus$1.debug("Got a webrtcup event on session " + sessionId);
        Janus$1.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$1.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$1.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.webrtcState(true);
        return;
      } else if (json["rtcgw"] === "hangup") {
        // A plugin asked the core to hangup a PeerConnection on one of our handles
        Janus$1.debug("Got a hangup event on session " + sessionId);
        Janus$1.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$1.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$1.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.webrtcState(false, json["reason"]);
        pluginHandle.hangup();
      } else if (json["rtcgw"] === "detached") {
        // A plugin asked the core to detach one of our handles
        Janus$1.debug("Got a detached event on session " + sessionId);
        Janus$1.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$1.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          // Don't warn here because destroyHandle causes this situation.
          return;
        }
        pluginHandle.detached = true;
        pluginHandle.ondetached();
        pluginHandle.detach();
      } else if (json["rtcgw"] === "media") {
        // Media started/stopped flowing
        Janus$1.debug("Got a media event on session " + sessionId);
        Janus$1.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$1.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$1.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.mediaState(json["type"], json["receiving"]);
      } else if (json["rtcgw"] === "slowlink") {
        Janus$1.debug("Got a slowlink event on session " + sessionId);
        Janus$1.debug(json);
        console.log("json的所有信息打印-----------------------------------------------", json);
        // Trouble uplink or downlink
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$1.warn("Missing sender...");
          return;
        }
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$1.debug("This handle is not attached to this session");
          return;
        }
        pluginHandle.slowLink(json["uplink"], json["lost"]);
      } else if (json["rtcgw"] === "error") {
        // Oops, something wrong happened
        Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
        Janus$1.debug(json);
        var transaction = json["transaction"];
        if (transaction !== null && transaction !== undefined) {
          var reportSuccess = transactions[transaction];
          if (reportSuccess !== null && reportSuccess !== undefined) {
            reportSuccess(json);
          }
          delete transactions[transaction];
        }
        return;
      } else if (json["rtcgw"] === "event") {
        Janus$1.debug("Got a plugin event on session " + sessionId);
        Janus$1.debug(json);
        var sender = json["sender"];
        if (sender === undefined || sender === null) {
          Janus$1.warn("Missing sender...");
          return;
        }
        var plugindata = json["plugindata"];
        if (plugindata === undefined || plugindata === null) {
          Janus$1.warn("Missing plugindata...");
          return;
        }
        Janus$1.debug("  -- Event is coming from " + sender + " (" + plugindata["plugin"] + ")");
        var data = plugindata["data"];
        Janus$1.debug(data);
        var pluginHandle = pluginHandles[sender];
        if (pluginHandle === undefined || pluginHandle === null) {
          Janus$1.warn("This handle is not attached to this session");
          return;
        }
        var jsep = json["jsep"];
        if (jsep !== undefined && jsep !== null) {
          Janus$1.debug("Handling SDP as well...");
          Janus$1.debug(jsep);
        }
        var callback = pluginHandle.onmessage;
        if (callback !== null && callback !== undefined) {
          Janus$1.debug("Notifying application...");
          // Send to callback specified when attaching plugin handle
          callback(data, jsep);
        } else {
          // Send to generic callback (?)
          Janus$1.debug("No provided notification callback");
        }
      } else if (json["rtcgw"] === "timeout") {
        Janus$1.error("Timeout on session " + sessionId);
        Janus$1.debug(json);
        if (websockets) {
          ws.close(3504, "Gateway timeout");
        }
        return;
      } else {
        Janus$1.warn("Unknown message/event  '" + json["rtcgw"] + "' on session " + sessionId);
        Janus$1.debug(json);
      }
    }

    // Private helper to send keep-alive messages on WebSockets
    function keepAlive() {
      if (server === null || !websockets || !connected) return;
      wsKeepaliveTimeoutId = setTimeout(keepAlive, keepAlivePeriod);
      var request = {
        "rtcgw": "keepalive",
        "session_id": sessionId,
        "transaction": Janus$1.randomString(12)
      };
      if (token !== null && token !== undefined) request["token"] = token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      ws.send(JSON.stringify(request));
    }

    // Private method to create a session
    function createSession(callbacks) {
      var transaction = Janus$1.randomString(12);
      // var request = { "rtcgw": "create", "transaction": transaction, "token": "testtoken", "device": "deviceserial", "channel": 1 };
      var request = {
        "rtcgw": "create",
        "transaction": transaction,
        "token": "testtoken"
      };
      request = Object.assign({}, request, requestOpt);
      if (callbacks["reconnect"]) {
        // We're reconnecting, claim the session
        connected = false;
        request["rtcgw"] = "claim";
        request["session_id"] = sessionId;
        // If we were using websockets, ignore the old connection
        if (ws) {
          ws.onopen = null;
          ws.onerror = null;
          ws.onclose = null;
          if (wsKeepaliveTimeoutId) {
            clearTimeout(wsKeepaliveTimeoutId);
            wsKeepaliveTimeoutId = null;
          }
        }
      }
      if (token !== null && token !== undefined) request["token"] = token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (server === null && Janus$1.isArray(servers)) {
        // We still need to find a working server from the list we were given
        server = servers[serversIndex];
        if (server.indexOf("ws") === 0) {
          websockets = true;
          Janus$1.log("Server #" + (serversIndex + 1) + ": trying WebSockets to contact Janus (" + server + ")");
        } else {
          websockets = false;
          Janus$1.log("Server #" + (serversIndex + 1) + ": trying REST API to contact Janus (" + server + ")");
        }
      }
      if (websockets) {
        ws = Janus$1.newWebSocket(server, 'rtcgw-protocol');
        wsHandlers = {
          'error': function error() {
            Janus$1.error("Error connecting to the Janus WebSockets server... " + server);
            if (Janus$1.isArray(servers) && !callbacks["reconnect"]) {
              serversIndex++;
              if (serversIndex == servers.length) {
                // We tried all the servers the user gave us and they all failed
                callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");
                return;
              }
              // Let's try the next server
              server = null;
              setTimeout(function () {
                createSession(callbacks);
              }, 200);
              return;
            }
            callbacks.error("Error connecting to the Janus WebSockets server: Is the server down?");
          },
          'open': function open() {
            // We need to be notified about the success
            transactions[transaction] = function (json) {
              Janus$1.debug(json);
              if (json["rtcgw"] !== "success") {
                Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
                callbacks.error(json["error"].reason);
                return;
              }
              wsKeepaliveTimeoutId = setTimeout(keepAlive, keepAlivePeriod);
              connected = true;
              sessionId = json["session_id"] ? json["session_id"] : json.data["id"];
              if (callbacks["reconnect"]) {
                Janus$1.log("Claimed session: " + sessionId);
              } else {
                Janus$1.log("Created session: " + sessionId);
              }
              Janus$1.sessions[sessionId] = that;
              callbacks.success(sessionId);
            };
            ws.send(JSON.stringify(request));
          },
          'message': function message(event) {
            handleEvent(JSON.parse(event.data));
          }

          // 'close': function() {
          // 	// debugger
          // 	if (server === null || !connected) {
          // 		return;
          // 	}
          // 	connected = false;
          // 	// FIXME What if this is called when the page is closed?
          // 	gatewayCallbacks.error("Lost connection to the server (is it down?)");
          // }
        };

        for (var eventName in wsHandlers) {
          ws.addEventListener(eventName, wsHandlers[eventName]);
        }
        return;
      }
      Janus$1.httpAPICall(server, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$1.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            callbacks.error(json["error"].reason);
            return;
          }
          connected = true;
          sessionId = json["session_id"] ? json["session_id"] : json.data["id"];
          if (callbacks["reconnect"]) {
            Janus$1.log("Claimed session: " + sessionId);
          } else {
            Janus$1.log("Created session: " + sessionId);
          }
          Janus$1.sessions[sessionId] = that;
          eventHandler();
          callbacks.success();
        },
        error: function error(textStatus, errorThrown) {
          Janus$1.error(textStatus + ":", errorThrown); // FIXME
          if (Janus$1.isArray(servers) && !callbacks["reconnect"]) {
            serversIndex++;
            if (serversIndex == servers.length) {
              // We tried all the servers the user gave us and they all failed
              callbacks.error("Error connecting to any of the provided Janus servers: Is the server down?");
              return;
            }
            // Let's try the next server
            server = null;
            setTimeout(function () {
              createSession(callbacks);
            }, 200);
            return;
          }
          if (errorThrown === "") callbacks.error(textStatus + ": Is the server down?");else callbacks.error(textStatus + ": " + errorThrown);
        }
      });
    }

    // Private method to destroy a session
    function destroySession(callbacks) {
      callbacks = callbacks || {};
      // FIXME This method triggers a success even when we fail
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      var asyncRequest = true;
      if (callbacks.asyncRequest !== undefined && callbacks.asyncRequest !== null) asyncRequest = callbacks.asyncRequest === true;
      var notifyDestroyed = true;
      if (callbacks.notifyDestroyed !== undefined && callbacks.notifyDestroyed !== null) notifyDestroyed = callbacks.notifyDestroyed === true;
      var cleanupHandles = false;
      if (callbacks.cleanupHandles !== undefined && callbacks.cleanupHandles !== null) cleanupHandles = callbacks.cleanupHandles === true;
      Janus$1.log("Destroying session " + sessionId + " (async=" + asyncRequest + ")");
      if (!connected) {
        Janus$1.warn("Is the server down? (connected=false)");
        callbacks.success();
        return;
      }
      if (sessionId === undefined || sessionId === null) {
        Janus$1.warn("No session to destroy");
        callbacks.success();
        if (notifyDestroyed) gatewayCallbacks.destroyed();
        return;
      }
      if (cleanupHandles) {
        for (var handleId in pluginHandles) destroyHandle(handleId, {
          noRequest: true
        });
      }
      // No need to destroy all handles first, Janus will do that itself
      var request = {
        "rtcgw": "destroy",
        "transaction": Janus$1.randomString(12)
      };
      if (token !== null && token !== undefined) request["token"] = token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (websockets) {
        request["session_id"] = sessionId;
        var unbindWebSocket = function unbindWebSocket() {
          for (var eventName in wsHandlers) {
            ws.removeEventListener(eventName, wsHandlers[eventName]);
          }
          ws.removeEventListener('message', onUnbindMessage);
          ws.removeEventListener('error', onUnbindError);
          if (wsKeepaliveTimeoutId) {
            clearTimeout(wsKeepaliveTimeoutId);
          }
          ws.close();
        };
        var onUnbindMessage = function onUnbindMessage(event) {
          var data = JSON.parse(event.data);
          if (data.session_id == request.session_id && data.transaction == request.transaction) {
            unbindWebSocket();
            callbacks.success();
            if (notifyDestroyed) gatewayCallbacks.destroyed();
          }
        };
        var onUnbindError = function onUnbindError(event) {
          unbindWebSocket();
          callbacks.error("Failed to destroy the server: Is the server down?");
          if (notifyDestroyed) gatewayCallbacks.destroyed();
        };
        ws.addEventListener('message', onUnbindMessage);
        ws.addEventListener('error', onUnbindError);
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$1.httpAPICall(server + "/" + sessionId, {
        verb: 'POST',
        async: asyncRequest,
        // Sometimes we need false here, or destroying in onbeforeunload won't work
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$1.log("Destroyed session:");
          Janus$1.debug(json);
          sessionId = null;
          connected = false;
          if (json["rtcgw"] !== "success") {
            Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
          }

          callbacks.success();
          if (notifyDestroyed) gatewayCallbacks.destroyed();
        },
        error: function error(textStatus, errorThrown) {
          Janus$1.error(textStatus + ":", errorThrown); // FIXME
          // Reset everything anyway
          sessionId = null;
          connected = false;
          callbacks.success();
          if (notifyDestroyed) gatewayCallbacks.destroyed();
          pluginHandlesp;
        }
      });
    }

    // Private method to create a plugin handle
    function createHandle(callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      callbacks.consentDialog = typeof callbacks.consentDialog == "function" ? callbacks.consentDialog : Janus$1.noop;
      callbacks.iceState = typeof callbacks.iceState == "function" ? callbacks.iceState : Janus$1.noop;
      callbacks.mediaState = typeof callbacks.mediaState == "function" ? callbacks.mediaState : Janus$1.noop;
      callbacks.webrtcState = typeof callbacks.webrtcState == "function" ? callbacks.webrtcState : Janus$1.noop;
      callbacks.slowLink = typeof callbacks.slowLink == "function" ? callbacks.slowLink : Janus$1.noop;
      callbacks.onmessage = typeof callbacks.onmessage == "function" ? callbacks.onmessage : Janus$1.noop;
      callbacks.onlocalstream = typeof callbacks.onlocalstream == "function" ? callbacks.onlocalstream : Janus$1.noop;
      callbacks.onremotestream = typeof callbacks.onremotestream == "function" ? callbacks.onremotestream : Janus$1.noop;
      callbacks.ondata = typeof callbacks.ondata == "function" ? callbacks.ondata : Janus$1.noop;
      callbacks.ondataopen = typeof callbacks.ondataopen == "function" ? callbacks.ondataopen : Janus$1.noop;
      callbacks.oncleanup = typeof callbacks.oncleanup == "function" ? callbacks.oncleanup : Janus$1.noop;
      callbacks.ondetached = typeof callbacks.ondetached == "function" ? callbacks.ondetached : Janus$1.noop;
      if (!connected) {
        Janus$1.warn("Is the server down? (connected=false)");
        callbacks.error("Is the server down? (connected=false)");
        return;
      }
      var plugin = callbacks.plugin;
      if (plugin === undefined || plugin === null) {
        Janus$1.error("Invalid plugin");
        callbacks.error("Invalid plugin");
        return;
      }
      var opaqueId = callbacks.opaqueId;
      var handleToken = callbacks.token ? callbacks.token : token;
      var transaction = Janus$1.randomString(12);
      var request = {
        "rtcgw": "attach",
        "plugin": plugin,
        "opaque_id": opaqueId,
        "transaction": transaction
      };
      if (handleToken !== null && handleToken !== undefined) request["token"] = handleToken;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (websockets) {
        transactions[transaction] = function (json) {
          Janus$1.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            callbacks.error("Ooops: " + json["error"].code + " " + json["error"].reason);
            return;
          }
          var handleId = json.data["id"];
          Janus$1.log("Created handle: " + handleId);
          var pluginHandle = {
            session: that,
            plugin: plugin,
            id: handleId,
            token: handleToken,
            detached: false,
            webrtcStuff: {
              started: false,
              myStream: null,
              streamExternal: false,
              remoteStream: null,
              mySdp: null,
              mediaConstraints: null,
              pc: null,
              dataChannel: {},
              dtmfSender: null,
              trickle: true,
              iceDone: false,
              volume: {
                value: null,
                timer: null
              },
              bitrate: {
                value: null,
                bsnow: null,
                bsbefore: null,
                tsnow: null,
                tsbefore: null,
                timer: null
              }
            },
            getId: function getId() {
              return handleId;
            },
            getPlugin: function getPlugin() {
              return plugin;
            },
            getVolume: function getVolume() {
              return _getVolume(handleId, true);
            },
            getRemoteVolume: function getRemoteVolume() {
              return _getVolume(handleId, true);
            },
            getLocalVolume: function getLocalVolume() {
              return _getVolume(handleId, false);
            },
            isAudioMuted: function isAudioMuted() {
              return isMuted(handleId, false);
            },
            muteAudio: function muteAudio() {
              return mute(handleId, false, true);
            },
            unmuteAudio: function unmuteAudio() {
              return mute(handleId, false, false);
            },
            isVideoMuted: function isVideoMuted() {
              return isMuted(handleId, true);
            },
            muteVideo: function muteVideo() {
              return mute(handleId, true, true);
            },
            unmuteVideo: function unmuteVideo() {
              return mute(handleId, true, false);
            },
            getBitrate: function getBitrate() {
              return _getBitrate(handleId);
            },
            getNetworkQuality: function getNetworkQuality(callbacks) {
              _getNetworkQuality(handleId, callbacks);
            },
            send: function send(callbacks) {
              sendMessage(handleId, callbacks);
            },
            data: function data(callbacks) {
              sendData(handleId, callbacks);
            },
            dtmf: function dtmf(callbacks) {
              sendDtmf(handleId, callbacks);
            },
            consentDialog: callbacks.consentDialog,
            iceState: callbacks.iceState,
            mediaState: callbacks.mediaState,
            webrtcState: callbacks.webrtcState,
            slowLink: callbacks.slowLink,
            onmessage: callbacks.onmessage,
            createOffer: function createOffer(callbacks) {
              prepareWebrtc(handleId, true, callbacks);
            },
            createAnswer: function createAnswer(callbacks) {
              prepareWebrtc(handleId, false, callbacks);
            },
            handleRemoteJsep: function handleRemoteJsep(callbacks) {
              prepareWebrtcPeer(handleId, callbacks);
            },
            onlocalstream: callbacks.onlocalstream,
            onremotestream: callbacks.onremotestream,
            ondata: callbacks.ondata,
            ondataopen: callbacks.ondataopen,
            oncleanup: callbacks.oncleanup,
            ondetached: callbacks.ondetached,
            hangup: function hangup(sendRequest) {
              cleanupWebrtc(handleId, sendRequest === true);
            },
            detach: function detach(callbacks) {
              destroyHandle(handleId, callbacks);
            }
          };
          pluginHandles[handleId] = pluginHandle;
          callbacks.success(pluginHandle);
        };
        request["session_id"] = sessionId;
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$1.httpAPICall(server + "/" + sessionId, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$1.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            callbacks.error("Ooops: " + json["error"].code + " " + json["error"].reason);
            return;
          }
          var handleId = json.data["id"];
          Janus$1.log("Created handle: " + handleId);
          var pluginHandle = {
            session: that,
            plugin: plugin,
            id: handleId,
            token: handleToken,
            detached: false,
            webrtcStuff: {
              started: false,
              myStream: null,
              streamExternal: false,
              remoteStream: null,
              mySdp: null,
              mediaConstraints: null,
              pc: null,
              dataChannel: {},
              dtmfSender: null,
              trickle: true,
              iceDone: false,
              volume: {
                value: null,
                timer: null
              },
              bitrate: {
                value: null,
                bsnow: null,
                bsbefore: null,
                tsnow: null,
                tsbefore: null,
                timer: null
              }
            },
            getId: function getId() {
              return handleId;
            },
            getPlugin: function getPlugin() {
              return plugin;
            },
            getVolume: function getVolume() {
              return _getVolume(handleId, true);
            },
            getRemoteVolume: function getRemoteVolume() {
              return _getVolume(handleId, true);
            },
            getLocalVolume: function getLocalVolume() {
              return _getVolume(handleId, false);
            },
            isAudioMuted: function isAudioMuted() {
              return isMuted(handleId, false);
            },
            muteAudio: function muteAudio() {
              return mute(handleId, false, true);
            },
            unmuteAudio: function unmuteAudio() {
              return mute(handleId, false, false);
            },
            isVideoMuted: function isVideoMuted() {
              return isMuted(handleId, true);
            },
            muteVideo: function muteVideo() {
              return mute(handleId, true, true);
            },
            unmuteVideo: function unmuteVideo() {
              return mute(handleId, true, false);
            },
            getBitrate: function getBitrate() {
              return _getBitrate(handleId);
            },
            getNetworkQuality: function getNetworkQuality(callbacks) {
              _getNetworkQuality(handleId, callbacks);
            },
            send: function send(callbacks) {
              sendMessage(handleId, callbacks);
            },
            data: function data(callbacks) {
              sendData(handleId, callbacks);
            },
            dtmf: function dtmf(callbacks) {
              sendDtmf(handleId, callbacks);
            },
            consentDialog: callbacks.consentDialog,
            iceState: callbacks.iceState,
            mediaState: callbacks.mediaState,
            webrtcState: callbacks.webrtcState,
            slowLink: callbacks.slowLink,
            onmessage: callbacks.onmessage,
            createOffer: function createOffer(callbacks) {
              prepareWebrtc(handleId, true, callbacks);
            },
            createAnswer: function createAnswer(callbacks) {
              prepareWebrtc(handleId, false, callbacks);
            },
            handleRemoteJsep: function handleRemoteJsep(callbacks) {
              prepareWebrtcPeer(handleId, callbacks);
            },
            onlocalstream: callbacks.onlocalstream,
            onremotestream: callbacks.onremotestream,
            ondata: callbacks.ondata,
            ondataopen: callbacks.ondataopen,
            oncleanup: callbacks.oncleanup,
            ondetached: callbacks.ondetached,
            hangup: function hangup(sendRequest) {
              cleanupWebrtc(handleId, sendRequest === true);
            },
            detach: function detach(callbacks) {
              destroyHandle(handleId, callbacks);
            }
          };
          pluginHandles[handleId] = pluginHandle;
          callbacks.success(pluginHandle);
        },
        error: function error(textStatus, errorThrown) {
          Janus$1.error(textStatus + ":", errorThrown); // FIXME
        }
      });
    }

    // Private method to send a message
    function sendMessage(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      if (!connected) {
        Janus$1.warn("Is the server down? (connected=false)");
        callbacks.error("Is the server down? (connected=false)");
        return;
      }
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var message = callbacks.message;
      var jsep = callbacks.jsep;
      var transaction = Janus$1.randomString(12);
      var request = {
        "rtcgw": "message",
        "body": message,
        "transaction": transaction
      };
      if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (jsep !== null && jsep !== undefined) request.jsep = jsep;
      Janus$1.debug("Sending message to plugin (handle=" + handleId + "):");
      Janus$1.debug(request);
      if (websockets) {
        request["session_id"] = sessionId;
        request["handle_id"] = handleId;
        transactions[transaction] = function (json) {
          Janus$1.debug("Message sent!");
          Janus$1.debug(json);
          if (json["rtcgw"] === "success") {
            // We got a success, must have been a synchronous transaction
            var plugindata = json["plugindata"];
            if (plugindata === undefined || plugindata === null) {
              Janus$1.warn("Request succeeded, but missing plugindata...");
              callbacks.success();
              return;
            }
            Janus$1.log("Synchronous transaction successful (" + plugindata["plugin"] + ")");
            var data = plugindata["data"];
            Janus$1.debug(data);
            callbacks.success(data);
            return;
          } else if (json["rtcgw"] !== "ack") {
            // Not a success and not an ack, must be an error
            if (json["error"] !== undefined && json["error"] !== null) {
              Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
              callbacks.error(json["error"].code + " " + json["error"].reason);
            } else {
              Janus$1.error("Unknown error"); // FIXME
              callbacks.error("Unknown error");
            }
            return;
          }
          // If we got here, the plugin decided to handle the request asynchronously
          callbacks.success();
        };
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$1.httpAPICall(server + "/" + sessionId + "/" + handleId, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$1.debug("Message sent!");
          Janus$1.debug(json);
          if (json["rtcgw"] === "success") {
            // We got a success, must have been a synchronous transaction
            var plugindata = json["plugindata"];
            if (plugindata === undefined || plugindata === null) {
              Janus$1.warn("Request succeeded, but missing plugindata...");
              callbacks.success();
              return;
            }
            Janus$1.log("Synchronous transaction successful (" + plugindata["plugin"] + ")");
            var data = plugindata["data"];
            Janus$1.debug(data);
            callbacks.success(data);
            return;
          } else if (json["rtcgw"] !== "ack") {
            // Not a success and not an ack, must be an error
            if (json["error"] !== undefined && json["error"] !== null) {
              Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
              callbacks.error(json["error"].code + " " + json["error"].reason);
            } else {
              Janus$1.error("Unknown error"); // FIXME
              callbacks.error("Unknown error");
            }
            return;
          }
          // If we got here, the plugin decided to handle the request asynchronously
          callbacks.success();
        },
        error: function error(textStatus, errorThrown) {
          Janus$1.error(textStatus + ":", errorThrown); // FIXME
          callbacks.error(textStatus + ": " + errorThrown);
        }
      });
    }

    // Private method to send a trickle candidate
    function sendTrickleCandidate(handleId, candidate) {
      if (!connected) {
        Janus$1.warn("Is the server down? (connected=false)");
        return;
      }
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        return;
      }
      var request = {
        "rtcgw": "trickle",
        "candidate": candidate,
        "transaction": Janus$1.randomString(12)
      };
      if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      Janus$1.vdebug("Sending trickle candidate (handle=" + handleId + "):");
      Janus$1.vdebug(request);
      if (websockets) {
        request["session_id"] = sessionId;
        request["handle_id"] = handleId;
        ws.send(JSON.stringify(request));
        return;
      }
      Janus$1.httpAPICall(server + "/" + sessionId + "/" + handleId, {
        verb: 'POST',
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$1.vdebug("Candidate sent!");
          Janus$1.vdebug(json);
          if (json["rtcgw"] !== "ack") {
            Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
            return;
          }
        },
        error: function error(textStatus, errorThrown) {
          Janus$1.error(textStatus + ":", errorThrown); // FIXME
        }
      });
    }

    // Private method to create a data channel
    function createDataChannel(handleId, dclabel, incoming, pendingText) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var onDataChannelMessage = function onDataChannelMessage(event) {
        Janus$1.log('Received message on data channel:', event);
        var label = event.target.label;
        pluginHandle.ondata(event.data, label);
      };
      var onDataChannelStateChange = function onDataChannelStateChange(event) {
        Janus$1.log('Received state change on data channel:', event);
        var label = event.target.label;
        var dcState = config.dataChannel[label] ? config.dataChannel[label].readyState : "null";
        Janus$1.log('State change on <' + label + '> data channel: ' + dcState);
        if (dcState === 'open') {
          // Any pending messages to send?
          if (config.dataChannel[label].pending && config.dataChannel[label].pending.length > 0) {
            Janus$1.log("Sending pending messages on <" + label + ">:", config.dataChannel[label].pending.length);
            for (var i in config.dataChannel[label].pending) {
              var text = config.dataChannel[label].pending[i];
              Janus$1.log("Sending string on data channel <" + label + ">: " + text);
              config.dataChannel[label].send(text);
            }
            config.dataChannel[label].pending = [];
          }
          // Notify the open data channel
          pluginHandle.ondataopen(label);
        }
      };
      var onDataChannelError = function onDataChannelError(error) {
        Janus$1.error('Got error on data channel:', error);
        // TODO
      };

      if (!incoming) {
        // FIXME Add options (ordered, maxRetransmits, etc.)
        config.dataChannel[dclabel] = config.pc.createDataChannel(dclabel, {
          ordered: false
        });
      } else {
        // The channel was created by Janus
        config.dataChannel[dclabel] = incoming;
      }
      config.dataChannel[dclabel].onmessage = onDataChannelMessage;
      config.dataChannel[dclabel].onopen = onDataChannelStateChange;
      config.dataChannel[dclabel].onclose = onDataChannelStateChange;
      config.dataChannel[dclabel].onerror = onDataChannelError;
      config.dataChannel[dclabel].pending = [];
      if (pendingText) config.dataChannel[dclabel].pending.push(pendingText);
    }

    // Private method to send a data channel message
    function sendData(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var text = callbacks.text;
      if (text === null || text === undefined) {
        Janus$1.warn("Invalid text");
        callbacks.error("Invalid text");
        return;
      }
      var label = callbacks.label ? callbacks.label : Janus$1.dataChanDefaultLabel;
      if (!config.dataChannel[label]) {
        // Create new data channel and wait for it to open
        createDataChannel(handleId, label, false, text);
        callbacks.success();
        return;
      }
      if (config.dataChannel[label].readyState !== "open") {
        config.dataChannel[label].pending.push(text);
        callbacks.success();
        return;
      }
      Janus$1.log("Sending string on data channel <" + label + ">: " + text);
      config.dataChannel[label].send(text);
      callbacks.success();
    }

    // Private method to send a DTMF tone
    function sendDtmf(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      if (config.dtmfSender === null || config.dtmfSender === undefined) {
        // Create the DTMF sender the proper way, if possible
        if (config.pc !== undefined && config.pc !== null) {
          var senders = config.pc.getSenders();
          var audioSender = senders.find(function (sender) {
            return sender.track && sender.track.kind === 'audio';
          });
          if (!audioSender) {
            Janus$1.warn("Invalid DTMF configuration (no audio track)");
            callbacks.error("Invalid DTMF configuration (no audio track)");
            return;
          }
          config.dtmfSender = audioSender.dtmf;
          if (config.dtmfSender) {
            Janus$1.log("Created DTMF Sender");
            config.dtmfSender.ontonechange = function (tone) {
              Janus$1.debug("Sent DTMF tone: " + tone.tone);
            };
          }
        }
        if (config.dtmfSender === null || config.dtmfSender === undefined) {
          Janus$1.warn("Invalid DTMF configuration");
          callbacks.error("Invalid DTMF configuration");
          return;
        }
      }
      var dtmf = callbacks.dtmf;
      if (dtmf === null || dtmf === undefined) {
        Janus$1.warn("Invalid DTMF parameters");
        callbacks.error("Invalid DTMF parameters");
        return;
      }
      var tones = dtmf.tones;
      if (tones === null || tones === undefined) {
        Janus$1.warn("Invalid DTMF string");
        callbacks.error("Invalid DTMF string");
        return;
      }
      var duration = dtmf.duration;
      if (duration === null || duration === undefined) duration = 500; // We choose 500ms as the default duration for a tone
      var gap = dtmf.gap;
      if (gap === null || gap === undefined) gap = 50; // We choose 50ms as the default gap between tones
      Janus$1.debug("Sending DTMF string " + tones + " (duration " + duration + "ms, gap " + gap + "ms)");
      config.dtmfSender.insertDTMF(tones, duration, gap);
      callbacks.success();
    }

    // Private method to destroy a plugin handle
    function destroyHandle(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      var asyncRequest = true;
      if (callbacks.asyncRequest !== undefined && callbacks.asyncRequest !== null) asyncRequest = callbacks.asyncRequest === true;
      var noRequest = true;
      if (callbacks.noRequest !== undefined && callbacks.noRequest !== null) noRequest = callbacks.noRequest === true;
      Janus$1.log("Destroying handle " + handleId + " (async=" + asyncRequest + ")");
      cleanupWebrtc(handleId);
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.detached) {
        // Plugin was already detached by Janus, calling detach again will return a handle not found error, so just exit here
        delete pluginHandles[handleId];
        callbacks.success();
        return;
      }
      if (noRequest) {
        // We're only removing the handle locally
        delete pluginHandles[handleId];
        callbacks.success();
        return;
      }
      if (!connected) {
        Janus$1.warn("Is the server down? (connected=false)");
        callbacks.error("Is the server down? (connected=false)");
        return;
      }
      var request = {
        "rtcgw": "detach",
        "transaction": Janus$1.randomString(12)
      };
      if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
      if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
      if (websockets) {
        request["session_id"] = sessionId;
        request["handle_id"] = handleId;
        ws.send(JSON.stringify(request));
        delete pluginHandles[handleId];
        callbacks.success();
        return;
      }
      Janus$1.httpAPICall(server + "/" + sessionId + "/" + handleId, {
        verb: 'POST',
        async: asyncRequest,
        // Sometimes we need false here, or destroying in onbeforeunload won't work
        withCredentials: withCredentials,
        body: request,
        success: function success(json) {
          Janus$1.log("Destroyed handle:");
          Janus$1.debug(json);
          if (json["rtcgw"] !== "success") {
            Janus$1.error("Ooops: " + json["error"].code + " " + json["error"].reason); // FIXME
          }

          delete pluginHandles[handleId];
          callbacks.success();
        },
        error: function error(textStatus, errorThrown) {
          Janus$1.error(textStatus + ":", errorThrown); // FIXME
          // We cleanup anyway
          delete pluginHandles[handleId];
          callbacks.success();
        }
      });
    }

    // WebRTC stuff
    function streamsDone(handleId, jsep, media, callbacks, stream) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      Janus$1.debug("streamsDone:", stream);
      if (stream) {
        Janus$1.debug("  -- Audio tracks:", stream.getAudioTracks());
        Janus$1.debug("  -- Video tracks:", stream.getVideoTracks());
      }
      // We're now capturing the new stream: check if we're updating or if it's a new thing
      var addTracks = false;
      if (!config.myStream || !media.update || config.streamExternal) {
        config.myStream = stream;
        addTracks = true;
      } else {
        // We only need to update the existing stream
        if ((!media.update && isAudioSendEnabled(media) || media.update && (media.addAudio || media.replaceAudio)) && stream.getAudioTracks() && stream.getAudioTracks().length) {
          config.myStream.addTrack(stream.getAudioTracks()[0]);
          if (Janus$1.unifiedPlan) {
            // Use Transceivers
            Janus$1.log((media.replaceAudio ? "Replacing" : "Adding") + " audio track:", stream.getAudioTracks()[0]);
            var audioTransceiver = null;
            var transceivers = config.pc.getTransceivers();
            if (transceivers && transceivers.length > 0) {
              for (var i in transceivers) {
                var t = transceivers[i];
                if (t.sender && t.sender.track && t.sender.track.kind === "audio" || t.receiver && t.receiver.track && t.receiver.track.kind === "audio") {
                  audioTransceiver = t;
                  break;
                }
              }
            }
            if (audioTransceiver && audioTransceiver.sender) {
              audioTransceiver.sender.replaceTrack(stream.getAudioTracks()[0]);
            } else {
              config.pc.addTrack(stream.getAudioTracks()[0], stream);
            }
          } else {
            Janus$1.log((media.replaceAudio ? "Replacing" : "Adding") + " audio track:", stream.getAudioTracks()[0]);
            config.pc.addTrack(stream.getAudioTracks()[0], stream);
          }
        }
        if ((!media.update && isVideoSendEnabled(media) || media.update && (media.addVideo || media.replaceVideo)) && stream.getVideoTracks() && stream.getVideoTracks().length) {
          config.myStream.addTrack(stream.getVideoTracks()[0]);
          if (Janus$1.unifiedPlan) {
            // Use Transceivers
            Janus$1.log((media.replaceVideo ? "Replacing" : "Adding") + " video track:", stream.getVideoTracks()[0]);
            var videoTransceiver = null;
            var transceivers = config.pc.getTransceivers();
            if (transceivers && transceivers.length > 0) {
              for (var i in transceivers) {
                var t = transceivers[i];
                if (t.sender && t.sender.track && t.sender.track.kind === "video" || t.receiver && t.receiver.track && t.receiver.track.kind === "video") {
                  videoTransceiver = t;
                  break;
                }
              }
            }
            if (videoTransceiver && videoTransceiver.sender) {
              videoTransceiver.sender.replaceTrack(stream.getVideoTracks()[0]);
            } else {
              config.pc.addTrack(stream.getVideoTracks()[0], stream);
            }
          } else {
            Janus$1.log((media.replaceVideo ? "Replacing" : "Adding") + " video track:", stream.getVideoTracks()[0]);
            config.pc.addTrack(stream.getVideoTracks()[0], stream);
          }
        }
      }
      // If we still need to create a PeerConnection, let's do that
      if (!config.pc) {
        var pc_config = {
          "iceServers": iceServers,
          "iceTransportPolicy": iceTransportPolicy,
          "bundlePolicy": bundlePolicy
        };
        if (Janus$1.webRTCAdapter.browserDetails.browser === "chrome") {
          // For Chrome versions before 72, we force a plan-b semantic, and unified-plan otherwise
          pc_config["sdpSemantics"] = Janus$1.webRTCAdapter.browserDetails.version < 72 ? "plan-b" : "unified-plan";
        }
        var pc_constraints = {
          "optional": [{
            "DtlsSrtpKeyAgreement": true
          }]
        };
        if (ipv6Support === true) {
          pc_constraints.optional.push({
            "googIPv6": true
          });
        }
        // Any custom constraint to add?
        if (callbacks.rtcConstraints && _typeof(callbacks.rtcConstraints) === 'object') {
          Janus$1.debug("Adding custom PeerConnection constraints:", callbacks.rtcConstraints);
          for (var i in callbacks.rtcConstraints) {
            pc_constraints.optional.push(callbacks.rtcConstraints[i]);
          }
        }
        if (Janus$1.webRTCAdapter.browserDetails.browser === "edge") {
          // This is Edge, enable BUNDLE explicitly
          pc_config.bundlePolicy = "max-bundle";
        }
        Janus$1.log("Creating PeerConnection");
        Janus$1.debug(pc_constraints);
        config.pc = new RTCPeerConnection(pc_config, pc_constraints);
        Janus$1.debug(config.pc);
        if (config.pc.getStats) {
          // FIXME
          config.volume = {};
          config.bitrate.value = "0 kbits/sec";
        }
        Janus$1.log("Preparing local SDP and gathering candidates (trickle=" + config.trickle + ")");
        config.pc.oniceconnectionstatechange = function (e) {
          if (config.pc) pluginHandle.iceState(config.pc.iceConnectionState);
        };
        config.pc.onicecandidate = function (event) {
          if (event.candidate == null || Janus$1.webRTCAdapter.browserDetails.browser === 'edge' && event.candidate.candidate.indexOf('endOfCandidates') > 0) {
            Janus$1.log("End of candidates.");
            config.iceDone = true;
            if (config.trickle === true) {
              // Notify end of candidates
              sendTrickleCandidate(handleId, {
                "completed": true
              });
            } else {
              // No trickle, time to send the complete SDP (including all candidates)
              sendSDP(handleId, callbacks);
            }
          } else {
            // JSON.stringify doesn't work on some WebRTC objects anymore
            // See https://code.google.com/p/chromium/issues/detail?id=467366
            var candidate = {
              "candidate": event.candidate.candidate,
              "sdpMid": event.candidate.sdpMid,
              "sdpMLineIndex": event.candidate.sdpMLineIndex
            };
            if (config.trickle === true) {
              // Send candidate
              sendTrickleCandidate(handleId, candidate);
            }
          }
        };
        config.pc.ontrack = function (event) {
          Janus$1.log("Handling Remote Track");
          Janus$1.debug(event);
          if (!event.streams) return;
          config.remoteStream = event.streams[0];
          pluginHandle.onremotestream(config.remoteStream);
          if (event.track.onended) return;
          Janus$1.log("Adding onended callback to track:", event.track);
          event.track.onended = function (ev) {
            Janus$1.log("Remote track muted/removed:", ev);
            if (config.remoteStream) {
              config.remoteStream.removeTrack(ev.target);
              pluginHandle.onremotestream(config.remoteStream);
            }
          };
          event.track.onmute = event.track.onended;
          event.track.onunmute = function (ev) {
            Janus$1.log("Remote track flowing again:", ev);
            try {
              config.remoteStream.addTrack(ev.target);
              pluginHandle.onremotestream(config.remoteStream);
            } catch (e) {
              Janus$1.error(e);
            }
          };
        };
      }
      //用于设置流的格式
      if (addTracks && stream !== null && stream !== undefined) {
        Janus$1.log('Adding local stream');
        console.log("callbacks", callbacks);
        if (callbacks.media.video == "screen") {
          var simulcast2 = callbacks.simulcast2 === true ? true : false;
          stream.getTracks().forEach(function (track) {
            Janus$1.log('Adding local track:', track);
            track.applyConstraints({
              frameRate: 5
            });
            if (!simulcast2) {
              config.pc.addTrack(track, stream);
            } else {
              if (track.kind === "audio") {
                config.pc.addTrack(track, stream);
              } else {
                Janus$1.log('Enabling rid-based simulcasting:', track);
                var maxBitrates = getMaxBitrates(callbacks.simulcastMaxBitrates);
                config.pc.addTransceiver(track, {
                  direction: "sendrecv",
                  streams: [stream],
                  sendEncodings: [{
                    rid: "h",
                    active: true,
                    maxBitrate: maxBitrates.high
                  }, {
                    rid: "m",
                    active: true,
                    maxBitrate: maxBitrates.medium,
                    scaleResolutionDownBy: 2
                  }, {
                    rid: "l",
                    active: true,
                    maxBitrate: maxBitrates.low,
                    scaleResolutionDownBy: 4
                  }]
                });
              }
            }
          });
        } else {
          var simulcast2 = callbacks.simulcast2 === true ? true : false;
          // var tracks = stream.getVideoTracks();
          var tracks = stream.getTracks();
          var videoTrack = tracks[0];
          if (videoTrack) {
            var settings = videoTrack.getSettings();
            console.log("videoTrack", videoTrack);
            console.log("videosettings", settings);
          }
          var audioTracks = stream.getAudioTracks();
          var audioTrack = audioTracks[0];
          if (audioTrack) {
            var _settings = audioTrack.getSettings();
            console.log("audiosettings", _settings);
          }
          tracks.forEach(function (track) {
            track.applyConstraints({
              frameRate: {
                max: callbacks.frameRate
              }
            });
            Janus$1.log('Adding local track:', track);
            // if (!simulcast2) {
            if (simulcast2) {
              config.pc.addTrack(track, stream);
              var vsender = null;
              var senders = config.pc.getSenders();
              for (var index in senders) {
                var s = senders[index];
                if (s && s.track && s.track.kind === "video") {
                  vsender = s;
                }
              }
              var parameters = null;
              if (vsender) {
                parameters = vsender.getParameters();
              }
              if (parameters && parameters.encodings) {
                parameters.encodings[0].maxBitrate = 100000;
                vsender.setParameters(parameters).then(function (res) {
                  console.log('Successed to set parameters!', parameters);
                })["catch"](function (err) {
                  console.log("err", err);
                  console.error(err);
                });
              }
              // debugger
            } else {
              if (track.kind === "audio") {
                config.pc.addTrack(track, stream);
              } else {
                // track.applyConstraints({
                // 	frameRate: { max: 5 }
                // })
                Janus$1.log('Enabling rid-based simulcasting:', track);
                var maxBitrate = callbacks.bitrate || 100000;
                config.pc.addTransceiver(track, {
                  direction: "sendrecv",
                  streams: [stream],
                  sendEncodings: [{
                    rid: "h",
                    active: true,
                    maxBitrate: maxBitrate
                  }
                  // { rid: "h", active: true, maxBitrate: maxBitrates.high },
                  // { rid: "m", active: true, maxBitrate: maxBitrates.medium, scaleResolutionDownBy: 2 },
                  // { rid: "l", active: true, maxBitrate: maxBitrates.low, scaleResolutionDownBy: 4 }
                  ]
                });
              }
            }
          });
        }
      }
      // Any data channel to create?
      if (isDataEnabled(media) && !config.dataChannel[Janus$1.dataChanDefaultLabel]) {
        Janus$1.log("Creating data channel");
        createDataChannel(handleId, Janus$1.dataChanDefaultLabel, false);
        config.pc.ondatachannel = function (event) {
          Janus$1.log("Data channel created by Janus:", event);
          createDataChannel(handleId, event.channel.label, event.channel);
        };
      }
      // If there's a new local stream, let's notify the application
      if (config.myStream) pluginHandle.onlocalstream(config.myStream);
      // Create offer/answer now
      if (jsep === null || jsep === undefined) {
        createOffer(handleId, media, callbacks);
      } else {
        config.pc.setRemoteDescription(jsep).then(function () {
          Janus$1.log("Remote description accepted!");
          config.remoteSdp = jsep.sdp;
          // Any trickle candidate we cached?
          if (config.candidates && config.candidates.length > 0) {
            for (var i = 0; i < config.candidates.length; i++) {
              var candidate = config.candidates[i];
              Janus$1.debug("Adding remote candidate:", candidate);
              if (!candidate || candidate.completed === true) {
                // end-of-candidates
                config.pc.addIceCandidate(Janus$1.endOfCandidates);
              } else {
                // New candidate
                config.pc.addIceCandidate(candidate);
              }
            }
            config.candidates = [];
          }
          // Create the answer now
          createAnswer(handleId, media, callbacks);
        }, callbacks.error);
      }
    }
    //调用webrtc的MediaDevices.getUserMedia()  设置视频流的分辨率，将获取的stream传入streamsDone(handleId, jsep, media, callbacks, stream);
    function prepareWebrtc(handleId, offer, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : webrtcError;
      var jsep = callbacks.jsep;
      if (offer && jsep) {
        Janus$1.error("Provided a JSEP to a createOffer");
        callbacks.error("Provided a JSEP to a createOffer");
        return;
      } else if (!offer && (!jsep || !jsep.type || !jsep.sdp)) {
        Janus$1.error("A valid JSEP is required for createAnswer");
        callbacks.error("A valid JSEP is required for createAnswer");
        return;
      }
      callbacks.media = callbacks.media || {
        audio: true,
        video: true
      };
      var media = callbacks.media;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      config.trickle = isTrickleEnabled(callbacks.trickle);
      // Are we updating a session?
      if (config.pc === undefined || config.pc === null) {
        // Nope, new PeerConnection
        media.update = false;
        media.keepAudio = false;
        media.keepVideo = false;
      } else if (config.pc !== undefined && config.pc !== null) {
        Janus$1.log("Updating existing media session");
        media.update = true;
        // Check if there's anything to add/remove/replace, or if we
        // can go directly to preparing the new SDP offer or answer
        if (callbacks.stream !== null && callbacks.stream !== undefined) {
          // External stream: is this the same as the one we were using before?
          if (callbacks.stream !== config.myStream) {
            Janus$1.log("Renegotiation involves a new external stream");
          }
        } else {
          // Check if there are changes on audio
          if (media.addAudio) {
            media.keepAudio = false;
            media.replaceAudio = false;
            media.removeAudio = false;
            media.audioSend = true;
            if (config.myStream && config.myStream.getAudioTracks() && config.myStream.getAudioTracks().length) {
              Janus$1.error("Can't add audio stream, there already is one");
              callbacks.error("Can't add audio stream, there already is one");
              return;
            }
          } else if (media.removeAudio) {
            media.keepAudio = false;
            media.replaceAudio = false;
            media.addAudio = false;
            media.audioSend = false;
          } else if (media.replaceAudio) {
            media.keepAudio = false;
            media.addAudio = false;
            media.removeAudio = false;
            media.audioSend = true;
          }
          if (config.myStream === null || config.myStream === undefined) {
            // No media stream: if we were asked to replace, it's actually an "add"
            if (media.replaceAudio) {
              media.keepAudio = false;
              media.replaceAudio = false;
              media.addAudio = true;
              media.audioSend = true;
            }
            if (isAudioSendEnabled(media)) {
              media.keepAudio = false;
              media.addAudio = true;
            }
          } else {
            if (config.myStream.getAudioTracks() === null || config.myStream.getAudioTracks() === undefined || config.myStream.getAudioTracks().length === 0) {
              // No audio track: if we were asked to replace, it's actually an "add"
              if (media.replaceAudio) {
                media.keepAudio = false;
                media.replaceAudio = false;
                media.addAudio = true;
                media.audioSend = true;
              }
              if (isAudioSendEnabled(media)) {
                media.keepVideo = false;
                media.addAudio = true;
              }
            } else {
              // We have an audio track: should we keep it as it is?
              if (isAudioSendEnabled(media) && !media.removeAudio && !media.replaceAudio) {
                media.keepAudio = true;
              }
            }
          }
          // Check if there are changes on video
          if (media.addVideo) {
            media.keepVideo = false;
            media.replaceVideo = false;
            media.removeVideo = false;
            media.videoSend = true;
            if (config.myStream && config.myStream.getVideoTracks() && config.myStream.getVideoTracks().length) {
              Janus$1.error("Can't add video stream, there already is one");
              callbacks.error("Can't add video stream, there already is one");
              return;
            }
          } else if (media.removeVideo) {
            media.keepVideo = false;
            media.replaceVideo = false;
            media.addVideo = false;
            media.videoSend = false;
          } else if (media.replaceVideo) {
            media.keepVideo = false;
            media.addVideo = false;
            media.removeVideo = false;
            media.videoSend = true;
          }
          if (config.myStream === null || config.myStream === undefined) {
            // No media stream: if we were asked to replace, it's actually an "add"
            if (media.replaceVideo) {
              media.keepVideo = false;
              media.replaceVideo = false;
              media.addVideo = true;
              media.videoSend = true;
            }
            if (isVideoSendEnabled(media)) {
              media.keepVideo = false;
              media.addVideo = true;
            }
          } else {
            if (config.myStream.getVideoTracks() === null || config.myStream.getVideoTracks() === undefined || config.myStream.getVideoTracks().length === 0) {
              // No video track: if we were asked to replace, it's actually an "add"
              if (media.replaceVideo) {
                media.keepVideo = false;
                media.replaceVideo = false;
                media.addVideo = true;
                media.videoSend = true;
              }
              if (isVideoSendEnabled(media)) {
                media.keepVideo = false;
                media.addVideo = true;
              }
            } else {
              // We have a video track: should we keep it as it is?
              if (isVideoSendEnabled(media) && !media.removeVideo && !media.replaceVideo) {
                media.keepVideo = true;
              }
            }
          }
          // Data channels can only be added
          if (media.addData) media.data = true;
        }
        // If we're updating and keeping all tracks, let's skip the getUserMedia part
        if (isAudioSendEnabled(media) && media.keepAudio && isVideoSendEnabled(media) && media.keepVideo) {
          pluginHandle.consentDialog(false);
          streamsDone(handleId, jsep, media, callbacks, config.myStream);
          return;
        }
      }
      // If we're updating, check if we need to remove/replace one of the tracks
      if (media.update && !config.streamExternal) {
        if (media.removeAudio || media.replaceAudio) {
          if (config.myStream && config.myStream.getAudioTracks() && config.myStream.getAudioTracks().length) {
            var s = config.myStream.getAudioTracks()[0];
            Janus$1.log("Removing audio track:", s);
            config.myStream.removeTrack(s);
            try {
              s.stop();
            } catch (e) {}
          }
          if (config.pc.getSenders() && config.pc.getSenders().length) {
            var ra = true;
            if (media.replaceAudio && Janus$1.unifiedPlan) {
              // We can use replaceTrack
              ra = false;
            }
            if (ra) {
              for (var index in config.pc.getSenders()) {
                var s = config.pc.getSenders()[index];
                if (s && s.track && s.track.kind === "audio") {
                  Janus$1.log("Removing audio sender:", s);
                  config.pc.removeTrack(s);
                }
              }
            }
          }
        }
        if (media.removeVideo || media.replaceVideo) {
          if (config.myStream && config.myStream.getVideoTracks() && config.myStream.getVideoTracks().length) {
            var s = config.myStream.getVideoTracks()[0];
            Janus$1.log("Removing video track:", s);
            config.myStream.removeTrack(s);
            try {
              s.stop();
            } catch (e) {}
          }
          if (config.pc.getSenders() && config.pc.getSenders().length) {
            var rv = true;
            if (media.replaceVideo && Janus$1.unifiedPlan) {
              // We can use replaceTrack
              rv = false;
            }
            if (rv) {
              for (var index in config.pc.getSenders()) {
                var s = config.pc.getSenders()[index];
                if (s && s.track && s.track.kind === "video") {
                  Janus$1.log("Removing video sender:", s);
                  config.pc.removeTrack(s);
                }
              }
            }
          }
        }
      }
      // Was a MediaStream object passed, or do we need to take care of that?
      if (callbacks.stream !== null && callbacks.stream !== undefined) {
        var stream = callbacks.stream;
        Janus$1.log("MediaStream provided by the application");
        Janus$1.debug(stream);
        // If this is an update, let's check if we need to release the previous stream
        if (media.update) {
          if (config.myStream && config.myStream !== callbacks.stream && !config.streamExternal) {
            // We're replacing a stream we captured ourselves with an external one
            try {
              // Try a MediaStreamTrack.stop() for each track
              var tracks = config.myStream.getTracks();
              for (var i in tracks) {
                var mst = tracks[i];
                Janus$1.log(mst);
                if (mst !== null && mst !== undefined) mst.stop();
              }
            } catch (e) {
              // Do nothing if this fails
            }
            config.myStream = null;
          }
        }
        // Skip the getUserMedia part
        config.streamExternal = true;
        pluginHandle.consentDialog(false);
        streamsDone(handleId, jsep, media, callbacks, stream);
        return;
      }
      if (isAudioSendEnabled(media) || isVideoSendEnabled(media)) {
        if (!Janus$1.isGetUserMediaAvailable()) {
          callbacks.error("getUserMedia not available");
          return;
        }
        var constraints = {
          mandatory: {},
          optional: []
        };
        pluginHandle.consentDialog(true);
        var audioSupport = isAudioSendEnabled(media);
        if (audioSupport === true && media != undefined && media != null) {
          if (_typeof(media.audio) === 'object') {
            audioSupport = media.audio;
          }
        }
        var videoSupport = isVideoSendEnabled(media);
        if (videoSupport === true && media != undefined && media != null) {
          var simulcast = callbacks.simulcast === true ? true : false;
          var simulcast2 = callbacks.simulcast2 === true ? true : false;
          if ((simulcast || simulcast2) && !jsep && (media.video === undefined || media.video === false)) media.video = "hires";
          if (media.video && media.video != 'screen' && media.video != 'window') {
            if (_typeof(media.video) === 'object') {
              videoSupport = media.video;
            } else {
              var width = 0;
              var height = 0;
              if (media.video === 'lowres') {
                // Small resolution, 4:3
                height = 240;
                width = 320;
              } else if (media.video === 'lowres-16:9') {
                // Small resolution, 16:9
                height = 180;
                width = 320;
              } else if (media.video === 'hires' || media.video === 'hires-16:9' || media.video === 'hdres') {
                // High(HD) resolution is only 16:9
                height = 720;
                width = 1280;
              } else if (media.video === 'fhdres') {
                // Full HD resolution is only 16:9
                height = 1080;
                width = 1920;
              } else if (media.video === '4kres') {
                // 4K resolution is only 16:9
                height = 2160;
                width = 3840;
              } else if (media.video === 'stdres') {
                // Normal resolution, 4:3
                height = 480;
                width = 640;
              } else if (media.video === 'stdres-16:9') {
                // Normal resolution, 16:9
                height = 360;
                width = 640;
              } else {
                Janus$1.log("Default video setting is stdres 4:3");
                height = 480;
                width = 640;
              }
              Janus$1.log("Adding media constraint:", media.video);
              videoSupport = {
                'height': {
                  'ideal': height
                },
                'width': {
                  'ideal': width
                }
              };
              Janus$1.log("Adding video constraint:", videoSupport);
            }
          } else if (media.video === 'screen' || media.video === 'window') {
            // We're going to try and use the extension for Chrome 34+, the old approach
            // for older versions of Chrome, or the experimental support in Firefox 33+
            var callbackUserMedia = function callbackUserMedia(error, stream) {
              pluginHandle.consentDialog(false);
              if (error) {
                callbacks.error(error);
              } else {
                streamsDone(handleId, jsep, media, callbacks, stream);
              }
            };
            var getScreenMedia = function getScreenMedia(constraints, gsmCallback, useAudio) {
              Janus$1.log("Adding media constraint (screen capture)");
              Janus$1.debug(constraints);
              navigator.mediaDevices.getUserMedia(constraints).then(function (stream) {
                if (useAudio) {
                  navigator.mediaDevices.getUserMedia({
                    audio: true,
                    video: false
                  }).then(function (audioStream) {
                    stream.addTrack(audioStream.getAudioTracks()[0]);
                    gsmCallback(null, stream);
                  });
                } else {
                  gsmCallback(null, stream);
                }
              })["catch"](function (error) {
                pluginHandle.consentDialog(false);
                gsmCallback(error);
              });
            };
            if (!media.screenshareFrameRate) {
              media.screenshareFrameRate = 3;
            }
            if (navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia) {
              // The new experimental getDisplayMedia API is available, let's use that
              // https://groups.google.com/forum/#!topic/discuss-webrtc/Uf0SrR4uxzk
              // https://webrtchacks.com/chrome-screensharing-getdisplaymedia/
              navigator.mediaDevices.getDisplayMedia({
                video: true
              }).then(function (stream) {
                pluginHandle.consentDialog(false);
                if (isAudioSendEnabled(media) && !media.keepAudio) {
                  navigator.mediaDevices.getUserMedia({
                    audio: true,
                    video: false
                  }).then(function (audioStream) {
                    stream.addTrack(audioStream.getAudioTracks()[0]);
                    streamsDone(handleId, jsep, media, callbacks, stream);
                  });
                } else {
                  streamsDone(handleId, jsep, media, callbacks, stream);
                }
              }, function (error) {
                pluginHandle.consentDialog(false);
                callbacks.error(error);
              });
              return;
            }
            if (Janus$1.webRTCAdapter.browserDetails.browser === 'chrome') {
              var chromever = Janus$1.webRTCAdapter.browserDetails.version;
              var maxver = 33;
              if (window.navigator.userAgent.match('Linux')) maxver = 35; // "known" crash in chrome 34 and 35 on linux
              if (chromever >= 26 && chromever <= maxver) {
                // Chrome 26->33 requires some awkward chrome://flags manipulation
                constraints = {
                  video: {
                    mandatory: {
                      googLeakyBucket: true,
                      maxWidth: window.screen.width,
                      maxHeight: window.screen.height,
                      minFrameRate: media.screenshareFrameRate,
                      maxFrameRate: media.screenshareFrameRate,
                      chromeMediaSource: 'screen'
                    }
                  },
                  audio: isAudioSendEnabled(media) && !media.keepAudio
                };
                getScreenMedia(constraints, callbackUserMedia);
              } else {
                // Chrome 34+ requires an extension
                Janus$1.extension.getScreen(function (error, sourceId) {
                  if (error) {
                    pluginHandle.consentDialog(false);
                    return callbacks.error(error);
                  }
                  constraints = {
                    audio: false,
                    video: {
                      mandatory: {
                        chromeMediaSource: 'desktop',
                        maxWidth: window.screen.width,
                        maxHeight: window.screen.height,
                        minFrameRate: media.screenshareFrameRate,
                        maxFrameRate: media.screenshareFrameRate
                      },
                      optional: [{
                        googLeakyBucket: true
                      }, {
                        googTemporalLayeredScreencast: true
                      }]
                    }
                  };
                  constraints.video.mandatory.chromeMediaSourceId = sourceId;
                  getScreenMedia(constraints, callbackUserMedia, isAudioSendEnabled(media) && !media.keepAudio);
                });
              }
            } else if (Janus$1.webRTCAdapter.browserDetails.browser === 'firefox') {
              if (Janus$1.webRTCAdapter.browserDetails.version >= 33) {
                // Firefox 33+ has experimental support for screen sharing
                constraints = {
                  video: {
                    mozMediaSource: media.video,
                    mediaSource: media.video
                  },
                  audio: isAudioSendEnabled(media) && !media.keepAudio
                };
                getScreenMedia(constraints, function (err, stream) {
                  callbackUserMedia(err, stream);
                  // Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1045810
                  if (!err) {
                    var lastTime = stream.currentTime;
                    var polly = window.setInterval(function () {
                      if (!stream) window.clearInterval(polly);
                      if (stream.currentTime == lastTime) {
                        window.clearInterval(polly);
                        if (stream.onended) {
                          stream.onended();
                        }
                      }
                      lastTime = stream.currentTime;
                    }, 500);
                  }
                });
              } else {
                var error = new Error('NavigatorUserMediaError');
                error.name = 'Your version of Firefox does not support screen sharing, please install Firefox 33 (or more recent versions)';
                pluginHandle.consentDialog(false);
                callbacks.error(error);
                return;
              }
            }
            return;
          }
        }
        // If we got here, we're not screensharing
        if (media === null || media === undefined || media.video !== 'screen') {
          // Check whether all media sources are actually available or not
          navigator.mediaDevices.enumerateDevices().then(function (devices) {
            var audioExist = devices.some(function (device) {
                return device.kind === 'audioinput';
              }),
              videoExist = isScreenSendEnabled(media) || devices.some(function (device) {
                return device.kind === 'videoinput';
              });

            // Check whether a missing device is really a problem
            var audioSend = isAudioSendEnabled(media);
            var videoSend = isVideoSendEnabled(media);
            var needAudioDevice = isAudioSendRequired(media);
            var needVideoDevice = isVideoSendRequired(media);
            if (audioSend || videoSend || needAudioDevice || needVideoDevice) {
              // We need to send either audio or video
              var haveAudioDevice = audioSend ? audioExist : false;
              var haveVideoDevice = videoSend ? videoExist : false;
              if (!haveAudioDevice && !haveVideoDevice) {
                // FIXME Should we really give up, or just assume recvonly for both?
                pluginHandle.consentDialog(false);
                callbacks.error('No capture device found');
                return false;
              } else if (!haveAudioDevice && needAudioDevice) {
                pluginHandle.consentDialog(false);
                callbacks.error('Audio capture is required, but no capture device found');
                return false;
              } else if (!haveVideoDevice && needVideoDevice) {
                pluginHandle.consentDialog(false);
                callbacks.error('Video capture is required, but no capture device found');
                return false;
              }
            }
            var gumConstraints = {
              audio: audioExist && !media.keepAudio ? audioSupport : false,
              video: videoExist && !media.keepVideo ? videoSupport : false
            };
            if (media.encodings) {
              gumConstraints = media.encodings;
            }
            Janus$1.debug("getUserMedia constraints", gumConstraints);
            if (!gumConstraints.audio && !gumConstraints.video) {
              pluginHandle.consentDialog(false);
              streamsDone(handleId, jsep, media, callbacks, stream);
            } else {
              console.log("gumConstraints_________", gumConstraints, media.encodings);
              navigator.mediaDevices.getUserMedia(media.encodings ? media.encodings : gumConstraints).then(function (stream) {
                pluginHandle.consentDialog(false);
                streamsDone(handleId, jsep, media, callbacks, stream);
              })["catch"](function (error) {
                pluginHandle.consentDialog(false);
                callbacks.error({
                  code: error.code,
                  name: error.name,
                  message: error.message
                });
              });
            }
          })["catch"](function (error) {
            pluginHandle.consentDialog(false);
            callbacks.error('enumerateDevices error', error);
          });
        }
      } else {
        // No need to do a getUserMedia, create offer/answer right away
        streamsDone(handleId, jsep, media, callbacks);
      }
    }
    function prepareWebrtcPeer(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : webrtcError;
      var jsep = callbacks.jsep;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      if (jsep !== undefined && jsep !== null) {
        if (config.pc === null) {
          Janus$1.warn("Wait, no PeerConnection?? if this is an answer, use createAnswer and not handleRemoteJsep");
          callbacks.error("No PeerConnection: if this is an answer, use createAnswer and not handleRemoteJsep");
          return;
        }
        config.pc.setRemoteDescription(jsep).then(function () {
          Janus$1.log("Remote description accepted!");
          config.remoteSdp = jsep.sdp;
          // Any trickle candidate we cached?
          if (config.candidates && config.candidates.length > 0) {
            for (var i = 0; i < config.candidates.length; i++) {
              var candidate = config.candidates[i];
              Janus$1.debug("Adding remote candidate:", candidate);
              if (!candidate || candidate.completed === true) {
                // end-of-candidates
                config.pc.addIceCandidate(Janus$1.endOfCandidates);
              } else {
                // New candidate
                config.pc.addIceCandidate(candidate);
              }
            }
            config.candidates = [];
          }
          // Done
          callbacks.success();
        }, callbacks.error);
      } else {
        callbacks.error("Invalid JSEP");
      }
    }
    function createOffer(handleId, media, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      callbacks.customizeSdp = typeof callbacks.customizeSdp == "function" ? callbacks.customizeSdp : Janus$1.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var simulcast = callbacks.simulcast === true ? true : false;
      if (!simulcast) {
        Janus$1.log("Creating offer (iceDone=" + config.iceDone + ")");
      } else {
        Janus$1.log("Creating offer (iceDone=" + config.iceDone + ", simulcast=" + simulcast + ")");
      }
      // https://code.google.com/p/webrtc/issues/detail?id=3508
      var mediaConstraints = {};
      if (Janus$1.unifiedPlan) {
        // We can use Transceivers
        var audioTransceiver = null,
          videoTransceiver = null;
        var transceivers = config.pc.getTransceivers();
        if (transceivers && transceivers.length > 0) {
          for (var i in transceivers) {
            var t = transceivers[i];
            if (t.sender && t.sender.track && t.sender.track.kind === "audio" || t.receiver && t.receiver.track && t.receiver.track.kind === "audio") {
              if (!audioTransceiver) audioTransceiver = t;
              continue;
            }
            if (t.sender && t.sender.track && t.sender.track.kind === "video" || t.receiver && t.receiver.track && t.receiver.track.kind === "video") {
              if (!videoTransceiver) videoTransceiver = t;
              continue;
            }
          }
        }
        // Handle audio (and related changes, if any)
        var audioSend = isAudioSendEnabled(media);
        var audioRecv = isAudioRecvEnabled(media);
        if (!audioSend && !audioRecv) {
          // Audio disabled: have we removed it?
          if (media.removeAudio && audioTransceiver) {
            if (audioTransceiver.setDirection) {
              audioTransceiver.setDirection("inactive");
            } else {
              audioTransceiver.direction = "inactive";
            }
            Janus$1.log("Setting audio transceiver to inactive:", audioTransceiver);
          }
        } else {
          // Take care of audio m-line
          if (audioSend && audioRecv) {
            if (audioTransceiver) {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("sendrecv");
              } else {
                audioTransceiver.direction = "sendrecv";
              }
              Janus$1.log("Setting audio transceiver to sendrecv:", audioTransceiver);
            }
          } else if (audioSend && !audioRecv) {
            if (audioTransceiver) {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("sendonly");
              } else {
                audioTransceiver.direction = "sendonly";
              }
              Janus$1.log("Setting audio transceiver to sendonly:", audioTransceiver);
            }
          } else if (!audioSend && audioRecv) {
            if (audioTransceiver) {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("recvonly");
              } else {
                audioTransceiver.direction = "recvonly";
              }
              Janus$1.log("Setting audio transceiver to recvonly:", audioTransceiver);
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              audioTransceiver = config.pc.addTransceiver("audio", {
                direction: "recvonly"
              });
              Janus$1.log("Adding recvonly audio transceiver:", audioTransceiver);
            }
          }
        }
        // Handle video (and related changes, if any)
        var videoSend = isVideoSendEnabled(media);
        var videoRecv = isVideoRecvEnabled(media);
        if (!videoSend && !videoRecv) {
          // Video disabled: have we removed it?
          if (media.removeVideo && videoTransceiver) {
            if (videoTransceiver.setDirection) {
              videoTransceiver.setDirection("inactive");
            } else {
              videoTransceiver.direction = "inactive";
            }
            Janus$1.log("Setting video transceiver to inactive:", videoTransceiver);
          }
        } else {
          // Take care of video m-line
          if (videoSend && videoRecv) {
            if (videoTransceiver) {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("sendrecv");
              } else {
                videoTransceiver.direction = "sendrecv";
              }
              Janus$1.log("Setting video transceiver to sendrecv:", videoTransceiver);
            }
          } else if (videoSend && !videoRecv) {
            if (videoTransceiver) {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("sendonly");
              } else {
                videoTransceiver.direction = "sendonly";
              }
              Janus$1.log("Setting video transceiver to sendonly:", videoTransceiver);
            }
          } else if (!videoSend && videoRecv) {
            if (videoTransceiver) {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("recvonly");
              } else {
                videoTransceiver.direction = "recvonly";
              }
              Janus$1.log("Setting video transceiver to recvonly:", videoTransceiver);
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              videoTransceiver = config.pc.addTransceiver("video", {
                direction: "recvonly"
              });
              Janus$1.log("Adding recvonly video transceiver:", videoTransceiver);
            }
          }
        }
      } else {
        mediaConstraints["offerToReceiveAudio"] = isAudioRecvEnabled(media);
        mediaConstraints["offerToReceiveVideo"] = isVideoRecvEnabled(media);
      }
      var iceRestart = callbacks.iceRestart === true ? true : false;
      if (iceRestart) {
        mediaConstraints["iceRestart"] = true;
      }
      Janus$1.debug(mediaConstraints);
      // Check if this is Firefox and we've been asked to do simulcasting
      var sendVideo = isVideoSendEnabled(media);
      if (sendVideo && simulcast && Janus$1.webRTCAdapter.browserDetails.browser === "firefox") {
        // FIXME Based on https://gist.github.com/voluntas/088bc3cc62094730647b
        Janus$1.log("Enabling Simulcasting for Firefox (RID)");
        var sender = config.pc.getSenders().find(function (s) {
          return s.track.kind == "video";
        });
        if (sender) {
          var parameters = sender.getParameters();
          if (!parameters) parameters = {};
          var maxBitrates = getMaxBitrates(callbacks.simulcastMaxBitrates);
          parameters.encodings = [{
            rid: "h",
            active: true,
            maxBitrate: maxBitrates.high
          }, {
            rid: "m",
            active: true,
            maxBitrate: maxBitrates.medium,
            scaleResolutionDownBy: 2
          }, {
            rid: "l",
            active: true,
            maxBitrate: maxBitrates.low,
            scaleResolutionDownBy: 4
          }];
          sender.setParameters(parameters);
        }
      }
      config.pc.createOffer(mediaConstraints).then(function (offer) {
        Janus$1.debug(offer);
        // JSON.stringify doesn't work on some WebRTC objects anymore
        // See https://code.google.com/p/chromium/issues/detail?id=467366
        var jsep = {
          "type": offer.type,
          "sdp": offer.sdp
        };
        callbacks.customizeSdp(jsep);
        offer.sdp = jsep.sdp;
        Janus$1.log("Setting local description");
        if (sendVideo && simulcast) {
          // This SDP munging only works with Chrome (Safari STP may support it too)
          if (Janus$1.webRTCAdapter.browserDetails.browser === "chrome" || Janus$1.webRTCAdapter.browserDetails.browser === "safari") {
            Janus$1.log("Enabling Simulcasting for Chrome (SDP munging)");
            offer.sdp = mungeSdpForSimulcasting(offer.sdp);
          } else if (Janus$1.webRTCAdapter.browserDetails.browser !== "firefox") {
            Janus$1.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring");
          }
        }
        config.mySdp = offer.sdp;
        config.pc.setLocalDescription(offer)["catch"](callbacks.error);
        config.mediaConstraints = mediaConstraints;
        if (!config.iceDone && !config.trickle) {
          // Don't do anything until we have all candidates
          Janus$1.log("Waiting for all candidates...");
          return;
        }
        Janus$1.log("Offer ready");
        Janus$1.debug(callbacks);
        callbacks.success(offer);
      }, callbacks.error);
    }
    function createAnswer(handleId, media, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      callbacks.customizeSdp = typeof callbacks.customizeSdp == "function" ? callbacks.customizeSdp : Janus$1.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        callbacks.error("Invalid handle");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      var simulcast = callbacks.simulcast === true ? true : false;
      if (!simulcast) {
        Janus$1.log("Creating answer (iceDone=" + config.iceDone + ")");
      } else {
        Janus$1.log("Creating answer (iceDone=" + config.iceDone + ", simulcast=" + simulcast + ")");
      }
      var mediaConstraints = null;
      if (Janus$1.unifiedPlan) {
        // We can use Transceivers
        mediaConstraints = {};
        var audioTransceiver = null,
          videoTransceiver = null;
        var transceivers = config.pc.getTransceivers();
        if (transceivers && transceivers.length > 0) {
          for (var i in transceivers) {
            var t = transceivers[i];
            if (t.sender && t.sender.track && t.sender.track.kind === "audio" || t.receiver && t.receiver.track && t.receiver.track.kind === "audio") {
              if (!audioTransceiver) audioTransceiver = t;
              continue;
            }
            if (t.sender && t.sender.track && t.sender.track.kind === "video" || t.receiver && t.receiver.track && t.receiver.track.kind === "video") {
              if (!videoTransceiver) videoTransceiver = t;
              continue;
            }
          }
        }
        // Handle audio (and related changes, if any)
        var audioSend = isAudioSendEnabled(media);
        var audioRecv = isAudioRecvEnabled(media);
        if (!audioSend && !audioRecv) {
          // Audio disabled: have we removed it?
          if (media.removeAudio && audioTransceiver) {
            try {
              if (audioTransceiver.setDirection) {
                audioTransceiver.setDirection("inactive");
              } else {
                audioTransceiver.direction = "inactive";
              }
              Janus$1.log("Setting audio transceiver to inactive:", audioTransceiver);
            } catch (e) {
              Janus$1.error(e);
            }
          }
        } else {
          // Take care of audio m-line
          if (audioSend && audioRecv) {
            if (audioTransceiver) {
              try {
                if (audioTransceiver.setDirection) {
                  audioTransceiver.setDirection("sendrecv");
                } else {
                  audioTransceiver.direction = "sendrecv";
                }
                Janus$1.log("Setting audio transceiver to sendrecv:", audioTransceiver);
              } catch (e) {
                Janus$1.error(e);
              }
            }
          } else if (audioSend && !audioRecv) {
            try {
              if (audioTransceiver) {
                if (audioTransceiver.setDirection) {
                  audioTransceiver.setDirection("sendonly");
                } else {
                  audioTransceiver.direction = "sendonly";
                }
                Janus$1.log("Setting audio transceiver to sendonly:", audioTransceiver);
              }
            } catch (e) {
              Janus$1.error(e);
            }
          } else if (!audioSend && audioRecv) {
            if (audioTransceiver) {
              try {
                if (audioTransceiver.setDirection) {
                  audioTransceiver.setDirection("recvonly");
                } else {
                  audioTransceiver.direction = "recvonly";
                }
                Janus$1.log("Setting audio transceiver to recvonly:", audioTransceiver);
              } catch (e) {
                Janus$1.error(e);
              }
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              audioTransceiver = config.pc.addTransceiver("audio", {
                direction: "recvonly"
              });
              Janus$1.log("Adding recvonly audio transceiver:", audioTransceiver);
            }
          }
        }
        // Handle video (and related changes, if any)
        var videoSend = isVideoSendEnabled(media);
        var videoRecv = isVideoRecvEnabled(media);
        if (!videoSend && !videoRecv) {
          // Video disabled: have we removed it?
          if (media.removeVideo && videoTransceiver) {
            try {
              if (videoTransceiver.setDirection) {
                videoTransceiver.setDirection("inactive");
              } else {
                videoTransceiver.direction = "inactive";
              }
              Janus$1.log("Setting video transceiver to inactive:", videoTransceiver);
            } catch (e) {
              Janus$1.error(e);
            }
          }
        } else {
          // Take care of video m-line
          if (videoSend && videoRecv) {
            if (videoTransceiver) {
              try {
                if (videoTransceiver.setDirection) {
                  videoTransceiver.setDirection("sendrecv");
                } else {
                  videoTransceiver.direction = "sendrecv";
                }
                Janus$1.log("Setting video transceiver to sendrecv:", videoTransceiver);
              } catch (e) {
                Janus$1.error(e);
              }
            }
          } else if (videoSend && !videoRecv) {
            if (videoTransceiver) {
              try {
                if (videoTransceiver.setDirection) {
                  videoTransceiver.setDirection("sendonly");
                } else {
                  videoTransceiver.direction = "sendonly";
                }
                Janus$1.log("Setting video transceiver to sendonly:", videoTransceiver);
              } catch (e) {
                Janus$1.error(e);
              }
            }
          } else if (!videoSend && videoRecv) {
            if (videoTransceiver) {
              try {
                if (videoTransceiver.setDirection) {
                  videoTransceiver.setDirection("recvonly");
                } else {
                  videoTransceiver.direction = "recvonly";
                }
                Janus$1.log("Setting video transceiver to recvonly:", videoTransceiver);
              } catch (e) {
                Janus$1.error(e);
              }
            } else {
              // In theory, this is the only case where we might not have a transceiver yet
              videoTransceiver = config.pc.addTransceiver("video", {
                direction: "recvonly"
              });
              Janus$1.log("Adding recvonly video transceiver:", videoTransceiver);
            }
          }
        }
      } else {
        if (Janus$1.webRTCAdapter.browserDetails.browser == "firefox" || Janus$1.webRTCAdapter.browserDetails.browser == "edge") {
          mediaConstraints = {
            offerToReceiveAudio: isAudioRecvEnabled(media),
            offerToReceiveVideo: isVideoRecvEnabled(media)
          };
        } else {
          mediaConstraints = {
            mandatory: {
              OfferToReceiveAudio: isAudioRecvEnabled(media),
              OfferToReceiveVideo: isVideoRecvEnabled(media)
            }
          };
        }
      }
      Janus$1.debug(mediaConstraints);
      // Check if this is Firefox and we've been asked to do simulcasting
      var sendVideo = isVideoSendEnabled(media);
      if (sendVideo && simulcast && Janus$1.webRTCAdapter.browserDetails.browser === "firefox") {
        // FIXME Based on https://gist.github.com/voluntas/088bc3cc62094730647b
        Janus$1.log("Enabling Simulcasting for Firefox (RID)");
        var sender = config.pc.getSenders()[1];
        Janus$1.log(sender);
        var parameters = sender.getParameters();
        Janus$1.log(parameters);
        var maxBitrates = getMaxBitrates(callbacks.simulcastMaxBitrates);
        sender.setParameters({
          encodings: [{
            rid: "high",
            active: true,
            priority: "high",
            maxBitrate: maxBitrates.high
          }, {
            rid: "medium",
            active: true,
            priority: "medium",
            maxBitrate: maxBitrates.medium
          }, {
            rid: "low",
            active: true,
            priority: "low",
            maxBitrate: maxBitrates.low
          }]
        });
      }
      config.pc.createAnswer(mediaConstraints).then(function (answer) {
        Janus$1.debug(answer);
        // JSON.stringify doesn't work on some WebRTC objects anymore
        // See https://code.google.com/p/chromium/issues/detail?id=467366
        var jsep = {
          "type": answer.type,
          "sdp": answer.sdp
        };
        callbacks.customizeSdp(jsep);
        answer.sdp = jsep.sdp;
        Janus$1.log("Setting local description");
        if (sendVideo && simulcast) {
          // This SDP munging only works with Chrome
          if (Janus$1.webRTCAdapter.browserDetails.browser === "chrome") {
            // FIXME Apparently trying to simulcast when answering breaks video in Chrome...
            //~ Janus.log("Enabling Simulcasting for Chrome (SDP munging)");
            //~ answer.sdp = mungeSdpForSimulcasting(answer.sdp);
            Janus$1.warn("simulcast=true, but this is an answer, and video breaks in Chrome if we enable it");
          } else if (Janus$1.webRTCAdapter.browserDetails.browser !== "firefox") {
            Janus$1.warn("simulcast=true, but this is not Chrome nor Firefox, ignoring");
          }
        }
        config.mySdp = answer.sdp;
        config.pc.setLocalDescription(answer)["catch"](callbacks.error);
        config.mediaConstraints = mediaConstraints;
        if (!config.iceDone && !config.trickle) {
          // Don't do anything until we have all candidates
          Janus$1.log("Waiting for all candidates...");
          return;
        }
        callbacks.success(answer);
      }, callbacks.error);
    }
    function sendSDP(handleId, callbacks) {
      callbacks = callbacks || {};
      callbacks.success = typeof callbacks.success == "function" ? callbacks.success : Janus$1.noop;
      callbacks.error = typeof callbacks.error == "function" ? callbacks.error : Janus$1.noop;
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle, not sending anything");
        return;
      }
      var config = pluginHandle.webrtcStuff;
      Janus$1.log("Sending offer/answer SDP...");
      if (config.mySdp === null || config.mySdp === undefined) {
        Janus$1.warn("Local SDP instance is invalid, not sending anything...");
        return;
      }
      config.mySdp = {
        "type": config.pc.localDescription.type,
        "sdp": config.pc.localDescription.sdp
      };
      if (config.trickle === false) config.mySdp["trickle"] = false;
      Janus$1.debug(callbacks);
      config.sdpSent = true;
      callbacks.success(config.mySdp);
    }
    function _getVolume(handleId, remote) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        return 0;
      }
      var stream = remote ? "remote" : "local";
      var config = pluginHandle.webrtcStuff;
      if (!config.volume[stream]) config.volume[stream] = {
        value: 0
      };
      // Start getting the volume, if getStats is supported
      if (config.pc.getStats && Janus$1.webRTCAdapter.browserDetails.browser === "chrome") {
        if (remote && (config.remoteStream === null || config.remoteStream === undefined)) {
          Janus$1.warn("Remote stream unavailable");
          return 0;
        } else if (!remote && (config.myStream === null || config.myStream === undefined)) {
          Janus$1.warn("Local stream unavailable");
          return 0;
        }
        if (config.volume[stream].timer === null || config.volume[stream].timer === undefined) {
          Janus$1.log("Starting " + stream + " volume monitor");
          config.volume[stream].timer = setInterval(function () {
            config.pc.getStats(function (stats) {
              var results = stats.result();
              for (var i = 0; i < results.length; i++) {
                var res = results[i];
                if (res.type == 'ssrc') {
                  if (remote && res.stat('audioOutputLevel')) config.volume[stream].value = parseInt(res.stat('audioOutputLevel'));else if (!remote && res.stat('audioInputLevel')) config.volume[stream].value = parseInt(res.stat('audioInputLevel'));
                }
              }
            });
          }, 200);
          return 0; // We don't have a volume to return yet
        }

        return config.volume[stream].value;
      } else {
        // audioInputLevel and audioOutputLevel seem only available in Chrome? audioLevel
        // seems to be available on Chrome and Firefox, but they don't seem to work
        Janus$1.warn("Getting the " + stream + " volume unsupported by browser");
        return 0;
      }
    }
    function isMuted(handleId, video) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        return true;
      }
      var config = pluginHandle.webrtcStuff;
      if (config.pc === null || config.pc === undefined) {
        Janus$1.warn("Invalid PeerConnection");
        return true;
      }
      if (config.myStream === undefined || config.myStream === null) {
        Janus$1.warn("Invalid local MediaStream");
        return true;
      }
      if (video) {
        // Check video track
        if (config.myStream.getVideoTracks() === null || config.myStream.getVideoTracks() === undefined || config.myStream.getVideoTracks().length === 0) {
          Janus$1.warn("No video track");
          return true;
        }
        return !config.myStream.getVideoTracks()[0].enabled;
      } else {
        // Check audio track
        if (config.myStream.getAudioTracks() === null || config.myStream.getAudioTracks() === undefined || config.myStream.getAudioTracks().length === 0) {
          Janus$1.warn("No audio track");
          return true;
        }
        return !config.myStream.getAudioTracks()[0].enabled;
      }
    }
    function mute(handleId, video, mute) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        return false;
      }
      var config = pluginHandle.webrtcStuff;
      if (config.pc === null || config.pc === undefined) {
        Janus$1.warn("Invalid PeerConnection");
        return false;
      }
      if (config.myStream === undefined || config.myStream === null) {
        Janus$1.warn("Invalid local MediaStream");
        return false;
      }
      if (video) {
        // Mute/unmute video track
        if (config.myStream.getVideoTracks() === null || config.myStream.getVideoTracks() === undefined || config.myStream.getVideoTracks().length === 0) {
          Janus$1.warn("No video track");
          return false;
        }
        config.myStream.getVideoTracks()[0].enabled = mute ? false : true;
        return true;
      } else {
        // Mute/unmute audio track
        if (config.myStream.getAudioTracks() === null || config.myStream.getAudioTracks() === undefined || config.myStream.getAudioTracks().length === 0) {
          Janus$1.warn("No audio track");
          return false;
        }
        config.myStream.getAudioTracks()[0].enabled = mute ? false : true;
        return true;
      }
    }
    function _getNetworkQuality(handleId, callbacks) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        return "Invalid handle";
      }
      var config = pluginHandle.webrtcStuff;
      if (config.pc === null || config.pc === undefined) return "Invalid PeerConnection";
      // Start getting the bitrate, if getStats is supported
      if (config.pc.getStats) {
        config.pc.getStats().then(function (stats) {
          stats.forEach(function (res) {
            if (!res) return;
            var inStats = false;
            // Check if these are statistics on incoming media
            if ((res.mediaType === "video" || res.id.toLowerCase().indexOf("video") > -1) && res.type === "inbound-rtp" && res.id.indexOf("rtcp") < 0) {
              // New stats
              inStats = true;
            } else if (res.type == 'ssrc' && res.bytesReceived && (res.googCodecName === "VP8" || res.googCodecName === "")) {
              // Older Chromer versions
              inStats = true;
            }
            // Parse stats now
            if (inStats) {
              callbacks && callbacks(res);
              config.bitrate.bsnow = res.bytesReceived;
              config.bitrate.tsnow = res.timestamp;
              if (config.bitrate.bsbefore === null || config.bitrate.tsbefore === null) {
                // Skip this round
                config.bitrate.bsbefore = config.bitrate.bsnow;
                config.bitrate.tsbefore = config.bitrate.tsnow;
              } else {
                // Calculate bitrate
                var timePassed = config.bitrate.tsnow - config.bitrate.tsbefore;
                if (Janus$1.webRTCAdapter.browserDetails.browser == "safari") timePassed = timePassed / 1000; // Apparently the timestamp is in microseconds, in Safari
                var bitRate = Math.round((config.bitrate.bsnow - config.bitrate.bsbefore) * 8 / timePassed);
                if (Janus$1.webRTCAdapter.browserDetails.browser === 'safari') bitRate = parseInt(bitRate / 1000);
                config.bitrate.value = bitRate + ' kbits/sec';
                //~ Janus.log("Estimated bitrate is " + config.bitrate.value);
                config.bitrate.bsbefore = config.bitrate.bsnow;
                config.bitrate.tsbefore = config.bitrate.tsnow;
              }
            }
          });
        });
      } else {
        Janus$1.warn("Getting the video bitrate unsupported by browser");
        return "Feature unsupported by browser";
      }
    }
    function _getBitrate(handleId) {
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined || pluginHandle.webrtcStuff === null || pluginHandle.webrtcStuff === undefined) {
        Janus$1.warn("Invalid handle");
        return "Invalid handle";
      }
      var config = pluginHandle.webrtcStuff;
      if (config.pc === null || config.pc === undefined) return "Invalid PeerConnection";
      // Start getting the bitrate, if getStats is supported
      if (config.pc.getStats) {
        if (config.bitrate.timer === null || config.bitrate.timer === undefined) {
          Janus$1.log("Starting bitrate timer (via getStats)");
          config.bitrate.timer = setInterval(function () {
            config.pc.getStats().then(function (stats) {
              stats.forEach(function (res) {
                if (!res) return;
                var inStats = false;
                // Check if these are statistics on incoming media
                if ((res.mediaType === "video" || res.id.toLowerCase().indexOf("video") > -1) && res.type === "inbound-rtp" && res.id.indexOf("rtcp") < 0) {
                  // New stats
                  inStats = true;
                } else if (res.type == 'ssrc' && res.bytesReceived && (res.googCodecName === "VP8" || res.googCodecName === "")) {
                  // Older Chromer versions
                  inStats = true;
                }
                // Parse stats now
                if (inStats) {
                  config.bitrate.bsnow = res.bytesReceived;
                  config.bitrate.tsnow = res.timestamp;
                  if (config.bitrate.bsbefore === null || config.bitrate.tsbefore === null) {
                    // Skip this round
                    config.bitrate.bsbefore = config.bitrate.bsnow;
                    config.bitrate.tsbefore = config.bitrate.tsnow;
                  } else {
                    // Calculate bitrate
                    var timePassed = config.bitrate.tsnow - config.bitrate.tsbefore;
                    if (Janus$1.webRTCAdapter.browserDetails.browser == "safari") timePassed = timePassed / 1000; // Apparently the timestamp is in microseconds, in Safari
                    var bitRate = Math.round((config.bitrate.bsnow - config.bitrate.bsbefore) * 8 / timePassed);
                    if (Janus$1.webRTCAdapter.browserDetails.browser === 'safari') bitRate = parseInt(bitRate / 1000);
                    config.bitrate.value = bitRate + ' kbits/sec';
                    //~ Janus.log("Estimated bitrate is " + config.bitrate.value);
                    config.bitrate.bsbefore = config.bitrate.bsnow;
                    config.bitrate.tsbefore = config.bitrate.tsnow;
                  }
                }
              });
            });
          }, 1000);
          return "0 kbits/sec"; // We don't have a bitrate value yet
        }

        return config.bitrate.value;
      } else {
        Janus$1.warn("Getting the video bitrate unsupported by browser");
        return "Feature unsupported by browser";
      }
    }
    function webrtcError(error) {
      Janus$1.error("WebRTC error:", error);
    }
    function cleanupWebrtc(handleId, hangupRequest) {
      Janus$1.log("Cleaning WebRTC stuff");
      var pluginHandle = pluginHandles[handleId];
      if (pluginHandle === null || pluginHandle === undefined) {
        // Nothing to clean
        return;
      }
      var config = pluginHandle.webrtcStuff;
      if (config !== null && config !== undefined) {
        if (hangupRequest === true) {
          // Send a hangup request (we don't really care about the response)
          var request = {
            "rtcgw": "hangup",
            "transaction": Janus$1.randomString(12)
          };
          if (pluginHandle.token !== null && pluginHandle.token !== undefined) request["token"] = pluginHandle.token;
          if (apisecret !== null && apisecret !== undefined) request["apisecret"] = apisecret;
          Janus$1.debug("Sending hangup request (handle=" + handleId + "):");
          Janus$1.debug(request);
          if (websockets) {
            request["session_id"] = sessionId;
            request["handle_id"] = handleId;
            ws.send(JSON.stringify(request));
          } else {
            Janus$1.httpAPICall(server + "/" + sessionId + "/" + handleId, {
              verb: 'POST',
              withCredentials: withCredentials,
              body: request
            });
          }
        }
        // Cleanup stack
        config.remoteStream = null;
        if (config.volume) {
          if (config.volume["local"] && config.volume["local"].timer) clearInterval(config.volume["local"].timer);
          if (config.volume["remote"] && config.volume["remote"].timer) clearInterval(config.volume["remote"].timer);
        }
        config.volume = {};
        if (config.bitrate.timer) clearInterval(config.bitrate.timer);
        config.bitrate.timer = null;
        config.bitrate.bsnow = null;
        config.bitrate.bsbefore = null;
        config.bitrate.tsnow = null;
        config.bitrate.tsbefore = null;
        config.bitrate.value = null;
        try {
          // Try a MediaStreamTrack.stop() for each track
          if (!config.streamExternal && config.myStream !== null && config.myStream !== undefined) {
            Janus$1.log("Stopping local stream tracks");
            var tracks = config.myStream.getTracks();
            for (var i in tracks) {
              var mst = tracks[i];
              Janus$1.log(mst);
              if (mst !== null && mst !== undefined) mst.stop();
            }
          }
        } catch (e) {
          // Do nothing if this fails
        }
        config.streamExternal = false;
        config.myStream = null;
        // Close PeerConnection
        try {
          config.pc.close();
        } catch (e) {
          // Do nothing
        }
        config.pc = null;
        config.candidates = null;
        config.mySdp = null;
        config.remoteSdp = null;
        config.iceDone = false;
        config.dataChannel = {};
        config.dtmfSender = null;
      }
      pluginHandle.oncleanup();
    }

    // Helper method to munge an SDP to enable simulcasting (Chrome only)
    function mungeSdpForSimulcasting(sdp) {
      // Let's munge the SDP to add the attributes for enabling simulcasting
      // (based on https://gist.github.com/ggarber/a19b4c33510028b9c657)
      var lines = sdp.split("\r\n");
      var video = false;
      var ssrc = [-1],
        ssrc_fid = [-1];
      var cname = null,
        msid = null,
        mslabel = null,
        label = null;
      var insertAt = -1;
      for (var i = 0; i < lines.length; i++) {
        var mline = lines[i].match(/m=(\w+) */);
        if (mline) {
          var medium = mline[1];
          if (medium === "video") {
            // New video m-line: make sure it's the first one
            if (ssrc[0] < 0) {
              video = true;
            } else {
              // We're done, let's add the new attributes here
              insertAt = i;
              break;
            }
          } else {
            // New non-video m-line: do we have what we were looking for?
            if (ssrc[0] > -1) {
              // We're done, let's add the new attributes here
              insertAt = i;
              break;
            }
          }
          continue;
        }
        if (!video) continue;
        var fid = lines[i].match(/a=ssrc-group:FID (\d+) (\d+)/);
        if (fid) {
          ssrc[0] = fid[1];
          ssrc_fid[0] = fid[2];
          lines.splice(i, 1);
          i--;
          continue;
        }
        if (ssrc[0]) {
          var match = lines[i].match('a=ssrc:' + ssrc[0] + ' cname:(.+)');
          if (match) {
            cname = match[1];
          }
          match = lines[i].match('a=ssrc:' + ssrc[0] + ' msid:(.+)');
          if (match) {
            msid = match[1];
          }
          match = lines[i].match('a=ssrc:' + ssrc[0] + ' mslabel:(.+)');
          if (match) {
            mslabel = match[1];
          }
          match = lines[i].match('a=ssrc:' + ssrc[0] + ' label:(.+)');
          if (match) {
            label = match[1];
          }
          if (lines[i].indexOf('a=ssrc:' + ssrc_fid[0]) === 0) {
            lines.splice(i, 1);
            i--;
            continue;
          }
          if (lines[i].indexOf('a=ssrc:' + ssrc[0]) === 0) {
            lines.splice(i, 1);
            i--;
            continue;
          }
        }
        if (lines[i].length == 0) {
          lines.splice(i, 1);
          i--;
          continue;
        }
      }
      if (ssrc[0] < 0) {
        // Couldn't find a FID attribute, let's just take the first video SSRC we find
        insertAt = -1;
        video = false;
        for (var i = 0; i < lines.length; i++) {
          var mline = lines[i].match(/m=(\w+) */);
          if (mline) {
            var medium = mline[1];
            if (medium === "video") {
              // New video m-line: make sure it's the first one
              if (ssrc[0] < 0) {
                video = true;
              } else {
                // We're done, let's add the new attributes here
                insertAt = i;
                break;
              }
            } else {
              // New non-video m-line: do we have what we were looking for?
              if (ssrc[0] > -1) {
                // We're done, let's add the new attributes here
                insertAt = i;
                break;
              }
            }
            continue;
          }
          if (!video) continue;
          if (ssrc[0] < 0) {
            var value = lines[i].match(/a=ssrc:(\d+)/);
            if (value) {
              ssrc[0] = value[1];
              lines.splice(i, 1);
              i--;
              continue;
            }
          } else {
            var match = lines[i].match('a=ssrc:' + ssrc[0] + ' cname:(.+)');
            if (match) {
              cname = match[1];
            }
            match = lines[i].match('a=ssrc:' + ssrc[0] + ' msid:(.+)');
            if (match) {
              msid = match[1];
            }
            match = lines[i].match('a=ssrc:' + ssrc[0] + ' mslabel:(.+)');
            if (match) {
              mslabel = match[1];
            }
            match = lines[i].match('a=ssrc:' + ssrc[0] + ' label:(.+)');
            if (match) {
              label = match[1];
            }
            if (lines[i].indexOf('a=ssrc:' + ssrc_fid[0]) === 0) {
              lines.splice(i, 1);
              i--;
              continue;
            }
            if (lines[i].indexOf('a=ssrc:' + ssrc[0]) === 0) {
              lines.splice(i, 1);
              i--;
              continue;
            }
          }
          if (lines[i].length == 0) {
            lines.splice(i, 1);
            i--;
            continue;
          }
        }
      }
      if (ssrc[0] < 0) {
        // Still nothing, let's just return the SDP we were asked to munge
        Janus$1.warn("Couldn't find the video SSRC, simulcasting NOT enabled");
        return sdp;
      }
      if (insertAt < 0) {
        // Append at the end
        insertAt = lines.length;
      }
      // Generate a couple of SSRCs (for retransmissions too)
      // Note: should we check if there are conflicts, here?
      ssrc[1] = Math.floor(Math.random() * 0xFFFFFFFF);
      ssrc[2] = Math.floor(Math.random() * 0xFFFFFFFF);
      ssrc_fid[1] = Math.floor(Math.random() * 0xFFFFFFFF);
      ssrc_fid[2] = Math.floor(Math.random() * 0xFFFFFFFF);
      // Add attributes to the SDP
      for (var i = 0; i < ssrc.length; i++) {
        if (cname) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' cname:' + cname);
          insertAt++;
        }
        if (msid) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' msid:' + msid);
          insertAt++;
        }
        if (mslabel) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' mslabel:' + mslabel);
          insertAt++;
        }
        if (label) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc[i] + ' label:' + label);
          insertAt++;
        }
        // Add the same info for the retransmission SSRC
        if (cname) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' cname:' + cname);
          insertAt++;
        }
        if (msid) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' msid:' + msid);
          insertAt++;
        }
        if (mslabel) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' mslabel:' + mslabel);
          insertAt++;
        }
        if (label) {
          lines.splice(insertAt, 0, 'a=ssrc:' + ssrc_fid[i] + ' label:' + label);
          insertAt++;
        }
      }
      lines.splice(insertAt, 0, 'a=ssrc-group:FID ' + ssrc[2] + ' ' + ssrc_fid[2]);
      lines.splice(insertAt, 0, 'a=ssrc-group:FID ' + ssrc[1] + ' ' + ssrc_fid[1]);
      lines.splice(insertAt, 0, 'a=ssrc-group:FID ' + ssrc[0] + ' ' + ssrc_fid[0]);
      lines.splice(insertAt, 0, 'a=ssrc-group:SIM ' + ssrc[0] + ' ' + ssrc[1] + ' ' + ssrc[2]);
      sdp = lines.join("\r\n");
      if (!sdp.endsWith("\r\n")) sdp += "\r\n";
      return sdp;
    }

    // Helper methods to parse a media object
    function isAudioSendEnabled(media) {
      Janus$1.debug("isAudioSendEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.audio === false) return false; // Generic audio has precedence
      if (media.audioSend === undefined || media.audioSend === null) return true; // Default
      return media.audioSend === true;
    }
    function isAudioSendRequired(media) {
      Janus$1.debug("isAudioSendRequired:", media);
      if (media === undefined || media === null) return false; // Default
      if (media.audio === false || media.audioSend === false) return false; // If we're not asking to capture audio, it's not required
      if (media.failIfNoAudio === undefined || media.failIfNoAudio === null) return false; // Default
      return media.failIfNoAudio === true;
    }
    function isAudioRecvEnabled(media) {
      Janus$1.debug("isAudioRecvEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.audio === false) return false; // Generic audio has precedence
      if (media.audioRecv === undefined || media.audioRecv === null) return true; // Default
      return media.audioRecv === true;
    }
    function isVideoSendEnabled(media) {
      Janus$1.debug("isVideoSendEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.video === false) return false; // Generic video has precedence
      if (media.videoSend === undefined || media.videoSend === null) return true; // Default
      return media.videoSend === true;
    }
    function isVideoSendRequired(media) {
      Janus$1.debug("isVideoSendRequired:", media);
      if (media === undefined || media === null) return false; // Default
      if (media.video === false || media.videoSend === false) return false; // If we're not asking to capture video, it's not required
      if (media.failIfNoVideo === undefined || media.failIfNoVideo === null) return false; // Default
      return media.failIfNoVideo === true;
    }
    function isVideoRecvEnabled(media) {
      Janus$1.debug("isVideoRecvEnabled:", media);
      if (media === undefined || media === null) return true; // Default
      if (media.video === false) return false; // Generic video has precedence
      if (media.videoRecv === undefined || media.videoRecv === null) return true; // Default
      return media.videoRecv === true;
    }
    function isScreenSendEnabled(media) {
      Janus$1.debug("isScreenSendEnabled:", media);
      if (media === undefined || media === null) return false;
      if (_typeof(media.video) !== 'object' || _typeof(media.video.mandatory) !== 'object') return false;
      var constraints = media.video.mandatory;
      if (constraints.chromeMediaSource) return constraints.chromeMediaSource === 'desktop' || constraints.chromeMediaSource === 'screen';else if (constraints.mozMediaSource) return constraints.mozMediaSource === 'window' || constraints.mozMediaSource === 'screen';else if (constraints.mediaSource) return constraints.mediaSource === 'window' || constraints.mediaSource === 'screen';
      return false;
    }
    function isDataEnabled(media) {
      Janus$1.debug("isDataEnabled:", media);
      if (Janus$1.webRTCAdapter.browserDetails.browser == "edge") {
        Janus$1.warn("Edge doesn't support data channels yet");
        return false;
      }
      if (media === undefined || media === null) return false; // Default
      return media.data === true;
    }
    function isTrickleEnabled(trickle) {
      Janus$1.debug("isTrickleEnabled:", trickle);
      if (trickle === undefined || trickle === null) return true; // Default is true
      return trickle === true;
    }
  }
  window.Janus = Janus$1;

  var werbrtcInfo = {
    version: "V1.0",
    apiDomain: "https://open.ys7.com"
  };

  var listenList = {}; //订阅列表 
  //添加订阅者
  var listen = function listen(key, fn) {
    // console.log('-----', key, fn)
    if (!listenList[key]) {
      listenList[key] = []; //如果没有订阅过此类消息 就给该消息创建订阅列表
    }

    listenList[key].push(fn); //将回调放入订阅列表
  };
  //发布消息
  var trigger = function trigger() {
    var key = Array.prototype.shift.call(arguments),
      //取出消息类型
      fns = listenList[key]; //取出该订阅对应的回调列表
    if (!fns || fns.length === 0) return false; //没有订阅则直接返回
    for (var i = 0, fn; fn = fns[i]; i++) {
      fn.apply(this, arguments); //绑定this
    }
  };
  // return {
  //     listen,
  //     trigger,
  //     remove
  // }

  /*
  * deffer
  * 分配函数
  */
  function deffer() {
    // 创建新的对象实例
    var deferred = {};

    // 构造 promise 对象
    deferred.promise = new Promise(function (resolve, reject) {
      deferred.resolve = resolve;
      deferred.reject = reject;
    });

    // 返回包含了 promise 的对象
    return deferred;
  }
  var EZWebRtc = /*#__PURE__*/function () {
    function EZWebRtc(_params) {
      _classCallCheck$1(this, EZWebRtc);
      //订阅
      _defineProperty(this, "subscribe", function (params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        var body = {
          "cmdType": "subremote",
          "streamtype": params.type,
          "customId": params.clientId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        var remoteFeed = null;
        window['ezuikit-webrtc'].opt.janus.attach({
          plugin: "rtcgw.plugin.sts",
          opaqueId: window['ezuikit-webrtc'].opt.opaqueId,
          success: function success(pluginHandle) {
            console.log("pluginHandle", pluginHandle);
            if (params.type == 8) {
              window['ezuikit-webrtc'].opt.subscribeScreenHandle = pluginHandle;
            } else {
              window['ezuikit-webrtc'].opt["".concat(params.clientId)] = pluginHandle;
              if (params.type == 1) {
                window['ezuikit-webrtc'].opt["".concat(params.clientId)].send({
                  "message": {
                    "cmdType": "unsubremote",
                    "streamtype": 2,
                    "customId": params.clientId,
                    "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
                  },
                  success: function success() {},
                  error: function error(_error) {}
                });
              }
            }
            remoteFeed = pluginHandle;
            remoteFeed.createOffer({
              media: {
                videoSend: false,
                audioSend: false,
                audioRecv: true,
                videoRecv: true,
                audio: true,
                video: true,
                data: false
              },
              // Audio only
              simulcast: false,
              simulcast2: false,
              success: function success(jsep) {
                Janus.debug("remoteFeed createOffer Got SDP!");
                Janus.debug(jsep);
                remoteFeed.send({
                  "message": body,
                  "jsep": jsep
                });
              },
              error: function error(_error2) {
                Janus.error("remoteFeed WebRTC error:", _error2);
                _deffer.reject(_error2);
              }
            });
          },
          error: function error(_error3) {
            console.error("  -- Error attaching plugin...", _error3);
            _deffer.reject(_error3);
          },
          consentDialog: function consentDialog(on) {
            Janus.debug("Consent dialog should be " + (on ? "on" : "off") + " now");
          },
          iceState: function iceState(state) {
            Janus.log("ICE state changed to " + state);
            switch (state) {
              case 'connected':
                console.log("ice connect success");
                break;
              case 'disconnected':
                console.log("ice connect loss");
                break;
            }
          },
          mediaState: function mediaState(medium, on) {
            Janus.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium);
          },
          webrtcState: function webrtcState(on) {
            Janus.log("Janus says our WebRTC PeerConnection is " + (on ? "up" : "down") + " now");
            // $("#audioleft").parent().unblock();
          },

          slowLink: function slowLink(uplink, lost) {
            Janus.warn("Janus reports problems " + (uplink ? "sending" : "receiving") + " packets on this PeerConnection (" + lost + " lost packets)");
          },
          onmessage: function onmessage(msg, jsep) {
            Janus.debug(" ::: Got a message :::");
            Janus.debug(msg);
            if (jsep !== undefined && jsep !== null) {
              Janus.debug("Handling SDP as well...");
              Janus.debug(jsep);
              remoteFeed.handleRemoteJsep({
                jsep: jsep
              });
            }
            //监听流订阅报错
            if (msg["rtcgw"] === "subremoteack") {
              trigger("subremoteack", msg);
            }
          },
          onlocalstream: function onlocalstream(stream) {
            // console.log("remoteStream==================================", stream)
          },
          onremotestream: function onremotestream(stream) {
            console.log("remoteStream==================================", stream);
            var msg = {
              // clientId: "clientId2",
              clientId: params.clientId,
              stream: stream,
              streamType: params.type
            };
            _deffer.resolve(msg);
            trigger("remoteStream", msg);
          },
          ondataopen: function ondataopen(data) {
            Janus.log("The DataChannel is available!");
          },
          ondata: function ondata(data) {
            Janus.debug("We got data from the DataChannel! " + data);
          },
          oncleanup: function oncleanup() {
            Janus.log(" ::: Got a cleanup notification :::");
          }
        });
        return _deffer.promise;
      });
      //订阅
      _defineProperty(this, "subscribeStream", function (params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        var body = {
          "cmdType": "resumesubremote",
          "streamtype": params.type,
          "customId": params.clientId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        if (window['ezuikit-webrtc'].opt["".concat(params.clientId)]) {
          window['ezuikit-webrtc'].opt["".concat(params.clientId)].send({
            "message": body,
            success: function success() {
              _deffer.resolve("success");
            },
            error: function error(_error4) {
              _deffer.reject(_error4);
            }
          });
        }
        return _deffer.promise;
      });
      //取消订阅用户
      _defineProperty(this, "unsubscribe", function (params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        var body = {
          "cmdType": "unsubremote",
          "streamtype": params.type,
          "customId": params.clientId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        if (params.type == 8) {
          window['ezuikit-webrtc'].opt.subscribeScreenHandle.send({
            "message": body,
            success: function success() {
              window['ezuikit-webrtc'].opt.subscribeScreenHandle.detach({
                noRequest: false,
                success: function success() {
                  _deffer.resolve("success");
                }
              });
            },
            error: function error(_error5) {
              _deffer.reject(_error5);
            }
          });
        } else {
          window['ezuikit-webrtc'].opt["".concat(params.clientId)].send({
            "message": body,
            success: function success() {
              if (params.type == 3) {
                window['ezuikit-webrtc'].opt["".concat(params.clientId)].detach({
                  noRequest: false,
                  success: function success() {
                    _deffer.resolve("success");
                  }
                });
              } else {
                _deffer.resolve("success");
              }
            },
            error: function error(_error6) {
              _deffer.reject(_error6);
            }
          });
        }
        return _deffer.promise;
      });
      //取消音频或视频订阅
      _defineProperty(this, "unsubscribeStream", function (params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        var body = {
          "cmdType": "pausesubremote",
          "streamtype": params.type,
          "customId": params.clientId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        window['ezuikit-webrtc'].opt["".concat(params.clientId)].send({
          "message": body,
          success: function success() {
            _deffer.resolve("success");
          },
          error: function error(_error7) {
            _deffer.reject(_error7);
          }
        });
        return _deffer.promise;
      });
      //监听事件
      _defineProperty(this, "listen", function () {
        return listen.apply(void 0, arguments);
      });
      this.initEZWEBPlayer(_params);
    }
    _createClass$1(EZWebRtc, [{
      key: "initEZWEBPlayer",
      value: function initEZWEBPlayer(params) {
        console.log('params', params);
        window['ezuikit-webrtc'] = {
          opt: {
            roomParams: {
              room: 0,
              userId: params.userId,
              video: 1,
              internalRoomId: null,
              roomId: params.roomId,
              clientId: null,
              rtctoken: params.rtctoken
            },
            janus: null,
            mainHandle: null,
            //创建房间的主handle
            sts: null,
            //本地发布视频handle
            screenHandle: null,
            //屏幕共享流handle
            subscribeScreenHandle: null,
            //定义的屏幕流handle
            opaqueId: "sts-" + Janus.randomString(12),
            localStreamType: null,
            server: null,
            accessToken: params.accessToken,
            stream: "",
            screenStream: null,
            apiDomain: werbrtcInfo.apiDomain,
            cln: {
              // 本地
              local: {
                username: '',
                client_id: ''
              }
            }
          },
          videoParams: {},
          audioParams: {},
          cameraId: null,
          microphoneId: null,
          bitrate: 100000,
          frameRate: 15,
          width: 320,
          height: 240
        };
        request( // `https://test12open.ys7.com/api/v3/rtc/wss`,
        "".concat(werbrtcInfo.apiDomain, "/api/v3/rtc/wss"), 'POST',
        //window['ezuikit-webrtc'].opt.apiDomain + "/api/lapp/live/talk/url",
        {
          appId: params.appId,
          roomId: params.roomId,
          customId: params.userId,
          accessToken: params.accessToken
        }, {
          "Content-Type": "application/x-www-form-urlencoded",
          "accessToken": params.accessToken
        }, logSuccess);
        function logSuccess(data) {
          console.log("data", data);
          if (data.meta.code != 200) {
            params.handleError(data.meta);
            return;
          }
          var _data$data = data.data;
            _data$data.clientId;
            var domain = _data$data.domain;
            _data$data.internalRoomId;
            var wssPath = _data$data.wssPath;
          window['ezuikit-webrtc'].opt.server = "wss://".concat(domain, "/").concat(wssPath);
          window['ezuikit-webrtc'].opt.roomParams.internalRoomId = data.data.internalRoomId;
          window['ezuikit-webrtc'].opt.roomParams.clientId = data.data.clientId;
          var Janusparams = {
            // "token": params.rtctoken,
            "token": "token=".concat(params.rtctoken, "&userId=").concat(params.userId, "&roomId=").concat(params.roomId, "&appId=").concat(params.appId),
            "authtype": 23
          };
          Janus.init({
            debug: "all",
            callback: function callback() {
              window['ezuikit-webrtc'].opt.janus = new Janus({
                server: window['ezuikit-webrtc'].opt.server,
                success: function success(sessionId) {
                  if (sessionId) {
                    params.onMessage(sessionId);
                  }
                },
                error: function error(_error8) {
                  params.handleError(_error8);
                },
                destroyed: function destroyed() {}
              }, Janusparams);
            }
          });
        }
      }
      /**
       * 获取sdk版本
       * 可在config文件进行设置
      */
    }, {
      key: "getVersion",
      value: function getVersion() {
        // 创建新的对象实例
        var _deffer = deffer();
        {
          _deffer.resolve(werbrtcInfo.version);
        }
        return _deffer.promise;
      }
      //获取浏览器兼容性
    }, {
      key: "getSupport",
      value: function getSupport() {
        // 创建新的对象实例
        var _deffer = deffer();
        var obj = {
          isWebrtcSupport: true,
          isH264Support: true
        };
        var myVideo = document.createElement('video');
        if (myVideo.canPlayType) {
          if (myVideo.canPlayType('video/mp4;codecs=“avc1.64001E”')) {
            obj.isH264Support = true;
          } else {
            obj.isH264Support = false;
          }
        }
        if (navigator.mediaDevices && navigator.mediaDevices.getDisplayMedia) {
          obj.isWebrtcSupport = true;
          _deffer.resolve(obj);
        } else {
          obj.isWebrtcSupport = false;
          _deffer.reject(obj);
        }
        return _deffer.promise;
      }
      //获取所有设备列表
    }, {
      key: "getMediaList",
      value: function getMediaList() {
        // 创建新的对象实例
        var _deffer = deffer();
        if (navigator.mediaDevices) {
          navigator.mediaDevices.enumerateDevices().then(function (devices) {
            _deffer.resolve(devices);
          });
        } else {
          _deffer.reject("no devices");
        }
        return _deffer.promise;
      }
      //获取所有设备列表
    }, {
      key: "getCamerasList",
      value: function getCamerasList() {
        // 创建新的对象实例
        var _deffer = deffer();
        if (navigator.mediaDevices) {
          navigator.mediaDevices.enumerateDevices().then(function (devices) {
            var arr = [];
            devices.map(function (item) {
              if (item.kind == "videoinput") {
                arr.push(item);
              }
            });
            _deffer.resolve(arr);
          });
        } else {
          _deffer.reject("no devices");
        }
        return _deffer.promise;
      }
      //获取所有设备列表
    }, {
      key: "getMicrophonesList",
      value: function getMicrophonesList() {
        // 创建新的对象实例
        var _deffer = deffer();
        if (navigator.mediaDevices) {
          navigator.mediaDevices.enumerateDevices().then(function (devices) {
            var arr = [];
            devices.map(function (item) {
              if (item.kind == "audioinput") {
                arr.push(item);
              }
            });
            _deffer.resolve(arr);
          });
        } else {
          _deffer.reject("no devices");
        }
        return _deffer.promise;
      }
      //获取所有设备列表
    }, {
      key: "getSpeakersList",
      value: function getSpeakersList() {
        // 创建新的对象实例
        var _deffer = deffer();
        if (navigator.mediaDevices) {
          navigator.mediaDevices.enumerateDevices().then(function (devices) {
            var arr = [];
            devices.map(function (item) {
              if (item.kind == "audiooutput") {
                arr.push(item);
              }
            });
            _deffer.resolve(arr);
          });
        } else {
          _deffer.reject("no devices");
        }
        return _deffer.promise;
      }
      /**
       * 播放本地流
      */
    }, {
      key: "play",
      value: function play(params) {
        var _deffer = deffer();
        var localVideo = document.getElementById(params.domId);
        var localStream = window['ezuikit-webrtc'].opt.cln.local.stream;
        //媒体流绑定标签
        Janus.attachMediaStream(localVideo, localStream);
        localVideo.play();
        if (document.getElementById(params.domId)) {
          _deffer.resolve("success");
          // let volumeValue = document.getElementById(params.domId).volume
          // _deffer.resolve(volumeValue)
        } else {
          _deffer.reject("no video dom");
        }
        return _deffer.promise;
      }
      /**
       * 离开房间
      */
    }, {
      key: "leaveRoom",
      value: function leaveRoom(params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        var body = {
          "cmdType": "exitRoom",
          "customId": window['ezuikit-webrtc'].opt.roomParams.userId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        window['ezuikit-webrtc'].opt.mainHandle.send({
          "message": body,
          success: function success() {
            window['ezuikit-webrtc'].opt.janus.destroy({
              success: function success() {}
            });
            _deffer.resolve("success");
          },
          error: function error(_error9) {
            console.error("  -- Error attaching plugin...", _error9);
            _deffer.reject(_error9);
          }
        });
        return _deffer.promise;
      }
      //设置摄像头设备
    }, {
      key: "setCameraDevice",
      value: function setCameraDevice(params) {
        var _deffer = deffer();
        window['ezuikit-webrtc'].cameraId = params.deviceId;
        if (window['ezuikit-webrtc'].opt.sts) {
          window['ezuikit-webrtc'].opt.sts.createOffer({
            // No media provided: by default, it's sendrecv for audio and video
            media: {
              video: {
                deviceId: params.deviceId
              },
              replaceVideo: true,
              audio: window['ezuikit-webrtc'].opt.localStreamType == 1 ? false : true
            },
            simulcast: false,
            simulcast2: false,
            bitrate: window['ezuikit-webrtc'].bitrate,
            frameRate: window['ezuikit-webrtc'].frameRate,
            // simulcast: true,
            // simulcast2: true,
            success: function success(jsep) {
              console.log("createOffersuccess");
              Janus.debug("Got SDP!");
              Janus.debug(jsep);
              _deffer.resolve("success");
            },
            error: function error(_error10) {
              console.log("createOffererror");
              Janus.error("WebRTC error:", _error10);
              _deffer.reject(_error10);
            }
          });
        }
        return _deffer.promise;
      }
      //设置麦克风设备
    }, {
      key: "setMicrophoneDevice",
      value: function setMicrophoneDevice(params) {
        var _deffer = deffer();
        window['ezuikit-webrtc'].microphoneId = params.deviceId;
        if (window['ezuikit-webrtc'].opt.sts) {
          window['ezuikit-webrtc'].opt.sts.createOffer({
            // No media provided: by default, it's sendrecv for audio and video
            media: {
              audio: {
                deviceId: params.deviceId
              },
              replaceAudio: true,
              video: window['ezuikit-webrtc'].opt.localStreamType == 2 ? false : true
            },
            simulcast: false,
            simulcast2: false,
            bitrate: window['ezuikit-webrtc'].bitrate,
            frameRate: window['ezuikit-webrtc'].frameRate,
            // simulcast: true,
            // simulcast2: true,
            success: function success(jsep) {
              console.log("createOffersuccess");
              Janus.debug("Got SDP!");
              Janus.debug(jsep);
              _deffer.resolve("success");
            },
            error: function error(_error11) {
              console.log("createOffererror");
              Janus.error("WebRTC error:", _error11);
              _deffer.reject(_error11);
            }
          });
        }
        return _deffer.promise;
      }
      //设置视频参数
    }, {
      key: "setVideoProfile",
      value: function setVideoProfile(data) {
        var _deffer = deffer();
        var params = {
          video: {
            width: data.video.width || 360,
            height: data.video.height || 640,
            frameRate: data.video.frameRate
          },
          bitrate: data.video.bitrate || 500000,
          id: data.id
        };
        window['ezuikit-webrtc'].videoParams = params.video;
        window['ezuikit-webrtc'].bitrate = params.bitrate * 1000;
        window['ezuikit-webrtc'].frameRate = data.video.frameRate;
        window['ezuikit-webrtc'].width = data.video.width;
        window['ezuikit-webrtc'].height = data.video.height;
        _deffer.resolve("success");
        return _deffer.promise;
      }

      /**
       * 设置视频参数
       * 当前版本设置不生效 后续版本处理
      */
    }, {
      key: "setAudioProfile",
      value: function setAudioProfile(data) {
        var params = {
          audio: {
            deviceId: window['ezuikit-webrtc'].cameraId,
            sampleRate: data.audio.sampleRate || "32000HZ",
            //采样率
            sampleSize: data.audio.sampleSize || 16,
            //采样大小
            channelCount: data.audio.channelCount || 1 //单声道还是双声道
          },

          id: data.id
        };
        window['ezuikit-webrtc'].audioParams = params.audio;
        console.log("window['ezuikit-webrtc'].videoParams", window['ezuikit-webrtc']);
      }
      //加入房间
    }, {
      key: "joinRoom",
      value: function joinRoom(params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        window['ezuikit-webrtc'].opt.janus.attach({
          plugin: "rtcgw.plugin.sts",
          opaqueId: window['ezuikit-webrtc'].opt.opaqueId,
          success: function success(pluginHandle) {
            console.log("pluginHandle", pluginHandle);
            window['ezuikit-webrtc'].opt.mainHandle = pluginHandle;
            Janus.debug("Trying a createOffer too (audio/video sendrecv)");
            var body = {
              "cmdType": "enterRoom",
              "customId": window['ezuikit-webrtc'].opt.roomParams.userId,
              "clientId": window['ezuikit-webrtc'].opt.roomParams.clientId,
              "strroomId": window['ezuikit-webrtc'].opt.roomParams.roomId,
              "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId,
              "authtype": 23,
              "authentication": window['ezuikit-webrtc'].opt.roomParams.rtctoken
            };
            pluginHandle.send({
              "message": body
            });
            _deffer.resolve(pluginHandle.id);
          },
          error: function error(_error12) {
            console.error("  -- Error attaching plugin...", _error12);
            _deffer.reject(_error12);
          },
          consentDialog: function consentDialog(on) {
            Janus.debug("Consent dialog should be " + (on ? "on" : "off") + " now");
          },
          iceState: function iceState(state) {
            Janus.log("ICE state changed to " + state);
            switch (state) {
              case 'connected':
                console.log("ice connect success");
                break;
              case 'disconnected':
                console.log("ice connect loss");
                break;
            }
          },
          mediaState: function mediaState(medium, on) {
            Janus.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium);
          },
          webrtcState: function webrtcState(on) {
            Janus.log("Janus says our WebRTC PeerConnection is " + (on ? "up" : "down") + " now");
            // $("#audioleft").parent().unblock();
          },

          slowLink: function slowLink(uplink, lost) {
            Janus.warn("Janus reports problems " + (uplink ? "sending" : "receiving") + " packets on this PeerConnection (" + lost + " lost packets)");
          },
          onmessage: function onmessage(msg, jsep) {
            // console.log("消息回调——————————————————————————————————", msg, jsep)
            Janus.debug(" ::: Got a message :::");
            Janus.debug(msg);
            if (jsep !== undefined && jsep !== null) {
              Janus.debug("Handling SDP as well...");
              Janus.debug(jsep);
              window['ezuikit-webrtc'].opt.mainHandle.handleRemoteJsep({
                jsep: jsep
              });
            }
            var result = msg["result"];
            if (result !== null && result !== undefined) {
              if (result === "done") {
                // The plugin closed
                return;
              }
              // Any loss?
              result["status"];
            }
            // 监听自己加入
            if (msg["rtcgw"] === "enterRoomack") {
              trigger("enterRoomack", msg);
            }
            // 监听用户加入
            if (msg["rtcgw"] === "clientJoin") {
              trigger("clientJoin", msg);
            }
            // 监听用户离开房间
            if (msg["rtcgw"] === "clientLeave") {
              trigger("clientLeave", msg);
            }
            // 监听远端流添加
            if (msg["rtcgw"] === "stream-added") {
              trigger("steam-added", msg);
            }
            // 监听远端流移除
            if (msg["rtcgw"] === "stream-removed") {
              trigger("stream-removed", msg);
            }
            // 监听到某个客户端音量
            if (msg["rtcgw"] === "audioleve") {
              trigger("audioleve", msg);
            }
            // 监听网络质量的实时统计
            if (msg["rtcgw"] === "networkquality") {
              trigger("networkquality", msg);
            }
            // 监听应用程序的报错
            if (msg["rtcgw"] === "error") {
              trigger("error", msg);
            }
            // 监听应用程序的报错
            if (msg["rtcgw"] === "audioleve") {
              trigger("audioleve", msg);
            }
            //监听屏幕共享流重复发布
            if (msg["rtcgw"] === "publishlocalstreamack") {
              trigger("publishlocalstreamack", msg);
            }
            //监听流订阅报错
            if (msg["rtcgw"] === "subremoteack") {
              trigger("subremoteack", msg);
            }
          },
          onlocalstream: function onlocalstream(stream) {
            console.log("onlocalstream", stream);
            Janus.debug(" ::: Got a local stream :::");
            Janus.debug(stream);
            window['ezuikit-webrtc'].opt.cln.local.stream = stream;
          },
          onremotestream: function onremotestream(stream) {},
          ondataopen: function ondataopen(data) {
            Janus.log("The DataChannel is available!");
          },
          ondata: function ondata(data) {
            Janus.debug("We got data from the DataChannel! " + data);
          },
          oncleanup: function oncleanup() {
            Janus.log(" ::: Got a cleanup notification :::");
          }
        });
        return _deffer.promise;
      }

      //getLocalStream获取本地流
    }, {
      key: "getLocalStream",
      value: function getLocalStream(params) {
        var _deffer = deffer();
        if (window['ezuikit-webrtc'].opt.cln.local.stream) {
          _deffer.resolve(window['ezuikit-webrtc'].opt.cln.local.stream);
        } else {
          _deffer.reject("no stream");
        }
        return _deffer.promise;
      }

      //获取屏幕共享流
    }, {
      key: "getScreenStream",
      value: function getScreenStream(params) {
        var _deffer = deffer();
        if (window['ezuikit-webrtc'].opt.screenStream) {
          _deffer.resolve(window['ezuikit-webrtc'].opt.screenStream);
        } else {
          _deffer.reject("no stream");
        }
        return _deffer.promise;
      }

      //暂停本地流
    }, {
      key: "suspendStream",
      value: function suspendStream(params) {
        var that = this;
        that.controlStream(params, "suspend");
      }
      /**恢复和暂停的公共方法*/
    }, {
      key: "controlStream",
      value: function controlStream(params, controlType) {
        var _deffer = deffer();
        var body = {
          "cmdType": controlType == "resume" ? "resumelocalstream" : "pauselocalstream",
          "streamtype": params.type,
          "customId": window['ezuikit-webrtc'].opt.roomParams.userId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        if (params.type == 2) {
          window['ezuikit-webrtc'].opt.cln.local.stream.getTracks().forEach(function (track) {
            if (track.kind == 'audio') {
              if (controlType == "resume") {
                track.enabled = true;
              } else {
                track.enabled = false;
              }
            }
          });
        }
        if (params.type == 1) {
          window['ezuikit-webrtc'].opt.cln.local.stream.getTracks().forEach(function (track) {
            if (track.kind == 'video') {
              if (controlType == "resume") {
                track.enabled = true;
              } else {
                track.enabled = false;
              }
            }
          });
        }
        if (params.type == 8) {
          console.log(" window['ezuikit-webrtc'].opt.screenStream.getTracks()", window['ezuikit-webrtc'].opt.screenStream.getTracks());
          window['ezuikit-webrtc'].opt.screenStream.getTracks().forEach(function (track) {
            // if (track.kind == 'video') {
            if (controlType == "resume") {
              track.enabled = true;
            } else {
              track.enabled = false;
            }
            // }
          });
        }

        if (params.type == 3) {
          window['ezuikit-webrtc'].opt.cln.local.stream.getTracks().forEach(function (track) {
            if (controlType == "resume") {
              track.enabled = true;
            } else {
              track.enabled = false;
            }
          });
        }
        if (params.type == 8) {
          window['ezuikit-webrtc'].opt.screenHandle.send({
            "message": body,
            success: function success() {
              // window['ezuikit-webrtc'].opt.sts.detach({ noRequest: false });
              _deffer.resolve("success");
            },
            error: function error(_error13) {
              _deffer.reject(_error13);
            }
          });
        } else {
          window['ezuikit-webrtc'].opt.sts.send({
            "message": body,
            success: function success() {
              // window['ezuikit-webrtc'].opt.sts.detach({ noRequest: false });
              _deffer.resolve("success");
            },
            error: function error(_error14) {
              _deffer.reject(_error14);
            }
          });
        }
        return _deffer.promise;
      }
      //恢复本地流
    }, {
      key: "resumeStream",
      value: function resumeStream(params) {
        var that = this;
        that.controlStream(params, "resume");
      }

      //发布本地音视频
    }, {
      key: "publishStream",
      value: function publishStream(params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        var body = {
          "cmdType": "publishlocalstream",
          "streamtype": params.type,
          "customId": window['ezuikit-webrtc'].opt.roomParams.userId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        if (params.type != 8) {
          window['ezuikit-webrtc'].opt.localStreamType = params.type;
        }
        ({
          // audio: window['ezuikit-webrtc'].audioParams,
          audio: true,
          video: window['ezuikit-webrtc'].videoParams
          // deviceId: "68c020f5a0f2e1227099bed64ab07365a805a99f3c96a5a645ed265896b57aaf"
        });

        var media = {
          videoSend: true,
          audioSend: true,
          audioRecv: true,
          videoRecv: true,
          data: false,
          video: "stdres",
          audio: true
        };
        switch (params.type) {
          //1纯视频
          case 1:
            media = {
              videoSend: true,
              audioSend: true,
              audioRecv: true,
              videoRecv: true,
              data: false,
              video: {
                deviceId: window['ezuikit-webrtc'].cameraId,
                width: window['ezuikit-webrtc'].width,
                height: window['ezuikit-webrtc'].height
              },
              audio: false
            };
            break;
          //1纯音频
          case 2:
            media = {
              videoSend: true,
              audioSend: true,
              audioRecv: true,
              videoRecv: true,
              data: false,
              video: false,
              audio: {
                deviceId: window['ezuikit-webrtc'].microphoneId
              }
            };
            break;
          //3音视频
          case 3:
            media = {
              videoSend: true,
              audioSend: true,
              audioRecv: true,
              videoRecv: true,
              data: false,
              video: {
                deviceId: window['ezuikit-webrtc'].cameraId,
                width: window['ezuikit-webrtc'].width,
                height: window['ezuikit-webrtc'].height
              },
              audio: {
                deviceId: window['ezuikit-webrtc'].microphoneId
              }
            };
            break;
          //8屏幕共享
          case 8:
            media = {
              audioRecv: false,
              videoRecv: true,
              data: false,
              audioSend: false,
              videoSend: true,
              video: "screen",
              screenshareFrameRate: 3
            };
            break;
        }
        console.log("media-----------", media);
        console.log("window['ezuikit-webrtc'].bitrate", window['ezuikit-webrtc'].bitrate);
        console.log("window['ezuikit-webrtc'].opt.sts", window['ezuikit-webrtc'].opt.sts);
        //如果发布流handle存在，则复用
        if (window['ezuikit-webrtc'].opt.sts && params.type != 8) {
          window['ezuikit-webrtc'].opt.sts.createOffer({
            // No media provided: by default, it's sendrecv for audio and video
            media: media,
            simulcast: false,
            simulcast2: false,
            bitrate: window['ezuikit-webrtc'].bitrate,
            frameRate: window['ezuikit-webrtc'].frameRate,
            success: function success(jsep) {
              console.log("createOffersuccess");
              Janus.debug("Got SDP!");
              Janus.debug(jsep);
              window['ezuikit-webrtc'].opt.sts.send({
                "message": body,
                "jsep": jsep
              });
              _deffer.resolve("success");
            },
            error: function error(_error15) {
              console.log("createOffererror");
              Janus.error("WebRTC error:", _error15);
              _deffer.reject(_error15);
            }
          });
        } else {
          window['ezuikit-webrtc'].opt.janus.attach({
            plugin: "rtcgw.plugin.sts",
            opaqueId: window['ezuikit-webrtc'].opt.opaqueId,
            success: function success(pluginHandle) {
              console.log("pluginHandle", pluginHandle);
              // $('#details').remove();
              if (params.type == 8) {
                window['ezuikit-webrtc'].opt.screenHandle = pluginHandle;
              } else {
                window['ezuikit-webrtc'].opt.sts = pluginHandle;
              }
              Janus.debug("Trying a createOffer too (audio/video sendrecv)");
              pluginHandle.createOffer({
                // No media provided: by default, it's sendrecv for audio and video
                media: media,
                simulcast: false,
                simulcast2: false,
                bitrate: window['ezuikit-webrtc'].bitrate,
                frameRate: window['ezuikit-webrtc'].frameRate,
                // simulcast: true,
                // simulcast2: true,
                success: function success(jsep) {
                  console.log("createOffersuccess");
                  Janus.debug("Got SDP!");
                  Janus.debug(jsep);
                  pluginHandle.send({
                    "message": body,
                    "jsep": jsep
                  });
                  _deffer.resolve("success");
                },
                error: function error(_error16) {
                  console.log("createOffererror");
                  Janus.error("WebRTC error:", _error16);
                  _deffer.reject(_error16);
                }
              });
            },
            error: function error(_error17) {
              console.error("  -- Error attaching plugin...", _error17);
              _deffer.reject(_error17);
            },
            consentDialog: function consentDialog(on) {
              Janus.debug("Consent dialog should be " + (on ? "on" : "off") + " now");
            },
            iceState: function iceState(state) {
              Janus.log("ICE state changed to " + state);
              switch (state) {
                case 'connected':
                  console.log("ice connect success");
                  break;
                case 'disconnected':
                  console.log("ice connect loss");
                  break;
              }
            },
            mediaState: function mediaState(medium, on) {
              Janus.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium);
            },
            webrtcState: function webrtcState(on) {
              Janus.log("Janus says our WebRTC PeerConnection is " + (on ? "up" : "down") + " now");
              // $("#audioleft").parent().unblock();
            },

            slowLink: function slowLink(uplink, lost) {
              Janus.warn("Janus reports problems " + (uplink ? "sending" : "receiving") + " packets on this PeerConnection (" + lost + " lost packets)");
            },
            onmessage: function onmessage(msg, jsep) {
              console.log("消息回调+++++++++++++++++++++++++++++++++++++++++", msg, jsep);
              Janus.debug(" ::: Got a message :::");
              Janus.debug(msg);
              if (jsep !== undefined && jsep !== null) {
                Janus.debug("Handling SDP as well...");
                Janus.debug(jsep);
                if (params.type == 8) {
                  window['ezuikit-webrtc'].opt.screenHandle.handleRemoteJsep({
                    jsep: jsep
                  });
                } else {
                  window['ezuikit-webrtc'].opt.sts.handleRemoteJsep({
                    jsep: jsep
                  });
                }
                // window['ezuikit-webrtc'].opt.sts.handleRemoteJsep({ jsep: jsep });
              }
            },

            onlocalstream: function onlocalstream(stream) {
              console.log("onlocalstream", stream);
              Janus.debug(" ::: Got a local stream :::");
              Janus.debug(stream);
              if (params.type == 8) {
                window['ezuikit-webrtc'].opt.screenStream = stream;
                stream.getVideoTracks()[0].addEventListener('ended', function () {
                  console.log("停止了屏幕共享-----------------------");
                  var screenBody = {
                    "cmdType": "unpublishlocalstream",
                    "streamtype": 8,
                    "customId": window['ezuikit-webrtc'].opt.roomParams.userId,
                    "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
                  };
                  if (window['ezuikit-webrtc'].opt.screenHandle) {
                    window['ezuikit-webrtc'].opt.screenHandle.send({
                      "message": screenBody,
                      success: function success() {
                        window['ezuikit-webrtc'].opt.screenHandle.detach({
                          noRequest: false
                        });
                        window['ezuikit-webrtc'].opt.screenHandle = null;
                      },
                      error: function error(_error18) {}
                    });
                  }
                });
                // window['ezuikit-webrtc'].opt.cln.local.stream = stream
              } else {
                window['ezuikit-webrtc'].opt.cln.local.stream = stream;
              }
            },
            onremotestream: function onremotestream(stream) {},
            ondataopen: function ondataopen(data) {
              Janus.log("The DataChannel is available!");
            },
            ondata: function ondata(data) {
              Janus.debug("We got data from the DataChannel! " + data);
            },
            oncleanup: function oncleanup() {
              Janus.log(" ::: Got a cleanup notification :::");
            }
          });
        }
        // }
        return _deffer.promise;
      }

      //取消发布本地音视频
    }, {
      key: "unpublishStream",
      value: function unpublishStream(params) {
        // 构建 deffer 实例
        var _deffer = deffer();
        var body = {
          "cmdType": "unpublishlocalstream",
          "streamtype": 3,
          "customId": window['ezuikit-webrtc'].opt.roomParams.userId,
          "roomId": window['ezuikit-webrtc'].opt.roomParams.internalRoomId
        };
        if (params.type == 8) {
          window['ezuikit-webrtc'].opt.screenHandle.send({
            "message": _objectSpread2(_objectSpread2({}, body), {}, {
              "streamtype": 8
            }),
            success: function success() {
              window['ezuikit-webrtc'].opt.screenHandle.detach({
                noRequest: false
              });
              window['ezuikit-webrtc'].opt.screenHandle = null;
              _deffer.resolve("success");
            },
            error: function error(_error19) {
              _deffer.reject(_error19);
            }
          });
        } else {
          window['ezuikit-webrtc'].opt.sts.send({
            "message": body,
            success: function success() {
              window['ezuikit-webrtc'].opt.sts.detach({
                noRequest: false
              });
              window['ezuikit-webrtc'].opt.sts = null;
              _deffer.resolve("success");
            },
            error: function error(_error20) {
              _deffer.reject(_error20);
            }
          });
        }
        return _deffer.promise;
      }
    }, {
      key: "ezwebTrigger",
      value:
      // listen(type,fn) {
      //     listen("steam-added",(event)=>{
      //         // console.log("event_______",event)
      //         fn(event)
      //     })
      // }
      function ezwebTrigger(params) {
        var localStream = window['ezuikit-webrtc'].opt.cln.local.stream;
        var event = {
          stream: localStream,
          clientId: "cliendId-".concat(Math.random() * 20)
        };
        trigger("steam-added", event);
      }
      //监听的消息回调，远端流展示
    }, {
      key: "playRemoteSteam",
      value: function playRemoteSteam(params) {
        // let _deffer = deffer()
        var localVideo = document.getElementById(params.domId);

        //媒体流绑定标签
        Janus.attachMediaStream(localVideo, params.stream);

        // localVideo.play();
        localVideo.load();
        var playPromise = localVideo.play();
        if (playPromise !== undefined) {
          // _deffer.resolve(localVideo.volume)
          playPromise.then(function () {
            localVideo.play();
          })["catch"](function (e) {
            // _deffer.reject(e)
          });
        }
        // return _deffer.promise
      }
      /**
       * 获取网络质量接口  以后版本处理
      */
    }, {
      key: "getQuality",
      value: function getQuality(params) {
        window['ezuikit-webrtc'].opt['z3'].getNetworkQuality(params.handleId, function (info) {
          console.log("NetworkQuality", info);
        });
      }
    }]);
    return EZWebRtc;
  }();

  var name = "ezuikit-js";
  var maintainers = [
  	"jzy"
  ];
  var version = "1.2.5";
  var description = "ezuikit javascript for npm";
  var main = "ezuikit.js";
  var scripts = {
  	test: "echo \"Error: no test specified\" && exit 1"
  };
  var repository = {
  	type: "git",
  	url: "git+https://github.com/Hikvision-Ezviz/EZUIKit-JavaScript-npm.git"
  };
  var files = [
  	"ezuikit.js",
  	"README.md",
  	"CHANGELOG.md"
  ];
  var keywords = [
  	"video",
  	"ezuikit"
  ];
  var author = "yujianbo";
  var license = "ISC";
  var bugs = {
  	url: "https://github.com/Hikvision-Ezviz/EZUIKit-JavaScript-npm/issues"
  };
  var homepage = "https://github.com/Hikvision-Ezviz/EZUIKit-JavaScript-npm#readme";
  var pkg = {
  	name: name,
  	maintainers: maintainers,
  	version: version,
  	description: description,
  	main: main,
  	scripts: scripts,
  	repository: repository,
  	files: files,
  	keywords: keywords,
  	author: author,
  	license: license,
  	bugs: bugs,
  	homepage: homepage
  };

  /**
   * 错误类型枚举
   */
  class ErrorCategoryEnum {
    /**
     * js 错误
     */
    static get JS_ERROR() {
      return "js_error";
    }

    /**
     * 资源引用错误
     */
    static get RESOURCE_ERROR() {
      return "resource_error";
    }

    /**
     * Vue错误
     */
    static get VUE_ERROR() {
      return "vue_error";
    }

    /**
     * promise 错误
     */
    static get PROMISE_ERROR() {
      return "promise_error";
    }

    /**
     * ajax异步请求错误
     */
    static get AJAX_ERROR() {
      return "ajax_error";
    }

    /**
     * 控制台错误console.info
     */
    static get CONSOLE_INFO() {
      return "console_info";
    }

    /**
     * 控制台错误console.warn
     */
    static get CONSOLE_WARN() {
      return "console_warn";
    }

    /**
     * 控制台错误console.error
     */
    static get CONSOLE_ERROR() {
      return "console_error";
    }

    /**
     * 跨域js错误
     */
    static get CROSS_SCRIPT_ERROR() {
      return "cross_srcipt_error";
    }

    /**
     * 未知异常
     */
    static get UNKNOW_ERROR() {
      return "unknow_error";
    }

    /**
     * 性能上报
     */
    static get PERFORMANCE() {
      return "performance";
    }

    /**
     * 业务埋点上报
     */
    static get BUSINESS() {
      return "business";
    }
  }

  /**
   * 错误level枚举
   */
  class ErrorLevelEnum {
    /**
     * 错误信息
     */
    static get ERROR() {
      return "Error";
    }

    /**
     * 警告信息
     */
    static get WARN() {
      return "Warning";
    }

    /**
     * 日志信息
     */
    static get INFO() {
      return "Info";
    }
  }

  /**
   * Ajax库枚举
   */
  class AjaxLibEnum {
    static get FETCH() {
      return 'fetch';
    }
    static get DEFAULT() {
      return 'default';
    }
  }

  var DeviceInfo = function () {
    var root = typeof self !== 'undefined' ? self : this;
    var _window = root || {};
    // 变量库
    var VariableLibrary = {
      navigator: typeof root.navigator != 'undefined' ? root.navigator : {},
      // 信息map
      infoMap: {
        engine: ['WebKit', 'Trident', 'Gecko', 'Presto'],
        browser: ['Safari', 'Chrome', 'Edge', 'IE', 'Firefox', 'Firefox Focus', 'Chromium', 'Opera', 'Vivaldi', 'Yandex', 'Arora', 'Lunascape', 'QupZilla', 'Coc Coc', 'Kindle', 'Iceweasel', 'Konqueror', 'Iceape', 'SeaMonkey', 'Epiphany', '360', '360SE', '360EE', 'UC', 'QQBrowser', 'QQ', 'Baidu', 'Maxthon', 'Sogou', 'LBBROWSER', '2345Explorer', 'TheWorld', 'XiaoMi', 'Quark', 'Qiyu', 'Wechat', 'Taobao', 'Alipay', 'Weibo', 'Douban', 'Suning', 'iQiYi'],
        os: ['Windows', 'Linux', 'Mac OS', 'Android', 'Ubuntu', 'FreeBSD', 'Debian', 'iOS', 'Windows Phone', 'BlackBerry', 'MeeGo', 'Symbian', 'Chrome OS', 'WebOS'],
        device: ['Mobile', 'Tablet', 'iPad']
      }
    };
    // 方法库
    var MethodLibrary = function () {
      return {
        // 获取匹配库
        getMatchMap: function (u) {
          return {
            // 内核
            Trident: u.indexOf('Trident') > -1 || u.indexOf('NET CLR') > -1,
            Presto: u.indexOf('Presto') > -1,
            WebKit: u.indexOf('AppleWebKit') > -1,
            Gecko: u.indexOf('Gecko/') > -1,
            // 浏览器
            Safari: u.indexOf('Safari') > -1,
            Chrome: u.indexOf('Chrome') > -1 || u.indexOf('CriOS') > -1,
            IE: u.indexOf('MSIE') > -1 || u.indexOf('Trident') > -1,
            Edge: u.indexOf('Edge') > -1,
            Firefox: u.indexOf('Firefox') > -1 || u.indexOf('FxiOS') > -1,
            'Firefox Focus': u.indexOf('Focus') > -1,
            Chromium: u.indexOf('Chromium') > -1,
            Opera: u.indexOf('Opera') > -1 || u.indexOf('OPR') > -1,
            Vivaldi: u.indexOf('Vivaldi') > -1,
            Yandex: u.indexOf('YaBrowser') > -1,
            Arora: u.indexOf('Arora') > -1,
            Lunascape: u.indexOf('Lunascape') > -1,
            QupZilla: u.indexOf('QupZilla') > -1,
            'Coc Coc': u.indexOf('coc_coc_browser') > -1,
            Kindle: u.indexOf('Kindle') > -1 || u.indexOf('Silk/') > -1,
            Iceweasel: u.indexOf('Iceweasel') > -1,
            Konqueror: u.indexOf('Konqueror') > -1,
            Iceape: u.indexOf('Iceape') > -1,
            SeaMonkey: u.indexOf('SeaMonkey') > -1,
            Epiphany: u.indexOf('Epiphany') > -1,
            '360': u.indexOf('QihooBrowser') > -1 || u.indexOf('QHBrowser') > -1,
            '360EE': u.indexOf('360EE') > -1,
            '360SE': u.indexOf('360SE') > -1,
            UC: u.indexOf('UC') > -1 || u.indexOf(' UBrowser') > -1,
            QQBrowser: u.indexOf('QQBrowser') > -1,
            QQ: u.indexOf('QQ/') > -1,
            Baidu: u.indexOf('Baidu') > -1 || u.indexOf('BIDUBrowser') > -1,
            Maxthon: u.indexOf('Maxthon') > -1,
            Sogou: u.indexOf('MetaSr') > -1 || u.indexOf('Sogou') > -1,
            LBBROWSER: u.indexOf('LBBROWSER') > -1,
            '2345Explorer': u.indexOf('2345Explorer') > -1,
            TheWorld: u.indexOf('TheWorld') > -1,
            XiaoMi: u.indexOf('MiuiBrowser') > -1,
            Quark: u.indexOf('Quark') > -1,
            Qiyu: u.indexOf('Qiyu') > -1,
            Wechat: u.indexOf('MicroMessenger') > -1,
            Taobao: u.indexOf('AliApp(TB') > -1,
            Alipay: u.indexOf('AliApp(AP') > -1,
            Weibo: u.indexOf('Weibo') > -1,
            Douban: u.indexOf('com.douban.frodo') > -1,
            Suning: u.indexOf('SNEBUY-APP') > -1,
            iQiYi: u.indexOf('IqiyiApp') > -1,
            // 系统或平台
            Windows: u.indexOf('Windows') > -1,
            Linux: u.indexOf('Linux') > -1 || u.indexOf('X11') > -1,
            'Mac OS': u.indexOf('Macintosh') > -1,
            Android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1,
            Ubuntu: u.indexOf('Ubuntu') > -1,
            FreeBSD: u.indexOf('FreeBSD') > -1,
            Debian: u.indexOf('Debian') > -1,
            'Windows Phone': u.indexOf('IEMobile') > -1 || u.indexOf('Windows Phone') > -1,
            BlackBerry: u.indexOf('BlackBerry') > -1 || u.indexOf('RIM') > -1,
            MeeGo: u.indexOf('MeeGo') > -1,
            Symbian: u.indexOf('Symbian') > -1,
            iOS: u.indexOf('like Mac OS X') > -1,
            'Chrome OS': u.indexOf('CrOS') > -1,
            WebOS: u.indexOf('hpwOS') > -1,
            // 设备
            Mobile: u.indexOf('Mobi') > -1 || u.indexOf('iPh') > -1 || u.indexOf('480') > -1,
            Tablet: u.indexOf('Tablet') > -1 || u.indexOf('Nexus 7') > -1,
            iPad: u.indexOf('iPad') > -1
          };
        },
        // 在信息map和匹配库中进行匹配
        matchInfoMap: function (_this) {
          var u = VariableLibrary.navigator.userAgent || {};
          var match = MethodLibrary.getMatchMap(u);
          for (var s in VariableLibrary.infoMap) {
            for (var i = 0; i < VariableLibrary.infoMap[s].length; i++) {
              var value = VariableLibrary.infoMap[s][i];
              if (match[value]) {
                _this[s] = value;
              }
            }
          }
        },
        // 获取当前操作系统
        getOS: function () {
          var _this = this;
          MethodLibrary.matchInfoMap(_this);
          return _this.os;
        },
        // 获取操作系统版本
        getOSVersion: function () {
          var _this = this;
          var u = VariableLibrary.navigator.userAgent || {};
          _this.osVersion = '';
          // 系统版本信息
          var osVersion = {
            Windows: function () {
              var v = u.replace(/^.*Windows NT ([\d.]+);.*$/, '$1');
              var oldWindowsVersionMap = {
                '6.4': '10',
                '6.3': '8.1',
                '6.2': '8',
                '6.1': '7',
                '6.0': 'Vista',
                '5.2': 'XP',
                '5.1': 'XP',
                '5.0': '2000'
              };
              return oldWindowsVersionMap[v] || v;
            },
            Android: function () {
              return u.replace(/^.*Android ([\d.]+);.*$/, '$1');
            },
            iOS: function () {
              return u.replace(/^.*OS ([\d_]+) like.*$/, '$1').replace(/_/g, '.');
            },
            Debian: function () {
              return u.replace(/^.*Debian\/([\d.]+).*$/, '$1');
            },
            'Windows Phone': function () {
              return u.replace(/^.*Windows Phone( OS)? ([\d.]+);.*$/, '$2');
            },
            'Mac OS': function () {
              return u.replace(/^.*Mac OS X ([\d_]+).*$/, '$1').replace(/_/g, '.');
            },
            WebOS: function () {
              return u.replace(/^.*hpwOS\/([\d.]+);.*$/, '$1');
            }
          };
          if (osVersion[_this.os]) {
            _this.osVersion = osVersion[_this.os]();
            if (_this.osVersion == u) {
              _this.osVersion = '';
            }
          }
          return _this.osVersion;
        },
        // 获取横竖屏状态
        getOrientationStatu: function () {
          var orientationStatus = '';
          var orientation = window.matchMedia('(orientation: portrait)');
          if (orientation.matches) {
            orientationStatus = '竖屏';
          } else {
            orientationStatus = '横屏';
          }
          return orientationStatus;
        },
        // 获取设备类型
        getDeviceType: function () {
          var _this = this;
          _this.device = 'PC';
          MethodLibrary.matchInfoMap(_this);
          return _this.device;
        },
        // 获取网络状态
        getNetwork: function () {
          var netWork = navigator && navigator.connection && navigator.connection.effectiveType;
          return netWork;
        },
        // 获取当前语言
        getLanguage: function () {
          var _this = this;
          _this.language = function () {
            var language = VariableLibrary.navigator.browserLanguage || VariableLibrary.navigator.language;
            var arr = language.split('-');
            if (arr[1]) {
              arr[1] = arr[1].toUpperCase();
            }
            return arr.join('_');
          }();
          return _this.language;
        },
        // 生成浏览器指纹
        createFingerprint: function (domain) {
          var fingerprint;
          function bin2hex(s) {
            var i,
              l,
              n,
              o = '';
            s += '';
            for (i = 0, l = s.length; i < l; i++) {
              n = s.charCodeAt(i).toString(16);
              o += n.length < 2 ? '0' + n : n;
            }
            return o;
          }
          var canvas = document.createElement('canvas');
          var ctx = canvas.getContext('2d');
          var txt = domain || window.location.host;
          ctx.textBaseline = 'top';
          ctx.font = "14px 'Arial'";
          ctx.textBaseline = 'tencent';
          ctx.fillStyle = '#f60';
          ctx.fillRect(125, 1, 62, 20);
          ctx.fillStyle = '#069';
          ctx.fillText(txt, 2, 15);
          ctx.fillStyle = 'rgba(102, 204, 0, 0.7)';
          ctx.fillText(txt, 4, 17);
          var b64 = canvas.toDataURL().replace('data:image/png;base64,', '');
          var bin = atob(b64);
          var crc = bin2hex(bin.slice(-16, -12));
          fingerprint = crc;
          return fingerprint;
        },
        // 浏览器信息
        getBrowserInfo: function () {
          var _this = this;
          MethodLibrary.matchInfoMap(_this);
          var u = VariableLibrary.navigator.userAgent || {};
          var _mime = function (option, value) {
            var mimeTypes = VariableLibrary.navigator.mimeTypes;
            for (var key in mimeTypes) {
              if (mimeTypes[key][option] == value) {
                return true;
              }
            }
            return false;
          };
          var match = MethodLibrary.getMatchMap(u);
          var is360 = false;
          if (_window.chrome) {
            var chrome_vision = u.replace(/^.*Chrome\/([\d]+).*$/, '$1');
            if (chrome_vision > 36 && _window.showModalDialog) {
              is360 = true;
            } else if (chrome_vision > 45) {
              is360 = _mime('type', 'application/vnd.chromium.remoting-viewer');
            }
          }
          if (match['Baidu'] && match['Opera']) {
            match['Baidu'] = false;
          }
          if (match['Mobile']) {
            match['Mobile'] = !(u.indexOf('iPad') > -1);
          }
          if (is360) {
            if (_mime('type', 'application/gameplugin')) {
              match['360SE'] = true;
            } else if (VariableLibrary.navigator && typeof VariableLibrary.navigator['connection']['saveData'] == 'undefined') {
              match['360SE'] = true;
            } else {
              match['360EE'] = true;
            }
          }
          if (match['IE'] || match['Edge']) {
            var navigator_top = window.screenTop - window.screenY;
            switch (navigator_top) {
              case 71:
                // 无收藏栏,贴边
                break;
              case 74:
                // 无收藏栏,非贴边
                break;
              case 99:
                // 有收藏栏,贴边
                break;
              case 102:
                // 有收藏栏,非贴边
                match['360EE'] = true;
                break;
              case 75:
                // 无收藏栏,贴边
                break;
              case 74:
                // 无收藏栏,非贴边
                break;
              case 105:
                // 有收藏栏,贴边
                break;
              case 104:
                // 有收藏栏,非贴边
                match['360SE'] = true;
                break;
            }
          }
          var browerVersionMap = {
            Safari: function () {
              return u.replace(/^.*Version\/([\d.]+).*$/, '$1');
            },
            Chrome: function () {
              return u.replace(/^.*Chrome\/([\d.]+).*$/, '$1').replace(/^.*CriOS\/([\d.]+).*$/, '$1');
            },
            IE: function () {
              return u.replace(/^.*MSIE ([\d.]+).*$/, '$1').replace(/^.*rv:([\d.]+).*$/, '$1');
            },
            Edge: function () {
              return u.replace(/^.*Edge\/([\d.]+).*$/, '$1');
            },
            Firefox: function () {
              return u.replace(/^.*Firefox\/([\d.]+).*$/, '$1').replace(/^.*FxiOS\/([\d.]+).*$/, '$1');
            },
            'Firefox Focus': function () {
              return u.replace(/^.*Focus\/([\d.]+).*$/, '$1');
            },
            Chromium: function () {
              return u.replace(/^.*Chromium\/([\d.]+).*$/, '$1');
            },
            Opera: function () {
              return u.replace(/^.*Opera\/([\d.]+).*$/, '$1').replace(/^.*OPR\/([\d.]+).*$/, '$1');
            },
            Vivaldi: function () {
              return u.replace(/^.*Vivaldi\/([\d.]+).*$/, '$1');
            },
            Yandex: function () {
              return u.replace(/^.*YaBrowser\/([\d.]+).*$/, '$1');
            },
            Arora: function () {
              return u.replace(/^.*Arora\/([\d.]+).*$/, '$1');
            },
            Lunascape: function () {
              return u.replace(/^.*Lunascape[\/\s]([\d.]+).*$/, '$1');
            },
            QupZilla: function () {
              return u.replace(/^.*QupZilla[\/\s]([\d.]+).*$/, '$1');
            },
            'Coc Coc': function () {
              return u.replace(/^.*coc_coc_browser\/([\d.]+).*$/, '$1');
            },
            Kindle: function () {
              return u.replace(/^.*Version\/([\d.]+).*$/, '$1');
            },
            Iceweasel: function () {
              return u.replace(/^.*Iceweasel\/([\d.]+).*$/, '$1');
            },
            Konqueror: function () {
              return u.replace(/^.*Konqueror\/([\d.]+).*$/, '$1');
            },
            Iceape: function () {
              return u.replace(/^.*Iceape\/([\d.]+).*$/, '$1');
            },
            SeaMonkey: function () {
              return u.replace(/^.*SeaMonkey\/([\d.]+).*$/, '$1');
            },
            Epiphany: function () {
              return u.replace(/^.*Epiphany\/([\d.]+).*$/, '$1');
            },
            '360': function () {
              return u.replace(/^.*QihooBrowser\/([\d.]+).*$/, '$1');
            },
            '360SE': function () {
              var hash = {
                '63': '10.0',
                '55': '9.1',
                '45': '8.1',
                '42': '8.0',
                '31': '7.0',
                '21': '6.3'
              };
              var chrome_vision = u.replace(/^.*Chrome\/([\d]+).*$/, '$1');
              return hash[chrome_vision] || '';
            },
            '360EE': function () {
              var hash = {
                '69': '11.0',
                '63': '9.5',
                '55': '9.0',
                '50': '8.7',
                '30': '7.5'
              };
              var chrome_vision = u.replace(/^.*Chrome\/([\d]+).*$/, '$1');
              return hash[chrome_vision] || '';
            },
            Maxthon: function () {
              return u.replace(/^.*Maxthon\/([\d.]+).*$/, '$1');
            },
            QQBrowser: function () {
              return u.replace(/^.*QQBrowser\/([\d.]+).*$/, '$1');
            },
            QQ: function () {
              return u.replace(/^.*QQ\/([\d.]+).*$/, '$1');
            },
            Baidu: function () {
              return u.replace(/^.*BIDUBrowser[\s\/]([\d.]+).*$/, '$1');
            },
            UC: function () {
              return u.replace(/^.*UC?Browser\/([\d.]+).*$/, '$1');
            },
            Sogou: function () {
              return u.replace(/^.*SE ([\d.X]+).*$/, '$1').replace(/^.*SogouMobileBrowser\/([\d.]+).*$/, '$1');
            },
            LBBROWSER: function () {
              var hash = {
                '57': '6.5',
                '49': '6.0',
                '46': '5.9',
                '42': '5.3',
                '39': '5.2',
                '34': '5.0',
                '29': '4.5',
                '21': '4.0'
              };
              var chrome_vision = navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/, '$1');
              return hash[chrome_vision] || '';
            },
            '2345Explorer': function () {
              return u.replace(/^.*2345Explorer\/([\d.]+).*$/, '$1');
            },
            TheWorld: function () {
              return u.replace(/^.*TheWorld ([\d.]+).*$/, '$1');
            },
            XiaoMi: function () {
              return u.replace(/^.*MiuiBrowser\/([\d.]+).*$/, '$1');
            },
            Quark: function () {
              return u.replace(/^.*Quark\/([\d.]+).*$/, '$1');
            },
            Qiyu: function () {
              return u.replace(/^.*Qiyu\/([\d.]+).*$/, '$1');
            },
            Wechat: function () {
              return u.replace(/^.*MicroMessenger\/([\d.]+).*$/, '$1');
            },
            Taobao: function () {
              return u.replace(/^.*AliApp\(TB\/([\d.]+).*$/, '$1');
            },
            Alipay: function () {
              return u.replace(/^.*AliApp\(AP\/([\d.]+).*$/, '$1');
            },
            Weibo: function () {
              return u.replace(/^.*weibo__([\d.]+).*$/, '$1');
            },
            Douban: function () {
              return u.replace(/^.*com.douban.frodo\/([\d.]+).*$/, '$1');
            },
            Suning: function () {
              return u.replace(/^.*SNEBUY-APP([\d.]+).*$/, '$1');
            },
            iQiYi: function () {
              return u.replace(/^.*IqiyiVersion\/([\d.]+).*$/, '$1');
            }
          };
          _this.browserVersion = '';
          if (browerVersionMap[_this.browser]) {
            _this.browserVersion = browerVersionMap[_this.browser]();
            if (_this.browserVersion == u) {
              _this.browserVersion = '';
            }
          }
          if (_this.browser == 'Edge') {
            _this.engine = 'EdgeHTML';
          }
          if (_this.browser == 'Chrome' && parseInt(_this.browserVersion) > 27) {
            _this.engine = 'Blink';
          }
          if (_this.browser == 'Opera' && parseInt(_this.browserVersion) > 12) {
            _this.engine = 'Blink';
          }
          if (_this.browser == 'Yandex') {
            _this.engine = 'Blink';
          }
          return _this.browser + '（版本: ' + _this.browserVersion + '&nbsp;&nbsp;内核: ' + _this.engine + '）';
        }
      };
    }();
    // 逻辑层
    var LogicLibrary = function () {
      return {
        DeviceInfoObj: function (params) {
          params = params || {
            domain: ''
          };
          var info = {
            deviceType: MethodLibrary.getDeviceType(),
            // 设备类型
            OS: MethodLibrary.getOS(),
            // 操作系统
            OSVersion: MethodLibrary.getOSVersion(),
            // 操作系统版本
            screenHeight: _window.screen.height,
            // 屏幕高
            screenWidth: _window.screen.width,
            // 屏幕宽
            language: MethodLibrary.getLanguage(),
            // 当前使用的语言-国家
            netWork: MethodLibrary.getNetwork(),
            // 联网类型
            orientation: MethodLibrary.getOrientationStatu(),
            // 横竖屏
            browserInfo: MethodLibrary.getBrowserInfo(),
            // 浏览器信息
            fingerprint: MethodLibrary.createFingerprint(params.domain),
            // 浏览器指纹
            userAgent: VariableLibrary.navigator.userAgent // 包含 appCodeName,appName,appVersion,language,platform 等
          };

          if (!params.info || params.info.length == 0) {
            return info;
          }
          var infoTemp = {};
          for (var i in info) {
            params.info.forEach(function (item) {
              if (item.toLowerCase() == i.toLowerCase()) {
                item = i;
                infoTemp[item] = info[item];
              }
            });
          }
          return infoTemp;
        }
      };
    }();
    // 对外暴露方法
    return {
      getDeviceInfo: function (params) {
        return LogicLibrary.DeviceInfoObj(params);
      }
    };
  }();

  var utils = {
    type(obj) {
      return Object.prototype.toString.call(obj).replace(/\[object\s|\]/g, '');
    },
    isFunction(func) {
      return this.type(func) === "Function";
    },
    isArray(list) {
      return this.type(list) === 'Array';
    },
    /**
     * 是否为null
     * @param {String} str 
     */
    isNull(str) {
      return str == undefined || str == '' || str == null;
    },
    /**
     * 对象是否为空
     * @param {*} obj 
     */
    objectIsNull(obj) {
      return JSON.stringify(obj) === "{}";
    },
    /**
     * 是否是对象
     * @param {*} obj 
     */
    isObject(obj) {
      return this.type(obj) === "Object";
    }
  };

  /**
   * 通过 XHR 发送信息
   */
  class ByXHR {
    toReport(url, data) {
      try {
        let dataStr = JSON.stringify(data);
        var xhr = new XMLHttpRequest();
        xhr.open("POST", url, true);
        xhr.setRequestHeader("Content-Type", "application/json");
        xhr.send(dataStr);
      } catch (error) {
        console.log(error);
      }
    }
  }

  /**
   * 通过 Fetch 发送信息
   */
  class ByFetch {
    toReport(url, data) {
      try {
        let dataStr = JSON.stringify(data);
        fetch(url, {
          headers: {
            "Content-Type": "application/json"
          },
          method: "POST",
          body: dataStr,
          mode: 'same-origin',
          // 告诉浏览器是同源，同源后浏览器不会进行预检请求
          keepalive: true
        });
      } catch (error) {
        new ByXHR().toReport(url, data);
        console.log("fetch请求异常", error);
      }
    }
  }

  /**
   * 通过 IMG 发送信息
   */
  class ByImg {
    toReport(url, data) {
      try {
        var img = new Image();
        img.src = url + '?st=' + new Date().getTime() + '&' + this.formatParams(data);
      } catch (error) {
        console.log(error);
      }
    }

    /*
     *格式化参数
     */
    formatParams(data) {
      var arr = [];
      for (var name in data) {
        arr.push(encodeURIComponent(name) + "=" + encodeURIComponent(data[name]));
      }
      return arr.join("&");
    }
  }

  /**
   * 通过 Navigator 发送信息
   */
  class ByNavigator {
    toReport(url, data) {
      try {
        data.st = new Date().getTime();
        navigator.sendBeacon && navigator.sendBeacon(url, this.formatParamsByURLSearchParams(data));
      } catch (error) {
        console.log(error);
      }
    }

    /*
     *格式化参数
     */
    formatParamsByFormData(data) {
      const form = new FormData();
      for (var name in data) {
        form.append(name, data[name]);
      }
      return form;
    }
    /*
     *格式化参数
     */
    formatParamsByURLSearchParams(data) {
      const form = new URLSearchParams();
      for (var name in data) {
        if (typeof data[name] === 'object') {
          data[name] = JSON.stringify(data[name]);
        }
        form.append(name, data[name]);
      }
      return form;
    }
    /*
     *格式化参数
     */
    formatParams(data) {
      var arr = [];
      for (var name in data) {
        arr.push(encodeURIComponent(name) + "=" + encodeURIComponent(data[name]));
      }
      return arr.join("&");
    }
  }

  /**
   * 数据持久化
   */
  class API {
    constructor(url) {
      this.url = url;
    }

    /**
     * 上报信息 （默认方式）
     * isFetch ：是否优先通过fetch上报
     * isXHR ：是否优先通过XHR上报
     * isImg ：是否优先通过IMG上报
     * isNavigator ：是否优先通过Navigator上报
     */
    report(data, reportWay) {
      let defaultWay = {
        isFetch: false,
        isXHR: false,
        isImg: false,
        isNavigator: false
      };
      reportWay = reportWay || defaultWay;
      if (!this.checkUrl(this.url)) {
        console.log("上报信息url地址格式不正确,url=", this.url);
        return;
      }
      this.sendInfo(data, reportWay);
    }

    /**
     * 发送消息
     */
    sendInfo(data, reportWay = {}) {
      let byFetch = new ByFetch();
      let byImg = new ByImg();
      let byXHR = new ByXHR();
      let byNavigator = new ByNavigator();
      if (reportWay.isImg) {
        byImg.toReport(this.url, data);
        return;
      }
      if (reportWay.isFetch) {
        byFetch.toReport(this.url, data);
        return;
      }
      if (reportWay.isXHR) {
        byXHR.toReport(this.url, data);
        return;
      }
      if (reportWay.isNavigator) {
        byNavigator.toReport(this.url, data);
        return;
      }
      let isDefault = !!(reportWay.isFetch && reportWay.isImg && reportWay.isXHR && reportWay.isNavigator);
      if (!isDefault) {
        byNavigator.toReport(this.url, data);
        return;
      }
    }

    /**
     * 检测URL
     */
    checkUrl(url) {
      if (!url) {
        return false;
      }
      var urlRule = /^[hH][tT][tT][pP]([sS]?):\/\//;
      return urlRule.test(url);
    }
  }

  /**
   * 消息队列
   */
  var TaskQueue = {
    /**
     * 是否停止fire
     */
    isStop: true,
    /**
     * 待处理消息列表
     */
    queues: [],
    /**
     * 添加消息
     * @param {*} reportUrl 上报url
     * @param {*} data 上报数据
     */
    add: function (reportUrl, data) {
      this.queues.push({
        reportUrl,
        data
      });
    },
    /**
     * 统一上报
     */
    fire: function () {
      if (!this.queues || this.queues.length === 0) {
        this.isStop = true;
        return;
      }
      this.isStop = false;
      let item = this.queues[0];
      item.reportUrl && new API(item.reportUrl).report(item.data);
      this.queues.splice(0, 1);
      this.fire(); //递归
    }
  };

  /**
   * 监控基类
   */
  class BaseMonitor {
    /**
     * 上报错误地址
     * @param {*} params { reportUrl,extendsInfo }
     */
    constructor(params) {
      this.category = ErrorCategoryEnum.UNKNOW_ERROR; //错误类型
      this.level = ErrorLevelEnum.INFO; //错误等级
      this.msg = ""; //错误信息
      this.url = ""; //错误信息地址
      this.line = ""; //行数
      this.col = ""; //列数
      this.errorObj = ""; //错误堆栈

      this.reportUrl = params.reportUrl; //上报错误地址
      this.extendsInfo = params.extendsInfo; //扩展信息
    }

    /**
     * 记录错误信息
     */
    recordError() {
      this.handleRecordError();
      TaskQueue.isStop && TaskQueue.fire(); //停止则fire
    }

    /**
     * 统一处理记录日志
     */
    handleRecordError() {
      try {
        if (!this.msg) {
          return;
        }
        //过滤掉错误上报地址
        if (this.reportUrl && this.url && this.url.toLowerCase().indexOf(this.reportUrl.toLowerCase()) >= 0) {
          console.log("统计错误接口异常", this.msg);
          return;
        }
        let errorInfo = this.handleErrorInfo();

        // console.log("\n````````````````````` " + this.category + " `````````````````````\n", errorInfo)

        //记录日志
        TaskQueue.add(this.reportUrl, errorInfo);
      } catch (error) {
        console.log(error);
      }
    }

    /**
     * 统一处理错误信息
     * 错误类别的设计与 action 字段的对应关系待优化
     * 
     */
    handleErrorInfo() {
      let extendsInfo = this.getExtendsInfo();
      let recordInfo = extendsInfo;
      let txt = "";
      let action = 0;
      switch (this.category) {
        case ErrorCategoryEnum.BUSINESS:
          // 如果有 textKey 字段，则默认 action 1 控制台业务埋点上报
          if (this.msg.textKey) {
            txt = JSON.stringify(this.msg);
            action = 1;
            recordInfo.textKey = this.msg.textKey;
            if (this.msg.h) {
              recordInfo.h = this.msg.h;
            }
            if (this.msg.text) {
              recordInfo.text = this.msg.text;
            }
          } else {
            // 如果没有 textKey 则将字段都上报  轻应用、小程序埋点上报
            recordInfo = Object.assign({}, recordInfo, this.msg);
            recordInfo.l = window.location.href;
            return recordInfo;
          }
          break;
        case ErrorCategoryEnum.PERFORMANCE:
          txt = JSON.stringify(this.msg);
          action = 1000;
          // 性能上报同时上报客户端信息
          recordInfo.clientInfo = this.getDeviceInfo();
          break;
        case ErrorCategoryEnum.AJAX_ERROR:
          txt = JSON.stringify(this.msg);
          action = 100;
          break;
        case ErrorCategoryEnum.RESOURCE_ERROR:
          const errorInfo = {
            msg: this.msg,
            url: encodeURIComponent(this.url)
          };
          txt = JSON.stringify(errorInfo);
          action = 101;
          break;
        case ErrorCategoryEnum.JS_ERROR:
          txt = "错误类别: " + this.category + "\r\n";
          txt += "日志信息: " + this.msg + "\r\n";
          txt += "url: " + encodeURIComponent(this.url) + "\r\n";
          txt += "错误行号: " + this.line + "\r\n";
          txt += "错误列号: " + this.col + "\r\n";
          if (this.errorObj && this.errorObj.stack) {
            txt += "错误栈: " + this.errorObj.stack + "\r\n";
          }
          action = 102;
          break;
        default:
          txt = this.msg;
          action = 106;
          break;
      }
      recordInfo.logInfo = txt; //错误信息

      recordInfo.l = window.location.pathname;
      recordInfo.action = action;
      return recordInfo;
    }

    /**
     * 获取扩展信息
     */
    getExtendsInfo() {
      try {
        let ret = {};
        let extendsInfo = this.extendsInfo || {};
        let dynamicParams;
        if (utils.isFunction(extendsInfo.getDynamic)) {
          dynamicParams = extendsInfo.getDynamic(); //获取动态参数
        }
        //判断动态方法返回的参数是否是对象
        if (utils.isObject(dynamicParams)) {
          extendsInfo = {
            ...extendsInfo,
            ...dynamicParams
          };
        }
        //遍历扩展信息，排除动态方法
        for (var key in extendsInfo) {
          if (!utils.isFunction(extendsInfo[key])) {
            //排除获取动态方法
            ret[key] = extendsInfo[key];
          }
        }
        return ret;
      } catch (error) {
        console.log('call getExtendsInfo error', error);
        return {};
      }
    }

    /**
     * 获取设备信息
     */
    getDeviceInfo() {
      try {
        let deviceInfo = DeviceInfo.getDeviceInfo();
        return JSON.stringify(deviceInfo);
      } catch (error) {
        console.log(error);
        return "";
      }
    }
  }

  function isMatchAjaxDomain(ajaxDomain, url) {
    if (!ajaxDomain) {
      return true;
    }
    if (typeof ajaxDomain === 'string') {
      if (url.startsWith('/')) {
        if (window.location.hostname.endsWith(ajaxDomain)) {
          return true;
        }
      } else {
        const u = new URL(url);
        if (u.hostname.endsWith(ajaxDomain)) {
          return true;
        }
      }
      return false;
    }
    if (typeof ajaxDomain === 'object' && ajaxDomain instanceof Array) {
      let isMatch = false;
      ajaxDomain.forEach(item => {
        if (typeof item === 'string') {
          if (url.startsWith('/')) {
            if (window.location.hostname.endsWith(item)) {
              isMatch = true;
            }
          } else {
            const u = new URL(url);
            if (u.hostname.endsWith(item)) {
              isMatch = true;
            }
          }
        }
      });
      return isMatch;
    }
    return false;
  }

  /**
   * ajax error异常
   */
  class AjaxError {
    constructor(params) {
      this.params = params;
    }
    /**
     * 处理错误
     * @param type {*} ajax库类型
     * @param error{*} 错误信息
     */
    handleError(type) {
      switch (type) {
        case AjaxLibEnum.FETCH:
          new FetchError(this.params).handleError();
          break;
        case AjaxLibEnum.DEFAULT:
          new XHRError(this.params).handleError();
          break;
        default:
          new FetchError(this.params).handleError();
          new XHRError(this.params).handleError();
          break;
      }
    }
  }
  const isString = obj => typeof obj === 'string';

  /**
   * Fetch类库 错误信息处理(如果不配置，可以统一通过XHR接受错误信息)
   * 需求变更：将所有请求数据都记录并上报
   */
  class FetchError extends BaseMonitor {
    constructor(params) {
      super(params);
      this.ajaxDomain = params.ajaxDomain;
    }
    handleError() {
      if (!window.fetch) {
        return;
      }
      this.level = ErrorLevelEnum.WARN;
      this.category = ErrorCategoryEnum.AJAX_ERROR;
      /**
       * 重写window.fetch
       * 1、记录所有请求信息
       * 2、记录请求错误信息
       * 3、记录请求耗时
       * 4、记录请求状态
       * 5、记录请求返回内容
       */
      let _self = this;
      let _oldFetch = window.fetch;
      window.fetch = function () {
        let _arguments = arguments;
        let _fetchStart = new Date().getTime();
        let _status = null;
        return _oldFetch.apply(this, arguments).then(function (_response) {
          try {
            // 仅当返回值是json时 上报内容增加 responseBody
            const contentType = _response.headers ? _response.headers.get('content-type') : '';
            const canToJson = isString(contentType) && contentType.includes('application/json');
            if (canToJson) {
              const response = _response.clone();
              _status = response.status;
              let _fetchEnd = new Date().getTime();
              let _loadTime = _fetchEnd - _fetchStart;
              response.json().then(function (data) {
                const requestInfo = {
                  fetchStart: _fetchStart,
                  url: _arguments[0],
                  requestOptions: _arguments[1],
                  status: _status,
                  responseBody: data,
                  loadTime: _loadTime
                };
                _self.msg = requestInfo;
                if (isMatchAjaxDomain(_self.ajaxDomain, requestInfo.url)) {
                  _self.recordError();
                }
              });
            } else {
              const response = _response.clone();
              _status = response.status;
              let _fetchEnd = new Date().getTime();
              let _loadTime = _fetchEnd - _fetchStart;
              response.text().then(function (data) {
                // 尝试 JSON.parse 因为有些旧接口响应json但是响应头不正确
                try {
                  data = JSON.parse(data);
                } catch (e) {
                  console.log('JSON.parse 失败');
                }
                const requestInfo = {
                  fetchStart: _fetchStart,
                  url: _arguments[0],
                  requestOptions: _arguments[1],
                  status: _status,
                  responseBody: data,
                  loadTime: _loadTime
                };
                _self.msg = requestInfo;
                if (isMatchAjaxDomain(_self.ajaxDomain, requestInfo.url)) {
                  _self.recordError();
                }
              });
            }
          } catch (e) {
            console.log('获取响应数据上报异常');
            console.log(e);
          }
          return _response;
        }).catch(function (error) {
          console.log('获取响应数据上报异常');
          console.log(error);
        });
      };
    }
  }

  /**
   * 获取HTTP错误信息
   */
  class XHRError extends BaseMonitor {
    constructor(params) {
      super(params);
      this.ajaxDomain = params.ajaxDomain;
    }

    /**
     * 获取错误信息
     */
    handleError() {
      if (!window.XMLHttpRequest) {
        return;
      }
      this.level = ErrorLevelEnum.WARN;
      this.category = ErrorCategoryEnum.AJAX_ERROR;
      let _self = this;
      // 劫持XMLHttpRequest 记录
      let xhrOpen = XMLHttpRequest.prototype.open;
      let xhrSend = XMLHttpRequest.prototype.send;
      XMLHttpRequest.prototype.open = function (method, url, async) {
        // 将 url method 参数保存到 xhr 对象中
        this._url = typeof url === "string" ? url : url.href;
        this._method = method;
        return xhrOpen.call(this, method, this._url, typeof async === "boolean" ? async : true);
      };
      XMLHttpRequest.prototype.send = function () {
        let _fetchStart = new Date().getTime();
        if (this.addEventListener) {
          this.addEventListener("readystatechange", function () {
            if (this.readyState === 4) {
              if (this.status >= 200 && this.status < 300) {
                let _fetchEnd = new Date().getTime();
                let _loadTime = _fetchEnd - _fetchStart;
                const requestOptions = {
                  method: this._method
                };
                const requestInfo = {
                  fetchStart: _fetchStart,
                  url: this._url,
                  requestOptions,
                  responseBody: this.response,
                  status: this.status,
                  loadTime: _loadTime
                };
                _self.msg = requestInfo;
                if (isMatchAjaxDomain(_self.ajaxDomain, requestInfo.url)) {
                  _self.recordError();
                }
              } else {
                let _fetchEnd = new Date().getTime();
                let _loadTime = _fetchEnd - _fetchStart;
                const requestOptions = {
                  method: this._method
                };
                const requestInfo = {
                  fetchStart: _fetchStart,
                  url: this._url,
                  requestOptions,
                  status: this.status,
                  loadTime: _loadTime
                };
                _self.msg = requestInfo;
                if (isMatchAjaxDomain(_self.ajaxDomain, requestInfo.url)) {
                  _self.recordError();
                }
              }
            }
          });
        }
        return xhrSend.apply(this, arguments);
      };
    }
  }

  /**
   * console.error异常
   */
  class ConsoleError extends BaseMonitor {
    constructor(params) {
      super(params);
    }

    /**
     * 处理console事件
     */
    handleError() {
      this.registerInfo();
      this.registerWarn();
      this.registerError();
    }

    /**
     * 处理信息
     */
    registerInfo() {
      let t = this;
      console.tInfo = function () {
        t.handleLog(ErrorLevelEnum.INFO, ErrorCategoryEnum.CONSOLE_INFO, arguments);
      };
    }

    /**
     * 处理警告
     */
    registerWarn() {
      let t = this;
      console.tWarn = function () {
        t.handleLog(ErrorLevelEnum.WARN, ErrorCategoryEnum.CONSOLE_WARN, arguments);
      };
    }

    /**
     * 处理错误
     */
    registerError() {
      let t = this;
      console.tError = function () {
        t.handleLog(ErrorLevelEnum.ERROR, ErrorCategoryEnum.CONSOLE_ERROR, arguments);
      };
    }

    /**
     * 处理日志
     */
    handleLog(level, category, args) {
      try {
        this.level = level;
        let params = [...args];
        this.msg = params.join("\r\n"); //换行符分割
        this.url = location.href; //当前地址
        this.category = category;
        this.recordError();
      } catch (error) {
        console.log("console统计错误异常", level, error);
      }
    }
  }

  /**
   * 初始化console事件
   */
  (function () {
    //创建空console对象，避免JS报错  
    if (!window.console) {
      window.console = {};
    }
    let funcs = ['tInfo', 'tWarn', 'tError'];
    funcs.forEach((func, index) => {
      if (!console[func]) {
        console[func] = function () {};
      }
    });
  })();

  /**
   * 捕获JS错误
   */
  class JSError extends BaseMonitor {
    constructor(params) {
      super(params);
    }

    /**
     * 注册onerror事件
     */
    handleError() {
      window.onerror = (msg, url, line, col, error) => {
        console.log('monitor onerror');
        try {
          this.level = ErrorLevelEnum.WARN;
          this.category = ErrorCategoryEnum.JS_ERROR;
          this.msg = msg;
          this.url = url;
          this.line = line;
          this.col = col;
          this.errorObj = error;
          this.recordError();
        } catch (error) {
          console.log("js错误异常", error);
        }
      };
    }
  }

  /**
   * 捕获未处理的Promise异常
   */
  class PromiseError extends BaseMonitor {
    constructor(params) {
      super(params);
    }

    /**
     * 处理错误
     */
    handleError() {
      window.addEventListener('unhandledrejection', event => {
        try {
          if (!event || !event.reason) {
            return;
          }
          //判断当前被捕获的异常url，是否是异常处理url，防止死循环
          if (event.reason.config && event.reason.config.url) {
            this.url = event.reason.config.url;
          }
          this.level = ErrorLevelEnum.WARN;
          this.category = ErrorCategoryEnum.PROMISE_ERROR;
          this.msg = event.reason;
          this.recordError();
        } catch (error) {
          console.log(error);
        }
      }, true);
    }
  }

  /**
   * 资源加载错误
   */
  class ResourceError extends BaseMonitor {
    constructor(params) {
      super(params);
    }

    /**
     * 注册onerror事件
     */
    handleError() {
      window.addEventListener('error', event => {
        console.log('monitor addEventListener error');
        try {
          if (!event) {
            return;
          }
          this.category = ErrorCategoryEnum.RESOURCE_ERROR;
          let target = event.target || event.srcElement;
          var isElementTarget = target instanceof HTMLScriptElement || target instanceof HTMLLinkElement || target instanceof HTMLImageElement;
          if (!isElementTarget) {
            return; // js error不再处理
          }

          this.level = target.tagName.toUpperCase() === 'IMG' ? ErrorLevelEnum.WARN : ErrorLevelEnum.ERROR;
          this.msg = "加载 " + target.tagName + " 资源错误";
          this.url = target.src || target.href;
          this.errorObj = target;
          this.recordError();
        } catch (error) {
          console.log("资源加载收集异常", error);
        }
      }, true);
    }
  }

  var e,
    n,
    t,
    r,
    a = -1,
    o = function (e) {
      addEventListener("pageshow", function (n) {
        n.persisted && (a = n.timeStamp, e(n));
      }, !0);
    },
    c = function () {
      return window.performance && performance.getEntriesByType && performance.getEntriesByType("navigation")[0];
    },
    u = function () {
      var e = c();
      return e && e.activationStart || 0;
    },
    f = function (e, n) {
      var t = c(),
        r = "navigate";
      a >= 0 ? r = "back-forward-cache" : t && (document.prerendering || u() > 0 ? r = "prerender" : document.wasDiscarded ? r = "restore" : t.type && (r = t.type.replace(/_/g, "-")));
      return {
        name: e,
        value: void 0 === n ? -1 : n,
        rating: "good",
        delta: 0,
        entries: [],
        id: "v3-".concat(Date.now(), "-").concat(Math.floor(8999999999999 * Math.random()) + 1e12),
        navigationType: r
      };
    },
    s = function (e, n, t) {
      try {
        if (PerformanceObserver.supportedEntryTypes.includes(e)) {
          var r = new PerformanceObserver(function (e) {
            Promise.resolve().then(function () {
              n(e.getEntries());
            });
          });
          return r.observe(Object.assign({
            type: e,
            buffered: !0
          }, t || {})), r;
        }
      } catch (e) {}
    },
    d = function (e, n, t, r) {
      var i, a;
      return function (o) {
        n.value >= 0 && (o || r) && ((a = n.value - (i || 0)) || void 0 === i) && (i = n.value, n.delta = a, n.rating = function (e, n) {
          return e > n[1] ? "poor" : e > n[0] ? "needs-improvement" : "good";
        }(n.value, t), e(n));
      };
    },
    l = function (e) {
      requestAnimationFrame(function () {
        return requestAnimationFrame(function () {
          return e();
        });
      });
    },
    p = function (e) {
      var n = function (n) {
        "pagehide" !== n.type && "hidden" !== document.visibilityState || e(n);
      };
      addEventListener("visibilitychange", n, !0), addEventListener("pagehide", n, !0);
    },
    v$1 = function (e) {
      var n = !1;
      return function (t) {
        n || (e(t), n = !0);
      };
    },
    m = -1,
    h = function () {
      return "hidden" !== document.visibilityState || document.prerendering ? 1 / 0 : 0;
    },
    g = function (e) {
      "hidden" === document.visibilityState && m > -1 && (m = "visibilitychange" === e.type ? e.timeStamp : 0, T());
    },
    y = function () {
      addEventListener("visibilitychange", g, !0), addEventListener("prerenderingchange", g, !0);
    },
    T = function () {
      removeEventListener("visibilitychange", g, !0), removeEventListener("prerenderingchange", g, !0);
    },
    E = function () {
      return m < 0 && (m = h(), y(), o(function () {
        setTimeout(function () {
          m = h(), y();
        }, 0);
      })), {
        get firstHiddenTime() {
          return m;
        }
      };
    },
    C = function (e) {
      document.prerendering ? addEventListener("prerenderingchange", function () {
        return e();
      }, !0) : e();
    },
    L = [1800, 3e3],
    b = function (e, n) {
      n = n || {}, C(function () {
        var t,
          r = E(),
          i = f("FCP"),
          a = s("paint", function (e) {
            e.forEach(function (e) {
              "first-contentful-paint" === e.name && (a.disconnect(), e.startTime < r.firstHiddenTime && (i.value = Math.max(e.startTime - u(), 0), i.entries.push(e), t(!0)));
            });
          });
        a && (t = d(e, i, L, n.reportAllChanges), o(function (r) {
          i = f("FCP"), t = d(e, i, L, n.reportAllChanges), l(function () {
            i.value = performance.now() - r.timeStamp, t(!0);
          });
        }));
      });
    },
    w = [.1, .25],
    S = function (e, n) {
      n = n || {}, b(v$1(function () {
        var t,
          r = f("CLS", 0),
          i = 0,
          a = [],
          c = function (e) {
            e.forEach(function (e) {
              if (!e.hadRecentInput) {
                var n = a[0],
                  t = a[a.length - 1];
                i && e.startTime - t.startTime < 1e3 && e.startTime - n.startTime < 5e3 ? (i += e.value, a.push(e)) : (i = e.value, a = [e]);
              }
            }), i > r.value && (r.value = i, r.entries = a, t());
          },
          u = s("layout-shift", c);
        u && (t = d(e, r, w, n.reportAllChanges), p(function () {
          c(u.takeRecords()), t(!0);
        }), o(function () {
          i = 0, r = f("CLS", 0), t = d(e, r, w, n.reportAllChanges), l(function () {
            return t();
          });
        }), setTimeout(t, 0));
      }));
    },
    A = {
      passive: !0,
      capture: !0
    },
    I = new Date(),
    P = function (r, i) {
      e || (e = i, n = r, t = new Date(), k(removeEventListener), F());
    },
    F = function () {
      if (n >= 0 && n < t - I) {
        var i = {
          entryType: "first-input",
          name: e.type,
          target: e.target,
          cancelable: e.cancelable,
          startTime: e.timeStamp,
          processingStart: e.timeStamp + n
        };
        r.forEach(function (e) {
          e(i);
        }), r = [];
      }
    },
    M = function (e) {
      if (e.cancelable) {
        var n = (e.timeStamp > 1e12 ? new Date() : performance.now()) - e.timeStamp;
        "pointerdown" == e.type ? function (e, n) {
          var t = function () {
              P(e, n), i();
            },
            r = function () {
              i();
            },
            i = function () {
              removeEventListener("pointerup", t, A), removeEventListener("pointercancel", r, A);
            };
          addEventListener("pointerup", t, A), addEventListener("pointercancel", r, A);
        }(n, e) : P(n, e);
      }
    },
    k = function (e) {
      ["mousedown", "keydown", "touchstart", "pointerdown"].forEach(function (n) {
        return e(n, M, A);
      });
    },
    D = [100, 300],
    x = function (t, i) {
      i = i || {}, C(function () {
        var a,
          c = E(),
          u = f("FID"),
          l = function (e) {
            e.startTime < c.firstHiddenTime && (u.value = e.processingStart - e.startTime, u.entries.push(e), a(!0));
          },
          m = function (e) {
            e.forEach(l);
          },
          h = s("first-input", m);
        a = d(t, u, D, i.reportAllChanges), h && p(v$1(function () {
          m(h.takeRecords()), h.disconnect();
        })), h && o(function () {
          var o;
          u = f("FID"), a = d(t, u, D, i.reportAllChanges), r = [], n = -1, e = null, k(addEventListener), o = l, r.push(o), F();
        });
      });
    },
    U = [2500, 4e3],
    V = {},
    W = function (e, n) {
      n = n || {}, C(function () {
        var t,
          r = E(),
          i = f("LCP"),
          a = function (e) {
            var n = e[e.length - 1];
            n && n.startTime < r.firstHiddenTime && (i.value = Math.max(n.startTime - u(), 0), i.entries = [n], t());
          },
          c = s("largest-contentful-paint", a);
        if (c) {
          t = d(e, i, U, n.reportAllChanges);
          var m = v$1(function () {
            V[i.id] || (a(c.takeRecords()), c.disconnect(), V[i.id] = !0, t(!0));
          });
          ["keydown", "click"].forEach(function (e) {
            addEventListener(e, function () {
              return setTimeout(m, 0);
            }, !0);
          }), p(m), o(function (r) {
            i = f("LCP"), t = d(e, i, U, n.reportAllChanges), l(function () {
              i.value = performance.now() - r.timeStamp, V[i.id] = !0, t(!0);
            });
          });
        }
      });
    },
    X = [800, 1800],
    Y = function e(n) {
      document.prerendering ? C(function () {
        return e(n);
      }) : "complete" !== document.readyState ? addEventListener("load", function () {
        return e(n);
      }, !0) : setTimeout(n, 0);
    },
    Z = function (e, n) {
      n = n || {};
      var t = f("TTFB"),
        r = d(e, t, X, n.reportAllChanges);
      Y(function () {
        var i = c();
        if (i) {
          var a = i.responseStart;
          if (a <= 0 || a > performance.now()) return;
          t.value = Math.max(a - u(), 0), t.entries = [i], r(!0), o(function () {
            t = f("TTFB", 0), (r = d(e, t, X, n.reportAllChanges))(!0);
          });
        }
      });
    };

  /**
   * 性能指标
   */
  class Performance extends BaseMonitor {
    constructor(options) {
      super(options || {});
      this.category = ErrorCategoryEnum.PERFORMANCE;
      this.reportUrl = options.reportUrl || "";
      this.performanceData = {};
      this.saveData = this.saveData.bind(this);
      b(this.saveData);
      x(this.saveData);
      W(this.saveData);
      S(this.saveData);
      Z(this.saveData);
    }
    saveData(data) {
      this.performanceData[data.name] = data.value;
      // 如果已获取到LCP数据，则执行性能数据上报
      if (data.name === 'LCP') {
        this.record(this.performanceData);
      }
    }

    /**
     * 性能数据上报
     */
    record(data) {
      this.msg = data;
      this.recordError();
    }
  }

  /**
   * 业务埋点
   */

  const ATTRIBUTE_KEY = 'textkey';
  const DEFAULT_A_TEXTKEY = 'common_a';
  const targetReg = /((<(A|B|BUTTON|DIV|H1|H2|H3|H4|H5|H6|P|IMG|SPAN|TABLE|TD|TEXTAREA|VIDEO)([^<>])*>)([^<>])+(<\/(A|B|BUTTON|DIV|H1|H2|H3|H4|H5|H6|P|IMG|SPAN|TABLE|TD|TEXTAREA|VIDEO)>)|(<(IMG|VIDEO)(.)+>))/i;
  const MAXLENGTH = 20; // 获取文字的最大长度
  function matchInnerText(target) {
    var targetName = target.nodeName;
    var targetText = "";
    if (target.hasAttribute("data-monitor") && target.getAttribute("data-monitor")) {
      targetText = target.getAttribute("data-monitor");
      return `${targetText}`.slice(0, MAXLENGTH);
    }
    var targetMatch = target.outerHTML.match(targetReg);
    if (targetMatch && targetMatch.length > 0) {
      switch (targetName) {
        case 'IMG':
          targetText = target.getAttribute("alt");
          break;
        default:
          targetText = targetMatch[0].match(/>[^<>]+<\//) ? targetMatch[0].match(/>[^<>]+<\//)[0] : '';
          targetText = targetText.replace(/[^A-Za-z0-9\u4e00-\u9fa5]/g, "");
          break;
      }
    }
    return `${targetText}`.slice(0, MAXLENGTH);
  }
  class Business extends BaseMonitor {
    constructor(options) {
      super(options || {});
      this.category = ErrorCategoryEnum.BUSINESS;
      this.reportUrl = options.reportUrl || "";
      const keyName = options.keyName || ATTRIBUTE_KEY;
      const that = this;
      // 全局监听点击事件
      window.addEventListener('click', function (event) {
        // 优化以下代码
        let target = event.target;
        if (!target) {
          // console.log('点击元素不存在');
          return false;
        }
        // 事件冒泡处理，向上查找是否有业务埋点或者跳转链接
        let key = target.getAttribute(keyName);
        let href = target.getAttribute('link') || target.getAttribute('href');
        // 如果当前点击元素包含埋点key或为链接
        if (key || href) {
          const data = {
            textKey: key || DEFAULT_A_TEXTKEY
          };
          if (href) {
            data.h = href;
          }
          // 增加获取文本内容
          const text = matchInnerText(target);
          if (text) {
            data.text = text;
          }
          that.record(data);
        } else {
          // // 查找点击元素的子元素是否包含埋点key或为链接
          // let subTarget = target.querySelector(`[${keyName}],[link],[href]`);
          // if (subTarget) {
          //     console.log('埋点元素为点击元素的子元素');
          //     key = subTarget.getAttribute(keyName);
          //     href = subTarget.getAttribute('link') || subTarget.getAttribute('href');
          //     if (key || href) {
          //         const data = {
          //             textKey: key || DEFAULT_A_TEXTKEY,
          //         };
          //         if (href) {
          //             data.h = href;
          //         }
          //         that.record(data);
          //         console.log('埋点点击上报或链接点击上报');
          //     }
          //     return;
          // }

          // 向上查找是否有业务埋点或者跳转链接
          while (!key && !href && target.parentNode) {
            target = target.parentNode;
            if (target.getAttribute) {
              key = target.getAttribute(keyName);
              href = target.getAttribute('link') || target.getAttribute('href');
            }
          }
          if (key || href) {
            const data = {
              textKey: key || DEFAULT_A_TEXTKEY
            };
            if (href) {
              data.h = href;
            }
            // 增加获取文本内容
            const text = matchInnerText(target);
            if (text) {
              data.text = text;
            }
            that.record(data);
          }
        }
      });
    }

    /**
     * 业务埋点
     */
    record(data) {
      this.msg = data;
      this.recordError();
    }
  }

  /**
   * 手动埋点
   */

  class Manual extends BaseMonitor {
    constructor(options) {
      super(options || {});
      this.category = ErrorCategoryEnum.BUSINESS;
      this.reportUrl = options.reportUrl || "";
    }

    /**
     * 上报
     */
    record(data) {
      this.msg = data;
      this.recordError();
    }
  }

  /** 
   * 对Date的扩展，将 Date 转化为指定格式的String * 月(M)、日(d)、12小时(h)、24小时(H)、分(m)、秒(s)、周(E)、季度(q)
   * 可以用 1-2 个占位符 * 年(y)可以用 1-4 个占位符，毫秒(S)只能用 1 个占位符(是 1-3 位的数字) * eg: * (new
   * Date()).format("yyyy-MM-dd hh:mm:ss.S")==> 2006-07-02 08:09:04.423      
   * (new Date()).format("yyyy-MM-dd E HH:mm:ss") ==> 2009-03-10 二 20:09:04      
   * (new Date()).format("yyyy-MM-dd EE hh:mm:ss") ==> 2009-03-10 周二 08:09:04      
   * (new Date()).format("yyyy-MM-dd EEE hh:mm:ss") ==> 2009-03-10 星期二 08:09:04      
   * (new Date()).format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
   */
  Date.prototype.format = function (fmt) {
    let o = {
      "M+": this.getMonth() + 1,
      //月份         
      "d+": this.getDate(),
      //日         
      "h+": this.getHours() % 12 == 0 ? 12 : this.getHours() % 12,
      //小时         
      "H+": this.getHours(),
      //小时         
      "m+": this.getMinutes(),
      //分         
      "s+": this.getSeconds(),
      //秒         
      "q+": Math.floor((this.getMonth() + 3) / 3),
      //季度         
      "S": this.getMilliseconds() //毫秒         
    };

    let week = {
      "0": "/u65e5",
      "1": "/u4e00",
      "2": "/u4e8c",
      "3": "/u4e09",
      "4": "/u56db",
      "5": "/u4e94",
      "6": "/u516d"
    };
    if (/(y+)/.test(fmt)) {
      fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    }
    if (/(E+)/.test(fmt)) {
      fmt = fmt.replace(RegExp.$1, (RegExp.$1.length > 1 ? RegExp.$1.length > 2 ? "/u661f/u671f" : "/u5468" : "") + week[this.getDay() + ""]);
    }
    for (let k in o) {
      if (new RegExp("(" + k + ")").test(fmt)) {
        fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
      }
    }
    return fmt;
  };

  /**
   * 入口
   */
  class EzMonitor {
    constructor(options) {
      this.jsError = true;
      this.promiseError = true;
      this.resourceError = true;
      this.ajaxError = true;
      // 配置上报接口域名，只有此配置下的域名接口调用会上报
      this.ajaxDomain = null;
      // 是否上报完整的url
      this.isReportHref = false;
      this.consoleError = false; //console.error默认不处理

      options = options || {};
      this.jsError = !(options.jsError === false);
      this.promiseError = !(options.promiseError === false);
      this.resourceError = !(options.resourceError === false);
      this.consoleError = options.consoleError === true; //显式配置
      this.ajaxError = !(options.ajaxError === false);
      this.ajaxDomain = options.ajaxDomain || this.ajaxDomain;
      this.isReportHref = options.isReportHref || this.isReportHref;
      this.business = !(options.business === false);
      this.reportUrl = options.url; //上报错误地址
      this.performace = !(options.performace === false); // 性能上报
      this.extendsInfo = options.extendsInfo || {}; //扩展信息（一般用于系统个性化分析）
      let param = {
        reportUrl: this.reportUrl,
        extendsInfo: this.extendsInfo
      };
      if (this.jsError) {
        new JSError(param).handleError();
      }
      if (this.promiseError) {
        new PromiseError(param).handleError();
      }
      if (this.resourceError) {
        new ResourceError(param).handleError();
      }
      if (this.ajaxError) {
        let ajaxParam = Object.assign({}, param, {
          ajaxDomain: this.ajaxDomain
        });
        new AjaxError(ajaxParam).handleError();
      }
      if (this.consoleError) {
        new ConsoleError(param).handleError();
      }
      if (this.performace) {
        new Performance(param);
      }
      if (this.business) {
        // 业务埋点
        new Business(param);
      }

      // 手动埋点
      this.manual = new Manual(param);
    }

    /**
     * 手动上报方法
     * @param {Object} args 数据 
     * @returns 
     */
    report(args) {
      if (!typeof args === 'object') {
        console.log('输入参数不正确');
        return false;
      }
      this.manual && this.manual.record(args);
      return this;
    }
  }

  var dclogUrl = 'https://log.ys7.com/statistics.do/opensdk_ezuikit';
  // 埋点上报扩展字段，可以动态增加
  window.monitorExtendsInfo = {};
  window.ezuikitMonitor = new EzMonitor({
    // 配置上报接口域名，只有此配置下的域名接口调用会上报
    ajaxDomain: ['open.ys7.com', '.ezvizlife.com'],
    url: dclogUrl,
    //上报错误地址
    // consoleError:true,
    // ajaxError: false,
    extendsInfo: {
      //扩展信息，一般用于数据数据持久化区分
      v: pkg.version,
      getDynamic: function getDynamic() {
        return window.monitorExtendsInfo;
      }
    }
  });

  // (function (global, factory) {

  //   "use strict";

  //   if (typeof module === "object" && typeof module.exports === "object") {
  //     module.exports = global.document ?
  //       factory(global, true) :
  //       function (w) {
  //         if (!w.document) {
  //           throw new Error("EZUIPlayer requires a window with a document");
  //         }
  //         return factory(w);
  //       };
  //   } else {
  //     factory(global);
  //   }
  //   // Pass this if window is not defined yet
  // })(typeof window !== "undefined" ? window : this, function (window, noGlobal) {
  var EZUIKit = {
    Core: Core,
    HLS: HLS,
    FLV: FLV,
    EZUIKitPlayer: EZUIKitPlayer,
    EZUIKitHD: EZUIKitHD,
    EZWebRtc: EZWebRtc
  };
  window.EZUIKit = EZUIKit;
  // });

  return EZUIKit;

}));
