window.__require = function e(t, n, r) {
  function s(o, u) {
    if (!n[o]) {
      if (!t[o]) {
        var b = o.split("/");
        b = b[b.length - 1];
        if (!t[b]) {
          var a = "function" == typeof __require && __require;
          if (!u && a) return a(b, !0);
          if (i) return i(b, !0);
          throw new Error("Cannot find module '" + o + "'");
        }
        o = b;
      }
      var f = n[o] = {
        exports: {}
      };
      t[o][0].call(f.exports, function(e) {
        var n = t[o][1][e];
        return s(n || e);
      }, f, f.exports, e, t, n, r);
    }
    return n[o].exports;
  }
  var i = "function" == typeof __require && __require;
  for (var o = 0; o < r.length; o++) s(r[o]);
  return s;
}({
  Host: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "037d4AvGBBHv7bkyLQMs/AF", "Host");
    "use strict";
    exports.__esModule = true;
    exports["default"] = void 0;
    var _ServerConfig = _interopRequireDefault(require("./ServerConfig"));
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : {
        default: obj
      };
    }
    var Host = function() {
      function Host() {
        this.isWechat = cc.sys.platform === cc.sys.WECHAT_GAME;
        this.isQQ = this.isWechat && "qq" === _ServerConfig["default"].subPlatform;
        this.isJkw = cc.sys.platform === cc.sys.JKW_GAME;
        this.isAndroid = cc.sys.platform === cc.sys.OS_ANDROID || 3 === cc.sys.platform;
      }
      var _proto = Host.prototype;
      _proto.getSystemInfoSync = function getSystemInfoSync() {
        if (this.isWechat) return wx.getSystemInfoSync();
        if (this.isJkw) {
          cc.log("host.getSystemInfoSync");
          false, true;
          return loadRuntime().getSystemInfoSync();
        }
        if (this.isAndroid) return {
          screenWidth: cc.view.getDesignResolutionSize().width,
          screenHeight: cc.view.getDesignResolutionSize().height,
          safeArea: cc.sys.getSafeAreaRect()
        };
      };
      _proto.getSystemInfo = function getSystemInfo(object) {
        if (this.isWechat) return wx.getSystemInfo(object);
        if (this.isJkw) {
          cc.log("host.getSystemInfo");
          false, true;
          return loadRuntime().getSystemInfo();
        }
        this.isAndroid && cc.log("host.getSystemInfo");
      };
      _proto.getUpdateManager = function getUpdateManager() {
        if (this.isWechat) return wx.getUpdateManager();
        if (this.isJkw) {
          cc.log("host.getUpdateManager");
          return {
            onCheckForUpdate: function onCheckForUpdate(callback) {},
            onUpdateFailed: function onUpdateFailed(callback) {},
            onUpdateReady: function onUpdateReady(callback) {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.getUpdateManager");
          return {
            onCheckForUpdate: function onCheckForUpdate(callback) {},
            onUpdateFailed: function onUpdateFailed(callback) {},
            onUpdateReady: function onUpdateReady(callback) {}
          };
        }
      };
      _proto.exitMiniProgram = function exitMiniProgram(object) {
        if (this.isWechat) return wx.exitMiniProgram(object);
        this.isJkw ? cc.log("host.exitMiniProgram") : this.isAndroid && cc.log("host.exitMiniProgram");
      };
      _proto.onAudioInterruptionEnd = function onAudioInterruptionEnd(callback) {
        if (this.isWechat) return wx.onAudioInterruptionEnd(callback);
        this.isJkw ? cc.log("host.onAudioInterruptionBegin") : this.isAndroid && cc.log("host.onAudioInterruptionBegin");
      };
      _proto.onAudioInterruptionBegin = function onAudioInterruptionBegin(callback) {
        if (this.isWechat) return wx.onAudioInterruptionBegin(callback);
        this.isJkw ? cc.log("host.onAudioInterruptionBegin") : this.isAndroid && cc.log("host.onAudioInterruptionBegin");
      };
      _proto.offAudioInterruptionEnd = function offAudioInterruptionEnd(callback) {
        if (this.isWechat) return wx.offAudioInterruptionEnd(callback);
        this.isJkw ? cc.log("host.onAudioInterruptionBegin") : this.isAndroid && cc.log("host.onAudioInterruptionBegin");
      };
      _proto.offAudioInterruptionBegin = function offAudioInterruptionBegin(callback) {
        if (this.isWechat) return wx.offAudioInterruptionBegin(callback);
        this.isJkw ? cc.log("host.onAudioInterruptionBegin") : this.isAndroid && cc.log("host.onAudioInterruptionBegin");
      };
      _proto.requestSubscribeSystemMessage = function requestSubscribeSystemMessage(object) {
        if (this.isWechat) return wx.requestSubscribeSystemMessage(object);
        this.isJkw ? cc.log("host.requestSubscribeSystemMessage") : this.isAndroid && cc.log("host.requestSubscribeSystemMessage");
      };
      _proto.requestSubscribeMessage = function requestSubscribeMessage(object) {
        if (this.isWechat) return wx.requestSubscribeMessage(object);
        this.isJkw ? cc.log("host.requestSubscribeMessage") : this.isAndroid && cc.log("host.requestSubscribeMessage");
      };
      _proto.setPreferredFramesPerSecond = function setPreferredFramesPerSecond(fps) {
        if (this.isWechat) return wx.setPreferredFramesPerSecond(fps);
        this.isJkw ? cc.log("host.setPreferredFramesPerSecond") : this.isAndroid && cc.log("host.setPreferredFramesPerSecond");
      };
      _proto.createRewardedVideoAd = function createRewardedVideoAd(object) {
        if (this.isWechat) return wx.createRewardedVideoAd(object);
        if (this.isJkw) return AdSDK.createRewardedVideoAd(object.adUnitId, _ServerConfig["default"].videoAdId, 2);
        if (this.isAndroid) {
          cc.log("host.createRewardedVideoAd");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offClose: function offClose(callback) {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onClose: function onClose(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {},
            hide: function hide() {}
          };
        }
      };
      _proto.createInterstitialAd = function createInterstitialAd(object) {
        if (this.isWechat) return wx.createInterstitialAd(object);
        if (this.isJkw) {
          var obj = AdSDK.createInterstitialAd(object.adUnitId, _ServerConfig["default"].interstitialAdId, 2);
          obj.onClose = obj.onResize;
          obj.offClose = obj.offResize;
          return obj;
        }
        if (this.isAndroid) {
          cc.log("host.createInterstitialAd");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offClose: function offClose(callback) {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onClose: function onClose(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {},
            hide: function hide() {}
          };
        }
      };
      _proto.createBannerAd = function createBannerAd(object) {
        if (this.isWechat) return wx.createBannerAd(object);
        if (this.isJkw) {
          cc.log("host.createBannerAd");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offClose: function offClose(callback) {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onClose: function onClose(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {},
            hide: function hide() {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.createBannerAd");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offClose: function offClose(callback) {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onClose: function onClose(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {},
            hide: function hide() {}
          };
        }
      };
      _proto.showToast = function showToast(object) {
        if (this.isWechat) return wx.showToast(object);
        this.isJkw ? cc.log("host.showToast") : this.isAndroid && cc.log("host.showToast");
      };
      _proto.showModal = function showModal(object) {
        if (this.isWechat) return wx.showModal(object);
        this.isJkw ? cc.log("host.showModal") : this.isAndroid && cc.log("host.showModal");
      };
      _proto.showLoading = function showLoading(object) {
        if (this.isWechat) return wx.showLoading(object);
        this.isJkw ? cc.log("host.showLoading") : this.isAndroid && cc.log("host.showLoading");
      };
      _proto.showActionSheet = function showActionSheet(object) {
        if (this.isWechat) return wx.showActionSheet(object);
        this.isJkw ? cc.log("host.showActionSheet") : this.isAndroid && cc.log("host.showActionSheet");
      };
      _proto.hideToast = function hideToast(object) {
        if (this.isWechat) return wx.hideToast(object);
        this.isJkw ? cc.log("host.hideToast") : this.isAndroid && cc.log("host.hideToast");
      };
      _proto.hideLoading = function hideLoading(object) {
        if (this.isWechat) return wx.hideLoading(object);
        this.isJkw ? cc.log("host.hideLoading") : this.isAndroid && cc.log("host.hideLoading");
      };
      _proto.connectSocket = function connectSocket(object) {
        if (this.isWechat) return wx.connectSocket(object);
        if (this.isJkw) {
          cc.log("host.connectSocket");
          false, true;
          return new WebSocket(object.url);
        }
        if (this.isAndroid) {
          cc.log("host.connectSocket");
          false, true;
          return new WebSocket(object.url);
        }
      };
      _proto.request = function request(object) {
        if (this.isWechat) return wx.request(object);
        if (this.isJkw) {
          cc.log("host.request");
          false, true;
          var xhr = cc.loader.getXMLHttpRequest();
          xhr.onreadystatechange = function() {
            if (4 == xhr.readyState) {
              cc.log("response:", xhr.status, xhr.responseURL);
              if (xhr.status >= 200 && xhr.status < 400) {
                var data = {
                  data: 204 === xhr.status ? "" : JSON.parse(xhr.responseText),
                  errMsg: "request:ok",
                  statusCode: xhr.status
                };
                object.success && object.success(data);
              } else object.fail && object.fail(xhr.status);
            }
          };
          cc.log("request:", object.method, object.url);
          if ("GET" === object.method.toUpperCase()) {
            var url = object.url;
            if (object.data) {
              var first = true;
              Object.keys(object.data).forEach(function(key) {
                if (first) url += "?" + key + "=" + encodeURIComponent(object.data[key]); else {
                  url += "&" + key + "=" + encodeURIComponent(object.data[key]);
                  first = false;
                }
              });
            }
            xhr.open(object.method, url, true);
            Object.keys(object.header).forEach(function(key) {
              return xhr.setRequestHeader(key, object.header[key]);
            });
            xhr.send();
          } else {
            xhr.open(object.method, object.url, true);
            xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
            Object.keys(object.header).forEach(function(key) {
              return xhr.setRequestHeader(key, object.header[key]);
            });
            xhr.send(JSON.stringify(object.data));
          }
        } else if (this.isAndroid) {
          cc.log("host.request");
          false, true;
          var _xhr = cc.loader.getXMLHttpRequest();
          _xhr.onreadystatechange = function() {
            if (4 == _xhr.readyState) {
              cc.log("response:", _xhr.status, _xhr.responseURL);
              if (_xhr.status >= 200 && _xhr.status < 400) {
                var data = {
                  data: 204 === _xhr.status ? "" : JSON.parse(_xhr.responseText),
                  errMsg: "request:ok",
                  statusCode: _xhr.status
                };
                object.success && object.success(data);
              } else object.fail && object.fail(_xhr.status);
            }
          };
          cc.log("request:", object.method, object.url);
          if ("GET" === object.method.toUpperCase()) {
            var _url = object.url;
            if (object.data) {
              var _first = true;
              Object.keys(object.data).forEach(function(key) {
                if (_first) _url += "?" + key + "=" + encodeURIComponent(object.data[key]); else {
                  _url += "&" + key + "=" + encodeURIComponent(object.data[key]);
                  _first = false;
                }
              });
            }
            _xhr.open(object.method, _url, true);
            Object.keys(object.header).forEach(function(key) {
              return _xhr.setRequestHeader(key, object.header[key]);
            });
            _xhr.send();
          } else {
            _xhr.open(object.method, object.url, true);
            _xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
            Object.keys(object.header).forEach(function(key) {
              return _xhr.setRequestHeader(key, object.header[key]);
            });
            _xhr.send(JSON.stringify(object.data));
          }
        }
      };
      _proto.showShareMenu = function showShareMenu(object) {
        void 0 === object && (object = {});
        if (this.isWechat) return wx.showShareMenu(object);
        this.isJkw ? cc.log("host.showShareMenu") : this.isAndroid && cc.log("host.showShareMenu");
      };
      _proto.request = function request(object) {
        if (this.isWechat) return wx.request(object);
        if (this.isJkw) {
          cc.log("host.request");
          false, true;
          var xhr = cc.loader.getXMLHttpRequest();
          xhr.onreadystatechange = function() {
            if (4 == xhr.readyState) {
              cc.log("response:", xhr.status, xhr.responseURL);
              if (xhr.status >= 200 && xhr.status < 400) {
                var data = {
                  data: 204 === xhr.status ? "" : JSON.parse(xhr.responseText),
                  errMsg: "request:ok",
                  statusCode: xhr.status
                };
                object.success && object.success(data);
              } else object.fail && object.fail(xhr.status);
            }
          };
          cc.log("request:", object.method, object.url);
          xhr.open(object.method, object.url, true);
          xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
          Object.keys(object.header).forEach(function(key) {
            return xhr.setRequestHeader(key, object.header[key]);
          });
          xhr.send(JSON.stringify(object.data));
        }
      };
      _proto.setStorageSync = function setStorageSync(key, data) {
        if (this.isWechat) return wx.setStorageSync(key, data);
        if (this.isJkw) {
          cc.log("host.setStorageSync");
          return cc.sys.localStorage.setItem(key, JSON.stringify(data));
        }
        if (this.isAndroid) {
          cc.log("host.setStorageSync");
          return cc.sys.localStorage.setItem(key, JSON.stringify(data));
        }
      };
      _proto.setStorage = function setStorage(object) {
        if (this.isWechat) return wx.setStorage(object);
        if (this.isJkw) {
          cc.log("host.setStorage");
          try {
            cc.sys.localStorage.setItem(object.key, JSON.stringify(object.data));
            object.success && object.success();
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        } else if (this.isAndroid) {
          cc.log("host.setStorage");
          try {
            cc.sys.localStorage.setItem(object.key, JSON.stringify(object.data));
            object.success && object.success();
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        }
      };
      _proto.removeStorageSync = function removeStorageSync(key) {
        if (this.isWechat) return wx.removeStorageSync(key);
        if (this.isJkw) {
          cc.log("host.removeStorageSync");
          return cc.sys.localStorage.removeItem(key);
        }
        if (this.isAndroid) {
          cc.log("host.removeStorageSync");
          return cc.sys.localStorage.removeItem(key);
        }
      };
      _proto.removeStorage = function removeStorage(object) {
        if (this.isWechat) return wx.removeStorage(object);
        if (this.isJkw) {
          cc.log("host.removeStorage");
          try {
            result = cc.sys.localStorage.removeItem(object.key);
            object.success && object.success();
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        } else if (this.isAndroid) {
          cc.log("host.removeStorage");
          try {
            result = cc.sys.localStorage.removeItem(object.key);
            object.success && object.success();
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        }
      };
      _proto.getStorageSync = function getStorageSync(key) {
        if (this.isWechat) return wx.getStorageSync(key);
        if (this.isJkw) {
          cc.log("host.getStorageSync");
          var _result = cc.sys.localStorage.getItem(key);
          _result = null === _result ? "" : JSON.parse(_result);
          return _result;
        }
        if (this.isAndroid) {
          cc.log("host.getStorageSync");
          var _result2 = cc.sys.localStorage.getItem(key);
          _result2 = null === _result2 ? "" : JSON.parse(_result2);
          return _result2;
        }
      };
      _proto.getStorageInfoSync = function getStorageInfoSync(object) {
        if (this.isWechat) return wx.getStorageInfoSync(object);
        if (this.isJkw) {
          cc.log("host.getStorageInfoSync");
          var _result3 = {
            keys: [],
            currentSize: -1,
            limitSize: -1
          };
          for (var i = 0; i < cc.sys.localStorage.length; i++) {
            var value = cc.sys.localStorage.key(i);
            _result3.keys[i] = null === value ? "" : JSON.parse(value);
          }
          return _result3;
        }
        if (this.isAndroid) {
          cc.log("host.getStorageInfoSync");
          var _result4 = {
            keys: [],
            currentSize: -1,
            limitSize: -1
          };
          for (var _i = 0; _i < cc.sys.localStorage.length; _i++) {
            var _value = cc.sys.localStorage.key(_i);
            _result4.keys[_i] = null === _value ? "" : JSON.parse(_value);
          }
          return _result4;
        }
      };
      _proto.getStorageInfo = function getStorageInfo(object) {
        if (this.isWechat) return wx.getStorageInfo(object);
        if (this.isJkw) {
          cc.log("host.getStorageInfo");
          try {
            var _result5 = {
              keys: [],
              currentSize: -1,
              limitSize: -1
            };
            for (var i = 0; i < cc.sys.localStorage.length; i++) {
              var value = cc.sys.localStorage.key(i);
              _result5.keys[i] = null === value ? "" : JSON.parse(value);
            }
            object.success && object.success(_result5);
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        } else if (this.isAndroid) {
          cc.log("host.getStorageInfo");
          try {
            var _result6 = {
              keys: [],
              currentSize: -1,
              limitSize: -1
            };
            for (var _i2 = 0; _i2 < cc.sys.localStorage.length; _i2++) {
              var _value2 = cc.sys.localStorage.key(_i2);
              _result6.keys[_i2] = null === _value2 ? "" : JSON.parse(_value2);
            }
            object.success && object.success(_result6);
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        }
      };
      _proto.getStorage = function getStorage(object) {
        if (this.isWechat) return wx.getStorage(object);
        if (this.isJkw) {
          cc.log("host.getStorage");
          try {
            var _result7 = cc.sys.localStorage.getItem(key);
            _result7 = null === _result7 ? "" : JSON.parse(_result7);
            object.success && object.success(_result7);
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        } else if (this.isAndroid) {
          cc.log("host.getStorage");
          try {
            var _result8 = cc.sys.localStorage.getItem(key);
            _result8 = null === _result8 ? "" : JSON.parse(_result8);
            object.success && object.success(_result8);
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        }
      };
      _proto.clearStorageSync = function clearStorageSync() {
        if (this.isWechat) return wx.clearStorageSync();
        if (this.isJkw) {
          cc.log("host.clearStorageSync");
          cc.sys.localStorage.clear();
        } else if (this.isAndroid) {
          cc.log("host.clearStorageSync");
          cc.sys.localStorage.clear();
        }
      };
      _proto.clearStorage = function clearStorage(object) {
        if (this.isWechat) return wx.clearStorage(object);
        if (this.isJkw) {
          cc.log("host.clearStorage");
          try {
            var _result9 = cc.sys.localStorage.clear();
            object.success && object.success(_result9);
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        } else if (this.isAndroid) {
          cc.log("host.clearStorage");
          try {
            var _result10 = cc.sys.localStorage.clear();
            object.success && object.success(_result10);
          } catch (error) {
            object.fail && object.fail(error);
          }
          object.complete && object.complete();
        }
      };
      _proto.getLaunchOptionsSync = function getLaunchOptionsSync() {
        if (this.isWechat) return wx.getLaunchOptionsSync();
        if (this.isJkw) {
          cc.log("host.getLaunchOptionsSync");
          return {
            query: {},
            scene: -1,
            referrerInfo: {
              appId: 0
            }
          };
        }
        if (this.isAndroid) {
          cc.log("host.getLaunchOptionsSync");
          return {
            query: {},
            scene: -1,
            referrerInfo: {
              appId: 0
            }
          };
        }
      };
      _proto.setClipboardData = function setClipboardData(object) {
        if (this.isWechat) return wx.setClipboardData(object);
        this.isJkw ? cc.log("host.setClipboardData") : this.isAndroid && cc.log("host.setClipboardData");
      };
      _proto.getClipboardData = function getClipboardData(object) {
        if (this.isWechat) return wx.getClipboardData(object);
        this.isJkw ? cc.log("host.getClipboardData") : this.isAndroid && cc.log("host.getClipboardData");
      };
      _proto.navigateToMiniProgram = function navigateToMiniProgram(object) {
        if (this.isWechat) return wx.navigateToMiniProgram(object);
        this.isJkw ? cc.log("host.navigateToMiniProgram") : this.isAndroid && cc.log("host.navigateToMiniProgram");
      };
      _proto.getUserInfo = function getUserInfo(object) {
        if (this.isWechat) return wx.getUserInfo(object);
        if (this.isJkw) {
          cc.log("host.getUserInfo");
          false, true;
          return loadRuntime().getUserInfo(object);
        }
        this.isAndroid && cc.log("host.getUserInfo");
      };
      _proto.getUserGameLabel = function getUserGameLabel(object) {
        if (this.isWechat) return wx.getUserGameLabel(object);
        this.isJkw ? cc.log("host.getUserGameLabel") : this.isAndroid && cc.log("host.getUserGameLabel");
      };
      _proto.createUserInfoButton = function createUserInfoButton(object) {
        if (this.isWechat) return wx.createUserInfoButton(object);
        if (this.isJkw) {
          cc.log("host.createUserInfoButton");
          return {
            destory: function destory() {},
            hide: function hide() {},
            offTap: function offTap(callback) {},
            onTap: function onTap(callback) {},
            show: function show() {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.createUserInfoButton");
          return {
            destory: function destory() {},
            hide: function hide() {},
            offTap: function offTap(callback) {},
            onTap: function onTap(callback) {},
            show: function show() {}
          };
        }
      };
      _proto.login = function login(object) {
        if (this.isWechat) return wx.login(object);
        if (this.isJkw) {
          cc.log("host.login");
          return object.success({
            code: "123"
          });
        }
        if (this.isAndroid) {
          cc.log("host.login");
          return object.success({
            code: "123"
          });
        }
      };
      _proto.checkSession = function checkSession(object) {
        if (this.isWechat) return wx.checkSession(object);
        this.isJkw ? cc.log("host.checkSession") : this.isAndroid && cc.log("host.checkSession");
      };
      _proto.authorize = function authorize(object) {
        if (this.isWechat) return wx.authorize(object);
        if (this.isJkw) {
          cc.log("host.authorize");
          false, true;
          return loadRuntime().authorize(object);
        }
        this.isAndroid && cc.log("host.authorize");
      };
      _proto.onMessage = function onMessage(callback) {
        if (this.isWechat) return wx.onMessage(callback);
        this.isJkw ? cc.log("host.onMessage") : this.isAndroid && cc.log("host.onMessage");
      };
      _proto.getOpenDataContext = function getOpenDataContext() {
        if (this.isWechat) return wx.getOpenDataContext();
        if (this.isJkw) {
          cc.log("host.getOpenDataContext");
          return {
            postMessage: function postMessage(message) {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.getOpenDataContext");
          return {
            postMessage: function postMessage(message) {}
          };
        }
      };
      _proto.shareMessageToFriend = function shareMessageToFriend(object) {
        if (this.isWechat) return wx.shareMessageToFriend(object);
        this.isJkw ? cc.log("host.shareMessageToFriend") : this.isAndroid && cc.log("host.shareMessageToFriend");
      };
      _proto.shareAppMessage = function shareAppMessage(object) {
        if (this.isWechat) return wx.shareAppMessage(object);
        this.isJkw ? cc.log("host.shareAppMessage") : this.isAndroid && cc.log("host.shareAppMessage");
      };
      _proto.setUserCloudStorage = function setUserCloudStorage(object) {
        if (this.isWechat) return wx.setUserCloudStorage(object);
        this.isJkw ? cc.log("host.setUserCloudStorage") : this.isAndroid && cc.log("host.setUserCloudStorage");
      };
      _proto.setMessageToFriendQuery = function setMessageToFriendQuery(object) {
        if (this.isWechat) return wx.setMessageToFriendQuery(object);
        this.isJkw ? cc.log("host.setMessageToFriendQuery") : this.isAndroid && cc.log("host.setMessageToFriendQuery");
      };
      _proto.onShareMessageToFriend = function onShareMessageToFriend(object) {
        if (this.isWechat) return wx.onShareMessageToFriend(object);
        this.isJkw ? cc.log("host.onShareMessageToFriend") : this.isAndroid && cc.log("host.onShareMessageToFriend");
      };
      _proto.removeUserCloudStorage = function removeUserCloudStorage(object) {
        if (this.isWechat) return wx.removeUserCloudStorage(object);
        this.isJkw ? cc.log("host.removeUserCloudStorage") : this.isAndroid && cc.log("host.removeUserCloudStorage");
      };
      _proto.onInteractiveStorageModified = function onInteractiveStorageModified(callback) {
        if (this.isWechat) return wx.onInteractiveStorageModified(callback);
        this.isJkw ? cc.log("host.onInteractiveStorageModified") : this.isAndroid && cc.log("host.onInteractiveStorageModified");
      };
      _proto.modifyFriendInteractiveStorage = function modifyFriendInteractiveStorage(object) {
        if (this.isWechat) return wx.modifyFriendInteractiveStorage(object);
        this.isJkw ? cc.log("host.modifyFriendInteractiveStorage") : this.isAndroid && cc.log("host.modifyFriendInteractiveStorage");
      };
      _proto.getUserInteractiveStorage = function getUserInteractiveStorage(object) {
        if (this.isWechat) return wx.getUserInteractiveStorage(object);
        this.isJkw ? cc.log("host.getUserInteractiveStorage") : this.isAndroid && cc.log("host.getUserInteractiveStorage");
      };
      _proto.getUserCloudStorage = function getUserCloudStorage(object) {
        if (this.isWechat) return wx.getUserCloudStorage(object);
        this.isJkw ? cc.log("host.getUserCloudStorage") : this.isAndroid && cc.log("host.getUserCloudStorage");
      };
      _proto.getSharedCanvas = function getSharedCanvas() {
        if (this.isWechat) return wx.getSharedCanvas();
        this.isJkw ? cc.log("host.getSharedCanvas") : this.isAndroid && cc.log("host.getSharedCanvas");
      };
      _proto.getPotentialFriendList = function getPotentialFriendList(object) {
        if (this.isWechat) return wx.getPotentialFriendList(object);
        this.isJkw ? cc.log("host.getPotentialFriendList") : this.isAndroid && cc.log("host.getPotentialFriendList");
      };
      _proto.getGroupCloudStorage = function getGroupCloudStorage(object) {
        if (this.isWechat) return wx.getGroupCloudStorage(object);
        this.isJkw ? cc.log("host.getGroupCloudStorage") : this.isAndroid && cc.log("host.getGroupCloudStorage");
      };
      _proto.getFriendCloudStorage = function getFriendCloudStorage(object) {
        if (this.isWechat) return wx.getFriendCloudStorage(object);
        this.isJkw ? cc.log("host.getFriendCloudStorage") : this.isAndroid && cc.log("host.getFriendCloudStorage");
      };
      _proto.openSetting = function openSetting(object) {
        if (this.isWechat) return wx.openSetting(object);
        if (this.isJkw) {
          cc.log("host.openSetting");
          false, true;
          return loadRuntime().openSetting(object);
        }
        this.isAndroid && cc.log("host.openSetting");
      };
      _proto.getSetting = function getSetting(object) {
        if (this.isWechat) return wx.getSetting(object);
        if (this.isJkw) {
          cc.log("host.getSetting");
          false, true;
          return loadRuntime().getSetting(object);
        }
        this.isAndroid && cc.log("host.getSetting");
      };
      _proto.createOpenSettingButton = function createOpenSettingButton(object) {
        if (this.isWechat) return wx.createOpenSettingButton(object);
        this.isJkw ? cc.log("host.createOpenSettingButton") : this.isAndroid && cc.log("host.createOpenSettingButton");
      };
      _proto.openCustomerServiceConversation = function openCustomerServiceConversation(object) {
        if (this.isWechat) return wx.openCustomerServiceConversation(object);
        this.isJkw ? cc.log("host.openCustomerServiceConversation") : this.isAndroid && cc.log("host.openCustomerServiceConversation");
      };
      _proto.createGameClubButton = function createGameClubButton(object) {
        if (this.isWechat) return wx.createGameClubButton(object);
        if (this.isJkw) {
          cc.log("host.createGameClubButton");
          return {
            destroy: function destroy() {},
            hide: function hide() {},
            offTap: function offTap(callback) {},
            onTap: function onTap(callback) {},
            show: function show() {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.createGameClubButton");
          return {
            destroy: function destroy() {},
            hide: function hide() {},
            offTap: function offTap(callback) {},
            onTap: function onTap(callback) {},
            show: function show() {}
          };
        }
      };
      _proto.createGamePortal = function createGamePortal(object) {
        if (this.isWechat) return wx.createGamePortal(object);
        if (this.isJkw) {
          cc.log("host.createGamePortal");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.createGamePortal");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {}
          };
        }
      };
      _proto.createGameIcon = function createGameIcon(object) {
        if (this.isWechat) return wx.createGameIcon(object);
        if (this.isJkw) {
          cc.log("host.createGameIcon");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.createGameIcon");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {}
          };
        }
      };
      _proto.createGameBanner = function createGameBanner(object) {
        if (this.isWechat) return wx.createGameBanner(object);
        if (this.isJkw) {
          cc.log("host.createGameBanner");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {},
            hide: function hide() {}
          };
        }
        if (this.isAndroid) {
          cc.log("host.createGameBanner");
          return {
            destroy: function destroy() {},
            load: function load() {},
            offError: function offError(callback) {},
            offLoad: function offLoad(callback) {},
            offResize: function offResize(callback) {},
            onError: function onError(callback) {},
            onLoad: function onLoad(callback) {},
            onResize: function onResize(callback) {},
            show: function show() {},
            hide: function hide() {}
          };
        }
      };
      _proto.createInnerAudioContext = function createInnerAudioContext() {
        if (this.isWechat) return wx.createInnerAudioContext();
        this.isJkw ? cc.log("host.createInnerAudioContext") : this.isAndroid && cc.log("host.createInnerAudioContext");
      };
      _proto.compareVersion = function compareVersion(v1, v2) {
        v1 = v1.split(".");
        v2 = v2.split(".");
        var len = Math.max(v1.length, v2.length);
        while (v1.length < len) v1.push("0");
        while (v2.length < len) v2.push("0");
        for (var i = 0; i < len; i++) {
          var num1 = parseInt(v1[i]);
          var num2 = parseInt(v2[i]);
          if (num1 > num2) return 1;
          if (num1 < num2) return -1;
        }
        return 0;
      };
      _proto.veq = function veq(version, success, fail) {
        void 0 === success && (success = function success() {});
        void 0 === fail && (fail = function fail() {});
        if (this.isWechat) return 0 === this.compareVersion(this.getSystemInfoSync().SDKVersion, version) ? success() : fail();
      };
      _proto.vne = function vne(version, success, fail) {
        void 0 === success && (success = function success() {});
        void 0 === fail && (fail = function fail() {});
        if (this.isWechat) return 0 !== this.compareVersion(this.getSystemInfoSync().SDKVersion, version) ? success() : fail();
      };
      _proto.vgt = function vgt(version, success, fail) {
        void 0 === success && (success = function success() {});
        void 0 === fail && (fail = function fail() {});
        if (this.isWechat) return this.compareVersion(this.getSystemInfoSync().SDKVersion, version) > 0 ? success() : fail();
      };
      _proto.vlt = function vlt(version, success, fail) {
        void 0 === success && (success = function success() {});
        void 0 === fail && (fail = function fail() {});
        if (this.isWechat) return this.compareVersion(this.getSystemInfoSync().SDKVersion, version) < 0 ? success() : fail();
      };
      _proto.vge = function vge(version, success, fail) {
        void 0 === success && (success = function success() {});
        void 0 === fail && (fail = function fail() {});
        if (this.isWechat) return this.compareVersion(this.getSystemInfoSync().SDKVersion, version) >= 0 ? success() : fail();
      };
      _proto.vle = function vle(version, success, fail) {
        void 0 === success && (success = function success() {});
        void 0 === fail && (fail = function fail() {});
        if (this.isWechat) return this.compareVersion(this.getSystemInfoSync().SDKVersion, version) <= 0 ? success() : fail();
      };
      _proto.vsm = function vsm() {
        cc.sys.platform === cc.sys.WECHAT_GAME && wx.showModal({
          title: "\u63d0\u793a",
          content: "\u5f53\u524d\u5fae\u4fe1\u7248\u672c\u8fc7\u4f4e\uff0c\u65e0\u6cd5\u4f7f\u7528\u8be5\u529f\u80fd\uff0c\u8bf7\u5347\u7ea7\u5230\u6700\u65b0\u5fae\u4fe1\u7248\u672c\u540e\u91cd\u8bd5\u3002"
        });
      };
      _proto.vibrateShort = function vibrateShort(obj) {
        cc.sys.platform === cc.sys.WECHAT_GAME && wx.vibrateShort();
      };
      _proto.onShareAppMessage = function onShareAppMessage(fn) {
        cc.sys.platform === cc.sys.WECHAT_GAME && ("function" === typeof fn ? wx.onShareAppMessage(fn) : wx.onShareAppMessage());
      };
      _proto.promiseLoadBundle = function promiseLoadBundle(nameOrUrl) {
        return this.isQQ ? new Promise(function(resolve, reject) {
          qq.loadSubpackage({
            name: nameOrUrl,
            success: function success(res) {
              resolve();
            },
            fail: function fail(res) {
              console.warn(nameOrUrl + " Rejected!", res);
              reject();
            }
          });
        }) : new Promise(function(resolve, reject) {
          cc.assetManager.loadBundle(nameOrUrl, function(err, bundle) {
            err && reject();
            resolve();
          });
        });
      };
      return Host;
    }();
    var _default = new Host();
    exports["default"] = _default;
    module.exports = exports["default"];
    cc._RF.pop();
  }, {
    "./ServerConfig": "ServerConfig"
  } ],
  ServerConfig: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "f0a70hjn2dAp7jKmVomNO4s", "ServerConfig");
    "use strict";
    exports.__esModule = true;
    exports["default"] = void 0;
    var ServerConfig = {
      platform: "wechatgame",
      subPlatform: "default",
      envVersion: "trial",
      loginUrl: "/wx/login"
    };
    var _default = ServerConfig;
    exports["default"] = _default;
    module.exports = exports["default"];
    cc._RF.pop();
  }, {} ],
  inviteUI: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "079bcZq4oZM+ZaR08X6uxoX", "inviteUI");
    "use strict";
    var _Host = _interopRequireDefault(require("./Host"));
    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : {
        default: obj
      };
    }
    cc.Class({
      extends: cc.Component,
      properties: {
        wxSubContextView: {
          default: null,
          type: cc.Node
        }
      },
      onLoad: function onLoad() {},
      init: function init() {
        this.initShareCanvas();
        this.initSubContext();
      },
      initSubContext: function initSubContext() {
        _Host["default"].vge("2.9.0", function() {
          _Host["default"].setMessageToFriendQuery({
            shareMessageToFriendScene: 1
          });
        });
        _Host["default"].vge("2.9.4", function() {
          _Host["default"].onShareMessageToFriend(function(res) {
            var tips = res.success ? "\u5206\u4eab\u6210\u529f" : "\u5206\u4eab\u5931\u8d25";
            _Host["default"].showToast({
              title: tips,
              icon: "none",
              duration: 2e3
            });
          });
        });
        var openDataContext = _Host["default"].getOpenDataContext();
        console.log("test");
        openDataContext.postMessage({
          type: "showInviteUI"
        });
        this.wxSubContextView.active = true;
        this.wxSubContextView.getComponent(cc.WXSubContextView).enabled = true;
        this.wxSubContextView.getComponent(cc.WXSubContextView).updateSubContextViewport();
      },
      hideInvite: function hideInvite() {
        var openDataContext = _Host["default"].getOpenDataContext();
        openDataContext.postMessage({
          type: "hideInviteUI"
        });
        this.wxSubContextView.active = false;
        this.wxSubContextView.getComponent(cc.WXSubContextView).enabled = false;
        this.wxSubContextView.getComponent(cc.WXSubContextView).updateSubContextViewport();
      },
      start: function start() {},
      getUserInteractiveData: function getUserInteractiveData() {
        _Host["default"].vge("2.7.7", function() {
          _Host["default"].getUserInteractiveStorage({
            keyList: [ "2" ],
            success: function success(res) {
              var encryptedData = res.encryptedData;
              var iv = res.iv;
              api.shareToFriend(encryptedData, iv);
            }
          });
        });
      },
      initShareCanvas: function initShareCanvas() {
        var openDataContext = _Host["default"].getOpenDataContext();
        this.sharedCanvas = openDataContext.canvas;
        var _host$getSystemInfoSy = _Host["default"].getSystemInfoSync(), windowWidth = _host$getSystemInfoSy.windowWidth, windowHeight = _host$getSystemInfoSy.windowHeight;
        var width = 750;
        var height = 1334;
        var canvasWidth = 750;
        var canvasHeight = 1334;
        var x = 0;
        var y = 0;
        var realWidth = width / canvasWidth * windowWidth;
        var realHeight = height / canvasHeight * windowHeight;
        var realX = x / canvasWidth * windowWidth;
        var realY = y / canvasHeight * windowHeight;
        openDataContext.postMessage({
          type: "updateViewPort",
          box: {
            width: realWidth,
            height: realHeight,
            x: realX,
            y: realY
          }
        });
      },
      inviteWeChatFriend: function inviteWeChatFriend() {
        wx.shareAppMessage({
          title: "\u70b9\u4e00\u4e0b\uff0c\u73a9\u4e00\u5e74\uff0c\u88c5\u5907\u4e0d\u82b1\u4e00\u5206\u94b1\uff01",
          imageUrl: "",
          success: function success(res) {},
          fail: function fail(res) {}
        });
        this.hideInvite();
      }
    });
    cc._RF.pop();
  }, {
    "./Host": "Host"
  } ],
  main: [ function(require, module, exports) {
    "use strict";
    cc._RF.push(module, "2ab26YBMjRJlK5mj8qyudXs", "main");
    "use strict";
    cc.Class({
      extends: cc.Component,
      init: function init() {
        cc.find("Popup/inviteUI").getComponent("inviteUI").init();
      }
    });
    cc._RF.pop();
  }, {} ]
}, {}, [ "Host", "ServerConfig", "inviteUI", "main" ]);