(global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{ /***/ 1: /*!************************************************************!*\ !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***! \************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 3); var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 4));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}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 _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}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 _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 _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}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;} var realAtob; var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/; if (typeof atob !== 'function') { realAtob = function realAtob(str) { str = String(str).replace(/[\t\n\f\r ]+/g, ''); if (!b64re.test(str)) {throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");} // Adding the padding if missing, for semplicity str += '=='.slice(2 - (str.length & 3)); var bitmap;var result = '';var r1;var r2;var i = 0; for (; i < str.length;) { bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++))); result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255); } return result; }; } else { // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法 realAtob = atob; } function b64DecodeUnicode(str) { return decodeURIComponent(realAtob(str).split('').map(function (c) { return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); }).join('')); } function getCurrentUserInfo() { var token = wx.getStorageSync('uni_id_token') || ''; var tokenArr = token.split('.'); if (!token || tokenArr.length !== 3) { return { uid: null, role: [], permission: [], tokenExpired: 0 }; } var userInfo; try { userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1])); } catch (error) { throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message); } userInfo.tokenExpired = userInfo.exp * 1000; delete userInfo.exp; delete userInfo.iat; return userInfo; } function uniIdMixin(Vue) { Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo = getCurrentUserInfo(),role = _getCurrentUserInfo.role; return role.indexOf(roleId) > -1; }; Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 = getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission; return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1; }; Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 = getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired; return tokenExpired > Date.now(); }; } var _toString = Object.prototype.toString; var hasOwnProperty = Object.prototype.hasOwnProperty; function isFn(fn) { return typeof fn === 'function'; } function isStr(str) { return typeof str === 'string'; } function isPlainObject(obj) { return _toString.call(obj) === '[object Object]'; } function hasOwn(obj, key) { return hasOwnProperty.call(obj, key); } function noop() {} /** * Create a cached version of a pure function. */ function cached(fn) { var cache = Object.create(null); return function cachedFn(str) { var hit = cache[str]; return hit || (cache[str] = fn(str)); }; } /** * Camelize a hyphen-delimited string. */ var camelizeRE = /-(\w)/g; var camelize = cached(function (str) { return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';}); }); function sortObject(obj) { var sortObj = {}; if (isPlainObject(obj)) { Object.keys(obj).sort().forEach(function (key) { sortObj[key] = obj[key]; }); } return !Object.keys(sortObj) ? obj : sortObj; } var HOOKS = [ 'invoke', 'success', 'fail', 'complete', 'returnValue']; var globalInterceptors = {}; var scopedInterceptors = {}; function mergeHook(parentVal, childVal) { var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal; return res ? dedupeHooks(res) : res; } function dedupeHooks(hooks) { var res = []; for (var i = 0; i < hooks.length; i++) { if (res.indexOf(hooks[i]) === -1) { res.push(hooks[i]); } } return res; } function removeHook(hooks, hook) { var index = hooks.indexOf(hook); if (index !== -1) { hooks.splice(index, 1); } } function mergeInterceptorHook(interceptor, option) { Object.keys(option).forEach(function (hook) { if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) { interceptor[hook] = mergeHook(interceptor[hook], option[hook]); } }); } function removeInterceptorHook(interceptor, option) { if (!interceptor || !option) { return; } Object.keys(option).forEach(function (hook) { if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) { removeHook(interceptor[hook], option[hook]); } }); } function addInterceptor(method, option) { if (typeof method === 'string' && isPlainObject(option)) { mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option); } else if (isPlainObject(method)) { mergeInterceptorHook(globalInterceptors, method); } } function removeInterceptor(method, option) { if (typeof method === 'string') { if (isPlainObject(option)) { removeInterceptorHook(scopedInterceptors[method], option); } else { delete scopedInterceptors[method]; } } else if (isPlainObject(method)) { removeInterceptorHook(globalInterceptors, method); } } function wrapperHook(hook) { return function (data) { return hook(data) || data; }; } function isPromise(obj) { return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; } function queue(hooks, data) { var promise = false; for (var i = 0; i < hooks.length; i++) { var hook = hooks[i]; if (promise) { promise = Promise.resolve(wrapperHook(hook)); } else { var res = hook(data); if (isPromise(res)) { promise = Promise.resolve(res); } if (res === false) { return { then: function then() {} }; } } } return promise || { then: function then(callback) { return callback(data); } }; } function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; ['success', 'fail', 'complete'].forEach(function (name) { if (Array.isArray(interceptor[name])) { var oldCallback = options[name]; options[name] = function callbackInterceptor(res) { queue(interceptor[name], res).then(function (res) { /* eslint-disable no-mixed-operators */ return isFn(oldCallback) && oldCallback(res) || res; }); }; } }); return options; } function wrapperReturnValue(method, returnValue) { var returnValueHooks = []; if (Array.isArray(globalInterceptors.returnValue)) { returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue)); } var interceptor = scopedInterceptors[method]; if (interceptor && Array.isArray(interceptor.returnValue)) { returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue)); } returnValueHooks.forEach(function (hook) { returnValue = hook(returnValue) || returnValue; }); return returnValue; } function getApiInterceptorHooks(method) { var interceptor = Object.create(null); Object.keys(globalInterceptors).forEach(function (hook) { if (hook !== 'returnValue') { interceptor[hook] = globalInterceptors[hook].slice(); } }); var scopedInterceptor = scopedInterceptors[method]; if (scopedInterceptor) { Object.keys(scopedInterceptor).forEach(function (hook) { if (hook !== 'returnValue') { interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]); } }); } return interceptor; } function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];} var interceptor = getApiInterceptorHooks(method); if (interceptor && Object.keys(interceptor).length) { if (Array.isArray(interceptor.invoke)) { var res = queue(interceptor.invoke, options); return res.then(function (options) { return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params)); }); } else { return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params)); } } return api.apply(void 0, [options].concat(params)); } var promiseInterceptor = { returnValue: function returnValue(res) { if (!isPromise(res)) { return res; } return new Promise(function (resolve, reject) { res.then(function (res) { if (res[0]) { reject(res[0]); } else { resolve(res[1]); } }); }); } }; var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting/; var CONTEXT_API_RE = /^create|Manager$/; // Context例外情况 var CONTEXT_API_RE_EXC = ['createBLEConnection']; // 同步例外情况 var ASYNC_API = ['createBLEConnection', 'createPushMessage']; var CALLBACK_API_RE = /^on|^off/; function isContextApi(name) { return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1; } function isSyncApi(name) { return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1; } function isCallbackApi(name) { return CALLBACK_API_RE.test(name) && name !== 'onPush'; } function handlePromise(promise) { return promise.then(function (data) { return [null, data]; }). catch(function (err) {return [err];}); } function shouldPromise(name) { if ( isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) { return false; } return true; } /* eslint-disable no-extend-native */ if (!Promise.prototype.finally) { Promise.prototype.finally = function (callback) { var promise = this.constructor; return this.then( function (value) {return promise.resolve(callback()).then(function () {return value;});}, function (reason) {return promise.resolve(callback()).then(function () { throw reason; });}); }; } function promisify(name, api) { if (!shouldPromise(name)) { return api; } return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];} if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) { return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params))); } return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) { invokeApi.apply(void 0, [name, api, Object.assign({}, options, { success: resolve, fail: reject })].concat( params)); }))); }; } var EPS = 1e-4; var BASE_DEVICE_WIDTH = 750; var isIOS = false; var deviceWidth = 0; var deviceDPR = 0; function checkDeviceWidth() {var _wx$getSystemInfoSync = wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni deviceWidth = windowWidth; deviceDPR = pixelRatio; isIOS = platform === 'ios'; } function upx2px(number, newDeviceWidth) { if (deviceWidth === 0) { checkDeviceWidth(); } number = Number(number); if (number === 0) { return 0; } var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth); if (result < 0) { result = -result; } result = Math.floor(result + EPS); if (result === 0) { if (deviceDPR === 1 || !isIOS) { result = 1; } else { result = 0.5; } } return number < 0 ? -result : result; } var LOCALE_ZH_HANS = 'zh-Hans'; var LOCALE_ZH_HANT = 'zh-Hant'; var LOCALE_EN = 'en'; var LOCALE_FR = 'fr'; var LOCALE_ES = 'es'; var messages = {}; var locale; { locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN; } function initI18nMessages() { if (!isEnableLocale()) { return; } var localeKeys = Object.keys(__uniConfig.locales); if (localeKeys.length) { localeKeys.forEach(function (locale) { var curMessages = messages[locale]; var userMessages = __uniConfig.locales[locale]; if (curMessages) { Object.assign(curMessages, userMessages); } else { messages[locale] = userMessages; } }); } } initI18nMessages(); var i18n = (0, _uniI18n.initVueI18n)( locale, {}); var t = i18n.t; var i18nMixin = i18n.mixin = { beforeCreate: function beforeCreate() {var _this = this; var unwatch = i18n.i18n.watchLocale(function () { _this.$forceUpdate(); }); this.$once('hook:beforeDestroy', function () { unwatch(); }); }, methods: { $$t: function $$t(key, values) { return t(key, values); } } }; var setLocale = i18n.setLocale; var getLocale = i18n.getLocale; function initAppLocale(Vue, appVm, locale) { var state = Vue.observable({ locale: locale || i18n.getLocale() }); var localeWatchers = []; appVm.$watchLocale = function (fn) { localeWatchers.push(fn); }; Object.defineProperty(appVm, '$locale', { get: function get() { return state.locale; }, set: function set(v) { state.locale = v; localeWatchers.forEach(function (watch) {return watch(v);}); } }); } function isEnableLocale() { return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length; } function include(str, parts) { return !!parts.find(function (part) {return str.indexOf(part) !== -1;}); } function startsWith(str, parts) { return parts.find(function (part) {return str.indexOf(part) === 0;}); } function normalizeLocale(locale, messages) { if (!locale) { return; } locale = locale.trim().replace(/_/g, '-'); if (messages && messages[locale]) { return locale; } locale = locale.toLowerCase(); if (locale === 'chinese') { // 支付宝 return LOCALE_ZH_HANS; } if (locale.indexOf('zh') === 0) { if (locale.indexOf('-hans') > -1) { return LOCALE_ZH_HANS; } if (locale.indexOf('-hant') > -1) { return LOCALE_ZH_HANT; } if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) { return LOCALE_ZH_HANT; } return LOCALE_ZH_HANS; } var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]); if (lang) { return lang; } } // export function initI18n() { // const localeKeys = Object.keys(__uniConfig.locales || {}) // if (localeKeys.length) { // localeKeys.forEach((locale) => // i18n.add(locale, __uniConfig.locales[locale]) // ) // } // } function getLocale$1() { // 优先使用 $locale var app = getApp({ allowDefault: true }); if (app && app.$vm) { return app.$vm.$locale; } return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN; } function setLocale$1(locale) { var app = getApp(); if (!app) { return false; } var oldLocale = app.$vm.$locale; if (oldLocale !== locale) { app.$vm.$locale = locale; onLocaleChangeCallbacks.forEach(function (fn) {return fn({ locale: locale });}); return true; } return false; } var onLocaleChangeCallbacks = []; function onLocaleChange(fn) { if (onLocaleChangeCallbacks.indexOf(fn) === -1) { onLocaleChangeCallbacks.push(fn); } } if (typeof global !== 'undefined') { global.getLocale = getLocale$1; } var interceptors = { promiseInterceptor: promiseInterceptor }; var baseApi = /*#__PURE__*/Object.freeze({ __proto__: null, upx2px: upx2px, getLocale: getLocale$1, setLocale: setLocale$1, onLocaleChange: onLocaleChange, addInterceptor: addInterceptor, removeInterceptor: removeInterceptor, interceptors: interceptors }); function findExistsPageIndex(url) { var pages = getCurrentPages(); var len = pages.length; while (len--) { var page = pages[len]; if (page.$page && page.$page.fullPath === url) { return len; } } return -1; } var redirectTo = { name: function name(fromArgs) { if (fromArgs.exists === 'back' && fromArgs.delta) { return 'navigateBack'; } return 'redirectTo'; }, args: function args(fromArgs) { if (fromArgs.exists === 'back' && fromArgs.url) { var existsPageIndex = findExistsPageIndex(fromArgs.url); if (existsPageIndex !== -1) { var delta = getCurrentPages().length - 1 - existsPageIndex; if (delta > 0) { fromArgs.delta = delta; } } } } }; var previewImage = { args: function args(fromArgs) { var currentIndex = parseInt(fromArgs.current); if (isNaN(currentIndex)) { return; } var urls = fromArgs.urls; if (!Array.isArray(urls)) { return; } var len = urls.length; if (!len) { return; } if (currentIndex < 0) { currentIndex = 0; } else if (currentIndex >= len) { currentIndex = len - 1; } if (currentIndex > 0) { fromArgs.current = urls[currentIndex]; fromArgs.urls = urls.filter( function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;}); } else { fromArgs.current = urls[0]; } return { indicator: false, loop: false }; } }; var UUID_KEY = '__DC_STAT_UUID'; var deviceId; function useDeviceId(result) { deviceId = deviceId || wx.getStorageSync(UUID_KEY); if (!deviceId) { deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7); wx.setStorage({ key: UUID_KEY, data: deviceId }); } result.deviceId = deviceId; } function addSafeAreaInsets(result) { if (result.safeArea) { var safeArea = result.safeArea; result.safeAreaInsets = { top: safeArea.top, left: safeArea.left, right: result.windowWidth - safeArea.right, bottom: result.screenHeight - safeArea.bottom }; } } function populateParameters(result) {var _result$brand = result.brand,brand = _result$brand === void 0 ? '' : _result$brand,_result$model = result.model,model = _result$model === void 0 ? '' : _result$model,_result$system = result.system,system = _result$system === void 0 ? '' : _result$system,_result$language = result.language,language = _result$language === void 0 ? '' : _result$language,theme = result.theme,version = result.version,platform = result.platform,fontSizeSetting = result.fontSizeSetting,SDKVersion = result.SDKVersion,pixelRatio = result.pixelRatio,deviceOrientation = result.deviceOrientation; // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1 // osName osVersion var osName = ''; var osVersion = ''; { osName = system.split(' ')[0] || ''; osVersion = system.split(' ')[1] || ''; } var hostVersion = version; // deviceType var deviceType = getGetDeviceType(result, model); // deviceModel var deviceBrand = getDeviceBrand(brand); // hostName var _hostName = getHostName(result); // deviceOrientation var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持 // devicePixelRatio var _devicePixelRatio = pixelRatio; // SDKVersion var _SDKVersion = SDKVersion; // hostLanguage var hostLanguage = language.replace(/_/g, '-'); // wx.getAccountInfoSync var parameters = { appId: "__UNI__4A2871E", appName: "kuailaiyou", appVersion: "1.0.0", appVersionCode: "100", appLanguage: getAppLanguage(hostLanguage), uniCompileVersion: "3.5.3", uniRuntimeVersion: "3.5.3", uniPlatform: undefined || "mp-weixin", deviceBrand: deviceBrand, deviceModel: model, deviceType: deviceType, devicePixelRatio: _devicePixelRatio, deviceOrientation: _deviceOrientation, osName: osName.toLocaleLowerCase(), osVersion: osVersion, hostTheme: theme, hostVersion: hostVersion, hostLanguage: hostLanguage, hostName: _hostName, hostSDKVersion: _SDKVersion, hostFontSizeSetting: fontSizeSetting, windowTop: 0, windowBottom: 0, // TODO osLanguage: undefined, osTheme: undefined, ua: undefined, hostPackageName: undefined, browserName: undefined, browserVersion: undefined }; Object.assign(result, parameters); } function getGetDeviceType(result, model) { var deviceType = result.deviceType || 'phone'; { var deviceTypeMaps = { ipad: 'pad', windows: 'pc', mac: 'pc' }; var deviceTypeMapsKeys = Object.keys(deviceTypeMaps); var _model = model.toLocaleLowerCase(); for (var index = 0; index < deviceTypeMapsKeys.length; index++) { var _m = deviceTypeMapsKeys[index]; if (_model.indexOf(_m) !== -1) { deviceType = deviceTypeMaps[_m]; break; } } } return deviceType; } function getDeviceBrand(brand) { var deviceBrand = brand; if (deviceBrand) { deviceBrand = brand.toLocaleLowerCase(); } return deviceBrand; } function getAppLanguage(defaultLanguage) { return getLocale$1 ? getLocale$1() : defaultLanguage; } function getHostName(result) { var _platform = 'WeChat'; var _hostName = result.hostName || _platform; // mp-jd { if (result.environment) { _hostName = result.environment; } else if (result.host && result.host.env) { _hostName = result.host.env; } } return _hostName; } var getSystemInfo = { returnValue: function returnValue(result) { useDeviceId(result); addSafeAreaInsets(result); populateParameters(result); } }; var showActionSheet = { args: function args(fromArgs) { if (typeof fromArgs === 'object') { fromArgs.alertText = fromArgs.title; } } }; var getAppBaseInfo = { returnValue: function returnValue(result) {var _result = result,version = _result.version,language = _result.language,SDKVersion = _result.SDKVersion,theme = _result.theme; var _hostName = getHostName(result); var hostLanguage = language.replace('_', '-'); result = sortObject(Object.assign(result, { appId: "__UNI__4A2871E", appName: "kuailaiyou", appVersion: "1.0.0", appVersionCode: "100", appLanguage: getAppLanguage(hostLanguage), hostVersion: version, hostLanguage: hostLanguage, hostName: _hostName, hostSDKVersion: SDKVersion, hostTheme: theme })); } }; var getDeviceInfo = { returnValue: function returnValue(result) {var _result2 = result,brand = _result2.brand,model = _result2.model; var deviceType = getGetDeviceType(result, model); var deviceBrand = getDeviceBrand(brand); useDeviceId(result); result = sortObject(Object.assign(result, { deviceType: deviceType, deviceBrand: deviceBrand, deviceModel: model })); } }; var getWindowInfo = { returnValue: function returnValue(result) { addSafeAreaInsets(result); result = sortObject(Object.assign(result, { windowTop: 0, windowBottom: 0 })); } }; var getAppAuthorizeSetting = { returnValue: function returnValue(result) {var locationReducedAccuracy = result.locationReducedAccuracy; result.locationAccuracy = 'unsupported'; if (locationReducedAccuracy === true) { result.locationAccuracy = 'reduced'; } else if (locationReducedAccuracy === false) { result.locationAccuracy = 'full'; } } }; // import navigateTo from 'uni-helpers/navigate-to' var protocols = { redirectTo: redirectTo, // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP previewImage: previewImage, getSystemInfo: getSystemInfo, getSystemInfoSync: getSystemInfo, showActionSheet: showActionSheet, getAppBaseInfo: getAppBaseInfo, getDeviceInfo: getDeviceInfo, getWindowInfo: getWindowInfo, getAppAuthorizeSetting: getAppAuthorizeSetting }; var todos = [ 'vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage']; var canIUses = []; var CALLBACKS = ['success', 'fail', 'cancel', 'complete']; function processCallback(methodName, method, returnValue) { return function (res) { return method(processReturnValue(methodName, res, returnValue)); }; } function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; if (isPlainObject(fromArgs)) {// 一般 api 的参数解析 var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值 if (isFn(argsOption)) { argsOption = argsOption(fromArgs, toArgs) || {}; } for (var key in fromArgs) { if (hasOwn(argsOption, key)) { var keyOption = argsOption[key]; if (isFn(keyOption)) { keyOption = keyOption(fromArgs[key], fromArgs, toArgs); } if (!keyOption) {// 不支持的参数 console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'")); } else if (isStr(keyOption)) {// 重写参数 key toArgs[keyOption] = fromArgs[key]; } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value toArgs[keyOption.name ? keyOption.name : key] = keyOption.value; } } else if (CALLBACKS.indexOf(key) !== -1) { if (isFn(fromArgs[key])) { toArgs[key] = processCallback(methodName, fromArgs[key], returnValue); } } else { if (!keepFromArgs) { toArgs[key] = fromArgs[key]; } } } return toArgs; } else if (isFn(fromArgs)) { fromArgs = processCallback(methodName, fromArgs, returnValue); } return fromArgs; } function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (isFn(protocols.returnValue)) {// 处理通用 returnValue res = protocols.returnValue(methodName, res); } return processArgs(methodName, res, returnValue, {}, keepReturnValue); } function wrapper(methodName, method) { if (hasOwn(protocols, methodName)) { var protocol = protocols[methodName]; if (!protocol) {// 暂不支持的 api return function () { console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'.")); }; } return function (arg1, arg2) {// 目前 api 最多两个参数 var options = protocol; if (isFn(protocol)) { options = protocol(arg1); } arg1 = processArgs(methodName, arg1, options.args, options.returnValue); var args = [arg1]; if (typeof arg2 !== 'undefined') { args.push(arg2); } if (isFn(options.name)) { methodName = options.name(arg1); } else if (isStr(options.name)) { methodName = options.name; } var returnValue = wx[methodName].apply(wx, args); if (isSyncApi(methodName)) {// 同步 api return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName)); } return returnValue; }; } return method; } var todoApis = Object.create(null); var TODOS = [ 'onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share']; function createTodoApi(name) { return function todoApi(_ref) {var fail = _ref.fail,complete = _ref.complete; var res = { errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") }; isFn(fail) && fail(res); isFn(complete) && complete(res); }; } TODOS.forEach(function (name) { todoApis[name] = createTodoApi(name); }); var providers = { oauth: ['weixin'], share: ['weixin'], payment: ['wxpay'], push: ['weixin'] }; function getProvider(_ref2) {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete; var res = false; if (providers[service]) { res = { errMsg: 'getProvider:ok', service: service, provider: providers[service] }; isFn(success) && success(res); } else { res = { errMsg: 'getProvider:fail service not found' }; isFn(fail) && fail(res); } isFn(complete) && complete(res); } var extraApi = /*#__PURE__*/Object.freeze({ __proto__: null, getProvider: getProvider }); var getEmitter = function () { var Emitter; return function getUniEmitter() { if (!Emitter) { Emitter = new _vue.default(); } return Emitter; }; }(); function apply(ctx, method, args) { return ctx[method].apply(ctx, args); } function $on() { return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments)); } function $off() { return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments)); } function $once() { return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments)); } function $emit() { return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments)); } var eventApi = /*#__PURE__*/Object.freeze({ __proto__: null, $on: $on, $off: $off, $once: $once, $emit: $emit }); /** * 框架内 try-catch */ /** * 开发者 try-catch */ function tryCatch(fn) { return function () { try { return fn.apply(fn, arguments); } catch (e) { // TODO console.error(e); } }; } function getApiCallbacks(params) { var apiCallbacks = {}; for (var name in params) { var param = params[name]; if (isFn(param)) { apiCallbacks[name] = tryCatch(param); delete params[name]; } } return apiCallbacks; } var cid; var cidErrMsg; var enabled; function normalizePushMessage(message) { try { return JSON.parse(message); } catch (e) {} return message; } function invokePushCallback( args) { if (args.type === 'enabled') { enabled = true; } else if (args.type === 'clientId') { cid = args.cid; cidErrMsg = args.errMsg; invokeGetPushCidCallbacks(cid, args.errMsg); } else if (args.type === 'pushMsg') { var message = { type: 'receive', data: normalizePushMessage(args.message) }; for (var i = 0; i < onPushMessageCallbacks.length; i++) { var callback = onPushMessageCallbacks[i]; callback(message); // 该消息已被阻止 if (message.stopped) { break; } } } else if (args.type === 'click') { onPushMessageCallbacks.forEach(function (callback) { callback({ type: 'click', data: normalizePushMessage(args.message) }); }); } } var getPushCidCallbacks = []; function invokeGetPushCidCallbacks(cid, errMsg) { getPushCidCallbacks.forEach(function (callback) { callback(cid, errMsg); }); getPushCidCallbacks.length = 0; } function getPushClientId(args) { if (!isPlainObject(args)) { args = {}; }var _getApiCallbacks = getApiCallbacks(args),success = _getApiCallbacks.success,fail = _getApiCallbacks.fail,complete = _getApiCallbacks.complete; var hasSuccess = isFn(success); var hasFail = isFn(fail); var hasComplete = isFn(complete); Promise.resolve().then(function () { if (typeof enabled === 'undefined') { enabled = false; cid = ''; cidErrMsg = 'unipush is not enabled'; } getPushCidCallbacks.push(function (cid, errMsg) { var res; if (cid) { res = { errMsg: 'getPushClientId:ok', cid: cid }; hasSuccess && success(res); } else { res = { errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '') }; hasFail && fail(res); } hasComplete && complete(res); }); if (typeof cid !== 'undefined') { invokeGetPushCidCallbacks(cid, cidErrMsg); } }); } var onPushMessageCallbacks = []; // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现 var onPushMessage = function onPushMessage(fn) { if (onPushMessageCallbacks.indexOf(fn) === -1) { onPushMessageCallbacks.push(fn); } }; var offPushMessage = function offPushMessage(fn) { if (!fn) { onPushMessageCallbacks.length = 0; } else { var index = onPushMessageCallbacks.indexOf(fn); if (index > -1) { onPushMessageCallbacks.splice(index, 1); } } }; var api = /*#__PURE__*/Object.freeze({ __proto__: null, getPushClientId: getPushClientId, onPushMessage: onPushMessage, offPushMessage: offPushMessage, invokePushCallback: invokePushCallback }); var MPPage = Page; var MPComponent = Component; var customizeRE = /:/g; var customize = cached(function (str) { return camelize(str.replace(customizeRE, '-')); }); function initTriggerEvent(mpInstance) { var oldTriggerEvent = mpInstance.triggerEvent; var newTriggerEvent = function newTriggerEvent(event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];} return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args)); }; try { // 京东小程序 triggerEvent 为只读 mpInstance.triggerEvent = newTriggerEvent; } catch (error) { mpInstance._triggerEvent = newTriggerEvent; } } function initHook(name, options, isComponent) { var oldHook = options[name]; if (!oldHook) { options[name] = function () { initTriggerEvent(this); }; } else { options[name] = function () { initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];} return oldHook.apply(this, args); }; } } if (!MPPage.__$wrappered) { MPPage.__$wrappered = true; Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; initHook('onLoad', options); return MPPage(options); }; Page.after = MPPage.after; Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; initHook('created', options); return MPComponent(options); }; } var PAGE_EVENT_HOOKS = [ 'onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap']; function initMocks(vm, mocks) { var mpInstance = vm.$mp[vm.mpType]; mocks.forEach(function (mock) { if (hasOwn(mpInstance, mock)) { vm[mock] = mpInstance[mock]; } }); } function hasHook(hook, vueOptions) { if (!vueOptions) { return true; } if (_vue.default.options && Array.isArray(_vue.default.options[hook])) { return true; } vueOptions = vueOptions.default || vueOptions; if (isFn(vueOptions)) { if (isFn(vueOptions.extendOptions[hook])) { return true; } if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) { return true; } return false; } if (isFn(vueOptions[hook])) { return true; } var mixins = vueOptions.mixins; if (Array.isArray(mixins)) { return !!mixins.find(function (mixin) {return hasHook(hook, mixin);}); } } function initHooks(mpOptions, hooks, vueOptions) { hooks.forEach(function (hook) { if (hasHook(hook, vueOptions)) { mpOptions[hook] = function (args) { return this.$vm && this.$vm.__call_hook(hook, args); }; } }); } function initVueComponent(Vue, vueOptions) { vueOptions = vueOptions.default || vueOptions; var VueComponent; if (isFn(vueOptions)) { VueComponent = vueOptions; } else { VueComponent = Vue.extend(vueOptions); } vueOptions = VueComponent.options; return [VueComponent, vueOptions]; } function initSlots(vm, vueSlots) { if (Array.isArray(vueSlots) && vueSlots.length) { var $slots = Object.create(null); vueSlots.forEach(function (slotName) { $slots[slotName] = true; }); vm.$scopedSlots = vm.$slots = $slots; } } function initVueIds(vueIds, mpInstance) { vueIds = (vueIds || '').split(','); var len = vueIds.length; if (len === 1) { mpInstance._$vueId = vueIds[0]; } else if (len === 2) { mpInstance._$vueId = vueIds[0]; mpInstance._$vuePid = vueIds[1]; } } function initData(vueOptions, context) { var data = vueOptions.data || {}; var methods = vueOptions.methods || {}; if (typeof data === 'function') { try { data = data.call(context); // 支持 Vue.prototype 上挂的数据 } catch (e) { if (Object({"VUE_APP_NAME":"kuailaiyou","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) { console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data); } } } else { try { // 对 data 格式化 data = JSON.parse(JSON.stringify(data)); } catch (e) {} } if (!isPlainObject(data)) { data = {}; } Object.keys(methods).forEach(function (methodName) { if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) { data[methodName] = methods[methodName]; } }); return data; } var PROP_TYPES = [String, Number, Boolean, Object, Array, null]; function createObserver(name) { return function observer(newVal, oldVal) { if (this.$vm) { this.$vm[name] = newVal; // 为了触发其他非 render watcher } }; } function initBehaviors(vueOptions, initBehavior) { var vueBehaviors = vueOptions.behaviors; var vueExtends = vueOptions.extends; var vueMixins = vueOptions.mixins; var vueProps = vueOptions.props; if (!vueProps) { vueOptions.props = vueProps = []; } var behaviors = []; if (Array.isArray(vueBehaviors)) { vueBehaviors.forEach(function (behavior) { behaviors.push(behavior.replace('uni://', "wx".concat("://"))); if (behavior === 'uni://form-field') { if (Array.isArray(vueProps)) { vueProps.push('name'); vueProps.push('value'); } else { vueProps.name = { type: String, default: '' }; vueProps.value = { type: [String, Number, Boolean, Array, Object, Date], default: '' }; } } }); } if (isPlainObject(vueExtends) && vueExtends.props) { behaviors.push( initBehavior({ properties: initProperties(vueExtends.props, true) })); } if (Array.isArray(vueMixins)) { vueMixins.forEach(function (vueMixin) { if (isPlainObject(vueMixin) && vueMixin.props) { behaviors.push( initBehavior({ properties: initProperties(vueMixin.props, true) })); } }); } return behaviors; } function parsePropType(key, type, defaultValue, file) { // [String]=>String if (Array.isArray(type) && type.length === 1) { return type[0]; } return type; } function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';var options = arguments.length > 3 ? arguments[3] : undefined; var properties = {}; if (!isBehavior) { properties.vueId = { type: String, value: '' }; { if (options.virtualHost) { properties.virtualHostStyle = { type: null, value: '' }; properties.virtualHostClass = { type: null, value: '' }; } } // scopedSlotsCompiler auto properties.scopedSlotsCompiler = { type: String, value: '' }; properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots type: null, value: [], observer: function observer(newVal, oldVal) { var $slots = Object.create(null); newVal.forEach(function (slotName) { $slots[slotName] = true; }); this.setData({ $slots: $slots }); } }; } if (Array.isArray(props)) {// ['title'] props.forEach(function (key) { properties[key] = { type: null, observer: createObserver(key) }; }); } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String} Object.keys(props).forEach(function (key) { var opts = props[key]; if (isPlainObject(opts)) {// title:{type:String,default:''} var value = opts.default; if (isFn(value)) { value = value(); } opts.type = parsePropType(key, opts.type); properties[key] = { type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null, value: value, observer: createObserver(key) }; } else {// content:String var type = parsePropType(key, opts); properties[key] = { type: PROP_TYPES.indexOf(type) !== -1 ? type : null, observer: createObserver(key) }; } }); } return properties; } function wrapper$1(event) { // TODO 又得兼容 mpvue 的 mp 对象 try { event.mp = JSON.parse(JSON.stringify(event)); } catch (e) {} event.stopPropagation = noop; event.preventDefault = noop; event.target = event.target || {}; if (!hasOwn(event, 'detail')) { event.detail = {}; } if (hasOwn(event, 'markerId')) { event.detail = typeof event.detail === 'object' ? event.detail : {}; event.detail.markerId = event.markerId; } if (isPlainObject(event.detail)) { event.target = Object.assign({}, event.target, event.detail); } return event; } function getExtraValue(vm, dataPathsArray) { var context = vm; dataPathsArray.forEach(function (dataPathArray) { var dataPath = dataPathArray[0]; var value = dataPathArray[2]; if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable'] var propPath = dataPathArray[1]; var valuePath = dataPathArray[3]; var vFor; if (Number.isInteger(dataPath)) { vFor = dataPath; } else if (!dataPath) { vFor = context; } else if (typeof dataPath === 'string' && dataPath) { if (dataPath.indexOf('#s#') === 0) { vFor = dataPath.substr(3); } else { vFor = vm.__get_value(dataPath, context); } } if (Number.isInteger(vFor)) { context = value; } else if (!propPath) { context = vFor[value]; } else { if (Array.isArray(vFor)) { context = vFor.find(function (vForItem) { return vm.__get_value(propPath, vForItem) === value; }); } else if (isPlainObject(vFor)) { context = Object.keys(vFor).find(function (vForKey) { return vm.__get_value(propPath, vFor[vForKey]) === value; }); } else { console.error('v-for 暂不支持循环数据:', vFor); } } if (valuePath) { context = vm.__get_value(valuePath, context); } } }); return context; } function processEventExtra(vm, extra, event) { var extraObj = {}; if (Array.isArray(extra) && extra.length) { /** *[ * ['data.items', 'data.id', item.data.id], * ['metas', 'id', meta.id] *], *[ * ['data.items', 'data.id', item.data.id], * ['metas', 'id', meta.id] *], *'test' */ extra.forEach(function (dataPath, index) { if (typeof dataPath === 'string') { if (!dataPath) {// model,prop.sync extraObj['$' + index] = vm; } else { if (dataPath === '$event') {// $event extraObj['$' + index] = event; } else if (dataPath === 'arguments') { if (event.detail && event.detail.__args__) { extraObj['$' + index] = event.detail.__args__; } else { extraObj['$' + index] = [event]; } } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event); } else { extraObj['$' + index] = vm.__get_value(dataPath); } } } else { extraObj['$' + index] = getExtraValue(vm, dataPath); } }); } return extraObj; } function getObjByArray(arr) { var obj = {}; for (var i = 1; i < arr.length; i++) { var element = arr[i]; obj[element[0]] = element[1]; } return obj; } function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined; var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象 if (isCustom) {// 自定义事件 isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx'; if (!args.length) {// 无参数,直接传入 event 或 detail 数组 if (isCustomMPEvent) { return [event]; } return event.detail.__args__ || event.detail; } } var extraObj = processEventExtra(vm, extra, event); var ret = []; args.forEach(function (arg) { if (arg === '$event') { if (methodName === '__set_model' && !isCustom) {// input v-model value ret.push(event.target.value); } else { if (isCustom && !isCustomMPEvent) { ret.push(event.detail.__args__[0]); } else {// wxcomponent 组件或内置组件 ret.push(event); } } } else { if (Array.isArray(arg) && arg[0] === 'o') { ret.push(getObjByArray(arg)); } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) { ret.push(extraObj[arg]); } else { ret.push(arg); } } }); return ret; } var ONCE = '~'; var CUSTOM = '^'; function isMatchEventType(eventType, optType) { return eventType === optType || optType === 'regionchange' && ( eventType === 'begin' || eventType === 'end'); } function getContextVm(vm) { var $parent = vm.$parent; // 父组件是 scoped slots 或者其他自定义组件时继续查找 while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) { $parent = $parent.$parent; } return $parent && $parent.$parent; } function handleEvent(event) {var _this2 = this; event = wrapper$1(event); // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]] var dataset = (event.currentTarget || event.target).dataset; if (!dataset) { return console.warn('事件信息不存在'); } var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰 if (!eventOpts) { return console.warn('事件信息不存在'); } // [['handle',[1,2,a]],['handle1',[1,2,a]]] var eventType = event.type; var ret = []; eventOpts.forEach(function (eventOpt) { var type = eventOpt[0]; var eventsArray = eventOpt[1]; var isCustom = type.charAt(0) === CUSTOM; type = isCustom ? type.slice(1) : type; var isOnce = type.charAt(0) === ONCE; type = isOnce ? type.slice(1) : type; if (eventsArray && isMatchEventType(eventType, type)) { eventsArray.forEach(function (eventArray) { var methodName = eventArray[0]; if (methodName) { var handlerCtx = _this2.$vm; if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots handlerCtx = getContextVm(handlerCtx) || handlerCtx; } if (methodName === '$emit') { handlerCtx.$emit.apply(handlerCtx, processEventArgs( _this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName)); return; } var handler = handlerCtx[methodName]; if (!isFn(handler)) { var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component'; var path = _this2.route || _this2.is; throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\"")); } if (isOnce) { if (handler.once) { return; } handler.once = true; } var params = processEventArgs( _this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName); params = Array.isArray(params) ? params : []; // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据 if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) { // eslint-disable-next-line no-sparse-arrays params = params.concat([,,,,,,,,,, event]); } ret.push(handler.apply(handlerCtx, params)); } }); } }); if ( eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') { return ret[0]; } } var eventChannels = {}; var eventChannelStack = []; function getEventChannel(id) { if (id) { var eventChannel = eventChannels[id]; delete eventChannels[id]; return eventChannel; } return eventChannelStack.shift(); } var hooks = [ 'onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection']; function initEventChannel() { _vue.default.prototype.getOpenerEventChannel = function () { // 微信小程序使用自身getOpenerEventChannel { return this.$scope.getOpenerEventChannel(); } }; var callHook = _vue.default.prototype.__call_hook; _vue.default.prototype.__call_hook = function (hook, args) { if (hook === 'onLoad' && args && args.__id__) { this.__eventChannel__ = getEventChannel(args.__id__); delete args.__id__; } return callHook.call(this, hook, args); }; } function initScopedSlotsParams() { var center = {}; var parents = {}; _vue.default.prototype.$hasScopedSlotsParams = function (vueId) { var has = center[vueId]; if (!has) { parents[vueId] = this; this.$on('hook:destroyed', function () { delete parents[vueId]; }); } return has; }; _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) { var data = center[vueId]; if (data) { var object = data[name] || {}; return key ? object[key] : object; } else { parents[vueId] = this; this.$on('hook:destroyed', function () { delete parents[vueId]; }); } }; _vue.default.prototype.$setScopedSlotsParams = function (name, value) { var vueIds = this.$options.propsData.vueId; if (vueIds) { var vueId = vueIds.split(',')[0]; var object = center[vueId] = center[vueId] || {}; object[name] = value; if (parents[vueId]) { parents[vueId].$forceUpdate(); } } }; _vue.default.mixin({ destroyed: function destroyed() { var propsData = this.$options.propsData; var vueId = propsData && propsData.vueId; if (vueId) { delete center[vueId]; delete parents[vueId]; } } }); } function parseBaseApp(vm, _ref3) {var mocks = _ref3.mocks,initRefs = _ref3.initRefs; initEventChannel(); { initScopedSlotsParams(); } if (vm.$options.store) { _vue.default.prototype.$store = vm.$options.store; } uniIdMixin(_vue.default); _vue.default.prototype.mpHost = "mp-weixin"; _vue.default.mixin({ beforeCreate: function beforeCreate() { if (!this.$options.mpType) { return; } this.mpType = this.$options.mpType; this.$mp = _defineProperty({ data: {} }, this.mpType, this.$options.mpInstance); this.$scope = this.$options.mpInstance; delete this.$options.mpType; delete this.$options.mpInstance; if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n var app = getApp(); if (app.$vm && app.$vm.$i18n) { this._i18n = app.$vm.$i18n; } } if (this.mpType !== 'app') { initRefs(this); initMocks(this, mocks); } } }); var appOptions = { onLaunch: function onLaunch(args) { if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前 return; } { if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断 console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上'); } } this.$vm = vm; this.$vm.$mp = { app: this }; this.$vm.$scope = this; // vm 上也挂载 globalData this.$vm.globalData = this.globalData; this.$vm._isMounted = true; this.$vm.__call_hook('mounted', args); this.$vm.__call_hook('onLaunch', args); } }; // 兼容旧版本 globalData appOptions.globalData = vm.$options.globalData || {}; // 将 methods 中的方法挂在 getApp() 中 var methods = vm.$options.methods; if (methods) { Object.keys(methods).forEach(function (name) { appOptions[name] = methods[name]; }); } initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN); initHooks(appOptions, hooks); return appOptions; } var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__']; function findVmByVueId(vm, vuePid) { var $children = vm.$children; // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200) for (var i = $children.length - 1; i >= 0; i--) { var childVm = $children[i]; if (childVm.$scope._$vueId === vuePid) { return childVm; } } // 反向递归查找 var parentVm; for (var _i = $children.length - 1; _i >= 0; _i--) { parentVm = findVmByVueId($children[_i], vuePid); if (parentVm) { return parentVm; } } } function initBehavior(options) { return Behavior(options); } function isPage() { return !!this.route; } function initRelation(detail) { this.triggerEvent('__l', detail); } function selectAllComponents(mpInstance, selector, $refs) { var components = mpInstance.selectAllComponents(selector); components.forEach(function (component) { var ref = component.dataset.ref; $refs[ref] = component.$vm || component; { if (component.dataset.vueGeneric === 'scoped') { component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) { selectAllComponents(scopedComponent, selector, $refs); }); } } }); } function initRefs(vm) { var mpInstance = vm.$scope; Object.defineProperty(vm, '$refs', { get: function get() { var $refs = {}; selectAllComponents(mpInstance, '.vue-ref', $refs); // TODO 暂不考虑 for 中的 scoped var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for'); forComponents.forEach(function (component) { var ref = component.dataset.ref; if (!$refs[ref]) { $refs[ref] = []; } $refs[ref].push(component.$vm || component); }); return $refs; } }); } function handleLink(event) {var _ref4 = event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch) var parentVm; if (vuePid) { parentVm = findVmByVueId(this.$vm, vuePid); } if (!parentVm) { parentVm = this.$vm; } vueOptions.parent = parentVm; } function parseApp(vm) { return parseBaseApp(vm, { mocks: mocks, initRefs: initRefs }); } function createApp(vm) { App(parseApp(vm)); return vm; } var encodeReserveRE = /[!'()*]/g; var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);}; var commaRE = /%2C/g; // fixed encodeURIComponent which is more conformant to RFC3986: // - escapes [!'()*] // - preserve commas var encode = function encode(str) {return encodeURIComponent(str). replace(encodeReserveRE, encodeReserveReplacer). replace(commaRE, ',');}; function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode; var res = obj ? Object.keys(obj).map(function (key) { var val = obj[key]; if (val === undefined) { return ''; } if (val === null) { return encodeStr(key); } if (Array.isArray(val)) { var result = []; val.forEach(function (val2) { if (val2 === undefined) { return; } if (val2 === null) { result.push(encodeStr(key)); } else { result.push(encodeStr(key) + '=' + encodeStr(val2)); } }); return result.join('&'); } return encodeStr(key) + '=' + encodeStr(val); }).filter(function (x) {return x.length > 0;}).join('&') : null; return res ? "?".concat(res) : ''; } function parseBaseComponent(vueComponentOptions) {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1]; var options = _objectSpread({ multipleSlots: true, addGlobalClass: true }, vueOptions.options || {}); { // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项 if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) { Object.assign(options, vueOptions['mp-weixin'].options); } } var componentOptions = { options: options, data: initData(vueOptions, _vue.default.prototype), behaviors: initBehaviors(vueOptions, initBehavior), properties: initProperties(vueOptions.props, false, vueOptions.__file, options), lifetimes: { attached: function attached() { var properties = this.properties; var options = { mpType: isPage.call(this) ? 'page' : 'component', mpInstance: this, propsData: properties }; initVueIds(properties.vueId, this); // 处理父子关系 initRelation.call(this, { vuePid: this._$vuePid, vueOptions: options }); // 初始化 vue 实例 this.$vm = new VueComponent(options); // 处理$slots,$scopedSlots(暂不支持动态变化$slots) initSlots(this.$vm, properties.vueSlots); // 触发首次 setData this.$vm.$mount(); }, ready: function ready() { // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发 // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800 if (this.$vm) { this.$vm._isMounted = true; this.$vm.__call_hook('mounted'); this.$vm.__call_hook('onReady'); } }, detached: function detached() { this.$vm && this.$vm.$destroy(); } }, pageLifetimes: { show: function show(args) { this.$vm && this.$vm.__call_hook('onPageShow', args); }, hide: function hide() { this.$vm && this.$vm.__call_hook('onPageHide'); }, resize: function resize(size) { this.$vm && this.$vm.__call_hook('onPageResize', size); } }, methods: { __l: handleLink, __e: handleEvent } }; // externalClasses if (vueOptions.externalClasses) { componentOptions.externalClasses = vueOptions.externalClasses; } if (Array.isArray(vueOptions.wxsCallMethods)) { vueOptions.wxsCallMethods.forEach(function (callMethod) { componentOptions.methods[callMethod] = function (args) { return this.$vm[callMethod](args); }; }); } if (isPage) { return componentOptions; } return [componentOptions, VueComponent]; } function parseComponent(vueComponentOptions) { return parseBaseComponent(vueComponentOptions, { isPage: isPage, initRelation: initRelation }); } var hooks$1 = [ 'onShow', 'onHide', 'onUnload']; hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS); function parseBasePage(vuePageOptions, _ref6) {var isPage = _ref6.isPage,initRelation = _ref6.initRelation; var pageOptions = parseComponent(vuePageOptions); initHooks(pageOptions.methods, hooks$1, vuePageOptions); pageOptions.methods.onLoad = function (query) { this.options = query; var copyQuery = Object.assign({}, query); delete copyQuery.__id__; this.$page = { fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) }; this.$vm.$mp.query = query; // 兼容 mpvue this.$vm.__call_hook('onLoad', query); }; return pageOptions; } function parsePage(vuePageOptions) { return parseBasePage(vuePageOptions, { isPage: isPage, initRelation: initRelation }); } function createPage(vuePageOptions) { { return Component(parsePage(vuePageOptions)); } } function createComponent(vueOptions) { { return Component(parseComponent(vueOptions)); } } function createSubpackageApp(vm) { var appOptions = parseApp(vm); var app = getApp({ allowDefault: true }); vm.$scope = app; var globalData = app.globalData; if (globalData) { Object.keys(appOptions.globalData).forEach(function (name) { if (!hasOwn(globalData, name)) { globalData[name] = appOptions.globalData[name]; } }); } Object.keys(appOptions).forEach(function (name) { if (!hasOwn(app, name)) { app[name] = appOptions[name]; } }); if (isFn(appOptions.onShow) && wx.onAppShow) { wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];} vm.__call_hook('onShow', args); }); } if (isFn(appOptions.onHide) && wx.onAppHide) { wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];} vm.__call_hook('onHide', args); }); } if (isFn(appOptions.onLaunch)) { var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync(); vm.__call_hook('onLaunch', args); } return vm; } function createPlugin(vm) { var appOptions = parseApp(vm); if (isFn(appOptions.onShow) && wx.onAppShow) { wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];} vm.__call_hook('onShow', args); }); } if (isFn(appOptions.onHide) && wx.onAppHide) { wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];} vm.__call_hook('onHide', args); }); } if (isFn(appOptions.onLaunch)) { var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync(); vm.__call_hook('onLaunch', args); } return vm; } todos.forEach(function (todoApi) { protocols[todoApi] = false; }); canIUses.forEach(function (canIUseApi) { var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi; if (!wx.canIUse(apiName)) { protocols[canIUseApi] = false; } }); var uni = {}; if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') { uni = new Proxy({}, { get: function get(target, name) { if (hasOwn(target, name)) { return target[name]; } if (baseApi[name]) { return baseApi[name]; } if (api[name]) { return promisify(name, api[name]); } { if (extraApi[name]) { return promisify(name, extraApi[name]); } if (todoApis[name]) { return promisify(name, todoApis[name]); } } if (eventApi[name]) { return eventApi[name]; } if (!hasOwn(wx, name) && !hasOwn(protocols, name)) { return; } return promisify(name, wrapper(name, wx[name])); }, set: function set(target, name, value) { target[name] = value; return true; } }); } else { Object.keys(baseApi).forEach(function (name) { uni[name] = baseApi[name]; }); { Object.keys(todoApis).forEach(function (name) { uni[name] = promisify(name, todoApis[name]); }); Object.keys(extraApi).forEach(function (name) { uni[name] = promisify(name, todoApis[name]); }); } Object.keys(eventApi).forEach(function (name) { uni[name] = eventApi[name]; }); Object.keys(api).forEach(function (name) { uni[name] = promisify(name, api[name]); }); Object.keys(wx).forEach(function (name) { if (hasOwn(wx, name) || hasOwn(protocols, name)) { uni[name] = promisify(name, wrapper(name, wx[name])); } }); } wx.createApp = createApp; wx.createPage = createPage; wx.createComponent = createComponent; wx.createSubpackageApp = createSubpackageApp; wx.createPlugin = createPlugin; var uni$1 = uni;var _default = uni$1;exports.default = _default; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 2))) /***/ }), /***/ 10: /*!*************************************************************************!*\ !*** D:/workspace/project_forwork/bizdbKLY_app/lib/goeasy-2.2.4.min.js ***! \*************************************************************************/ /*! no static exports found */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(uni) {!function (e, t) { true ? module.exports = t() : undefined;}(window, function () {return function (e) {var t = {};function n(o) {if (t[o]) return t[o].exports;var r = t[o] = { i: o, l: !1, exports: {} };return e[o].call(r.exports, r, r.exports, n), r.l = !0, r.exports;}return n.m = e, n.c = t, n.d = function (e, t, o) {n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: o });}, n.r = function (e) {"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 });}, n.t = function (e, t) {if (1 & t && (e = n(e)), 8 & t) return e;if (4 & t && "object" == typeof e && e && e.__esModule) return e;var o = Object.create(null);if (n.r(o), Object.defineProperty(o, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var r in e) {n.d(o, r, function (t) {return e[t];}.bind(null, r));}return o;}, n.n = function (e) {var t = e && e.__esModule ? function () {return e["default"];} : function () {return e;};return n.d(t, "a", t), t;}, n.o = function (e, t) {return Object.prototype.hasOwnProperty.call(e, t);}, n.p = "", n(n.s = 32);}([function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.noop = t.GoEasyDomainNumber = t.goEasyArray = t.UUID = t.calibrator = undefined;var o = n(35),r = n(61),i = n(65),s = n(36);t.calibrator = o.calibrator, t.UUID = r.UUID, t.goEasyArray = i.goEasyArray, t.GoEasyDomainNumber = s.GoEasyDomainNumber, t.noop = function () {};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t["default"] = { WRITE: "WRITE", READ: "READ", NONE: "NONE" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t["default"] = { "default": "default", text: "text", image: "image", video: "video", audio: "audio", emoji: "emoji", file: "file" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(0),s = n(1),a = (o = s) && o.__esModule ? o : { "default": o };var u = function () {function e(t) {var n = this;!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.uuid = null, this.name = "", this.params = null, this.success = null, this.fail = null, this.permission = a["default"].NONE, this.singleTimeout = 0, this.totalTimeout = 0, this.startTime = 0, this.complete = !1, this.retried = 0, this.uuid = i.UUID.get(), this.name = t.name, this.params = t.params, this.permission = t.permission, this.totalTimeout = t.totalTimeout, this.singleTimeout = t.singleTimeout, this.success = function (e) {n.complete || (n.complete = !0, t.success(e));}, this.fail = function (e) {n.complete || (n.complete = !0, t.fail(e));};}return r(e, [{ key: "start", value: function value() {this.startTime = Date.now();} }, { key: "isTimeout", value: function value() {return this.startTime + this.totalTimeout < Date.now();} }]), e;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t.SocketTimeout = { connect: 1500, reconnectionDelayMax: 3e3, commonQuerySingle: 2500, commonQueryTotal: 12e3, commonRequestSingle: 1700, commonRequestTotal: 12e3, commonInfiniteSingle: 1700, commonInfiniteTotal: 864e5 };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t.EmitType = { authorize: "authorize", manualDisconnect: "manualDisconnect", subscribe: "subscribe", unsubscribe: "unsubscribe", publish: "publish", ack: "ack", historyMessages: "historyMessages", hereNow: "hereNow", hereNowByUserIds: "hereNowByUserIds", imLastConversations: "imLastConversations", markPrivateMessageAsRead: "markPrivateMessageAsRead", markGroupMessageAsRead: "markGroupMessageAsRead", imGroupOnlineCount: "imGroupOnlineCount", imHereNow: "imHereNow", imGroupHereNow: "imGroupHereNow", publishIM: "publishIM", imHistory: "imHistory", subscribeUserPresence: "subscribeUserPresence", unsubscribeUserPresence: "unsubscribeUserPresence", subscribeGroupPresence: "subscribeGroupPresence", unsubscribeGroupPresence: "unsubscribeGroupPresence", removeConversation: "removeConversation", topConversation: "topConversation", imData: "imData", subscribeGroups: "subscribeGroups", unsubscribeGroup: "unsubscribeGroup" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.str = t.noop = t.GoEasyDomainNumber = t.goEasyArray = t.UUID = t.calibrator = undefined;var o = n(69),r = n(0);t.calibrator = r.calibrator, t.UUID = r.UUID, t.goEasyArray = r.goEasyArray, t.GoEasyDomainNumber = r.GoEasyDomainNumber, t.noop = r.noop, t.str = o.str;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.Conversion = t.ConversationType = t.Conversations = undefined;var o = n(38),r = n(23),i = n(107);t.Conversations = i.Conversations, t.ConversationType = r.ConversationType, t.Conversion = o.Conversion;}, function (e, t, n) {"use strict";e.exports = function () {return function () {};};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t["default"] = { DISCONNECTED: "disconnected", DISCONNECTING: "disconnecting", CONNECTING: "connecting", CONNECTED: "connected", RECONNECTING: "reconnecting", RECONNECTED: "reconnected", EXPIRED_RECONNECTED: "reconnected", CONNECT_FAILED: "connect_failed" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.ImEventType = t.eventCenter = undefined;var o = n(33),r = n(34);t.eventCenter = o.eventCenter, t.ImEventType = r.ImEventType;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.im = t.IM = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(7),i = n(68),s = w(n(2)),a = w(n(80)),u = w(n(96)),c = w(n(43)),l = w(n(97)),f = w(n(98)),p = w(n(99)),d = w(n(100)),h = w(n(101)),y = w(n(102)),v = w(n(103)),b = w(n(104)),m = w(n(106)),g = n(33);function w(e) {return e && e.__esModule ? e : { "default": e };}var _ = t.IM = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this._event = g.eventCenter, this._goEasyUploader = null, this._goEasySocket = null, this._dataCache = null, this._messageSender = null, this._history = null, this._conversations = null, this._iMReceiver = null, this._groupMessageReceive = null, this._groupPresenceSubscriber = null, this._groupOnlineCount = null, this._groupHereNow = null, this._privateMessageReceive = null, this._userPresenceSubscriber = null, this._userHereNow = null;}return o(e, [{ key: "on", value: function value(e, t) {this._event.on(e, t);} }, { key: "initialBeforeConnect", value: function value(t) {e.userId = t.id, e.userData = t.data, this._dataCache = new m["default"](this, t), this._messageSender = new a["default"](this), this._history = new u["default"](this), this._goEasyUploader = new c["default"](this), this._userHereNow = new y["default"](this), this._groupHereNow = new v["default"](this), this._groupOnlineCount = new p["default"](this);} }, { key: "initialAfterConnect", value: function value() {this._iMReceiver = new b["default"](this), this._conversations = new r.Conversations(this), this._groupPresenceSubscriber = new d["default"](this), this._groupMessageReceive = new l["default"](this), this._userPresenceSubscriber = new h["default"](this), this._privateMessageReceive = new f["default"](this);} }, { key: "initialGoEasySocket", value: function value(e) {this._goEasySocket = e;} }, { key: "createTextMessage", value: function value(e) {return i.messageCreator.create(s["default"].text, e);} }, { key: "createImageMessage", value: function value(e) {return i.messageCreator.create(s["default"].image, e);} }, { key: "createFileMessage", value: function value(e) {return i.messageCreator.create(s["default"].file, e);} }, { key: "createAudioMessage", value: function value(e) {return i.messageCreator.create(s["default"].audio, e);} }, { key: "createVideoMessage", value: function value(e) {return i.messageCreator.create(s["default"].video, e);} }, { key: "createCustomMessage", value: function value(e) {return i.messageCreator.create(e.type, e);} }, { key: "latestConversations", value: function value() {return this._conversations ? this._conversations.latestConversations() : Promise.reject({ code: 500, content: "Please connect GoEasyIM first." });} }, { key: "groupMarkAsRead", value: function value(e, t) {return this._conversations.groupMarkAsRead(e, t);} }, { key: "privateMarkAsRead", value: function value(e, t) {return this._conversations.privateMarkAsRead(e, t);} }, { key: "removePrivateConversation", value: function value(e) {return this._conversations.removeConversation(e, r.ConversationType.PRIVATE);} }, { key: "removeGroupConversation", value: function value(e) {return this._conversations.removeConversation(e, r.ConversationType.GROUP);} }, { key: "topPrivateConversation", value: function value(e, t) {return this._conversations.topConversation(e, t, r.ConversationType.PRIVATE);} }, { key: "topGroupConversation", value: function value(e, t) {return this._conversations.topConversation(e, t, r.ConversationType.GROUP);} }, { key: "history", value: function value(e) {return this._history.history(e);} }, { key: "upload", value: function value(e, t, n) {return this._goEasyUploader.upload(e, t, n);} }, { key: "sendSystemMessage", value: function value(e, t) {return this._messageSender.send(e, t, r.ConversationType.SYSTEM);} }, { key: "sendMessage", value: function value(e) {return this._messageSender.sendMessage(e);} }, { key: "sendPrivateMessage", value: function value(e, t) {return this._messageSender.send(e, t, r.ConversationType.PRIVATE);} }, { key: "subscribeUserPresence", value: function value(e) {return this._userPresenceSubscriber.presence(e);} }, { key: "unsubscribeUserPresence", value: function value(e) {return this._userPresenceSubscriber.unPresence(e);} }, { key: "hereNow", value: function value(e) {return this._userHereNow.hereNow(e, r.ConversationType.PRIVATE);} }, { key: "sendGroupMessage", value: function value(e, t) {return this._messageSender.send(e, t, r.ConversationType.GROUP);} }, { key: "subscribeGroup", value: function value(e) {return this._groupMessageReceive.subscribe(e);} }, { key: "unsubscribeGroup", value: function value(e) {return this._groupMessageReceive.unsubscribe(e);} }, { key: "subscribeGroupPresence", value: function value(e) {return this._groupPresenceSubscriber.presence(e);} }, { key: "unsubscribeGroupPresence", value: function value(e) {return this._groupPresenceSubscriber.unPresence(e);} }, { key: "groupHereNow", value: function value(e) {return this._groupHereNow.hereNow(e);} }, { key: "groupOnlineCount", value: function value(e) {return this._groupOnlineCount.get(e);} }]), e;}();_.version = null, _.userId = undefined, _.userData = null;var E = new _();t.im = E;}, function (e, t, n) {function o(e) {if (e) return function (e) {for (var t in o.prototype) {e[t] = o.prototype[t];}return e;}(e);}e.exports = o, o.prototype.on = o.prototype.addEventListener = function (e, t) {return this._callbacks = this._callbacks || {}, (this._callbacks["$" + e] = this._callbacks["$" + e] || []).push(t), this;}, o.prototype.once = function (e, t) {function n() {this.off(e, n), t.apply(this, arguments);}return n.fn = t, this.on(e, n), this;}, o.prototype.off = o.prototype.removeListener = o.prototype.removeAllListeners = o.prototype.removeEventListener = function (e, t) {if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;var n,o = this._callbacks["$" + e];if (!o) return this;if (1 == arguments.length) return delete this._callbacks["$" + e], this;for (var r = 0; r < o.length; r++) {if ((n = o[r]) === t || n.fn === t) {o.splice(r, 1);break;}}return this;}, o.prototype.emit = function (e) {this._callbacks = this._callbacks || {};var t = [].slice.call(arguments, 1),n = this._callbacks["$" + e];if (n) for (var o = 0, r = (n = n.slice(0)).length; o < r; ++o) {n[o].apply(this, t);}return this;}, o.prototype.listeners = function (e) {return this._callbacks = this._callbacks || {}, this._callbacks["$" + e] || [];}, o.prototype.hasListeners = function (e) {return !!this.listeners(e).length;};}, function (e, t, n) {"use strict";var o = n(116),r = n(52),i = n(120),s = n(121);"undefined" != typeof navigator && /Android/i.test(navigator.userAgent), "undefined" != typeof navigator && /PhantomJS/i.test(navigator.userAgent);t.protocol = 3;var a = t.packets = { open: 0, close: 1, ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6 },u = o(a),c = { type: "error", data: "parser error" },l = n(122);t.encodePacket = function (e, t, n, o) {"function" == typeof t && (o = t, t = !1), "function" == typeof n && (o = n, n = null);e.data === undefined ? undefined : e.data.buffer || e.data;var r = a[e.type];return undefined !== e.data && (r += n ? s.encode(String(e.data), { strict: !1 }) : String(e.data)), o("" + r);}, t.decodePacket = function (e, t, n) {if (e === undefined) return c;if ("string" == typeof e) {if (n && !1 === (e = function (e) {try {e = s.decode(e, { strict: !1 });} catch (t) {return !1;}return e;}(e))) return c;var o = e.charAt(0);return Number(o) == o && u[o] ? e.length > 1 ? { type: u[o], data: e.substring(1) } : { type: u[o] } : c;}o = new Uint8Array(e)[0];var r = sliceBuffer(e, 1);return l && "blob" === t && (r = new l([r])), { type: u[o], data: r };}, t.encodePayload = function (e, n, o) {"function" == typeof n && (o = n, n = null);var s = r(e);if (!e.length) return o("0:");!function (e, t, n) {for (var o = new Array(e.length), r = i(e.length, n), s = function s(e, n, r) {t(n, function (t, n) {o[e] = n, r(t, o);});}, a = 0; a < e.length; a++) {s(a, e[a], r);}}(e, function (e, o) {t.encodePacket(e, !!s && n, !0, function (e) {o(null, function (e) {return e.length + ":" + e;}(e));});}, function (e, t) {return o(t.join(""));});}, t.decodePayload = function (e, n, o) {var r;if ("function" == typeof n && (o = n, n = null), "" === e) return o(c, 0, 1);for (var i, s, a = "", u = 0, l = e.length; u < l; u++) {var f = e.charAt(u);if (":" === f) {if ("" === a || a != (i = Number(a))) return o(c, 0, 1);if (a != (s = e.substr(u + 1, i)).length) return o(c, 0, 1);if (s.length) {if (r = t.decodePacket(s, n, !0), c.type === r.type && c.data === r.data) return o(c, 0, 1);if (!1 === o(r, u + i, l)) return;}u += i, a = "";} else a += f;}return "" !== a ? o(c, 0, 1) : void 0;};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(11),i = n(0),s = (u(n(2)), u(n(19))),a = n(7);function u(e) {return e && e.__esModule ? e : { "default": e };}var c = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.type = "", this.to = { type: null, id: null, data: null }, this.timestamp = Date.now(), this.senderId = null, this.payload = null, this.messageId = i.UUID.get(), this.status = s["default"]["new"], this.validate(t), this.setSenderId(), this.setType(t), this.setNotification(t), this.setPayload(t), this.setTo(t), this.setData();}return o(e, [{ key: "validate", value: function value(e) {if (!i.calibrator.isObject(e)) throw Error("it is an empty message.");} }, { key: "setType", value: function value(e) {throw Error("Abstract method");} }, { key: "setNotification", value: function value(e) {if (e.notification) {if (!i.calibrator.isObject(e.notification)) throw Error("notification require an object.");if (i.calibrator.isEmpty(e.notification.title)) throw Error("notification's title is empty.");if (i.calibrator.isEmpty(e.notification.body)) throw Error("notification's body is empty.");if (e.notification.title.length > 32) throw Error("notification's title over max length 32");if (e.notification.body.length > 50) throw Error("notification's body over max length 50");this.notification = e.notification;}} }, { key: "setPayload", value: function value(e) {this.payload = Object.create(null);} }, { key: "setSenderId", value: function value() {if (!r.IM.userId) throw Error("please call connect() first.");this.senderId = r.IM.userId;} }, { key: "setTo", value: function value(e) {this.to = e.to;} }, { key: "setData", value: function value() {this.to && this.to.type == a.ConversationType.GROUP && (this.senderData = r.IM.userData);} }]), e;}();t["default"] = c;}, function (e, t, n) {"use strict";(function (e) {var n,o = this && this.__values || function (e) {var t = "function" == typeof Symbol && Symbol.iterator,n = t && e[t],o = 0;if (n) return n.call(e);if (e && "number" == typeof e.length) return { next: function next() {return e && o >= e.length && (e = void 0), { value: e && e[o++], done: !e };} };throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");};t.__esModule = !0, t.FrameworkDetector = t.Framework = void 0, function (e) {e.UNIAPP = "UNIAPP", e.REACT_NATIVE = "REACT_NATIVE", e.TARO = "TARO", e.IONIC = "IONIC", e.NATIVE_APPLET_WX = "NATIVE_APPLET_WX", e.NATIVE_APPLET_ALIPAY = "NATIVE_APPLET_ALIPAY", e.UNKNOWN = "UNKNOWN";}(n = t.Framework || (t.Framework = {}));var r = function () {function t() {var e, t, r;this.framework = null, this.methods = ((e = {})[n.UNIAPP] = this.isUniApp, e[n.REACT_NATIVE] = this.isReactNative, e[n.NATIVE_APPLET_WX] = this.isWXApplet, e);var i = this.methods,s = Object.keys(i);try {for (var a = o(s), u = a.next(); !u.done; u = a.next()) {var c = u.value;if ((0, i[c])()) {this.framework = c;break;}}} catch (l) {t = { error: l };} finally {try {u && !u.done && (r = a["return"]) && r.call(a);} finally {if (t) throw t.error;}}this.framework = this.framework || n.UNKNOWN, this.framework;}return t.currentFramework = function () {return this.instance.framework;}, t.prototype.isUniApp = function () {return "object" == typeof uni && !!uni.getSystemInfoSync;}, t.prototype.isReactNative = function () {return void 0 !== e && e.__fbGenNativeModule;}, t.prototype.isTaro = function () {return !1;}, t.prototype.isWXApplet = function () {return "undefined" != typeof wx && wx.getLocation && "undefined" == typeof uni;}, t.instance = new t(), t;}();t.FrameworkDetector = r;}).call(this, n(25));}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(0),s = n(7),a = n(19),u = (o = a) && o.__esModule ? o : { "default": o };var c = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return r(e, null, [{ key: "assemble", value: function value(e) {if (!i.calibrator.isDef(e)) return null;try {var t = Object.create(null);return t.type = e.mt, t.timestamp = e.ts, t.senderId = e.s, t.payload = JSON.parse(e.p), t.messageId = e.i, t.status = u["default"].success, e.t == s.ConversationType.GROUP ? (t.groupId = e.r, t.senderData = e.d ? JSON.parse(e.d) : {}) : t.receiverId = e.r, t;} catch (n) {throw Error(n);}} }]), e;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t["default"] = { message: "message", imMessage: "imMessage", userPresence: "userPresence", groupPresence: "groupPresence" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = function l(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : l(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},s = n(24),a = (o = s) && o.__esModule ? o : { "default": o },u = n(6);var c = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, a["default"]), r(t, [{ key: "validate", value: function value(e) {if (i(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e), !u.calibrator.isDef(e.file)) throw Error("file is empty.");} }, { key: "setPayload", value: function value(e) {i(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t["default"] = { "new": "new", sending: "sending", success: "success", fail: "fail" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = function l(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : l(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},s = n(6),a = n(24),u = (o = a) && o.__esModule ? o : { "default": o };var c = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, u["default"]), r(t, [{ key: "validate", value: function value(e) {if (i(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e), !s.calibrator.isDef(e.file)) throw Error("file is empty.");} }, { key: "setPayload", value: function value(e) {i(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = function c(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : c(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},s = n(24),a = (o = s) && o.__esModule ? o : { "default": o };var u = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, a["default"]), r(t, [{ key: "validate", value: function value(e) {if (i(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e), !(e.file instanceof File)) throw Error("wrong file type.");if (0 == e.file.size) throw Error("File size is 0.");if (e.file.size > 31457280) throw Error("message-length limit 30mib");} }, { key: "setPayload", value: function value(e) {i(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e), this.payload.contentType = e.file.type, this.payload.name = e.file.name, this.payload.size = e.file.size;var n = (window.URL || window.webkitURL).createObjectURL(e.file);this.payload.url = n;} }]), t;}();t["default"] = u;}, function (e, t) {t.encode = function (e) {var t = "";for (var n in e) {e.hasOwnProperty(n) && (t.length && (t += "&"), t += encodeURIComponent(n) + "=" + encodeURIComponent(e[n]));}return t;}, t.decode = function (e) {for (var t = {}, n = e.split("&"), o = 0, r = n.length; o < r; o++) {var i = n[o].split("=");t[decodeURIComponent(i[0])] = decodeURIComponent(i[1]);}return t;};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t.ConversationType = { GROUP: "group", PRIVATE: "private" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function c(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : c(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = a(n(14)),s = a(n(2));function a(e) {return e && e.__esModule ? e : { "default": e };}var u = function (e) {function t(e) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t);var n = function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));return n.file = null, n.onProgress = null, n.setFile(e.file), n.setOnProgress(e.onProgress), n;}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "validate", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);} }, { key: "setPayload", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e), this.payload.size = "", this.payload.contentType = "", this.payload.name = "", this.payload.url = "";} }, { key: "setType", value: function value(e) {this.type = s["default"].file;} }, { key: "setFile", value: function value(e) {this.file = e;} }, { key: "setOnProgress", value: function value(e) {this.onProgress = e;} }]), t;}();t["default"] = u;}, function (e, t) {var n;n = function () {return this;}();try {n = n || new Function("return this")();} catch (o) {"object" == typeof window && (n = window);}e.exports = n;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}();var r = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return o(e, [{ key: "upload", value: function value(e) {throw Error("Not implementation yet.");} }]), e;}();t["default"] = r;}, function (e, t, n) {"use strict";t.__esModule = !0, t.GoEasyEventCenter = void 0;var o = n(105),r = function () {function e() {}return e.on = function (t, n) {e.eventDriver.on(t, n);}, e.fire = function (t, n) {e.eventDriver.fire(t, n);}, e.eventDriver = new o.EmitterEventDriver(), e;}();t.GoEasyEventCenter = r;}, function (e, t, n) {"use strict";n(8)("socket.io-parser");var o = n(12),r = n(49);function i() {}t.protocol = 4, t.types = ["CONNECT", "DISCONNECT", "EVENT", "ACK", "ERROR", "BINARY_EVENT", "BINARY_ACK"], t.CONNECT = 0, t.DISCONNECT = 1, t.EVENT = 2, t.ACK = 3, t.ERROR = 4, t.BINARY_EVENT = 5, t.BINARY_ACK = 6, t.Encoder = i, t.Decoder = a;var s = t.ERROR + '"encode error"';function a() {this.reconstructor = null;}function u(e) {this.reconPack = e, this.buffers = [];}function c(e) {return { type: t.ERROR, data: "parser error: " + e };}i.prototype.encode = function (e, n) {n([function (e) {var n = "" + e.type;t.BINARY_EVENT !== e.type && t.BINARY_ACK !== e.type || (n += e.attachments + "-");e.nsp && "/" !== e.nsp && (n += e.nsp + ",");null != e.id && (n += e.id);if (null != e.data) {var o = function (e) {try {return JSON.stringify(e);} catch (t) {return !1;}}(e.data);if (!1 === o) return s;n += o;}return n;}(e)]);}, o(a.prototype), a.prototype.add = function (e) {var n;if ("string" != typeof e) throw new Error("Unknown type: " + e);n = function (e) {var n = 0,o = { type: Number(e.charAt(0)) };if (null == t.types[o.type]) return c("unknown packet type " + o.type);if (t.BINARY_EVENT === o.type || t.BINARY_ACK === o.type) {for (var i = ""; "-" !== e.charAt(++n) && (i += e.charAt(n), n != e.length);) {;}if (i != Number(i) || "-" !== e.charAt(n)) throw new Error("Illegal attachments");o.attachments = Number(i);}if ("/" === e.charAt(n + 1)) for (o.nsp = ""; ++n;) {var s = e.charAt(n);if ("," === s) break;if (o.nsp += s, n === e.length) break;} else o.nsp = "/";var a = e.charAt(n + 1);if ("" !== a && Number(a) == a) {for (o.id = ""; ++n;) {var s = e.charAt(n);if (null == s || Number(s) != s) {--n;break;}if (o.id += e.charAt(n), n === e.length) break;}o.id = Number(o.id);}if (e.charAt(++n)) {var u = function (e) {try {return JSON.parse(e);} catch (t) {return !1;}}(e.substr(n)),l = !1 !== u && (o.type === t.ERROR || r(u));if (!l) return c("invalid payload");o.data = u;}return o;}(e), this.emit("decoded", n);}, a.prototype.destroy = function () {this.reconstructor && this.reconstructor.finishedReconstruction();}, u.prototype.takeBinaryData = function (e) {if (this.buffers.push(e), this.buffers.length === this.reconPack.attachments) {var t = binary.reconstructPacket(this.reconPack, this.buffers);return this.finishedReconstruction(), t;}return null;}, u.prototype.finishedReconstruction = function () {this.reconPack = null, this.buffers = [];};}, function (e, t, n) {"use strict";var o = n(13),r = n(12);function i(e) {this.path = e.path, this.hostname = e.hostname, this.port = e.port, this.secure = e.secure, this.query = e.query, this.timestampParam = e.timestampParam, this.timestampRequests = e.timestampRequests, this.readyState = "", this.agent = e.agent || !1, this.socket = e.socket, this.enablesXDR = e.enablesXDR, this.pfx = e.pfx, this.key = e.key, this.passphrase = e.passphrase, this.cert = e.cert, this.ca = e.ca, this.ciphers = e.ciphers, this.rejectUnauthorized = e.rejectUnauthorized, this.forceNode = e.forceNode, this.isReactNative = e.isReactNative, this.extraHeaders = e.extraHeaders, this.localAddress = e.localAddress;}e.exports = i, r(i.prototype), i.prototype.onError = function (e, t) {var n = new Error(e);return n.type = "TransportError", n.description = t, this.emit("error", n), this;}, i.prototype.open = function () {return "closed" !== this.readyState && "" !== this.readyState || (this.readyState = "opening", this.doOpen()), this;}, i.prototype.close = function () {return "opening" !== this.readyState && "open" !== this.readyState || (this.doClose(), this.onClose()), this;}, i.prototype.send = function (e) {if ("open" !== this.readyState) throw new Error("Transport not open");this.write(e);}, i.prototype.onOpen = function () {this.readyState = "open", this.writable = !0, this.emit("open");}, i.prototype.onData = function (e) {var t = o.decodePacket(e, this.socket.binaryType);this.onPacket(t);}, i.prototype.onPacket = function (e) {this.emit("packet", e);}, i.prototype.onClose = function () {this.readyState = "closed", this.emit("close");};}, function (e, t) {e.exports = function (e, t) {var n = function n() {};n.prototype = t.prototype, e.prototype = new n(), e.prototype.constructor = e;};}, function (e, t, n) {"use strict";var o,r = this && this.__values || function (e) {var t = "function" == typeof Symbol && Symbol.iterator,n = t && e[t],o = 0;if (n) return n.call(e);if (e && "number" == typeof e.length) return { next: function next() {return e && o >= e.length && (e = void 0), { value: e && e[o++], done: !e };} };throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");};t.__esModule = !0, t.PlatformDetector = t.Platform = void 0, function (e) {e.BROWSER = "BROWSER", e.UNKNOWN = "UNKNOWN", e.APP_IOS = "APP_IOS", e.APP_ANDROID = "APP_ANDROID", e.APPLET_WX = "APPLET_WX", e.APPLET_ALIPAY = "APPLET_ALIPAY", e.APPLET_BYTEDANCE = "APPLET_BYTEDANCE";}(o = t.Platform || (t.Platform = {}));var i = function () {function e() {var e, t, n;this.platform = null, this.methods = ((e = {})[o.BROWSER] = this.isBrowser, e[o.APP_IOS] = this.isAppiOS, e[o.APP_ANDROID] = this.isAppAndroid, e[o.APPLET_WX] = this.isWXApplet, e);var i = this.methods,s = Object.keys(i);try {for (var a = r(s), u = a.next(); !u.done; u = a.next()) {var c = u.value;if ((0, i[c])()) {this.platform = c;break;}}} catch (l) {t = { error: l };} finally {try {u && !u.done && (n = a["return"]) && n.call(a);} finally {if (t) throw t.error;}}this.platform = this.platform || o.UNKNOWN, this.platform;}return e.currentPlatform = function () {return e.instance.platform;}, e.prototype.isBrowser = function () {return "undefined" != typeof navigator && "undefined" != typeof document && !!document.getElementById;}, e.prototype.isAppiOS = function () {return "object" == typeof uni && !!uni.getSystemInfoSync && "ios" === uni.getSystemInfoSync().platform && "object" == typeof plus;}, e.prototype.isAppAndroid = function () {return "object" == typeof uni && !!uni.getSystemInfoSync && "android" === uni.getSystemInfoSync().platform && "object" == typeof plus;}, e.prototype.isWXApplet = function () {return "object" == typeof wx && !!wx.getSystemInfoSync && "undefined" == typeof WebSocket && "undefined" == typeof XMLHttpRequest && "undefined" == typeof plus;}, e.prototype.isAlipayApplet = function () {return !1;}, e.prototype.isBytedanceApplet = function () {return !1;}, e.prototype.isQQApplet = function () {return !1;}, e.prototype.isBaiduApplet = function () {return !1;}, e.instance = new e(), e;}();t.PlatformDetector = i;}, function (e, t, n) {"use strict";t.__esModule = !0, t.GoEasyIM = t.PubSub = t.MessageStatus = void 0;var o = n(10),r = n(7),i = n(9),s = n(108),a = n(0),u = n(133),c = n(11),l = n(134),f = n(135),p = n(136),d = n(137),h = n(139),y = n(141);!function (e) {e["new"] = "new", e.sending = "sending", e.success = "success", e.fail = "fail";}(t.MessageStatus || (t.MessageStatus = {}));var v = function () {function e(e) {this.options = null, this.goEasySocket = null, this.publisher = null, this.subscriber = null, this.presence = null, this.histories = null, this.hereNows = null, this.neverConnect = !0, this.options = e;}return e.prototype.initialGoEasySocket = function (e) {this.goEasySocket = e, this.subscriber.initialGoEasySocket(), this.presence.initialGoEasySocket();}, e.prototype.initialBeforeConnect = function () {this.neverConnect = !1, this.publisher = new p["default"](this), this.subscriber = new d["default"](this), this.histories = new l["default"](this), this.presence = new h["default"](this), this.hereNows = new f["default"](this);}, e.prototype.validateOptions = function () {var e = this.options;if (!e.modules || !e.modules.includes(u.ModuleType.PUBSUB)) throw Error("Invalid options: module '" + u.ModuleType.PUBSUB + "' is not enabled");}, e.prototype.publish = function (e) {this.validateOptions(), this.publisher.publish(e);}, e.prototype.subscribe = function (e) {this.validateOptions(), this.subscriber.subscribe(e);}, e.prototype.unsubscribe = function (e) {this.validateOptions(), this.subscriber.unsubscribe(e);}, e.prototype.subscribePresence = function (e) {this.validateOptions(), this.presence.subscribePresence(e);}, e.prototype.unsubscribePresence = function (e) {this.validateOptions(), this.presence.unsubscribePresence(e);}, e.prototype.history = function (e) {this.validateOptions(), this.histories.get(e);}, e.prototype.hereNow = function (e) {this.validateOptions(), this.hereNows.byChannel(e);}, e.prototype.hereNowByUserIds = function (e) {this.validateOptions(), this.hereNows.byUserId(e);}, e.instance = null, e;}();t.PubSub = v;var b = function () {function e(e) {this.options = e;}return e.prototype.initialBeforeConnect = function (e) {c.im.initialBeforeConnect(e);}, e.prototype.initialAfterConnect = function () {c.im.initialAfterConnect();}, e.prototype.initialGoEasySocket = function (e) {c.im.initialGoEasySocket(e);}, e.prototype.validateOptions = function () {var e = this.options;if (!e.modules || !e.modules.includes(u.ModuleType.IM)) throw Error("Invalid options: module '" + u.ModuleType.IM + "' is not enabled");}, e.prototype.validateMessageToData = function (e) {if (!a.calibrator.isObject(e.to)) throw { code: 400, content: "TypeError: to requires an object." };if (!a.calibrator.isObject(e.to.data)) throw { code: 400, content: "TypeError: to.data requires an object." };}, e.prototype.on = function (e, t) {this.validateOptions(), c.im.on(e, t);}, e.prototype.createTextMessage = function (e) {if (this.validateOptions(), this.validateMessageToData(e), !a.calibrator.isString(e.text)) throw { code: 400, content: "TypeError: text requires string." };return c.im.createTextMessage(e);}, e.prototype.createImageMessage = function (e) {return this.validateOptions(), this.validateMessageToData(e), c.im.createImageMessage(e);}, e.prototype.createFileMessage = function (e) {return this.validateOptions(), this.validateMessageToData(e), c.im.createFileMessage(e);}, e.prototype.createAudioMessage = function (e) {return this.validateOptions(), this.validateMessageToData(e), c.im.createAudioMessage(e);}, e.prototype.createVideoMessage = function (e) {return this.validateOptions(), this.validateMessageToData(e), c.im.createVideoMessage(e);}, e.prototype.createCustomMessage = function (e) {if (this.validateOptions(), this.validateMessageToData(e), !a.calibrator.isObject(e.payload)) throw { code: 400, content: "TypeError: payload requires an object." };return c.im.createCustomMessage(e);}, e.prototype.latestConversations = function (e) {this.validateOptions(), c.im.latestConversations().then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.removePrivateConversation = function (e) {this.validateOptions(), c.im.removePrivateConversation(e.userId).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess();})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.removeGroupConversation = function (e) {this.validateOptions(), c.im.removeGroupConversation(e.groupId).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess();})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.history = function (e) {this.validateOptions();var t = Object.assign(e, { friendId: e.userId });c.im.history(t).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.upload = function (e) {this.validateOptions(), c.im.upload(e.file, e.name, e.onProgress).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.sendMessage = function (e) {this.validateOptions(), c.im.sendMessage(e).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.markGroupMessageAsRead = function (e) {this.validateOptions(), c.im.groupMarkAsRead(e.groupId, e.timestamp).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.markPrivateMessageAsRead = function (e) {this.validateOptions(), c.im.privateMarkAsRead(e.userId, e.timestamp).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.topPrivateConversation = function (e) {this.validateOptions(), c.im.topPrivateConversation(e.userId, e.top).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess();})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.topGroupConversation = function (e) {this.validateOptions(), c.im.topGroupConversation(e.groupId, e.top).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess();})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.subscribeUserPresence = function (e) {this.validateOptions(), c.im.subscribeUserPresence(e.userIds).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.unsubscribeUserPresence = function (e) {this.validateOptions(), c.im.unsubscribeUserPresence(e.userId).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.hereNow = function (e) {this.validateOptions(), c.im.hereNow(e).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.subscribeGroup = function (e) {this.validateOptions(), c.im.subscribeGroup(e).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.unsubscribeGroup = function (e) {this.validateOptions(), c.im.unsubscribeGroup(e.groupId).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.subscribeGroupPresence = function (e) {this.validateOptions(), c.im.subscribeGroupPresence(e.groupIds).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.unsubscribeGroupPresence = function (e) {this.validateOptions(), c.im.unsubscribeGroupPresence(e.groupId).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.groupHereNow = function (e) {this.validateOptions(), c.im.groupHereNow(e.groupId).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.groupOnlineCount = function (e) {this.validateOptions(), c.im.groupOnlineCount(e.groupId).then(function (t) {a.calibrator.isFunction(e.onSuccess) && e.onSuccess(t);})["catch"](function (t) {a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e;}();t.GoEasyIM = b;var m = function () {function e(t) {if (this.im = null, this.pubsub = null, this.goEasySocket = null, this.notification = null, null !== e.instance && e.instance.getConnectionStatus() !== i["default"].DISCONNECTED) return e.instance;this.validateOptions(t), this.options = t, this.pubsub = new v(this.options), this.im = new b(this.options), this.notification = new y.GoEasyNotification(this.options.allowNotification);}return e.getInstance = function (t) {return null === e.instance && (e.instance = new e(t)), e.instance;}, e.prototype.connect = function (e) {this.getConnectionStatus() !== i["default"].DISCONNECTED && a.calibrator.isObject(e) && a.calibrator.isFunction(e.onFailed) ? e.onFailed({ code: 408, content: "It is already connected, don't try again until disconnect() is called. " }) : (this.confirmUserId(e), this.pubsub.initialBeforeConnect(), this.im.initialBeforeConnect({ id: e.id, data: e.data }), this.goEasySocket = new s["default"](this.options, e), this.im.initialGoEasySocket(this.goEasySocket), this.goEasySocket.connect(this.notification), this.pubsub.initialGoEasySocket(this.goEasySocket), this.im.initialAfterConnect());}, e.prototype.disconnect = function (e) {this.goEasySocket.disconnect(e).then(function () {a.calibrator.isObject(e) && a.calibrator.isFunction(e.onSuccess) && e.onSuccess();})["catch"](function (t) {a.calibrator.isObject(e) && a.calibrator.isFunction(e.onFailed) && e.onFailed(t);});}, e.prototype.getConnectionStatus = function () {return this.goEasySocket ? this.goEasySocket.getStatus() : i["default"].DISCONNECTED;}, e.prototype.validateOptions = function (e) {var t = "";if (!a.calibrator.isObject(e)) throw t = "options is require an object.", Error(t);if (!a.calibrator.isPrimitive(e.appkey) || 0 == e.appkey.length) throw t = "Invalid options:'host' is empty.", Error(t);if (!a.calibrator.isPrimitive(e.host) || 0 == e.host.length) throw t = "Invalid options:'host' is empty.", Error(t);if (!a.calibrator.isArray(e.modules)) throw t = "Invalid options: 'modules' must be nonempty array", Error(t);var n = [u.ModuleType.IM, u.ModuleType.PUBSUB],o = e.modules.map(function (e) {var o = e.toUpperCase();if (!n.includes(o)) throw t = "Invalid options: module '" + e + "' is not support", Error(t);return o;});e.modules = o;}, e.prototype.onClickNotification = function (e) {this.notification.onClickNotification(e);}, e.prototype.confirmUserId = function (e) {if (this.options.modules.includes(u.ModuleType.IM) && (a.calibrator.isEmpty(e.id) || !a.calibrator.isStringOrNumber(e.id))) throw { code: 400, content: "TypeError: id requires number or string." };}, e.instance = null, e.version = "2.2.4", e.IM_EVENT = o.ImEventType, e.IM_SCENE = r.ConversationType, e;}();t["default"] = m;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.eventCenter = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(34),i = n(0);var s = new (function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.subs = null, this.subs = Object.create(null);}return o(e, [{ key: "on", value: function value(e, t) {if (!i.calibrator.isString(e)) throw Error("eventType require a string.");if (!i.calibrator.isDef(r.ImEventType[e])) throw Error("event not found.");if (!i.calibrator.isFunction(t)) throw Error("event require a callback.");this.subs[e] = t;} }, { key: "notify", value: function value(e, t) {var n = this.subs[e];n && n(t);} }]), e;}())();t.eventCenter = s;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t.ImEventType = { PRIVATE_MESSAGE_RECEIVED: "PRIVATE_MESSAGE_RECEIVED", GROUP_MESSAGE_RECEIVED: "GROUP_MESSAGE_RECEIVED", SYSTEM_MESSAGE_RECEIVED: "SYSTEM_MESSAGE_RECEIVED", CONVERSATIONS_UPDATED: "CONVERSATIONS_UPDATED", CONNECTED: "CONNECTED", CONNECTING: "CONNECTING", DISCONNECTED: "DISCONNECTED", USER_PRESENCE: "USER_PRESENCE", GROUP_PRESENCE: "GROUP_PRESENCE" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {return typeof e;} : function (e) {return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;},r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}();var i = new (function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return r(e, [{ key: "isUndef", value: function value(e) {return e === undefined || null === e;} }, { key: "isTrue", value: function value(e) {return !0 === e;} }, { key: "isFalse", value: function value(e) {return !1 === e;} }, { key: "isPrimitive", value: function value(e) {return "string" == typeof e || "number" == typeof e || "symbol" === (void 0 === e ? "undefined" : o(e)) || "boolean" == typeof e;} }, { key: "isDef", value: function value(e) {return e !== undefined && null !== e;} }, { key: "isObject", value: function value(e) {return null !== e && "object" === (void 0 === e ? "undefined" : o(e));} }, { key: "isPlainObject", value: function value(e) {return "[object Object]" === Object.prototype.toString.call(e);} }, { key: "isRegExp", value: function value(e) {return "[object RegExp]" === Object.prototype.toString.call(e);} }, { key: "isValidArrayIndex", value: function value(e) {var t = parseFloat(String(e));return t >= 0 && Math.floor(t) === t && isFinite(e);} }, { key: "isStringOrNumber", value: function value(e) {return "string" == typeof e || "number" == typeof e;} }, { key: "isString", value: function value(e) {return "string" == typeof e;} }, { key: "isNumber", value: function value(e) {return "number" == typeof e;} }, { key: "isArray", value: function value(e) {return "[object Array]" == Object.prototype.toString.call(e);} }, { key: "isEmpty", value: function value(e) {return this.isArray(e) ? 0 == e.length : this.isObject(e) ? !this.isDef(e) : !this.isNumber(e) && (this.isString(e) ? "" == e.trim() : !this.isDef(e));} }, { key: "isNative", value: function value(e) {return "function" == typeof e && /native code/.test(e.toString());} }, { key: "isFunction", value: function value(e) {return "function" == typeof e;} }]), e;}())();t.calibrator = i;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.GoEasyDomainNumber = undefined;var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(66),s = (o = i) && o.__esModule ? o : { "default": o },a = n(37);var u = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return r(e, null, [{ key: "refreshNumber", value: function value() {var t = e.GOEASY_DOMAIN_NUMBER,n = a.LocalStorageDispatcher.localStorage(),o = Math.floor(Math.random() * (s["default"].maxNumber - 1) + 1);return null !== n && (o = parseInt(n.get(t)) || o), o > 0 && o < s["default"].maxNumber ? o += 1 : o == s["default"].maxNumber && (o = 1), null !== n && n.put(t, o), o;} }]), e;}();u.GOEASY_DOMAIN_NUMBER = "GOEASY_DOMAIN_NUMBER", t.GoEasyDomainNumber = u;}, function (e, t, n) {"use strict";var o = this && this.__values || function (e) {var t = "function" == typeof Symbol && Symbol.iterator,n = t && e[t],o = 0;if (n) return n.call(e);if (e && "number" == typeof e.length) return { next: function next() {return e && o >= e.length && (e = void 0), { value: e && e[o++], done: !e };} };throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");};t.__esModule = !0, t.LocalStorageDispatcher = void 0;var r = n(67),i = function () {function e() {this.domain = null;this.domain = "undefined" != typeof location && /^(?:[A-za-z0-9-]+\.)+[A-za-z]{2,4}(?:[\/\?#][\/=\?%\-&~`@[\]\':+!\.#\w]*)?$/.test(location.host) ? location.host.split(".").slice(-2).join(".") : null;}return e.prototype.get = function (e) {var t = r.Cookie.get(e) || null;return JSON.parse(t);}, e.prototype.put = function (e, t) {var n = new Date(2030, 12, 31, 0, 0, 0, 0),o = this.domain;r.Cookie.set(e, JSON.stringify(t), n, o);}, e.prototype.remove = function (e) {var t = this.domain;r.Cookie.remove(e, t);}, e.prototype.support = function () {return navigator && !0 === navigator.cookieEnabled;}, e;}(),s = function () {function e() {}return e.prototype.get = function (e) {var t = localStorage.getItem(e);return JSON.parse(t);}, e.prototype.put = function (e, t) {var n = localStorage.setItem(e, JSON.stringify(t));JSON.stringify(n);}, e.prototype.remove = function (e) {localStorage.removeItem(e);}, e.prototype.support = function () {return !("undefined" == typeof localStorage || !localStorage.setItem);}, e;}(),a = function () {function e() {}return e.prototype.get = function (e) {var t = uni.getStorageSync(e) || null;return JSON.parse(t);}, e.prototype.put = function (e, t) {uni.setStorageSync(e, JSON.stringify(t));}, e.prototype.remove = function (e) {uni.removeStorageSync(e);}, e.prototype.support = function () {return !("object" != typeof uni || !uni.getStorageSync);}, e;}(),u = function () {function e() {}return e.prototype.get = function (e) {var t = wx.getStorageSync(e) || null;return JSON.parse(t);}, e.prototype.put = function (e, t) {wx.setStorageSync(e, JSON.stringify(t));}, e.prototype.remove = function (e) {wx.removeStorageSync(e);}, e.prototype.support = function () {return !("object" != typeof wx || !wx.getStorageSync);}, e;}(),c = (function () {function e() {}e.prototype.get = function (e) {var t = my.getStorageSync(e) || null;return JSON.parse(t);}, e.prototype.put = function (e, t) {my.setStorageSync(e, JSON.stringify(t));}, e.prototype.remove = function (e) {my.removeStorageSync(e);}, e.prototype.support = function () {return !("undefined" == typeof my || !my.getStorageSync);};}(), function () {function e() {}e.prototype.get = function (e) {var t = qq.getStorageSync(e) || null;return JSON.parse(t);}, e.prototype.put = function (e, t) {qq.setStorageSync(e, JSON.stringify(t));}, e.prototype.remove = function (e) {qq.removeStorageSync(e);}, e.prototype.support = function () {return !("undefined" == typeof qq || !qq.getStorageSync);};}(), function () {function e() {}e.prototype.get = function (e) {var t = tt.getStorageSync(e) || null;return JSON.parse(t);}, e.prototype.put = function (e, t) {tt.setStorageSync(e, JSON.stringify(t));}, e.prototype.remove = function (e) {tt.removeStorageSync(e);}, e.prototype.support = function () {return !("object" != typeof tt || !tt.getStorageSync);};}(), function () {function e() {}e.prototype.get = function (e) {var t = swan.getStorageSync(e) || null;return JSON.parse(t);}, e.prototype.put = function (e, t) {swan.setStorageSync(e, JSON.stringify(t));}, e.prototype.remove = function (e) {swan.removeStorageSync(e);}, e.prototype.support = function () {return !("undefined" == typeof swan || !swan.getStorageSync);};}(), function () {function e() {this.api = e.dispatch(), this.api;}e.dispatch = function () {var e = new s(),t = new i();return e.support() ? e : t;}, e.prototype.get = function (e) {return this.api.get(e);}, e.prototype.put = function (e, t) {this.api.put(e, t);}, e.prototype.remove = function (e) {this.api.remove(e);}, e.prototype.support = function () {return "undefined" != typeof localStorage;};}(), function () {function e() {this.supportedStorage = null;var t = e.storages;t.push(new a()), t.push(new s()), t.push(new u()), t.push(new i()), this.dispatch(), this.supportedStorage;}return e.localStorage = function () {return this.instance.supportedStorage;}, e.prototype.dispatch = function () {var t, n;try {for (var r = o(e.storages), i = r.next(); !i.done; i = r.next()) {var s = i.value;if (s.support()) {this.supportedStorage = s;break;}}} catch (a) {t = { error: a };} finally {try {i && !i.done && (n = r["return"]) && n.call(r);} finally {if (t) throw t.error;}}}, e.storages = new Array(), e.instance = new e(), e;}());t.LocalStorageDispatcher = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.Conversion = undefined;var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(23),s = n(11),a = n(16),u = (o = a) && o.__esModule ? o : { "default": o };t.Conversion = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.type = "", this.lastMessage = null, this.unread = 0, this.top = !1, this.data = null, this.lc = 0, this.lm = 0;}return r(e, null, [{ key: "buildByInMessage", value: function value(t) {var n = new e();return n.data = {}, n.type = t.t, n.lastMessage = u["default"].assemble(t), n.lc = n.lastMessage.timestamp - 1, n.lm = n.lastMessage.timestamp, n.unread = 0, t.t == i.ConversationType.GROUP ? n.groupId = t.r : s.IM.userId == t.r ? n.userId = t.s : n.userId = t.r, n;} }, { key: "buildByOutMessage", value: function value(t, n, o, r) {var s = new e();return s.type = n, s.lastMessage = t, s.lm = s.lastMessage.timestamp, s.lc = s.lm, s.unread = 0, n == i.ConversationType.GROUP ? (s.groupId = o, s.lastMessage.groupId = o) : (s.userId = o, s.lastMessage.receiverId = o), s;} }, { key: "buildByConversation", value: function value(t, n) {var o = new e();o.type = n.t, n.lmsg.t = n.t, o.lastMessage = u["default"].assemble(n.lmsg), o.unread = 0, o.lc = n.lcts, o.lm = o.lastMessage.timestamp, o.top = n.top || !1;var r = n.d ? JSON.parse(n.d) : {};return o.data = r, n.t == i.ConversationType.GROUP ? (o.groupId = n.g, t.putGroupData(o.groupId, r)) : (o.userId = n.uid, t.putUserData(o.userId, r), s.IM.userId == n.lmsg.s ? o.lastMessage.senderData = s.IM.userData : o.lastMessage.senderData = r), o;} }]), e;}();}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = a(n(14)),i = a(n(2)),s = n(0);function a(e) {return e && e.__esModule ? e : { "default": e };}var u = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, r["default"]), o(t, [{ key: "validate", value: function value(e) {if (s.calibrator.isEmpty(e.text) || "" == e.text.trim()) throw Error("text is empty");} }, { key: "setType", value: function value(e) {this.type = i["default"].text;} }, { key: "setPayload", value: function value(e) {(function n(e, t, o) {null === e && (e = Function.prototype);var r = Object.getOwnPropertyDescriptor(e, t);if (r === undefined) {var i = Object.getPrototypeOf(e);return null === i ? undefined : n(i, t, o);}if ("value" in r) return r.value;var s = r.get;return s === undefined ? undefined : s.call(o);})(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e), this.payload.text = e.text;} }]), t;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}();var r = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return o(e, [{ key: "build", value: function value() {throw Error("Not implementation yet.");} }]), e;}();t["default"] = r;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = u(n(42)),i = u(n(2)),s = u(n(43)),a = u(n(40));function u(e) {return e && e.__esModule ? e : { "default": e };}var c = function (e) {function t(e) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t);var n = function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return n.im = null, n.goEasyUploader = new s["default"](e), n;}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, a["default"]), o(t, [{ key: "build", value: function value(e) {var t = this;return new Promise(function (n, o) {var i = new r["default"]();t.upload(e).then(function (t) {var o = t.content,r = o === undefined ? {} : o;(i = e.payload).url = r.url, i.name = r.newFileName, n(i);})["catch"](function (e) {o(e);});});} }, { key: "upload", value: function value(e) {var t = e.type == i["default"].video ? e.payload.video.name : e.payload.name;return this.goEasyUploader.upload(e.file, t, e.onProgress, e.type);} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t["default"] = function o(e) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, o);};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(86),s = n(90),a = (o = s) && o.__esModule ? o : { "default": o };var u = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.requestBuilder = null, this.fileUploader = i.fileUploader, this.requestBuilder = new a["default"](t);}return r(e, [{ key: "upload", value: function value(e, t, n, o) {var r = this;return new Promise(function (i, s) {r.requestBuilder.build(e, t, o).then(function (e) {i(r.doUpload(e, n));})["catch"](function (e) {s(e);});});} }, { key: "customizeUpload", value: function value(e, t) {this.doUpload(e, t);} }, { key: "doUpload", value: function value(e, t) {return this.fileUploader.upload(e, t);} }]), e;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t["default"] = function o(e, t, n, r, i) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, o), this.host = "", this.headers = {}, this.parameters = {}, this.file = {}, this.payload = {}, this.host = e, this.headers = t, this.parameters = n, this.file = r, this.payload = i;};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}();var r = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return o(e, [{ key: "build", value: function value(e, t) {} }, { key: "newFileName", value: function value(e) {return e && e.newFilename || "";} }]), e;}();t["default"] = r;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t.IM_INTERNAL_EVENTS = { IM_INTERNAL: "IM_INTERNAL_", MESSAGE_RECEIVED: "IM_INTERNAL_MESSAGE_RECEIVED" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = c(n(9)),i = c(n(1)),s = c(n(109)),a = c(n(110)),u = n(0);function c(e) {return e && e.__esModule ? e : { "default": e };}var l = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.io = a["default"], this.status = r["default"].DISCONNECTED, this.permissions = [i["default"].NONE], this.emitter = null, this.connectedObservers = [], this.disconnectedObservers = [], this.emitter = new s["default"](this);}return o(e, [{ key: "connect", value: function value() {this.status = r["default"].CONNECTING;} }, { key: "emit", value: function value(e) {this.emitter.emit(e);} }, { key: "doEmit", value: function value(e, t, n) {} }, { key: "on", value: function value(e, t) {this.io.on(e, t);} }, { key: "disconnect", value: function value() {this.io.disconnect();} }, { key: "getStatus", value: function value() {return this.status;} }, { key: "addConnectedObserver", value: function value(e) {u.calibrator.isFunction(e) && this.connectedObservers.push(e);} }, { key: "addDisconnectedObserver", value: function value(e) {u.calibrator.isFunction(e) && this.disconnectedObservers.push(e);} }, { key: "notify", value: function value(e, t) {for (var n = 0; n < e.length; n++) {e[n](t);}} }]), e;}();t["default"] = l;}, function (e, t) {var n = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,o = ["source", "protocol", "authority", "userInfo", "user", "password", "host", "port", "relative", "path", "directory", "file", "query", "anchor"];e.exports = function (e) {var t = e,r = e.indexOf("["),i = e.indexOf("]");-1 != r && -1 != i && (e = e.substring(0, r) + e.substring(r, i).replace(/:/g, ";") + e.substring(i, e.length));for (var s = n.exec(e || ""), a = {}, u = 14; u--;) {a[o[u]] = s[u] || "";}return -1 != r && -1 != i && (a.source = t, a.host = a.host.substring(1, a.host.length - 1).replace(/;/g, ":"), a.authority = a.authority.replace("[", "").replace("]", "").replace(/;/g, ":"), a.ipv6uri = !0), a;};}, function (e, t) {var n = {}.toString;e.exports = Array.isArray || function (e) {return "[object Array]" == n.call(e);};}, function (e, t, n) {"use strict";var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {return typeof e;} : function (e) {return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;},r = n(112),i = n(56),s = n(12),a = n(28),u = n(57),c = n(58),l = (n(8)("socket.io-client:manager"), n(55)),f = n(128),p = n(36).GoEasyDomainNumber,d = Object.prototype.hasOwnProperty;function h(e, t) {if (!(this instanceof h)) return new h(e, t);e && "object" === (void 0 === e ? "undefined" : o(e)) && (t = e, e = undefined), (t = t || {}).path = t.path || "/socket.io", this.nsps = {}, this.subs = [], this.opts = t, this.reconnection(!1 !== t.reconnection), this.reconnectionAttempts(t.reconnectionAttempts || Infinity), this.reconnectionDelay(t.reconnectionDelay || 1e3), this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3), this.randomizationFactor(t.randomizationFactor || .5), this.backoff = new f({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor() }), this.timeout(null == t.timeout ? 2e4 : t.timeout), this.readyState = "closed", this.uri = e, this.connecting = [], this.lastPing = null, this.encoding = !1, this.packetBuffer = [];var n = t.parser || a;this.encoder = new n.Encoder(), this.decoder = new n.Decoder(), this.autoConnect = !1 !== t.autoConnect, this.autoConnect && this.open();}function y() {var e = !1;return "object" === ("undefined" == typeof uni ? "undefined" : o(uni)) && uni.getSystemInfo && (e = !0), e && !0 === getApp().uniAppRunningBackend;}e.exports = h, h.prototype.emitAll = function () {for (var e in this.emit.apply(this, arguments), this.nsps) {d.call(this.nsps, e) && this.nsps[e].emit.apply(this.nsps[e], arguments);}}, h.prototype.updateSocketIds = function () {for (var e in this.nsps) {d.call(this.nsps, e) && (this.nsps[e].id = this.generateId(e));}}, h.prototype.generateId = function (e) {return ("/" === e ? "" : e + "#") + this.engine.id;}, s(h.prototype), h.prototype.reconnection = function (e) {return arguments.length ? (this._reconnection = !!e, this) : this._reconnection;}, h.prototype.reconnectionAttempts = function (e) {return arguments.length ? (this._reconnectionAttempts = e, this) : this._reconnectionAttempts;}, h.prototype.reconnectionDelay = function (e) {return arguments.length ? (this._reconnectionDelay = e, this.backoff && this.backoff.setMin(e), this) : this._reconnectionDelay;}, h.prototype.randomizationFactor = function (e) {return arguments.length ? (this._randomizationFactor = e, this.backoff && this.backoff.setJitter(e), this) : this._randomizationFactor;}, h.prototype.reconnectionDelayMax = function (e) {return arguments.length ? (this._reconnectionDelayMax = e, this.backoff && this.backoff.setMax(e), this) : this._reconnectionDelayMax;}, h.prototype.timeout = function (e) {return arguments.length ? (this._timeout = e, this) : this._timeout;}, h.prototype.maybeReconnectOnOpen = function () {!this.reconnecting && this._reconnection && 0 === this.backoff.attempts && this.reconnect();}, h.prototype.open = h.prototype.connect = function (e, t) {if (this.readyState, ~this.readyState.indexOf("open")) return this;this.uri, this.engine = r(this.uri, this.opts);var n = this.engine,o = this;this.readyState = "opening", this.skipReconnect = !1;var i = u(n, "open", function () {o.onopen(), e && e();}),s = u(n, "error", function (t) {if ("undefined" != typeof window) {var n = parseInt(o.uri.match(/[1-9][0-9]*/g)[0]),r = p.refreshNumber();o.uri = o.uri.replace(n, r);}if (o.cleanup(), o.readyState = "closed", o.emitAll("connect_error", t), e) {var i = new Error("Connection error");i.data = t, e(i);} else o.maybeReconnectOnOpen();});if (!1 !== this._timeout) {var a = this._timeout,c = setTimeout(function () {i.destroy(), n.close(), n.emit("error", "timeout"), o.emitAll("connect_timeout", a);}, a);this.subs.push({ destroy: function destroy() {clearTimeout(c);} });}return this.subs.push(i), this.subs.push(s), this;}, h.prototype.onopen = function () {this.cleanup(), this.readyState = "open", this.emit("open");var e = this.engine;this.subs.push(u(e, "data", c(this, "ondata"))), this.subs.push(u(e, "ping", c(this, "onping"))), this.subs.push(u(e, "pong", c(this, "onpong"))), this.subs.push(u(e, "error", c(this, "onerror"))), this.subs.push(u(e, "close", c(this, "onclose"))), this.subs.push(u(this.decoder, "decoded", c(this, "ondecoded")));}, h.prototype.onping = function () {this.lastPing = new Date(), this.emitAll("ping");}, h.prototype.onpong = function () {this.emitAll("pong", new Date() - this.lastPing);}, h.prototype.ondata = function (e) {this.decoder.add(e);}, h.prototype.ondecoded = function (e) {this.emit("packet", e);}, h.prototype.onerror = function (e) {this.emitAll("error", e);}, h.prototype.socket = function (e, t) {var n = this.nsps[e];if (!n) {n = new i(this, e, t), this.nsps[e] = n;var o = this;n.on("connecting", r), n.on("connect", function () {n.id = o.generateId(e);}), this.autoConnect && r();}function r() {~l(o.connecting, n) || o.connecting.push(n);}return n;}, h.prototype.destroy = function (e) {var t = l(this.connecting, e);~t && this.connecting.splice(t, 1), this.connecting.length || this.close();}, h.prototype.packet = function (e) {var t = this;e.query && 0 === e.type && (e.nsp += "?" + e.query), t.encoding ? t.packetBuffer.push(e) : (t.encoding = !0, this.encoder.encode(e, function (n) {for (var o = 0; o < n.length; o++) {t.engine.write(n[o], e.options);}t.encoding = !1, t.processPacketQueue();}));}, h.prototype.processPacketQueue = function () {if (this.packetBuffer.length > 0 && !this.encoding) {var e = this.packetBuffer.shift();this.packet(e);}}, h.prototype.cleanup = function () {for (var e = this.subs.length, t = 0; t < e; t++) {this.subs.shift().destroy();}this.packetBuffer = [], this.encoding = !1, this.lastPing = null, this.decoder.destroy();}, h.prototype.close = h.prototype.disconnect = function () {this.skipReconnect = !0, this.reconnecting = !1, "opening" === this.readyState && this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.engine && this.engine.close();}, h.prototype.onclose = function (e) {this.cleanup(), this.backoff.reset(), this.readyState = "closed", this.emit("close", e), this._reconnection && !this.skipReconnect && this.reconnect();}, h.prototype.reconnect = function () {if (y(), this.reconnecting || this.skipReconnect) return this;var e = this;if (this.backoff.attempts >= this._reconnectionAttempts) this.backoff.reset(), this.emitAll("reconnect_failed"), this.reconnecting = !1;else {var t = this.backoff.duration();this.reconnecting = !0;var n = setTimeout(function () {e.skipReconnect || (e.emitAll("reconnect_attempt", e.backoff.attempts), e.emitAll("reconnecting", e.backoff.attempts), e.skipReconnect || (y() ? (e.reconnecting = !1, e.reconnect(), e.emitAll("reconnect_error", "Uniapp running backend, skipped reconnect...")) : e.open(function (t) {t ? (e.reconnecting = !1, e.reconnect(), e.emitAll("reconnect_error", t.data)) : e.onreconnect();})));}, t);this.subs.push({ destroy: function destroy() {clearTimeout(n);} });}}, h.prototype.onreconnect = function () {var e = this.backoff.attempts;this.reconnecting = !1, this.backoff.reset(), this.updateSocketIds(), this.emitAll("reconnect", e);};}, function (e, t, n) {"use strict";var o = n(114),r = n(125);t.polling = function (e) {var t = !1,n = !1;e.jsonp;if ("undefined" != typeof location) {var r = "https:" === location.protocol,i = location.port;i || (i = r ? 443 : 80), t = e.hostname !== location.hostname || i !== e.port, n = e.secure !== r;}return e.xdomain = t, e.xscheme = n, new o(e);}, t.websocket = r;}, function (e, t, n) {(function (t) {var o = n(49),r = Object.prototype.toString,i = "function" == typeof Blob || "undefined" != typeof Blob && "[object BlobConstructor]" === r.call(Blob),s = "function" == typeof File || "undefined" != typeof File && "[object FileConstructor]" === r.call(File);e.exports = function a(e) {if (!e || "object" != typeof e) return !1;if (o(e)) {for (var n = 0, r = e.length; n < r; n++) {if (a(e[n])) return !0;}return !1;}if ("function" == typeof t && t.isBuffer && t.isBuffer(e) || "function" == typeof ArrayBuffer && e instanceof ArrayBuffer || i && e instanceof Blob || s && e instanceof File) return !0;if (e.toJSON && "function" == typeof e.toJSON && 1 === arguments.length) return a(e.toJSON(), !0);for (var u in e) {if (Object.prototype.hasOwnProperty.call(e, u) && a(e[u])) return !0;}return !1;};}).call(this, n(53).Buffer);}, function (e, t, n) {"use strict";(function (e) { /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var o = n(117),r = n(118),i = n(119);function s() {return u.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;}function a(e, t) {if (s() < t) throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = u.prototype : (null === e && (e = new u(t)), e.length = t), e;}function u(e, t, n) {if (!(u.TYPED_ARRAY_SUPPORT || this instanceof u)) return new u(e, t, n);if ("number" == typeof e) {if ("string" == typeof t) throw new Error("If encoding is specified then the first argument must be a string");return f(this, e);}return c(this, e, t, n);}function c(e, t, n, o) {if ("number" == typeof t) throw new TypeError('"value" argument must not be a number');return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function (e, t, n, o) {if (t.byteLength, n < 0 || t.byteLength < n) throw new RangeError("'offset' is out of bounds");if (t.byteLength < n + (o || 0)) throw new RangeError("'length' is out of bounds");t = n === undefined && o === undefined ? new Uint8Array(t) : o === undefined ? new Uint8Array(t, n) : new Uint8Array(t, n, o);u.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = u.prototype : e = p(e, t);return e;}(e, t, n, o) : "string" == typeof t ? function (e, t, n) {"string" == typeof n && "" !== n || (n = "utf8");if (!u.isEncoding(n)) throw new TypeError('"encoding" must be a valid string encoding');var o = 0 | h(t, n),r = (e = a(e, o)).write(t, n);r !== o && (e = e.slice(0, r));return e;}(e, t, n) : function (e, t) {if (u.isBuffer(t)) {var n = 0 | d(t.length);return 0 === (e = a(e, n)).length ? e : (t.copy(e, 0, 0, n), e);}if (t) {if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length" in t) return "number" != typeof t.length || (o = t.length) != o ? a(e, 0) : p(e, t);if ("Buffer" === t.type && i(t.data)) return p(e, t.data);}var o;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");}(e, t);}function l(e) {if ("number" != typeof e) throw new TypeError('"size" argument must be a number');if (e < 0) throw new RangeError('"size" argument must not be negative');}function f(e, t) {if (l(t), e = a(e, t < 0 ? 0 : 0 | d(t)), !u.TYPED_ARRAY_SUPPORT) for (var n = 0; n < t; ++n) {e[n] = 0;}return e;}function p(e, t) {var n = t.length < 0 ? 0 : 0 | d(t.length);e = a(e, n);for (var o = 0; o < n; o += 1) {e[o] = 255 & t[o];}return e;}function d(e) {if (e >= s()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + s().toString(16) + " bytes");return 0 | e;}function h(e, t) {if (u.isBuffer(e)) return e.length;if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer)) return e.byteLength;"string" != typeof e && (e = "" + e);var n = e.length;if (0 === n) return 0;for (var o = !1;;) {switch (t) {case "ascii":case "latin1":case "binary":return n;case "utf8":case "utf-8":case undefined:return q(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2 * n;case "hex":return n >>> 1;case "base64":return L(e).length;default:if (o) return q(e).length;t = ("" + t).toLowerCase(), o = !0;}}}function y(e, t, n) {var o = e[t];e[t] = e[n], e[n] = o;}function v(e, t, n, o, r) {if (0 === e.length) return -1;if ("string" == typeof n ? (o = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = r ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {if (r) return -1;n = e.length - 1;} else if (n < 0) {if (!r) return -1;n = 0;}if ("string" == typeof t && (t = u.from(t, o)), u.isBuffer(t)) return 0 === t.length ? -1 : b(e, t, n, o, r);if ("number" == typeof t) return t &= 255, u.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : b(e, [t], n, o, r);throw new TypeError("val must be string, number or Buffer");}function b(e, t, n, o, r) {var i,s = 1,a = e.length,u = t.length;if (o !== undefined && ("ucs2" === (o = String(o).toLowerCase()) || "ucs-2" === o || "utf16le" === o || "utf-16le" === o)) {if (e.length < 2 || t.length < 2) return -1;s = 2, a /= 2, u /= 2, n /= 2;}function c(e, t) {return 1 === s ? e[t] : e.readUInt16BE(t * s);}if (r) {var l = -1;for (i = n; i < a; i++) {if (c(e, i) === c(t, -1 === l ? 0 : i - l)) {if (-1 === l && (l = i), i - l + 1 === u) return l * s;} else -1 !== l && (i -= i - l), l = -1;}} else for (n + u > a && (n = a - u), i = n; i >= 0; i--) {for (var f = !0, p = 0; p < u; p++) {if (c(e, i + p) !== c(t, p)) {f = !1;break;}}if (f) return i;}return -1;}function m(e, t, n, o) {n = Number(n) || 0;var r = e.length - n;o ? (o = Number(o)) > r && (o = r) : o = r;var i = t.length;if (i % 2 != 0) throw new TypeError("Invalid hex string");o > i / 2 && (o = i / 2);for (var s = 0; s < o; ++s) {var a = parseInt(t.substr(2 * s, 2), 16);if (isNaN(a)) return s;e[n + s] = a;}return s;}function g(e, t, n, o) {return G(q(t, e.length - n), e, n, o);}function w(e, t, n, o) {return G(function (e) {for (var t = [], n = 0; n < e.length; ++n) {t.push(255 & e.charCodeAt(n));}return t;}(t), e, n, o);}function _(e, t, n, o) {return w(e, t, n, o);}function E(e, t, n, o) {return G(L(t), e, n, o);}function O(e, t, n, o) {return G(function (e, t) {for (var n, o, r, i = [], s = 0; s < e.length && !((t -= 2) < 0); ++s) {n = e.charCodeAt(s), o = n >> 8, r = n % 256, i.push(r), i.push(o);}return i;}(t, e.length - n), e, n, o);}function k(e, t, n) {return 0 === t && n === e.length ? o.fromByteArray(e) : o.fromByteArray(e.slice(t, n));}function S(e, t, n) {n = Math.min(e.length, n);for (var o = [], r = t; r < n;) {var i,s,a,u,c = e[r],l = null,f = c > 239 ? 4 : c > 223 ? 3 : c > 191 ? 2 : 1;if (r + f <= n) switch (f) {case 1:c < 128 && (l = c);break;case 2:128 == (192 & (i = e[r + 1])) && (u = (31 & c) << 6 | 63 & i) > 127 && (l = u);break;case 3:i = e[r + 1], s = e[r + 2], 128 == (192 & i) && 128 == (192 & s) && (u = (15 & c) << 12 | (63 & i) << 6 | 63 & s) > 2047 && (u < 55296 || u > 57343) && (l = u);break;case 4:i = e[r + 1], s = e[r + 2], a = e[r + 3], 128 == (192 & i) && 128 == (192 & s) && 128 == (192 & a) && (u = (15 & c) << 18 | (63 & i) << 12 | (63 & s) << 6 | 63 & a) > 65535 && u < 1114112 && (l = u);}null === l ? (l = 65533, f = 1) : l > 65535 && (l -= 65536, o.push(l >>> 10 & 1023 | 55296), l = 56320 | 1023 & l), o.push(l), r += f;}return function (e) {var t = e.length;if (t <= P) return String.fromCharCode.apply(String, e);var n = "",o = 0;for (; o < t;) {n += String.fromCharCode.apply(String, e.slice(o, o += P));}return n;}(o);}t.Buffer = u, t.SlowBuffer = function (e) {+e != e && (e = 0);return u.alloc(+e);}, t.INSPECT_MAX_BYTES = 50, u.TYPED_ARRAY_SUPPORT = e.TYPED_ARRAY_SUPPORT !== undefined ? e.TYPED_ARRAY_SUPPORT : function () {try {var e = new Uint8Array(1);return e.__proto__ = { __proto__: Uint8Array.prototype, foo: function foo() {return 42;} }, 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength;} catch (t) {return !1;}}(), t.kMaxLength = s(), u.poolSize = 8192, u._augment = function (e) {return e.__proto__ = u.prototype, e;}, u.from = function (e, t, n) {return c(null, e, t, n);}, u.TYPED_ARRAY_SUPPORT && (u.prototype.__proto__ = Uint8Array.prototype, u.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && u[Symbol.species] === u && Object.defineProperty(u, Symbol.species, { value: null, configurable: !0 })), u.alloc = function (e, t, n) {return function (e, t, n, o) {return l(t), t <= 0 ? a(e, t) : n !== undefined ? "string" == typeof o ? a(e, t).fill(n, o) : a(e, t).fill(n) : a(e, t);}(null, e, t, n);}, u.allocUnsafe = function (e) {return f(null, e);}, u.allocUnsafeSlow = function (e) {return f(null, e);}, u.isBuffer = function (e) {return !(null == e || !e._isBuffer);}, u.compare = function (e, t) {if (!u.isBuffer(e) || !u.isBuffer(t)) throw new TypeError("Arguments must be Buffers");if (e === t) return 0;for (var n = e.length, o = t.length, r = 0, i = Math.min(n, o); r < i; ++r) {if (e[r] !== t[r]) {n = e[r], o = t[r];break;}}return n < o ? -1 : o < n ? 1 : 0;}, u.isEncoding = function (e) {switch (String(e).toLowerCase()) {case "hex":case "utf8":case "utf-8":case "ascii":case "latin1":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return !0;default:return !1;}}, u.concat = function (e, t) {if (!i(e)) throw new TypeError('"list" argument must be an Array of Buffers');if (0 === e.length) return u.alloc(0);var n;if (t === undefined) for (t = 0, n = 0; n < e.length; ++n) {t += e[n].length;}var o = u.allocUnsafe(t),r = 0;for (n = 0; n < e.length; ++n) {var s = e[n];if (!u.isBuffer(s)) throw new TypeError('"list" argument must be an Array of Buffers');s.copy(o, r), r += s.length;}return o;}, u.byteLength = h, u.prototype._isBuffer = !0, u.prototype.swap16 = function () {var e = this.length;if (e % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");for (var t = 0; t < e; t += 2) {y(this, t, t + 1);}return this;}, u.prototype.swap32 = function () {var e = this.length;if (e % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");for (var t = 0; t < e; t += 4) {y(this, t, t + 3), y(this, t + 1, t + 2);}return this;}, u.prototype.swap64 = function () {var e = this.length;if (e % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");for (var t = 0; t < e; t += 8) {y(this, t, t + 7), y(this, t + 1, t + 6), y(this, t + 2, t + 5), y(this, t + 3, t + 4);}return this;}, u.prototype.toString = function () {var e = 0 | this.length;return 0 === e ? "" : 0 === arguments.length ? S(this, 0, e) : function (e, t, n) {var o = !1;if ((t === undefined || t < 0) && (t = 0), t > this.length) return "";if ((n === undefined || n > this.length) && (n = this.length), n <= 0) return "";if ((n >>>= 0) <= (t >>>= 0)) return "";for (e || (e = "utf8");;) {switch (e) {case "hex":return I(this, t, n);case "utf8":case "utf-8":return S(this, t, n);case "ascii":return T(this, t, n);case "latin1":case "binary":return C(this, t, n);case "base64":return k(this, t, n);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return N(this, t, n);default:if (o) throw new TypeError("Unknown encoding: " + e);e = (e + "").toLowerCase(), o = !0;}}}.apply(this, arguments);}, u.prototype.equals = function (e) {if (!u.isBuffer(e)) throw new TypeError("Argument must be a Buffer");return this === e || 0 === u.compare(this, e);}, u.prototype.inspect = function () {var e = "",n = t.INSPECT_MAX_BYTES;return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g).join(" "), this.length > n && (e += " ... ")), "";}, u.prototype.compare = function (e, t, n, o, r) {if (!u.isBuffer(e)) throw new TypeError("Argument must be a Buffer");if (t === undefined && (t = 0), n === undefined && (n = e ? e.length : 0), o === undefined && (o = 0), r === undefined && (r = this.length), t < 0 || n > e.length || o < 0 || r > this.length) throw new RangeError("out of range index");if (o >= r && t >= n) return 0;if (o >= r) return -1;if (t >= n) return 1;if (t >>>= 0, n >>>= 0, o >>>= 0, r >>>= 0, this === e) return 0;for (var i = r - o, s = n - t, a = Math.min(i, s), c = this.slice(o, r), l = e.slice(t, n), f = 0; f < a; ++f) {if (c[f] !== l[f]) {i = c[f], s = l[f];break;}}return i < s ? -1 : s < i ? 1 : 0;}, u.prototype.includes = function (e, t, n) {return -1 !== this.indexOf(e, t, n);}, u.prototype.indexOf = function (e, t, n) {return v(this, e, t, n, !0);}, u.prototype.lastIndexOf = function (e, t, n) {return v(this, e, t, n, !1);}, u.prototype.write = function (e, t, n, o) {if (t === undefined) o = "utf8", n = this.length, t = 0;else if (n === undefined && "string" == typeof t) o = t, n = this.length, t = 0;else {if (!isFinite(t)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t |= 0, isFinite(n) ? (n |= 0, o === undefined && (o = "utf8")) : (o = n, n = undefined);}var r = this.length - t;if ((n === undefined || n > r) && (n = r), e.length > 0 && (n < 0 || t < 0) || t > this.length) throw new RangeError("Attempt to write outside buffer bounds");o || (o = "utf8");for (var i = !1;;) {switch (o) {case "hex":return m(this, e, t, n);case "utf8":case "utf-8":return g(this, e, t, n);case "ascii":return w(this, e, t, n);case "latin1":case "binary":return _(this, e, t, n);case "base64":return E(this, e, t, n);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return O(this, e, t, n);default:if (i) throw new TypeError("Unknown encoding: " + o);o = ("" + o).toLowerCase(), i = !0;}}}, u.prototype.toJSON = function () {return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };};var P = 4096;function T(e, t, n) {var o = "";n = Math.min(e.length, n);for (var r = t; r < n; ++r) {o += String.fromCharCode(127 & e[r]);}return o;}function C(e, t, n) {var o = "";n = Math.min(e.length, n);for (var r = t; r < n; ++r) {o += String.fromCharCode(e[r]);}return o;}function I(e, t, n) {var o = e.length;(!t || t < 0) && (t = 0), (!n || n < 0 || n > o) && (n = o);for (var r = "", i = t; i < n; ++i) {r += B(e[i]);}return r;}function N(e, t, n) {for (var o = e.slice(t, n), r = "", i = 0; i < o.length; i += 2) {r += String.fromCharCode(o[i] + 256 * o[i + 1]);}return r;}function j(e, t, n) {if (e % 1 != 0 || e < 0) throw new RangeError("offset is not uint");if (e + t > n) throw new RangeError("Trying to access beyond buffer length");}function M(e, t, n, o, r, i) {if (!u.isBuffer(e)) throw new TypeError('"buffer" argument must be a Buffer instance');if (t > r || t < i) throw new RangeError('"value" argument is out of bounds');if (n + o > e.length) throw new RangeError("Index out of range");}function R(e, t, n, o) {t < 0 && (t = 65535 + t + 1);for (var r = 0, i = Math.min(e.length - n, 2); r < i; ++r) {e[n + r] = (t & 255 << 8 * (o ? r : 1 - r)) >>> 8 * (o ? r : 1 - r);}}function A(e, t, n, o) {t < 0 && (t = 4294967295 + t + 1);for (var r = 0, i = Math.min(e.length - n, 4); r < i; ++r) {e[n + r] = t >>> 8 * (o ? r : 3 - r) & 255;}}function D(e, t, n, o, r, i) {if (n + o > e.length) throw new RangeError("Index out of range");if (n < 0) throw new RangeError("Index out of range");}function F(e, t, n, o, i) {return i || D(e, 0, n, 4), r.write(e, t, n, o, 23, 4), n + 4;}function U(e, t, n, o, i) {return i || D(e, 0, n, 8), r.write(e, t, n, o, 52, 8), n + 8;}u.prototype.slice = function (e, t) {var n,o = this.length;if (e = ~~e, t = t === undefined ? o : ~~t, e < 0 ? (e += o) < 0 && (e = 0) : e > o && (e = o), t < 0 ? (t += o) < 0 && (t = 0) : t > o && (t = o), t < e && (t = e), u.TYPED_ARRAY_SUPPORT) (n = this.subarray(e, t)).__proto__ = u.prototype;else {var r = t - e;n = new u(r, undefined);for (var i = 0; i < r; ++i) {n[i] = this[i + e];}}return n;}, u.prototype.readUIntLE = function (e, t, n) {e |= 0, t |= 0, n || j(e, t, this.length);for (var o = this[e], r = 1, i = 0; ++i < t && (r *= 256);) {o += this[e + i] * r;}return o;}, u.prototype.readUIntBE = function (e, t, n) {e |= 0, t |= 0, n || j(e, t, this.length);for (var o = this[e + --t], r = 1; t > 0 && (r *= 256);) {o += this[e + --t] * r;}return o;}, u.prototype.readUInt8 = function (e, t) {return t || j(e, 1, this.length), this[e];}, u.prototype.readUInt16LE = function (e, t) {return t || j(e, 2, this.length), this[e] | this[e + 1] << 8;}, u.prototype.readUInt16BE = function (e, t) {return t || j(e, 2, this.length), this[e] << 8 | this[e + 1];}, u.prototype.readUInt32LE = function (e, t) {return t || j(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3];}, u.prototype.readUInt32BE = function (e, t) {return t || j(e, 4, this.length), 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);}, u.prototype.readIntLE = function (e, t, n) {e |= 0, t |= 0, n || j(e, t, this.length);for (var o = this[e], r = 1, i = 0; ++i < t && (r *= 256);) {o += this[e + i] * r;}return o >= (r *= 128) && (o -= Math.pow(2, 8 * t)), o;}, u.prototype.readIntBE = function (e, t, n) {e |= 0, t |= 0, n || j(e, t, this.length);for (var o = t, r = 1, i = this[e + --o]; o > 0 && (r *= 256);) {i += this[e + --o] * r;}return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)), i;}, u.prototype.readInt8 = function (e, t) {return t || j(e, 1, this.length), 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e];}, u.prototype.readInt16LE = function (e, t) {t || j(e, 2, this.length);var n = this[e] | this[e + 1] << 8;return 32768 & n ? 4294901760 | n : n;}, u.prototype.readInt16BE = function (e, t) {t || j(e, 2, this.length);var n = this[e + 1] | this[e] << 8;return 32768 & n ? 4294901760 | n : n;}, u.prototype.readInt32LE = function (e, t) {return t || j(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;}, u.prototype.readInt32BE = function (e, t) {return t || j(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];}, u.prototype.readFloatLE = function (e, t) {return t || j(e, 4, this.length), r.read(this, e, !0, 23, 4);}, u.prototype.readFloatBE = function (e, t) {return t || j(e, 4, this.length), r.read(this, e, !1, 23, 4);}, u.prototype.readDoubleLE = function (e, t) {return t || j(e, 8, this.length), r.read(this, e, !0, 52, 8);}, u.prototype.readDoubleBE = function (e, t) {return t || j(e, 8, this.length), r.read(this, e, !1, 52, 8);}, u.prototype.writeUIntLE = function (e, t, n, o) {(e = +e, t |= 0, n |= 0, o) || M(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);var r = 1,i = 0;for (this[t] = 255 & e; ++i < n && (r *= 256);) {this[t + i] = e / r & 255;}return t + n;}, u.prototype.writeUIntBE = function (e, t, n, o) {(e = +e, t |= 0, n |= 0, o) || M(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);var r = n - 1,i = 1;for (this[t + r] = 255 & e; --r >= 0 && (i *= 256);) {this[t + r] = e / i & 255;}return t + n;}, u.prototype.writeUInt8 = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 1, 255, 0), u.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), this[t] = 255 & e, t + 1;}, u.prototype.writeUInt16LE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 2, 65535, 0), u.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2;}, u.prototype.writeUInt16BE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 2, 65535, 0), u.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2;}, u.prototype.writeUInt32LE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 4, 4294967295, 0), u.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = 255 & e) : A(this, e, t, !0), t + 4;}, u.prototype.writeUInt32BE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 4, 4294967295, 0), u.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : A(this, e, t, !1), t + 4;}, u.prototype.writeIntLE = function (e, t, n, o) {if (e = +e, t |= 0, !o) {var r = Math.pow(2, 8 * n - 1);M(this, e, t, n, r - 1, -r);}var i = 0,s = 1,a = 0;for (this[t] = 255 & e; ++i < n && (s *= 256);) {e < 0 && 0 === a && 0 !== this[t + i - 1] && (a = 1), this[t + i] = (e / s >> 0) - a & 255;}return t + n;}, u.prototype.writeIntBE = function (e, t, n, o) {if (e = +e, t |= 0, !o) {var r = Math.pow(2, 8 * n - 1);M(this, e, t, n, r - 1, -r);}var i = n - 1,s = 1,a = 0;for (this[t + i] = 255 & e; --i >= 0 && (s *= 256);) {e < 0 && 0 === a && 0 !== this[t + i + 1] && (a = 1), this[t + i] = (e / s >> 0) - a & 255;}return t + n;}, u.prototype.writeInt8 = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 1, 127, -128), u.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)), e < 0 && (e = 255 + e + 1), this[t] = 255 & e, t + 1;}, u.prototype.writeInt16LE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 2, 32767, -32768), u.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8) : R(this, e, t, !0), t + 2;}, u.prototype.writeInt16BE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 2, 32767, -32768), u.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8, this[t + 1] = 255 & e) : R(this, e, t, !1), t + 2;}, u.prototype.writeInt32LE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 4, 2147483647, -2147483648), u.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24) : A(this, e, t, !0), t + 4;}, u.prototype.writeInt32BE = function (e, t, n) {return e = +e, t |= 0, n || M(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), u.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = 255 & e) : A(this, e, t, !1), t + 4;}, u.prototype.writeFloatLE = function (e, t, n) {return F(this, e, t, !0, n);}, u.prototype.writeFloatBE = function (e, t, n) {return F(this, e, t, !1, n);}, u.prototype.writeDoubleLE = function (e, t, n) {return U(this, e, t, !0, n);}, u.prototype.writeDoubleBE = function (e, t, n) {return U(this, e, t, !1, n);}, u.prototype.copy = function (e, t, n, o) {if (n || (n = 0), o || 0 === o || (o = this.length), t >= e.length && (t = e.length), t || (t = 0), o > 0 && o < n && (o = n), o === n) return 0;if (0 === e.length || 0 === this.length) return 0;if (t < 0) throw new RangeError("targetStart out of bounds");if (n < 0 || n >= this.length) throw new RangeError("sourceStart out of bounds");if (o < 0) throw new RangeError("sourceEnd out of bounds");o > this.length && (o = this.length), e.length - t < o - n && (o = e.length - t + n);var r,i = o - n;if (this === e && n < t && t < o) for (r = i - 1; r >= 0; --r) {e[r + t] = this[r + n];} else if (i < 1e3 || !u.TYPED_ARRAY_SUPPORT) for (r = 0; r < i; ++r) {e[r + t] = this[r + n];} else Uint8Array.prototype.set.call(e, this.subarray(n, n + i), t);return i;}, u.prototype.fill = function (e, t, n, o) {if ("string" == typeof e) {if ("string" == typeof t ? (o = t, t = 0, n = this.length) : "string" == typeof n && (o = n, n = this.length), 1 === e.length) {var r = e.charCodeAt(0);r < 256 && (e = r);}if (o !== undefined && "string" != typeof o) throw new TypeError("encoding must be a string");if ("string" == typeof o && !u.isEncoding(o)) throw new TypeError("Unknown encoding: " + o);} else "number" == typeof e && (e &= 255);if (t < 0 || this.length < t || this.length < n) throw new RangeError("Out of range index");if (n <= t) return this;var i;if (t >>>= 0, n = n === undefined ? this.length : n >>> 0, e || (e = 0), "number" == typeof e) for (i = t; i < n; ++i) {this[i] = e;} else {var s = u.isBuffer(e) ? e : q(new u(e, o).toString()),a = s.length;for (i = 0; i < n - t; ++i) {this[i + t] = s[i % a];}}return this;};var x = /[^+\/0-9A-Za-z-_]/g;function B(e) {return e < 16 ? "0" + e.toString(16) : e.toString(16);}function q(e, t) {var n;t = t || Infinity;for (var o = e.length, r = null, i = [], s = 0; s < o; ++s) {if ((n = e.charCodeAt(s)) > 55295 && n < 57344) {if (!r) {if (n > 56319) {(t -= 3) > -1 && i.push(239, 191, 189);continue;}if (s + 1 === o) {(t -= 3) > -1 && i.push(239, 191, 189);continue;}r = n;continue;}if (n < 56320) {(t -= 3) > -1 && i.push(239, 191, 189), r = n;continue;}n = 65536 + (r - 55296 << 10 | n - 56320);} else r && (t -= 3) > -1 && i.push(239, 191, 189);if (r = null, n < 128) {if ((t -= 1) < 0) break;i.push(n);} else if (n < 2048) {if ((t -= 2) < 0) break;i.push(n >> 6 | 192, 63 & n | 128);} else if (n < 65536) {if ((t -= 3) < 0) break;i.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128);} else {if (!(n < 1114112)) throw new Error("Invalid code point");if ((t -= 4) < 0) break;i.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128);}}return i;}function L(e) {return o.toByteArray(function (e) {if ((e = function (e) {return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "");}(e).replace(x, "")).length < 2) return "";for (; e.length % 4 != 0;) {e += "=";}return e;}(e));}function G(e, t, n, o) {for (var r = 0; r < o && !(r + n >= t.length || r >= e.length); ++r) {t[r + n] = e[r];}return r;}}).call(this, n(25));}, function (e, t, n) {"use strict";var o,r = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),i = 64,s = {},a = 0,u = 0;function c(e) {var t = "";do {t = r[e % i] + t, e = Math.floor(e / i);} while (e > 0);return t;}function l() {var e = c(+new Date());return e !== o ? (a = 0, o = e) : e + "." + c(a++);}for (; u < i; u++) {s[r[u]] = u;}l.encode = c, l.decode = function (e) {var t = 0;for (u = 0; u < e.length; u++) {t = t * i + s[e.charAt(u)];}return t;}, e.exports = l;}, function (e, t) {var n = [].indexOf;e.exports = function (e, t) {if (n) return e.indexOf(t);for (var o = 0; o < e.length; ++o) {if (e[o] === t) return o;}return -1;};}, function (e, t, n) {"use strict";var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {return typeof e;} : function (e) {return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;},r = n(28),i = n(12),s = n(127),a = n(57),u = n(58),c = (n(8)("socket.io-client:socket"), n(22)),l = n(52);e.exports = d;var f = { connect: 1, connect_error: 1, connect_timeout: 1, connecting: 1, disconnect: 1, error: 1, reconnect: 1, reconnect_attempt: 1, reconnect_failed: 1, reconnect_error: 1, reconnecting: 1, ping: 1, pong: 1 },p = i.prototype.emit;function d(e, t, n) {this.io = e, this.nsp = t, this.json = this, this.ids = 0, this.acks = {}, this.receiveBuffer = [], this.sendBuffer = [], this.connected = !1, this.disconnected = !0, this.flags = {}, n && n.query && (this.query = n.query), this.io.autoConnect && this.open();}i(d.prototype), d.prototype.subEvents = function () {if (!this.subs) {var e = this.io;this.subs = [a(e, "open", u(this, "onopen")), a(e, "packet", u(this, "onpacket")), a(e, "close", u(this, "onclose"))];}}, d.prototype.open = d.prototype.connect = function () {return this.connected ? this : (this.subEvents(), this.io.open(), "open" === this.io.readyState && this.onopen(), this.emit("connecting"), this);}, d.prototype.send = function () {var e = s(arguments);return e.unshift("message"), this.emit.apply(this, e), this;}, d.prototype.emit = function (e) {if (f.hasOwnProperty(e)) return p.apply(this, arguments), this;var t = s(arguments),n = { type: (this.flags.binary !== undefined ? this.flags.binary : l(t)) ? r.BINARY_EVENT : r.EVENT, data: t, options: {} };return n.options.compress = !this.flags || !1 !== this.flags.compress, "function" == typeof t[t.length - 1] && (this.ids, this.acks[this.ids] = t.pop(), n.id = this.ids++), this.connected ? this.packet(n) : this.sendBuffer.push(n), this.flags = {}, this;}, d.prototype.packet = function (e) {e.nsp = this.nsp, this.io.packet(e);}, d.prototype.onopen = function () {if ("/" !== this.nsp) if (this.query) {var e = "object" === o(this.query) ? c.encode(this.query) : this.query;this.packet({ type: r.CONNECT, query: e });} else this.packet({ type: r.CONNECT });}, d.prototype.onclose = function (e) {this.connected = !1, this.disconnected = !0, delete this.id, this.emit("disconnect", e);}, d.prototype.onpacket = function (e) {var t = e.nsp === this.nsp,n = e.type === r.ERROR && "/" === e.nsp;if (t || n) switch (e.type) {case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error", e.data);}}, d.prototype.onevent = function (e) {var t = e.data || [];null != e.id && t.push(this.ack(e.id)), this.connected ? p.apply(this, t) : this.receiveBuffer.push(t);}, d.prototype.ack = function (e) {var t = this,n = !1;return function () {if (!n) {n = !0;var o = s(arguments);t.packet({ type: l(o) ? r.BINARY_ACK : r.ACK, id: e, data: o });}};}, d.prototype.onack = function (e) {var t = this.acks[e.id];"function" == typeof t ? (e.id, e.data, t.apply(this, e.data), delete this.acks[e.id]) : e.id;}, d.prototype.onconnect = function () {this.connected = !0, this.disconnected = !1, this.emit("connect"), this.emitBuffered();}, d.prototype.emitBuffered = function () {var e;for (e = 0; e < this.receiveBuffer.length; e++) {p.apply(this, this.receiveBuffer[e]);}for (this.receiveBuffer = [], e = 0; e < this.sendBuffer.length; e++) {this.packet(this.sendBuffer[e]);}this.sendBuffer = [];}, d.prototype.ondisconnect = function () {this.nsp, this.destroy(), this.onclose("io server disconnect");}, d.prototype.destroy = function () {if (this.subs) {for (var e = 0; e < this.subs.length; e++) {this.subs[e].destroy();}this.subs = null;}this.io.destroy(this);}, d.prototype.close = d.prototype.disconnect = function () {return this.connected && (this.nsp, this.packet({ type: r.DISCONNECT })), this.destroy(), this.connected && this.onclose("io client disconnect"), this;}, d.prototype.compress = function (e) {return this.flags.compress = e, this;}, d.prototype.binary = function (e) {return this.flags.binary = e, this;};}, function (e, t, n) {"use strict";e.exports = function (e, t, n) {return e.on(t, n), { destroy: function destroy() {e.removeListener(t, n);} };};}, function (e, t) {var n = [].slice;e.exports = function (e, t) {if ("string" == typeof t && (t = e[t]), "function" != typeof t) throw new Error("bind() requires a function");var o = n.call(arguments, 2);return function () {return t.apply(e, o.concat(n.call(arguments)));};};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.uniApp = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(15);var i = new (function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.overrided = !1;}return o(e, [{ key: "overrideUniShowHideMethods", value: function value() {if (r.FrameworkDetector.currentFramework() === r.Framework.UNIAPP && !this.overrided && getApp() && "undefined" != typeof getApp().$options) {this.overrided = !0;var e = getApp().$options;if ("undefined" != typeof e.onShow) {var t = e.onShow[0];e.onShow[0] = function () {getApp().uniAppRunningBackend = !1, t && t.call(e);};}if ("undefined" != typeof e.onHide) {var n = e.onHide[0];e.onHide[0] = function () {getApp().uniAppRunningBackend = !0, n && n.call(e);};}}} }, { key: "runningBackend", value: function value() {return getApp().uniAppRunningBackend;} }]), e;}())();t.uniApp = i;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t.PUBSUB_INTERNAL_EVENTS = { MESSAGE_RECEIVED: "PUBSUB_INTERNAL_MESSAGE_RECEIVED" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.UUID = undefined;var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(62),s = (o = i) && o.__esModule ? o : { "default": o };var a = function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return r(e, null, [{ key: "get", value: function value() {return (0, s["default"])().replace(/-/g, "");} }]), e;}();t.UUID = a;}, function (e, t, n) {var o,r,i = n(63),s = n(64),a = 0,u = 0;e.exports = function (e, t, n) {var c = t && n || 0,l = t || [],f = (e = e || {}).node || o,p = e.clockseq !== undefined ? e.clockseq : r;if (null == f || null == p) {var d = i();null == f && (f = o = [1 | d[0], d[1], d[2], d[3], d[4], d[5]]), null == p && (p = r = 16383 & (d[6] << 8 | d[7]));}var h = e.msecs !== undefined ? e.msecs : new Date().getTime(),y = e.nsecs !== undefined ? e.nsecs : u + 1,v = h - a + (y - u) / 1e4;if (v < 0 && e.clockseq === undefined && (p = p + 1 & 16383), (v < 0 || h > a) && e.nsecs === undefined && (y = 0), y >= 1e4) throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");a = h, u = y, r = p;var b = (1e4 * (268435455 & (h += 122192928e5)) + y) % 4294967296;l[c++] = b >>> 24 & 255, l[c++] = b >>> 16 & 255, l[c++] = b >>> 8 & 255, l[c++] = 255 & b;var m = h / 4294967296 * 1e4 & 268435455;l[c++] = m >>> 8 & 255, l[c++] = 255 & m, l[c++] = m >>> 24 & 15 | 16, l[c++] = m >>> 16 & 255, l[c++] = p >>> 8 | 128, l[c++] = 255 & p;for (var g = 0; g < 6; ++g) {l[c + g] = f[g];}return t || s(l);};}, function (e, t) {var n = "undefined" != typeof crypto && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" != typeof msCrypto && "function" == typeof window.msCrypto.getRandomValues && msCrypto.getRandomValues.bind(msCrypto);if (n) {var o = new Uint8Array(16);e.exports = function () {return n(o), o;};} else {var r = new Array(16);e.exports = function () {for (var e, t = 0; t < 16; t++) {0 == (3 & t) && (e = 4294967296 * Math.random()), r[t] = e >>> ((3 & t) << 3) & 255;}return r;};}}, function (e, t) {for (var n = [], o = 0; o < 256; ++o) {n[o] = (o + 256).toString(16).substr(1);}e.exports = function (e, t) {var o = t || 0,r = n;return [r[e[o++]], r[e[o++]], r[e[o++]], r[e[o++]], "-", r[e[o++]], r[e[o++]], "-", r[e[o++]], r[e[o++]], "-", r[e[o++]], r[e[o++]], "-", r[e[o++]], r[e[o++]], r[e[o++]], r[e[o++]], r[e[o++]], r[e[o++]]].join("");};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}();var r = new (function (e) {function t() {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, Array), o(t, [{ key: "deleteByKey", value: function value(e, t, n) {var o = e.findIndex(function (e) {return e[t] == n;});o > -1 && e.splice(o, 1);} }, { key: "unshiftGuid", value: function value(e) {var t = !1,n = this.findIndex(function (t) {return t == e;});for (n > -1 && (t = !0, this.splice(n, 1)), this.unshift(e); this.length > 300;) {this.pop();}return t;} }]), t;}())();t.goEasyArray = r;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t["default"] = { maxNumber: 5 };}, function (e, t, n) {"use strict";var o = this && this.__values || function (e) {var t = "function" == typeof Symbol && Symbol.iterator,n = t && e[t],o = 0;if (n) return n.call(e);if (e && "number" == typeof e.length) return { next: function next() {return e && o >= e.length && (e = void 0), { value: e && e[o++], done: !e };} };throw new TypeError(t ? "Object is not iterable." : "Symbol.iterator is not defined.");};t.__esModule = !0, t.Cookie = void 0;var r = function () {function e() {}return e.get = function (e) {var t,n,r = encodeURIComponent(e) + "=",i = document.cookie.split("; ");try {for (var s = o(i), a = s.next(); !a.done; a = s.next()) {var u = a.value;if (u.startsWith(r)) return decodeURIComponent(u.substring(r.length));}} catch (c) {t = { error: c };} finally {try {a && !a.done && (n = s["return"]) && n.call(s);} finally {if (t) throw t.error;}}return null;}, e.set = function (e, t, n, o, r, i) {void 0 === r && (r = "/"), void 0 === i && (i = !1);var s = encodeURIComponent(e) + "=" + encodeURIComponent(t);n instanceof Date && (s += "; expires=" + n.toGMTString()), r && (s += "; path=" + r), o && (s += "; domain=" + o), i && (s += "; secure"), document.cookie = s;}, e.remove = function (t, n, o, r) {void 0 === o && (o = "/"), void 0 === r && (r = !1), e.set(t, "", new Date(0), n, o, r);}, e;}();t.Cookie = r;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.messageCreator = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = g(n(18)),i = g(n(70)),s = g(n(71)),a = g(n(72)),u = g(n(20)),c = g(n(73)),l = g(n(74)),f = g(n(75)),p = g(n(76)),d = g(n(77)),h = g(n(78)),y = g(n(39)),v = g(n(21)),b = g(n(79)),m = n(15);function g(e) {return e && e.__esModule ? e : { "default": e };}function w(e, t, n) {return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;}var _ = new (function () {function e() {var t;!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.messageTypes = (w(t = {}, m.Framework.NATIVE_APPLET_WX, { image: i["default"], file: r["default"], audio: s["default"], video: a["default"], text: y["default"] }), w(t, m.Framework.UNIAPP, { image: f["default"], file: u["default"], audio: c["default"], video: l["default"], text: y["default"] }), w(t, m.Framework.UNKNOWN, { image: p["default"], file: v["default"], audio: d["default"], video: h["default"], text: y["default"] }), t);}return o(e, [{ key: "create", value: function value(e, t) {var n = m.FrameworkDetector.currentFramework(),o = this.messageTypes[n][e];return o ? new o(t) : new b["default"](t);} }]), e;}())();t.messageCreator = _;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.str = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(35);var i = new (function () {function e() {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e);}return o(e, [{ key: "fileExtension", value: function value(e, t) {if (r.calibrator.isString(e)) try {var n = e.split(t);return n[n.length - 1];} catch (o) {throw Error(o);}} }]), e;}())();t.str = i;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function l(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : l(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = u(n(18)),s = u(n(2)),a = n(6);function u(e) {return e && e.__esModule ? e : { "default": e };}var c = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "validate", value: function value(e) {if (r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e), !a.calibrator.isDef(e.file.tempFiles) || 0 == e.file.tempFiles[0].length) throw Error("tempFiles is empty.");} }, { key: "setType", value: function value(e) {this.type = s["default"].image;} }, { key: "setFile", value: function value(e) {var t = "chooseMedia:ok" == e.errMsg ? e.tempFiles[0].tempFilePath : e.tempFiles[0].path;e.tempFiles[0].path = t, this.file = e;} }, { key: "setPayload", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);var n = this,o = e.file.tempFiles[0],i = "chooseMedia:ok" == e.file.errMsg ? o.tempFilePath : o.path;this.payload.url = i, this.payload.size = o.size, this.payload.width = "", this.payload.height = "", this.payload.contentType = "";var s = a.calibrator.isEmpty(o.name) || o.name == undefined ? i : o.name;this.payload.name = "wx-image." + a.str.fileExtension(s, "."), this.payload.contentType = "image/" + a.str.fileExtension(s, "."), wx.getImageInfo({ src: i, success: function success(e) {n.payload.width = e.width, n.payload.height = e.height;} });} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function l(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : l(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = u(n(18)),s = u(n(2)),a = n(6);function u(e) {return e && e.__esModule ? e : { "default": e };}var c = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "validate", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);} }, { key: "setType", value: function value(e) {this.type = s["default"].audio;} }, { key: "setPayload", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);var n = e.file.tempFilePath;this.payload.url = n, this.payload.duration = e.file.duration / 1e3, this.payload.size = e.file.fileSize;var o = a.calibrator.isEmpty(e.file.name) || e.file.name == undefined ? n : e.file.name;this.payload.contentType = "audio/" + a.str.fileExtension(o, "."), this.payload.name = "wx-audio." + a.str.fileExtension(o, ".");} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = u(n(18)),i = u(n(2)),s = n(0),a = n(6);function u(e) {return e && e.__esModule ? e : { "default": e };}var c = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, r["default"]), o(t, [{ key: "validate", value: function value(e) {(function n(e, t, o) {null === e && (e = Function.prototype);var r = Object.getOwnPropertyDescriptor(e, t);if (r === undefined) {var i = Object.getPrototypeOf(e);return null === i ? undefined : n(i, t, o);}if ("value" in r) return r.value;var s = r.get;return s === undefined ? undefined : s.call(o);})(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);} }, { key: "setType", value: function value(e) {this.type = i["default"].video;} }, { key: "setFile", value: function value(e) {this.file = "chooseMedia:ok" == e.errMsg ? e.tempFiles[0] : e;} }, { key: "setPayload", value: function value(e) {this.payload = Object.create(null);var t = Object.create(null),n = Object.create(null),o = "chooseMedia:ok" == e.file.errMsg ? e.file.tempFiles[0] : e.file,r = o.duration,i = o.height,u = o.size,c = o.tempFilePath,l = o.thumbTempFilePath,f = o.width,p = o.name,d = p === undefined ? "" : p,h = s.calibrator.isEmpty(d) ? c : d;t.contentType = "video/" + a.str.fileExtension(h, "."), t.name = "wx-video." + a.str.fileExtension(h, "."), t.url = c, t.width = n.width = f, t.height = n.height = i, t.size = u, t.duration = r, n.url = l, n.contentType = "image/jpg", n.name = "wx-thumbnail.jpg", this.payload.video = t, this.payload.thumbnail = n;} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function l(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : l(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = u(n(20)),s = u(n(2)),a = n(6);function u(e) {return e && e.__esModule ? e : { "default": e };}var c = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "validate", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);} }, { key: "setType", value: function value(e) {this.type = s["default"].audio;} }, { key: "setPayload", value: function value(e) {var n = this;r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);var o = this,i = e.file.tempFilePath;this.payload.url = i;var s = a.calibrator.isEmpty(e.file.name) || e.file.name == undefined ? i : e.file.name;if (this.payload.contentType = "audio/" + a.str.fileExtension(s, "."), this.payload.name = "uni-audio." + a.str.fileExtension(s, "."), a.calibrator.isDef(e.file.duration)) this.payload.duration = e.file.duration / 1e3;else {this.payload.duration = 0;var u = uni.createInnerAudioContext();u.src = i, u.onCanplay(function (e) {o.payload.duration = u.duration, u.destroy();});}uni.getFileInfo({ filePath: i, success: function success(e) {n.payload.size = e.size;} });} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = a(n(20)),i = a(n(2)),s = n(6);function a(e) {return e && e.__esModule ? e : { "default": e };}var u = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, r["default"]), o(t, [{ key: "validate", value: function value(e) {(function n(e, t, o) {null === e && (e = Function.prototype);var r = Object.getOwnPropertyDescriptor(e, t);if (r === undefined) {var i = Object.getPrototypeOf(e);return null === i ? undefined : n(i, t, o);}if ("value" in r) return r.value;var s = r.get;return s === undefined ? undefined : s.call(o);})(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);} }, { key: "setType", value: function value(e) {this.type = i["default"].video;} }, { key: "setPayload", value: function value(e) {var t = Object.create(null),n = Object.create(null);this.payload = Object.create(null);var o = e.file,r = o.duration,i = o.height,a = o.size,u = o.tempFilePath,c = o.width,l = o.name,f = l === undefined ? "" : l,p = s.calibrator.isEmpty(f) ? u : f;t.contentType = "video/" + s.str.fileExtension(p, "."), t.name = "uni-video." + s.str.fileExtension(p, "."), t.size = a, t.duration = r, t.url = n.url = u, t.width = n.width = c, t.height = n.height = i, n.contentType = "image/jpg", n.name = "wx-thumbnail.jpg", this.payload.video = t, this.payload.thumbnail = n;} }]), t;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function l(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : l(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = u(n(20)),s = n(6),a = u(n(2));function u(e) {return e && e.__esModule ? e : { "default": e };}var c = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "validate", value: function value(e) {if (r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e), !s.calibrator.isDef(e.file.tempFiles) || 0 == e.file.tempFiles[0].length) throw Error("tempFiles is empty.");} }, { key: "setType", value: function value(e) {this.type = a["default"].image;} }, { key: "setPayload", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);var n = this,o = e.file.tempFiles[0];this.payload.url = o.path, this.payload.size = o.size, this.payload.width = "", this.payload.height = "";var i = s.calibrator.isEmpty(o.name) || o.name == undefined ? o.path : o.name;this.payload.contentType = "image/" + s.str.fileExtension(i, "."), this.payload.name = "uni-image." + s.str.fileExtension(i, "."), uni.getImageInfo({ src: o.path, success: function success(e) {n.payload.width = e.width, n.payload.height = e.height;} });} }]), t;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function c(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : c(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = a(n(21)),s = a(n(2));function a(e) {return e && e.__esModule ? e : { "default": e };}var u = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "validate", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);var n = ["gif", "jpg", "png", "jpeg"];if (!n.find(function (t) {return t == e.file.type.split("/")[1].toLowerCase();})) throw Error("Only " + n.join(",") + " is supported image.");} }, { key: "setType", value: function value(e) {this.type = s["default"].image;} }, { key: "setPayload", value: function value(e) {var n = this;r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);var o = window.URL || window.webkitURL,i = new Image();i.src = o.createObjectURL(e.file), i.onload = function () {n.payload.width = i.width, n.payload.height = i.height, o.revokeObjectURL(i.src);};} }]), t;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function c(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : c(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = a(n(21)),s = a(n(2));function a(e) {return e && e.__esModule ? e : { "default": e };}var u = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "validate", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);var n = ["mp3", "ogg", "wav", "wma", "ape", "acc", "mpeg"];if (!n.find(function (t) {return t == e.file.type.split("/")[1].toLowerCase();})) throw Error("Only " + n.join(",") + " is supported audio.");} }, { key: "setType", value: function value(e) {this.type = s["default"].audio;} }, { key: "setPayload", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "setPayload", this).call(this, e);var n = this,o = window.URL || window.webkitURL,i = document.createElement("audio");i.src = o.createObjectURL(e.file), i.onloadedmetadata = function () {n.payload.duration = i.duration, o.revokeObjectURL(i.src);};} }]), t;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = s(n(21)),i = s(n(2));function s(e) {return e && e.__esModule ? e : { "default": e };}var a = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, r["default"]), o(t, [{ key: "validate", value: function value(e) {(function o(e, t, n) {null === e && (e = Function.prototype);var r = Object.getOwnPropertyDescriptor(e, t);if (r === undefined) {var i = Object.getPrototypeOf(e);return null === i ? undefined : o(i, t, n);}if ("value" in r) return r.value;var s = r.get;return s === undefined ? undefined : s.call(n);})(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "validate", this).call(this, e);var n = ["avi", "mov", "rmvb", "rm", "flv", "mp4", "3gp", "quicktime"];if (!n.find(function (t) {return t == e.file.type.split("/")[1].toLowerCase();})) throw Error("Only " + n.join(",") + " is supported video.");} }, { key: "setType", value: function value(e) {this.type = i["default"].video;} }, { key: "setPayload", value: function value(e) {this.payload = Object.create(null);var t = Object.create(null),n = Object.create(null);t.contentType = e.file.type, t.size = e.file.size, t.duration = 0, t.url = n.url = "", t.name = e.file.name, t.width = n.width = 0, t.height = n.height = 0, n.contentType = "image/jpg", this.payload.video = t, this.payload.thumbnail = n;var o = this,r = window.URL || window.webkitURL,i = document.createElement("video"),s = r.createObjectURL(e.file);i.src = s, i.onloadedmetadata = function () {o.payload.video.duration = i.duration, o.payload.video.width = o.payload.thumbnail.width = i.videoWidth, o.payload.video.height = o.payload.thumbnail.height = i.videoHeight, o.payload.video.url = s, o.payload.thumbnail.url = function (e) {var t = document.createElement("canvas");return t.width = e.videoWidth, t.height = e.videoHeight, t.getContext("2d").drawImage(e, 0, 0, t.width, t.height), t.toDataURL("image/png");}(i), r.revokeObjectURL(i.src);};} }]), t;}();t["default"] = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(14),s = (o = i) && o.__esModule ? o : { "default": o },a = n(0);var u = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, s["default"]), r(t, [{ key: "setType", value: function value(e) {if (!a.calibrator.isStringOrNumber(e.type)) throw Error("type require a string or number.");if (a.calibrator.isEmpty(e.type)) throw Error("type is empty.");this.type = e.type;} }, { key: "setPayload", value: function value(e) {if (a.calibrator.isEmpty(e.payload)) throw Error("payload is empty.");if (!a.calibrator.isPlainObject(e.payload) && !a.calibrator.isStringOrNumber(e.payload)) throw Error("payload require object | string | number.");this.payload = e.payload;} }]), t;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = d(n(81)),i = d(n(3)),s = d(n(1)),a = n(5),u = d(n(19)),c = n(7),l = d(n(14)),f = n(0),p = n(4);function d(e) {return e && e.__esModule ? e : { "default": e };}var h = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.bulletMessageBuilder = null, this.im = t, this.bulletMessageBuilder = new r["default"](t);}return o(e, [{ key: "send", value: function value(e, t, n) {var o = this;return new Promise(function (r, c) {t.status === u["default"]["new"] ? (t.status = u["default"].sending, o.bulletMessageBuilder.build(e, t, n).then(function (e) {var n = new i["default"]({ name: a.EmitType.publishIM, params: e, permission: s["default"].WRITE, singleTimeout: p.SocketTimeout.commonRequestSingle, totalTimeout: p.SocketTimeout.commonRequestTotal, fail: function fail(e) {t.status = u["default"].fail, c({ code: e.resultCode || 408, content: e.content || "Failed to send private message." });}, success: function success(e) {t.status = u["default"].success, 200 == e.resultCode ? r({ code: 200, content: e.content }) : c(e);} });o.im._goEasySocket.emit(n);})["catch"](function (e) {c({ code: e.code || 400, content: e.content || e });})) : c({ code: 400, content: "Please create a new message, a message can only be sent once" });});} }, { key: "sendMessage", value: function value(e) {var t = this,n = this.im,o = e.message;return new Promise(function (r, d) {if (o instanceof l["default"]) {if (o.status === u["default"]["new"]) {o.status = u["default"].sending;var h = o.to;if (delete o.to, h) {if (!h.type || h.type != c.ConversationType.GROUP && h.type != c.ConversationType.PRIVATE) d({ code: 400, content: "message require property to.type" });else if (h.id) {if (h.data && f.calibrator.isFunction(h.data)) d({ code: 400, content: "to.data can not be function" });else {var y = o.notification;if (y) if (f.calibrator.isObject(y)) {if (f.calibrator.isEmpty(y.title)) return void d({ code: 400, content: "notification title is required" });if (!f.calibrator.isString(y.title)) return void d({ code: 400, content: "notification title must be string" });if (f.calibrator.isEmpty(o.notification.body)) return void d({ code: 400, content: "notification body is required" });if (!f.calibrator.isString(o.notification.body)) return void d({ code: 400, content: "notification body must be string" });} else if (f.calibrator.isPrimitive(o.notification)) return void d({ code: 400, content: "notification must be an json object" });h.data || (h.data = {}), n._conversations.updateByOutMessage(o, h.type, h.id, h.data), t.bulletMessageBuilder.build(h.id, o, h.type, e.accessToken).then(function (e) {e.d = JSON.stringify(h.data);var t = new i["default"]({ name: a.EmitType.publishIM, params: e, permission: s["default"].WRITE, singleTimeout: p.SocketTimeout.commonRequestSingle, totalTimeout: p.SocketTimeout.commonRequestTotal, fail: function fail(e) {o.status = u["default"].fail, d({ code: e.resultCode || 408, content: e.content || "Failed to send private message." });}, success: function success(e) {o.status = u["default"].success, o.timestamp = e.content.timestamp, r(o), n._conversations.updateByOutMessage(o, h.type, h.id, h.data);} });n._goEasySocket.emit(t);})["catch"](function (e) {o.status = u["default"].fail, d({ code: e.code || 400, content: e.content || e });});}} else d({ code: 400, content: "message require property to.id" });} else d({ code: 400, content: "message require property to." });} else d({ code: 400, content: "Please create a new message, a message can only be sent once" });} else d({ code: 400, content: "it is invalid message" });});} }]), e;}();t["default"] = h;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = s(n(82)),i = s(n(83));s(n(2));function s(e) {return e && e.__esModule ? e : { "default": e };}var a = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t;}return o(e, [{ key: "build", value: function value(e, t, n, o) {var s = this;return new Promise(function (a, u) {var c = new r["default"]({ to: e, message: t, conversationType: n, accessToken: o }),l = t.type;new i["default"](l, s.im).build(t).then(function (e) {c.p = JSON.stringify(e), a(c);})["catch"](function (e) {u(e);});});} }]), e;}();t["default"] = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(6),i = c(n(14)),s = c(n(39)),a = c(n(2)),u = n(11);function c(e) {return e && e.__esModule ? e : { "default": e };}var l = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.mt = null, this.to = null, this.p = null, this.t = null, this.guid = null, this.nt = null, this.at = null, this.validate(t.to, t.message), this.mt = t.message.type, this.to = t.to, this.t = t.conversationType, this.guid = t.message.messageId, this.p = t.message.payload, this.nt = t.message.notification, this.at = t.accessToken;}return o(e, [{ key: "validate", value: function value(e, t) {if (!(t instanceof i["default"])) throw Error("createMessage first.");if (r.calibrator.isEmpty(e)) throw Error("userId is empty.");if (!r.calibrator.isStringOrNumber(e)) throw Error("userId should be a string or number.");if (u.IM.userId == e) throw Error("userId can not be the same as your id.");if (t.type == a["default"].text) {if (!(t instanceof s["default"])) throw Error("it is not textMessage");if (JSON.stringify(t.payload).length > 3072) throw Error("message-length limit 3kb");}} }]), e;}();t["default"] = l;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = n(84),r = a(n(85)),i = a(n(41)),s = a(n(2));function a(e) {return e && e.__esModule ? e : { "default": e };}t["default"] = function u(e, t) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, u), e == s["default"].video ? new r["default"](t) : e == s["default"].audio || e == s["default"].image || e == s["default"].file ? new i["default"](t) : o.simplePayloadBuilder;};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.simplePayloadBuilder = undefined;var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(40),s = (o = i) && o.__esModule ? o : { "default": o };var a = new (function (e) {function t() {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, s["default"]), r(t, [{ key: "build", value: function value(e) {return new Promise(function (t, n) {try {t(e.payload);} catch (o) {n(o);}});} }]), t;}())();t.simplePayloadBuilder = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = s(n(41)),i = s(n(42));function s(e) {return e && e.__esModule ? e : { "default": e };}var a = function (e) {function t(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, r["default"]), o(t, [{ key: "build", value: function value(e) {var t = this;return new Promise(function (n, o) {var r = new i["default"]();t.upload(e).then(function (t) {var o = t.content;undefined;r = e.payload;var i = "?x-oss-process=video/snapshot,t_0000,f_jpg,w_" + e.payload.video.width + ",m_fast,ar_auto";r.video.url = t.content.url, r.thumbnail.url = t.content.url + i, r.video.name = t.content.newFileName, n(r);})["catch"](function (e) {o(e);});});} }]), t;}();t["default"] = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.fileUploader = t.FileUploader = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(87),i = n(88),s = n(89),a = n(15);function u(e, t, n) {return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;}var c = new (t.FileUploader = function () {function e() {var t;!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.uploader = (u(t = {}, a.Framework.UNIAPP, r.uniAppFileUploader), u(t, a.Framework.NATIVE_APPLET_WX, i.wxFileUploader), u(t, a.Framework.UNKNOWN, s.htmlFileUploader), t);}return o(e, [{ key: "upload", value: function value(e, t) {var n = a.FrameworkDetector.currentFramework();return this.uploader[n].upload(e, t);} }]), e;}())();t.fileUploader = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.uniAppFileUploader = undefined;var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(26),s = (o = i) && o.__esModule ? o : { "default": o };var a = new (function (e) {function t() {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, s["default"]), r(t, [{ key: "upload", value: function value(e, t) {var n = this;try {return new Promise(function (o, r) {uni.uploadFile({ url: e.host, filePath: n.getTempFilePath(e), name: "file", formData: e.parameters, success: function success(t) {if (200 === t.statusCode) {var n = e.payload;n.message = t.errMsg, o({ code: 200, content: n });} else r({ code: t.statusCode, content: t.errMsg });}, fail: function fail(e) {r({ code: 500, content: e.errMsg });} }).onProgressUpdate(function (e) {t && t(e);});});} catch (o) {return new Promise(function (e, t) {t({ code: 500, content: o });});}} }, { key: "getTempFilePath", value: function value(e) {var t = e.file || e.fileRes;return Array.isArray(t.tempFiles) ? t.tempFiles[0].path : t.tempFilePath;} }]), t;}())();t.uniAppFileUploader = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.wxFileUploader = undefined;var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(26),s = (o = i) && o.__esModule ? o : { "default": o };var a = new (function (e) {function t() {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).apply(this, arguments));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, s["default"]), r(t, [{ key: "upload", value: function value(e, t) {var n = this;try {return new Promise(function (o, r) {wx.uploadFile({ url: e.host, filePath: n.getTempFilePath(e), name: "file", formData: e.parameters, success: function success(t) {if (200 === t.statusCode) {var n = e.payload;n.message = t.errMsg, o({ code: 200, content: n });} else r({ code: t.statusCode, content: t.errMsg });}, fail: function fail(e) {r({ code: 500, content: e.errMsg });} }).onProgressUpdate(function (e) {t && t(e);});});} catch (o) {return new Promise(function (e, t) {t({ code: 500, content: o });});}} }, { key: "getTempFilePath", value: function value(e) {var t = e.file || e.fileRes;return Array.isArray(t.tempFiles) ? t.tempFiles[0].path : t.tempFilePath;} }]), t;}())();t.wxFileUploader = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.htmlFileUploader = undefined;var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(26),s = (o = i) && o.__esModule ? o : { "default": o };var a = new (function (e) {function t() {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, s["default"]), r(t, [{ key: "upload", value: function value(e, t) {try {return new Promise(function (n, o) {var r = new XMLHttpRequest();for (var i in r.open("post", e.host, !0), e.headers) {r.setRequestHeader(i, e.headers[i]);}r.upload.onprogress = function (e) {t && t(e);}, r.upload.onloadstart = function (e) {t && t(e);}, r.upload.onloadend = function (e) {t && t(e);};var s = new FormData();for (var a in e.parameters) {"fileRes" == a ? s.append("file", e.parameters[a]) : s.append(a, e.parameters[a]);}r.send(s), r.onreadystatechange = function () {if (4 == r.readyState) if (r.status >= 200 && r.status < 300 || 304 == r.status) {var t = e.payload;t.message = r.responseText, n({ code: 200, content: t });} else o({ code: r.status, content: r.responseText });};});} catch (n) {return new Promise(function (e, t) {t({ code: 500, content: n });});}} }]), t;}())();t.htmlFileUploader = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = s(n(91)),i = s(n(95));function s(e) {return e && e.__esModule ? e : { "default": e };}var a = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.uploadTokenResolver = null, this.uploadTokenResolver = new i["default"](t);}return o(e, [{ key: "build", value: function value(e, t, n) {var o = this;return new Promise(function (i, s) {o.uploadTokenResolver.resolve(t).then(function (t) {var o = t.content;i(new r["default"](o.vendor).build(o, e, n));})["catch"](function (e) {s(e);});});} }]), e;}();t["default"] = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = n(92),r = n(93),i = n(94);t["default"] = function s(e) {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, s), e == o.OssType.aliYun ? r.aliYunOSSRequestBuilder : i.qiNiuYunOSSRequestBuilder;};}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });t.OssType = { aliYun: "ALI", qiNiu: "QN" };}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.aliYunOSSRequestBuilder = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = a(n(44)),i = a(n(45)),s = a(n(2));function a(e) {return e && e.__esModule ? e : { "default": e };}var u = function (e) {function t() {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "url", value: function value(e) {return e.host + "/" + e.dir + "/" + this.newFileName(e);} }, { key: "build", value: function value(e, t, n) {var o = { key: e.dir + "/" + this.newFileName(e), OSSAccessKeyId: e.accessKeyId, policy: e.policy, signature: e.signature, success_action_status: "200", fileRes: t };s["default"].file === n && (o = { key: e.dir + "/" + this.newFileName(e), OSSAccessKeyId: e.accessKeyId, policy: e.policy, signature: e.signature, success_action_status: "200", "Content-Disposition": "attachment;filename=" + t.name, fileRes: t });var i = { newFileName: this.newFileName(e), url: this.url(e) };return new r["default"](e.host, null, o, t, i);} }]), t;}();t["default"] = u;var c = new u();t.aliYunOSSRequestBuilder = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.qiNiuYunOSSRequestBuilder = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = s(n(45)),i = s(n(44));function s(e) {return e && e.__esModule ? e : { "default": e };}var a = new (function (e) {function t() {return function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t), function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, r["default"]), o(t, [{ key: "url", value: function value(e) {return e.downloadUrl;} }, { key: "build", value: function value(e, t) {var n = { key: this.newFileName(e), token: e.token, file: t },o = { newFileName: this.newFileName(e), url: this.url(e) };return new i["default"](e.host, null, n, t, o);} }]), t;}())();t.qiNiuYunOSSRequestBuilder = a;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = a(n(3)),i = a(n(1)),s = n(4);function a(e) {return e && e.__esModule ? e : { "default": e };}var u = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t;}return o(e, [{ key: "resolve", value: function value(e) {var t = this;return new Promise(function (n, o) {var a = new r["default"]({ name: "uploadToken", params: { filename: e }, permission: i["default"].WRITE, singleTimeout: s.SocketTimeout.commonRequestSingle, totalTimeout: s.SocketTimeout.commonRequestTotal, fail: function fail(e) {o(e);}, success: function success(e) {200 == e.code ? n(e) : o(e);} });t.im._goEasySocket.emit(a);});} }]), e;}();t["default"] = u;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(6),i = c(n(3)),s = c(n(1)),a = n(5),u = n(4);function c(e) {return e && e.__esModule ? e : { "default": e };}var l = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t;}return o(e, [{ key: "history", value: function value(e) {var t = this;return new Promise(function (n, o) {t.transformOptions(e);var r = new i["default"]({ name: a.EmitType.imHistory, params: e, permission: s["default"].READ, singleTimeout: u.SocketTimeout.commonQuerySingle, totalTimeout: u.SocketTimeout.commonQueryTotal, fail: function fail(e) {o({ code: e.code || 408, content: e.content || "Failed to query message" });}, success: function success(r) {if (200 == r.code) {var i = t.transformHistories(r, e);n({ code: 200, content: i });} else o(r);} });t.im._goEasySocket.emit(r);});} }, { key: "transformOptions", value: function value(e) {if (!r.calibrator.isObject(e) || !r.calibrator.isDef(e.friendId) && !r.calibrator.isDef(e.groupId)) throw Error("friendId or groupId is not define.");if (r.calibrator.isDef(e.friendId) && r.calibrator.isDef(e.groupId)) throw Error("only contain friendId or groupId.");if (r.calibrator.isDef(e.limit) || (e.limit = 10), e.limit > 30 && (e.limit = 30), r.calibrator.isDef(e.friendId)) {if (!r.calibrator.isStringOrNumber(e.friendId)) throw Error("TypeError: friendId require string or number.");r.calibrator.isNumber(e.friendId) && (e.friendId = e.friendId.toString());} else {if (!r.calibrator.isStringOrNumber(e.groupId)) throw Error("TypeError: groupId require string or number.");r.calibrator.isNumber(e.groupId) && (e.groupId = e.groupId.toString());}return e;} }, { key: "transformHistories", value: function value(e, t) {var n = [];return e && e.content && e.content.map(function (e) {var o = Object.create(null);o.messageId = e.i, o.timestamp = e.ts, o.senderId = e.s, o.type = e.mt, o.payload = JSON.parse(e.p), t.groupId && e.d && (o.senderData = JSON.parse(e.d)), n.push(o);}), n;} }]), e;}();t["default"] = l;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = p(n(3)),i = n(5),s = p(n(1)),a = n(4),u = n(7),c = p(n(16)),l = n(0),f = n(10);function p(e) {return e && e.__esModule ? e : { "default": e };}var d = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t, t._iMReceiver.addIMMessageObserver(this.newNewMessageReceived.bind(this));}return o(e, [{ key: "newNewMessageReceived", value: function value(e) {if (e.t === u.ConversationType.GROUP) {var t = c["default"].assemble(e);this.im._event.notify(f.ImEventType.GROUP_MESSAGE_RECEIVED, t);}} }, { key: "subscribe", value: function value(e) {var t = this,n = e.groupIds;return new Promise(function (o, u) {if (Array.isArray(n) && 0 != n.length) {for (var c = 0; c < n.length; c++) {if (!l.calibrator.isStringOrNumber(n[c])) return void u({ code: 400, content: "TypeError: groups item require string or number." });l.calibrator.isNumber(n[c]) && (n[c] = n[c].toString());}var f = new r["default"]({ name: i.EmitType.subscribeGroups, params: { groupIds: n, at: e.accessToken }, permission: s["default"].WRITE, singleTimeout: a.SocketTimeout.commonInfiniteSingle, totalTimeout: a.SocketTimeout.commonInfiniteTotal, success: function success() {o({ code: 200, content: "ok" });}, fail: function fail(e) {u({ code: e.resultCode || 408, content: e.content || "Failed to subscribe group message" });} });t.im._goEasySocket.emit(f);} else u({ code: 400, content: "TypeError: groups require array." });});} }, { key: "unsubscribe", value: function value(e) {var t = this;return new Promise(function (n, o) {if (l.calibrator.isStringOrNumber(e)) {e = e.toString();var u = new r["default"]({ name: i.EmitType.unsubscribeGroup, params: { groupId: e }, permission: s["default"].READ, singleTimeout: a.SocketTimeout.commonRequestSingle, totalTimeout: a.SocketTimeout.commonRequestTotal, success: function success() {n({ code: 200, content: "ok" });}, fail: function fail(e) {o({ code: e.resultCode || 408, content: e.content || "Failed to unsubscribe group message" });} });t.im._goEasySocket.emit(u);} else o({ code: 400, content: "TypeError: channel require string or number." });});} }]), e;}();t["default"] = d;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(16),s = (o = i) && o.__esModule ? o : { "default": o },a = n(7),u = n(10);var c = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t, t._iMReceiver.addIMMessageObserver(this.onNewMessageReceived.bind(this));}return r(e, [{ key: "onNewMessageReceived", value: function value(e) {if (e.t === a.ConversationType.PRIVATE) {var t = s["default"].assemble(e);this.im._event.notify(u.ImEventType.PRIVATE_MESSAGE_RECEIVED, t);}} }]), e;}();t["default"] = c;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = c(n(3)),i = n(5),s = c(n(1)),a = n(4),u = n(0);function c(e) {return e && e.__esModule ? e : { "default": e };}var l = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t;}return o(e, [{ key: "get", value: function value(e) {var t = this;return new Promise(function (n, o) {if (u.calibrator.isStringOrNumber(e)) {u.calibrator.isNumber(e) && (e = e.toString());var c = new r["default"]({ name: i.EmitType.imGroupOnlineCount, params: { groupId: e }, permission: s["default"].READ, singleTimeout: a.SocketTimeout.commonQuerySingle, totalTimeout: a.SocketTimeout.commonQueryTotal, fail: function fail(e) {o(e || { code: 408, content: "Failed to query online group users" });}, success: function success(e) {200 == e.code ? n(e) : o(e);} });t.im._goEasySocket.emit(c);} else o({ code: 400, content: "TypeError: groupId require string or number." });});} }]), e;}();t["default"] = l;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = f(n(3)),i = f(n(1)),s = n(4),a = n(5),u = n(0),c = n(10),l = f(n(17));function f(e) {return e && e.__esModule ? e : { "default": e };}var p = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t, t._goEasySocket.addMessageObserver(l["default"].groupPresence, this.newMessageReceived.bind(this));}return o(e, [{ key: "presence", value: function value(e) {var t = this;return new Promise(function (n, o) {if (Array.isArray(e) && 0 != e.length) {for (var r = 0; r < e.length; r++) {if (!u.calibrator.isStringOrNumber(e[r])) return void o({ code: 400, content: "TypeError: groupIds item require string or number." });if (u.calibrator.isNumber(e[r]) && (e[r] = e[r].toString()), 0 == e[r].length) return void o({ code: 400, content: "TypeError: groupIds has empty item." });}var i = { groupIds: e };t.emitRocket(a.EmitType.subscribeGroupPresence, i, function () {n({ code: 200, content: "ok" });}, function (e) {o({ code: e.code || 408, content: e.content || "Failed to subscribe group message" });}, s.SocketTimeout.commonInfiniteSingle, s.SocketTimeout.commonInfiniteTotal);} else o({ code: 400, content: "TypeError: groupIds require array." });});} }, { key: "unPresence", value: function value(e) {var t = this;return new Promise(function (n, o) {if (u.calibrator.isStringOrNumber(e)) {u.calibrator.isNumber(e) && (e = e.toString());var r = { groupId: e };t.emitRocket(a.EmitType.unsubscribeGroupPresence, r, function () {n({ code: 200, content: "ok" });}, function (e) {o({ code: e.code || 408, content: e.content || "Failed to unsubscribe presence" });}, s.SocketTimeout.commonRequestSingle, s.SocketTimeout.commonRequestTotal);} else o({ code: 400, content: "TypeError: groupId require string or number." });});} }, { key: "emitRocket", value: function value(e, t, n, o, s, a) {var u = new r["default"]({ name: e, params: t, singleTimeout: s, totalTimeout: a, permission: i["default"].WRITE, success: n, fail: o });this.im._goEasySocket.emit(u);} }, { key: "newMessageReceived", value: function value(e) {var t = this,n = null;e.c && (n = JSON.parse(e.c)), n && n.events && n.events.map(function (e) {var o = e.userData ? JSON.parse(e.userData) : {},r = { time: e.time, action: e.action, groupOnlineCount: n.userAmount, groupId: n.groupId, id: e.userId, data: o };t.im._event.notify(c.ImEventType.GROUP_PRESENCE, r);});} }]), e;}();t["default"] = p;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = f(n(3)),i = f(n(1)),s = n(4),a = n(5),u = n(0),c = n(10),l = f(n(17));function f(e) {return e && e.__esModule ? e : { "default": e };}var p = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t, this.im._goEasySocket.addMessageObserver(l["default"].userPresence, this.newMessageReceived.bind(this));}return o(e, [{ key: "presence", value: function value(e) {var t = this;return new Promise(function (n, o) {if (Array.isArray(e) && 0 != e.length) {for (var r = 0; r < e.length; r++) {if (!u.calibrator.isStringOrNumber(e[r])) return void o({ code: 400, content: "TypeError: userIds item require string or number." });if (u.calibrator.isNumber(e[r]) && (e[r] = e[r].toString()), 0 == e[r].length) return void o({ code: 400, content: "TypeError: userIds has empty item." });}var i = { userIds: e };t.emitRocket(a.EmitType.subscribeUserPresence, i, function () {n({ code: 200, content: "ok" });}, function (e) {o({ code: e.code || 408, content: e.content || "Failed to subscribe group message" });}, s.SocketTimeout.commonInfiniteSingle, s.SocketTimeout.commonInfiniteTotal);} else o({ code: 400, content: "TypeError: userIds require array." });});} }, { key: "unPresence", value: function value(e) {var t = this;return new Promise(function (n, o) {if (u.calibrator.isStringOrNumber(e)) {u.calibrator.isNumber(e) && (e = e.toString());var r = { userId: e };t.emitRocket(a.EmitType.unsubscribeUserPresence, r, function () {n({ code: 200, content: "ok" });}, function (e) {o({ code: e.code || 408, content: e.content || "Failed to unsubscribe presence" });}, s.SocketTimeout.commonRequestSingle, s.SocketTimeout.commonRequestTotal);} else o({ code: 400, content: "TypeError: id require string or number." });});} }, { key: "emitRocket", value: function value(e, t, n, o, s, a) {var u = new r["default"]({ name: e, params: t, singleTimeout: s, totalTimeout: a, permission: i["default"].WRITE, success: n, fail: o });this.im._goEasySocket.emit(u);} }, { key: "newMessageReceived", value: function value(e) {var t = this,n = [];e.c && (n = JSON.parse(e.c).events || []), n.map(function (e) {var n = e.userData ? JSON.parse(e.userData) : {},o = { time: e.time, action: e.action, id: e.userId, data: n };t.im._event.notify(c.ImEventType.USER_PRESENCE, o);});} }]), e;}();t["default"] = p;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(5),i = c(n(3)),s = c(n(1)),a = n(4),u = n(0);function c(e) {return e && e.__esModule ? e : { "default": e };}var l = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t;}return o(e, [{ key: "hereNow", value: function value(e) {var t = this;return new Promise(function (n, o) {if (e.userIds && Array.isArray(e.userIds) && 0 != e.userIds.length) {for (var c = 0; c < e.userIds.length; c++) {if (!u.calibrator.isStringOrNumber(e.userIds[c])) return void o({ code: 400, content: "TypeError: userIds item require string or number." });if (u.calibrator.isNumber(e.userIds[c]) && (e.userIds[c] = e.userIds[c].toString()), 0 == e.userIds[c].length) return void o({ code: 400, content: "TypeError: userIds has empty item." });}var l = new i["default"]({ name: r.EmitType.imHereNow, params: e, permission: s["default"].READ, singleTimeout: a.SocketTimeout.commonQuerySingle, totalTimeout: a.SocketTimeout.commonQueryTotal, fail: function fail(e) {o({ code: e.resultCode || 408, content: e.content || "Failed to query online users" });}, success: function success(e) {if (200 == e.code) {var t = e.content;e.content = t.map(function (e) {var t = e.userData ? JSON.parse(e.userData) : {};return { id: e.userId, data: t };}), n(e);} else o(e);} });t.im._goEasySocket.emit(l);} else o({ code: 400, content: "TypeError: userIds require array." });});} }]), e;}();t["default"] = l;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(5),i = c(n(3)),s = c(n(1)),a = n(4),u = n(6);function c(e) {return e && e.__esModule ? e : { "default": e };}var l = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.im = t;}return o(e, [{ key: "hereNow", value: function value(e) {var t = this;return new Promise(function (n, o) {if (u.calibrator.isStringOrNumber(e)) {u.calibrator.isNumber(e) && (e = e.toString());var c = new i["default"]({ name: r.EmitType.imGroupHereNow, params: { groupId: e }, permission: s["default"].READ, singleTimeout: a.SocketTimeout.commonQuerySingle, totalTimeout: a.SocketTimeout.commonQueryTotal, fail: function fail(e) {o({ code: e.resultCode || 408, content: e.content || "Failed to query online group users" });}, success: function success(e) {if (200 == e.code) {var t = e.content;e.content = t.map(function (e) {var t = e.userData ? JSON.parse(e.userData) : {};return { id: e.userId, data: t };}), n(e);} else o(e);} });t.im._goEasySocket.emit(c);} else o({ code: 400, content: "TypeError: groupId require string or number." });});} }]), e;}();t["default"] = l;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(17),s = (o = i) && o.__esModule ? o : { "default": o },a = n(46),u = n(27);var c = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.observers = [], this.im = t, t._goEasySocket.addMessageObserver(s["default"].imMessage, this.newNewMessageReceived.bind(this));}return r(e, [{ key: "newNewMessageReceived", value: function value(e) {this.sendAck(e), this.notify(e), u.GoEasyEventCenter.fire(a.IM_INTERNAL_EVENTS.MESSAGE_RECEIVED, e);} }, { key: "addIMMessageObserver", value: function value(e) {this.observers.push(e);} }, { key: "sendAck", value: function value(e) {this.im._goEasySocket.sendAck("imAck", { publishGuid: e.i });} }, { key: "notify", value: function value(e) {for (var t = 0; t < this.observers.length; t++) {this.observers[t](e);}} }]), e;}();t["default"] = c;}, function (e, t, n) {"use strict";t.__esModule = !0, t.EmitterEventDriver = void 0;var o = n(12),r = function () {function e() {this.emitter = new o();}return e.prototype.on = function (e, t) {return this.emitter.on(e, t), this;}, e.prototype.once = function (e, t) {return this.emitter.once(e, t), this;}, e.prototype.off = function (e, t) {return this.emitter.off(e, t), this;}, e.prototype.fire = function (e, t) {return this.emitter.emit(e, t), this;}, e;}();t.EmitterEventDriver = r;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = c(n(3)),i = n(5),s = c(n(1)),a = n(4),u = n(7);function c(e) {return e && e.__esModule ? e : { "default": e };}var l = function () {function e(t, n) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.userData = {}, this.groupData = {}, this.im = t, this.putUserData(n.id, n.data);}return o(e, [{ key: "putData", value: function value(e, t, n) {n || (n = {}), e == u.ConversationType.PRIVATE ? this.userData[t] = n : this.groupData[t] = n;} }, { key: "putUserData", value: function value(e, t) {this.userData[e] = t;} }, { key: "putGroupData", value: function value(e, t) {this.groupData[e] = t;} }, { key: "loadData", value: function value(e, t) {var n = this;return new Promise(function (o, c) {var l = void 0;if ((l = u.ConversationType.PRIVATE === t ? n.userData : n.groupData)[e] && 0 != Object.keys(l[e]).length) o(l[e]);else {var f = { targetId: e, type: t },p = new r["default"]({ name: i.EmitType.imData, params: f, permission: s["default"].READ, singleTimeout: a.SocketTimeout.commonQuerySingle, totalTimeout: a.SocketTimeout.commonQueryTotal, success: function success(t) {t.content ? l[e] = JSON.parse(t.content) : l[e] = {}, o(l[e]);}, fail: function fail(e) {c(e);} });n.im._goEasySocket.emit(p);}});} }]), e;}();t["default"] = l;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 }), t.Conversations = undefined;var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = n(38),i = n(11),s = n(10),a = n(23),u = y(n(3)),c = y(n(1)),l = n(4),f = n(5),p = n(0),d = y(n(16)),h = y(n(19));function y(e) {return e && e.__esModule ? e : { "default": e };}t.Conversations = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.im = null, this.list = [], this.synchronized = !1, this.im = t, t._iMReceiver.addIMMessageObserver(this.updateByInMessage.bind(this));}return o(e, [{ key: "onUpdated", value: function value() {var e = this;this.latestConversations().then(function () {e.im._event.notify(s.ImEventType.CONVERSATIONS_UPDATED, { unreadTotal: e.getUnreadTotal(e.list), conversations: e.list.slice(0) });});} }, { key: "latestConversations", value: function value() {return this.synchronized ? this.loadLocalConversations() : this.loadServerConversations();} }, { key: "updateByInMessage", value: function value(e) {var t = this,n = null;n = e.t == a.ConversationType.GROUP ? e.r : i.IM.userId == e.r ? e.s : e.r;var o = this.list.findIndex(function (t) {return e.t == a.ConversationType.GROUP && n == t.groupId || e.t == a.ConversationType.PRIVATE && n == t.userId;}),s = void 0;function u(e) {e.type === a.ConversationType.PRIVATE && (i.IM.userId === e.lastMessage.senderId ? e.lastMessage.senderData = i.IM.userData : e.lastMessage.senderData = e.data);}o > -1 ? (s = this.list[o], this.list.splice(o, 1), s.lc < e.ts && (s.lastMessage = d["default"].assemble(e), s.lm = e.ts), i.IM.userId != e.senderId && (s.unread += 1), u(s), this.insertOne(s), this.onUpdated()) : (s = r.Conversion.buildByInMessage(e), i.IM.userId != e.senderId && (s.unread += 1), this.insertOne(s), this.im._dataCache.loadData(n, e.t).then(function (e) {s.data = e, u(s), t.onUpdated();})["catch"](function (t) {e.t;}));} }, { key: "updateByOutMessage", value: function value(e, t, n, o) {var s = {};Object.assign(s, e), delete s.file;var u = this.list.findIndex(function (e) {return e.type == a.ConversationType.GROUP && n == e.groupId || e.type == a.ConversationType.PRIVATE && n == e.userId;}),c = void 0;u > -1 ? (c = this.list[u], this.list.splice(u, 1), c.unread = 0, c.lc = c.lm, c.lastMessage = s, e.status === h["default"].success && (c.lc = e.timestamp, c.lm = e.timestamp)) : c = r.Conversion.buildByOutMessage(s, t, n, o), c.data = o;var l = this.im._dataCache;t === a.ConversationType.GROUP ? l.putGroupData(c.groupId, o) : (l.putUserData(c.userId, o), c.lastMessage.senderData = i.IM.userData), this.insertOne(c), this.onUpdated();} }, { key: "imLastConversations", value: function value(e, t) {var n = new u["default"]({ name: f.EmitType.imLastConversations, params: {}, permission: c["default"].READ, singleTimeout: l.SocketTimeout.commonQuerySingle, totalTimeout: l.SocketTimeout.commonQueryTotal, fail: t, success: e });this.im._goEasySocket.emit(n);} }, { key: "loadServerConversations", value: function value() {var e = this,t = this.im;return new Promise(function (n, o) {e.imLastConversations(function (i) {if (200 == i.code) {for (var s = i.content, u = function u(n, o) {var i = s[n],u = e.list.find(function (e) {return i.t == a.ConversationType.GROUP && i.g == e.groupId || i.t == a.ConversationType.PRIVATE && i.uid == e.userId;});p.calibrator.isDef(u) ? u.top = i.top : (u = r.Conversion.buildByConversation(t._dataCache, i), e.insertOne(u));}, c = 0, l = s.length; c < l; c++) {u(c);}e.synchronized = !0, n({ code: 200, content: { unreadTotal: e.getUnreadTotal(e.list), conversations: e.list.slice(0) } });} else o(i);}, function (e) {o({ code: e.resultCode, content: e.content });});});} }, { key: "loadLocalConversations", value: function value() {var e = this,t = [];return this.list.map(function (n) {if (!n.data) {var o = "private" == n.t ? n.userId : n.groupId,r = e.im._dataCache.loadData(o, n.t);r.then(function (e) {n.data = e;})["catch"](function (e) {n.type;}), t.push(r);}}), 0 != t.length ? new Promise(function (n, o) {Promise.all(t).then(function () {n({ code: 200, content: { unreadTotal: e.getUnreadTotal(e.list), conversations: e.list.slice(0) } });})["catch"](function (e) {o({ code: 408, content: e.message });});}) : Promise.resolve({ code: 200, content: { unreadTotal: this.getUnreadTotal(this.list), conversations: this.list } });} }, { key: "privateMarkAsRead", value: function value(e) {var t = this.list.find(function (t) {return t.userId == e;}),n = { friendId: e };return this.markAsRead(n, t);} }, { key: "groupMarkAsRead", value: function value(e) {var t = this.list.find(function (t) {return t.groupId === e;}),n = { groupId: e };return this.markAsRead(n, t);} }, { key: "markAsRead", value: function value(e, t) {var n = this;if (!t || t.unread <= 0) return Promise.resolve({ code: 200, content: "OK" });var o = t.unread,r = t.lm;return t.mt = r, e.lastTimestamp = r, e.lastConsumedTimestamp = t.lc, new Promise(function (i, s) {var u = t.type == a.ConversationType.PRIVATE ? f.EmitType.markPrivateMessageAsRead : f.EmitType.markGroupMessageAsRead;n.requestEmit(u, e, function (e) {200 == e.code ? (r === t.mt && n.resetConversation(t, t.lm, o), i({ code: 200, content: "OK" })) : s(e);}, function (e) {s(e || { code: e.code || 408, content: e.content || "Failed to query message" });});});} }, { key: "resetConversation", value: function value(e, t, n) {t <= e.lc || (e.unread -= n, e.lc = t, this.onUpdated());} }, { key: "getUnreadTotal", value: function value(e) {for (var t = 0, n = 0, o = e.length; n < o; n++) {t += e[n].unread;}return t;} }, { key: "insertOne", value: function value(e) {var t = this.getPosIndex(e);this.list.splice(t + 1, 0, e);} }, { key: "getPosIndex", value: function value(e) {if (0 == this.list.length) return -1;for (var t, n, o = 0, r = this.list.length; r - o > 1;) {t = Math.floor((o + r) / 2), n = this.list[t];var i = this.compares(e, n);if (0 == i) return t;i > 0 ? o = t : r = t;}return 0 == o && this.compares(this.list[0], e) > 0 ? -1 : o;} }, { key: "compares", value: function value(e, t) {var n = void 0;return (n = e.top == t.top ? t.lastMessage.timestamp - e.lastMessage.timestamp : e.top ? -1 : 1) > 0 ? 1 : 0 === n ? 0 : -1;} }, { key: "removeConversation", value: function value(e, t) {var n = this,o = t == a.ConversationType.PRIVATE ? "userId" : "groupId";return p.calibrator.isStringOrNumber(e) ? (p.calibrator.isNumber(e) && (e = e.toString()), -1 == this.findConversationIndex(t, e) ? Promise.reject({ code: 400, content: "Failed to remove conversation, " + o + " does not exists." }) : new Promise(function (o, r) {var i = { targetId: e, type: t };n.requestEmit(f.EmitType.removeConversation, i, function (i) {var s = n.findConversationIndex(t, e);s > -1 && n.list.splice(s, 1), n.onUpdated(), 200 == i.code ? o({}) : r({ code: i.code || 408, content: i.content || "Failed to remove conversation" });}, function (e) {r({ code: e.code || 408, content: e.content || "Failed to remove conversation" });});})) : Promise.reject({ code: 400, content: "Failed to remove conversation, " + o + " must be a string or integer." });} }, { key: "topConversation", value: function value(e, t, n) {var o = this,r = n == a.ConversationType.PRIVATE ? "userId" : "groupId";if (!p.calibrator.isStringOrNumber(e)) return Promise.reject({ code: 400, content: "Failed to top conversation, " + r + " must be a string or integer." });p.calibrator.isNumber(e) && (e = e.toString());var i = this.findConversationIndex(n, e);return -1 == i || this.list[i].top == t ? Promise.reject({ code: 400, content: "Failed to top conversation, " + r + " does not exists." }) : new Promise(function (r, i) {var s = { targetId: e, top: t, type: n };o.requestEmit(f.EmitType.topConversation, s, function () {var i = o.findConversationIndex(n, e),s = o.list[i];s.top = t, o.list.splice(i, 1), o.insertOne(s), o.onUpdated(), r({});}, function (e) {i({ code: e.code || 408, content: e.content || "Failed to top Conversation" });});});} }, { key: "requestEmit", value: function value(e, t, n, o) {var r = new u["default"]({ name: e, params: t, permission: c["default"].WRITE, singleTimeout: l.SocketTimeout.commonRequestSingle, totalTimeout: l.SocketTimeout.commonRequestTotal, success: n, fail: o });this.im._goEasySocket.emit(r);} }, { key: "findConversationIndex", value: function value(e, t) {return this.list.findIndex(function (n) {return e == a.ConversationType.PRIVATE ? n.type == e && n.userId == t : n.type == e && n.groupId == t;});} }]), e;}();}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),r = function _(e, t, n) {null === e && (e = Function.prototype);var o = Object.getOwnPropertyDescriptor(e, t);if (o === undefined) {var r = Object.getPrototypeOf(e);return null === r ? undefined : _(r, t, n);}if ("value" in o) return o.value;var i = o.get;return i === undefined ? undefined : i.call(n);},i = g(n(47)),s = n(5),a = g(n(129)),u = g(n(3)),c = g(n(1)),l = g(n(9)),f = g(n(130)),p = n(0),d = n(59),h = n(4),y = g(n(32)),v = n(31),b = n(131),m = n(132);function g(e) {return e && e.__esModule ? e : { "default": e };}var w = function (e) {function t(e, n) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, t);var o = function (e, t) {if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t || "object" != typeof t && "function" != typeof t ? e : t;}(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this));return o.ioSocket = null, o.sid = null, o.appKey = null, o.anonymous = !1, o.userId = null, o.userData = null, o.otp = null, o.artifactVersion = "0.0.0", o.uri = null, o.ioOpts = null, o.allowNotification = !1, o.reconnectingTimes = 0, o.messageObservers = {}, o.connectFailedObservers = [], o.connectingObservers = [], o.expiredReconnectedObservers = [], o.onConnectSuccess = p.noop, o.onConnectFailed = p.noop, o.onConnectProgress = p.noop, o.setUriAndOpts(e), o.extendOptions(n), o.ioSocket = new a["default"]({ onDisconnected: o.onIoDisconnected.bind(o), onReconnecting: o.onIoReconnecting.bind(o) }), o.ioSocket.addConnectedObserver(o.onIoReconnected.bind(o)), o.appKey = e.appkey, o.allowNotification = e.allowNotification, o.modules = e.modules, p.calibrator.isEmpty(n.id) ? (o.anonymous = !0, o.userId = b.AnonymousUserIdRepository.get()) : o.userId = n.id, o.artifactVersion = y["default"].version, o.addConnectedObserver(o.onConnectSuccess), o.addConnectFailedObserver(o.onConnectFailed), o.addConnectingObserver(o.onConnectProgress), o;}return function (e, t) {if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);}(t, i["default"]), o(t, [{ key: "extendOptions", value: function value(e) {if (p.calibrator.isFunction(e.onSuccess) && (this.onConnectSuccess = e.onSuccess), p.calibrator.isFunction(e.onFailed) && (this.onConnectFailed = e.onFailed), p.calibrator.isFunction(e.onProgress) && (this.onConnectProgress = e.onProgress), p.calibrator.isDef(e.data) && !p.calibrator.isObject(e.data)) throw { code: 400, content: "TypeError: data requires an object." };if ((p.calibrator.isDef(e.data) ? String(e.data).length : 0) > 300) {if (p.calibrator.isObject(e) && p.calibrator.isFunction(e.onFailed)) throw { code: 400, content: "user.data-length limit 300 byte." };} else this.userData = e.data;this.otp = e.otp || null;} }, { key: "setUriAndOpts", value: function value(e) {var t = "://" + p.GoEasyDomainNumber.refreshNumber() + e.host,n = !0;if (v.PlatformDetector.currentPlatform() === v.Platform.BROWSER) {var o = void 0;!0 === e.supportOldBrowser ? (o = ["polling", "websocket"], n = !1) : o = ["websocket"], !1 !== e.forceTLS && n ? this.uri = "https" + t + ":443" : this.uri = "http" + t + ":80", this.ioOpts = { transports: o, timeout: h.SocketTimeout.connect };} else this.uri = "https://wx-" + e.host + ":443", this.ioOpts = { transports: ["websocket"], reconnectionDelayMax: h.SocketTimeout.reconnectionDelayMax };} }, { key: "onIoReconnected", value: function value() {this.status === l["default"].RECONNECTING && this.authorize();} }, { key: "emit", value: function value(e) {r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "emit", this).call(this, e);} }, { key: "doEmit", value: function value(e, t, n) {d.uniApp.overrideUniShowHideMethods(), t.sid = this.sid, this.ioSocket.doEmit(e, t, n);} }, { key: "sendAck", value: function value(e, t) {this.ioSocket.io.emit(e, t);} }, { key: "connect", value: function value(e) {var n = this;r(t.prototype.__proto__ || Object.getPrototypeOf(t.prototype), "connect", this).call(this), this.onConnecting(this.reconnectingTimes), this.ioSocket.connect({ uri: this.uri, opts: this.ioOpts }), e && e.supportNotification() && e.getRegIdPromise() ? e.getRegIdPromise().then(function (e) {n.regId = e, n.authorize();})["catch"](function (e) {console.warn("Failed to register the Manufacturers Push service:" + JSON.stringify(e)), n.authorize();}) : this.authorize();} }, { key: "disconnect", value: function value() {var e = this;return new Promise(function (t, n) {var o = function o() {e.status = l["default"].DISCONNECTED, e.ioSocket.disconnect(), t();};if (e.allowNotification) {var r = new u["default"]({ name: s.EmitType.manualDisconnect, params: {}, permission: c["default"].READ, singleTimeout: h.SocketTimeout.commonInfiniteSingle, totalTimeout: h.SocketTimeout.commonInfiniteTotal, fail: function fail(e) {n(e);}, success: o });e.emit(r);} else o();});} }, { key: "authorize", value: function value() {var e = { appkey: this.appKey, userId: this.userId, userData: JSON.stringify(this.userData), otp: this.otp, artifactVersion: this.artifactVersion, sid: this.sid, allowNT: this.allowNotification, regId: this.regId, modules: this.modules, a: this.anonymous, z: m.clientInfo.z };JSON.stringify(e);var t = new u["default"]({ name: s.EmitType.authorize, params: e, permission: c["default"].NONE, singleTimeout: h.SocketTimeout.commonInfiniteSingle, totalTimeout: h.SocketTimeout.commonInfiniteTotal, success: this.onAuthorizeSuccess.bind(this), fail: this.onAuthorizeFailed.bind(this) });this.ioSocket.emit(t);} }, { key: "onConnecting", value: function value() {this.notify(this.connectingObservers, this.reconnectingTimes);} }, { key: "onIoReconnecting", value: function value() {d.uniApp.overrideUniShowHideMethods(), this.reconnectingTimes++, this.status == l["default"].CONNECTED || this.status == l["default"].EXPIRED_RECONNECTED || this.status == l["default"].RECONNECTING ? this.status = l["default"].RECONNECTING : this.status = l["default"].CONNECTING, this.onConnecting();} }, { key: "onIoDisconnected", value: function value() {this.status == l["default"].DISCONNECTING && (this.status = l["default"].DISCONNECTED, this.notify(this.disconnectedObservers));} }, { key: "onAuthorizeSuccess", value: function value(e) {(!0 === this.anonymous && e.u && (b.AnonymousUserIdRepository.put(e.u), this.userId = e.u), this.status === l["default"].RECONNECTING) ? this.sid !== e.sid ? (this.status = l["default"].EXPIRED_RECONNECTED, this.notify(this.expiredReconnectedObservers)) : this.status = l["default"].RECONNECTED : (this.status = l["default"].CONNECTED, this.sid = e.sid);e.enablePublish && (this.permissions.find(function (e) {return e == c["default"].WRITE;}) || this.permissions.push(c["default"].WRITE)), e.enableSubscribe && (this.permissions.find(function (e) {return e == c["default"].READ;}) || this.permissions.push(c["default"].READ)), this.reconnectingTimes = 0, this.notify(this.connectedObservers);} }, { key: "onAuthorizeFailed", value: function value(e) {this.ioSocket.disconnect(), this.status = l["default"].CONNECT_FAILED;var t = { code: e.resultCode || 408, content: e.content || "Host unreachable or timeout" };this.notify(this.connectFailedObservers, t);} }, { key: "addConnectingObserver", value: function value(e) {p.calibrator.isFunction(e) && this.connectingObservers.push(e);} }, { key: "addConnectFailedObserver", value: function value(e) {p.calibrator.isFunction(e) && this.connectFailedObservers.push(e);} }, { key: "addExpiredReconnectedObserver", value: function value(e) {p.calibrator.isFunction(e) && this.expiredReconnectedObservers.push(e);} }, { key: "addMessageObserver", value: function value(e, t) {var n = this;this.ioSocket.io.on(e, function (t) {n.notifyMessageObservers(e, t);}), this.messageObservers[e] || (this.messageObservers[e] = []), this.messageObservers[e].push(new f["default"](t));} }, { key: "notifyMessageObservers", value: function value(e, t) {for (var n = this.messageObservers[e], o = 0; o < n.length; o++) {n[o].onMessage(e, t);}} }]), t;}();t["default"] = w;}, function (e, t, n) {"use strict";Object.defineProperty(t, "__esModule", { value: !0 });var o,r = function () {function e(e, t) {for (var n = 0; n < t.length; n++) {var o = t[n];o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, o.key, o);}}return function (t, n, o) {return n && e(t.prototype, n), o && e(t, o), t;};}(),i = n(9),s = (o = i) && o.__esModule ? o : { "default": o };var a = function () {function e(t) {!function (e, t) {if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");}(this, e), this.socket = null, this.socket = t;}return r(e, [{ key: "emit", value: function value(e) {this.socket.status !== s["default"].CONNECT_FAILED && this.socket.status !== s["default"].DISCONNECTED ? (e.start(), this.doEmit(e)) : e.fail({ resultCode: "409", content: "Please connect first" });} }, { key: "doEmit", value: function value(e) {var t = this;if (e.isTimeout()) e.fail({ resultCode: 408, content: "Host unreachable or timeout" });else if (this.socket.status !== s["default"].CONNECT_FAILED) {if (this.authenticated()) {if (this.hasPermission(e)) {if (this.socket.status === s["default"].CONNECTED || this.socket.status === s["default"].RECONNECTED || this.socket.status === s["default"].EXPIRED_RECONNECTED) {if (!e.complete) {var n = setTimeout(function () {t.doEmit(e);}, e.singleTimeout);this.socket.doEmit(e.name, e.params, function (t) {clearTimeout(n), 200 === t.resultCode || 200 == t.code ? e.success(t) : e.fail(t);}), e.retried++;}} else setTimeout(function () {t.doEmit(e);}, 500);} else e.fail({ resultCode: 401, content: "No permission" });} else setTimeout(function () {t.doEmit(e);}, 500);} else e.fail({ resultCode: 408, content: "Failed to connect GoEasy." });} }, { key: "hasPermission", value: function value(e) {return !!this.socket.permissions.find(function (t) {return t === e.permission;});} }, { key: "authenticated", value: function value() {return this.socket.status === s["default"].CONNECTED || this.socket.status === s["default"].RECONNECTING || this.socket.status === s["default"].RECONNECTED || this.socket.status === s["default"].EXPIRED_RECONNECTED;} }]), e;}();t["default"] = a;}, function (e, t, n) {"use strict";var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {return typeof e;} : function (e) {return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;},r = n(111),i = n(28),s = n(50);n(8)("socket.io-client");e.exports = t = u;var a = t.managers = {};function u(e, t) {"object" === (void 0 === e ? "undefined" : o(e)) && (t = e, e = undefined), t = t || {};var n,i = r(e),u = i.source,c = i.id,l = i.path,f = a[c] && l in a[c].nsps;return t.forceNew || t["force new connection"] || !1 === t.multiplex || f ? n = s(u, t) : (a[c] || (a[c] = s(u, t)), n = a[c]), i.query && !t.query && (t.query = i.query), n.socket(i.path, t);}t.protocol = i.protocol, t.connect = u, t.Manager = n(50), t.Socket = n(56);}, function (e, t, n) {"use strict";var o = n(48);n(8)("socket.io-client:url");e.exports = function (e, t) {var n = e;t = t || "undefined" != typeof location && location, null == e && (e = t.protocol + "//" + t.host);"string" == typeof e && ("/" === e.charAt(0) && (e = "/" === e.charAt(1) ? t.protocol + e : t.host + e), /^(https?|wss?):\/\//.test(e) || (e = void 0 !== t ? t.protocol + "//" + e : "https://" + e), n = o(e));n.port || (/^(http|ws)$/.test(n.protocol) ? n.port = "80" : /^(http|ws)s$/.test(n.protocol) && (n.port = "443"));n.path = n.path || "/";var r = -1 !== n.host.indexOf(":") ? "[" + n.host + "]" : n.host;return n.id = n.protocol + "://" + r + ":" + n.port, n.href = n.protocol + "://" + r + (t && t.port === n.port ? "" : ":" + n.port), n;};}, function (e, t, n) {"use strict";e.exports = n(113), e.exports.parser = n(13);}, function (e, t, n) {"use strict";var o = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (e) {return typeof e;} : function (e) {return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;},r = n(51),i = n(12),s = (n(8)("engine.io-client:socket"), n(55)),a = n(13),u = n(48),c = n(22);function l(e, t) {if (!(this instanceof l)) return new l(e, t);t = t || {}, e && "object" === (void 0 === e ? "undefined" : o(e)) && (t = e, e = null), e ? (e = u(e), t.hostname = e.host, t.secure = "https" === e.protocol || "wss" === e.protocol, t.port = e.port, e.query && (t.query = e.query)) : t.host && (t.hostname = u(t.host).host), this.secure = null != t.secure ? t.secure : "undefined" != typeof location && "https:" === location.protocol, t.hostname && !t.port && (t.port = this.secure ? "443" : "80"), this.agent = t.agent || !1, this.hostname = t.hostname || ("undefined" != typeof location ? location.hostname : "localhost"), this.port = t.port || ("undefined" != typeof location && location.port ? location.port : this.secure ? 443 : 80), this.query = t.query || {}, "string" == typeof this.query && (this.query = c.decode(this.query)), this.upgrade = !1 !== t.upgrade, this.path = (t.path || "/engine.io").replace(/\/$/, "") + "/", this.forceJSONP = !!t.forceJSONP, this.jsonp = !1 !== t.jsonp, this.forceBase64 = !!t.forceBase64, this.enablesXDR = !!t.enablesXDR, this.timestampParam = t.timestampParam || "t", this.timestampRequests = t.timestampRequests, this.transports = t.transports || ["polling", "websocket"], this.transportOptions = t.transportOptions || {}, this.readyState = "", this.writeBuffer = [], this.prevBufferLen = 0, this.policyPort = t.policyPort || 843, this.rememberUpgrade = t.rememberUpgrade || !1, this.binaryType = null, this.onlyBinaryUpgrades = t.onlyBinaryUpgrades, this.perMessageDeflate = !1 !== t.perMessageDeflate && (t.perMessageDeflate || {}), !0 === this.perMessageDeflate && (this.perMessageDeflate = {}), this.perMessageDeflate && null == this.perMessageDeflate.threshold && (this.perMessageDeflate.threshold = 1024), this.pfx = t.pfx || null, this.key = t.key || null, this.passphrase = t.passphrase || null, this.cert = t.cert || null, this.ca = t.ca || null, this.ciphers = t.ciphers || null, this.rejectUnauthorized = t.rejectUnauthorized === undefined || t.rejectUnauthorized, this.forceNode = !!t.forceNode, this.isReactNative = "undefined" != typeof navigator && "string" == typeof navigator.product && "reactnative" === navigator.product.toLowerCase(), ("undefined" == typeof self || this.isReactNative) && (t.extraHeaders && Object.keys(t.extraHeaders).length > 0 && (this.extraHeaders = t.extraHeaders), t.localAddress && (this.localAddress = t.localAddress)), this.id = null, this.upgrades = null, this.pingInterval = null, this.pingTimeout = null, this.pingIntervalTimer = null, this.pingTimeoutTimer = null, this.open();}e.exports = l, l.priorWebsocketSuccess = !1, i(l.prototype), l.protocol = a.protocol, l.Socket = l, l.Transport = n(29), l.transports = n(51), l.parser = n(13), l.prototype.createTransport = function (e) {var t = function (e) {var t = {};for (var n in e) {e.hasOwnProperty(n) && (t[n] = e[n]);}return t;}(this.query);t.EIO = a.protocol, t.transport = e;var n = this.transportOptions[e] || {};return this.id && (t.sid = this.id), new r[e]({ query: t, socket: this, agent: n.agent || this.agent, hostname: n.hostname || this.hostname, port: n.port || this.port, secure: n.secure || this.secure, path: n.path || this.path, forceJSONP: n.forceJSONP || this.forceJSONP, jsonp: n.jsonp || this.jsonp, forceBase64: n.forceBase64 || this.forceBase64, enablesXDR: n.enablesXDR || this.enablesXDR, timestampRequests: n.timestampRequests || this.timestampRequests, timestampParam: n.timestampParam || this.timestampParam, policyPort: n.policyPort || this.policyPort, pfx: n.pfx || this.pfx, key: n.key || this.key, passphrase: n.passphrase || this.passphrase, cert: n.cert || this.cert, ca: n.ca || this.ca, ciphers: n.ciphers || this.ciphers, rejectUnauthorized: n.rejectUnauthorized || this.rejectUnauthorized, perMessageDeflate: n.perMessageDeflate || this.perMessageDeflate, extraHeaders: n.extraHeaders || this.extraHeaders, forceNode: n.forceNode || this.forceNode, localAddress: n.localAddress || this.localAddress, requestTimeout: n.requestTimeout || this.requestTimeout, protocols: n.protocols || void 0, isReactNative: this.isReactNative });}, l.prototype.open = function () {var e;if (this.rememberUpgrade && l.priorWebsocketSuccess && -1 !== this.transports.indexOf("websocket")) e = "websocket";else {if (0 === this.transports.length) {var t = this;return void setTimeout(function () {t.emit("error", "No transports available");}, 0);}e = this.transports[0];}this.readyState = "opening";try {e = this.createTransport(e);} catch (n) {return this.transports.shift(), void this.open();}e.open(), this.setTransport(e);}, l.prototype.setTransport = function (e) {e.name;var t = this;this.transport && (this.transport.name, this.transport.removeAllListeners()), this.transport = e, e.on("drain", function () {t.onDrain();}).on("packet", function (e) {t.onPacket(e);}).on("error", function (e) {t.onError(e);}).on("close", function () {t.onClose("transport close");});}, l.prototype.probe = function (e) {var t = this.createTransport(e, { probe: 1 }),n = !1,o = this;function r() {if (o.onlyBinaryUpgrades) {var e = !this.supportsBinary && o.transport.supportsBinary;n = n || e;}n || (t.send([{ type: "ping", data: "probe" }]), t.once("packet", function (e) {if (!n) if ("pong" === e.type && "probe" === e.data) {if (o.upgrading = !0, o.emit("upgrading", t), !t) return;l.priorWebsocketSuccess = "websocket" === t.name, o.transport.name, o.transport.pause(function () {n || "closed" !== o.readyState && (f(), o.setTransport(t), t.send([{ type: "upgrade" }]), o.emit("upgrade", t), t = null, o.upgrading = !1, o.flush());});} else {var r = new Error("probe error");r.transport = t.name, o.emit("upgradeError", r);}}));}function i() {n || (n = !0, f(), t.close(), t = null);}function s(e) {var n = new Error("probe error: " + e);n.transport = t.name, i(), o.emit("upgradeError", n);}function a() {s("transport closed");}function u() {s("socket closed");}function c(e) {t && e.name !== t.name && (e.name, t.name, i());}function f() {t.removeListener("open", r), t.removeListener("error", s), t.removeListener("close", a), o.removeListener("close", u), o.removeListener("upgrading", c);}l.priorWebsocketSuccess = !1, t.once("open", r), t.once("error", s), t.once("close", a), this.once("close", u), this.once("upgrading", c), t.open();}, l.prototype.onOpen = function () {if (this.readyState = "open", l.priorWebsocketSuccess = "websocket" === this.transport.name, this.emit("open"), this.flush(), "open" === this.readyState && this.upgrade && this.transport.pause) for (var e = 0, t = this.upgrades.length; e < t; e++) {this.probe(this.upgrades[e]);}}, l.prototype.onPacket = function (e) {if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) switch (e.type, e.data, this.emit("packet", e), this.emit("heartbeat"), e.type) {case "open":this.onHandshake(JSON.parse(e.data));break;case "pong":this.setPing(), this.emit("pong");break;case "error":var t = new Error("server error");t.code = e.data, this.onError(t);break;case "message":this.emit("data", e.data), this.emit("message", e.data);} else this.readyState;}, l.prototype.onHandshake = function (e) {this.emit("handshake", e), this.id = e.sid, this.transport.query.sid = e.sid, this.upgrades = this.filterUpgrades(e.upgrades), this.pingInterval = e.pingInterval, this.pingTimeout = e.pingTimeout, this.onOpen(), "closed" !== this.readyState && (this.setPing(), this.removeListener("heartbeat", this.onHeartbeat), this.on("heartbeat", this.onHeartbeat));}, l.prototype.onHeartbeat = function (e) {clearTimeout(this.pingTimeoutTimer);var t = this;t.pingTimeoutTimer = setTimeout(function () {"closed" !== t.readyState && t.onClose("ping timeout");}, e || t.pingInterval + t.pingTimeout);}, l.prototype.setPing = function () {var e = this;clearTimeout(e.pingIntervalTimer), e.pingIntervalTimer = setTimeout(function () {e.pingTimeout, e.ping(), e.onHeartbeat(e.pingTimeout);}, e.pingInterval);}, l.prototype.ping = function () {var e = this;this.sendPacket("ping", function () {e.emit("ping");});}, l.prototype.onDrain = function () {this.writeBuffer.splice(0, this.prevBufferLen), this.prevBufferLen = 0, 0 === this.writeBuffer.length ? this.emit("drain") : this.flush();}, l.prototype.flush = function () {"closed" !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length && (this.writeBuffer.length, this.transport.send(this.writeBuffer), this.prevBufferLen = this.writeBuffer.length, this.emit("flush"));}, l.prototype.write = l.prototype.send = function (e, t, n) {return this.sendPacket("message", e, t, n), this;}, l.prototype.sendPacket = function (e, t, n, o) {if ("function" == typeof t && (o = t, t = undefined), "function" == typeof n && (o = n, n = null), "closing" !== this.readyState && "closed" !== this.readyState) {(n = n || {}).compress = !1 !== n.compress;var r = { type: e, data: t, options: n };this.emit("packetCreate", r), this.writeBuffer.push(r), o && this.once("flush", o), this.flush();}}, l.prototype.close = function () {if ("opening" === this.readyState || "open" === this.readyState) {this.readyState = "closing";var e = this;this.writeBuffer.length ? this.once("drain", function () {this.upgrading ? o() : t();}) : this.upgrading ? o() : t();}function t() {e.onClose("forced close"), e.transport.close();}function n() {e.removeListener("upgrade", n), e.removeListener("upgradeError", n), t();}function o() {e.once("upgrade", n), e.once("upgradeError", n);}return this;}, l.prototype.onError = function (e) {l.priorWebsocketSuccess = !1, this.emit("error", e), this.onClose("transport error", e);}, l.prototype.onClose = function (e, t) {if ("opening" === this.readyState || "open" === this.readyState || "closing" === this.readyState) {clearTimeout(this.pingIntervalTimer), clearTimeout(this.pingTimeoutTimer), this.transport.removeAllListeners("close"), this.transport.close(), this.transport.removeAllListeners(), this.readyState = "closed", this.id = null, this.emit("close", e, t), this.writeBuffer = [], this.prevBufferLen = 0;}}, l.prototype.filterUpgrades = function (e) {for (var t = [], n = 0, o = e.length; n < o; n++) {~s(this.transports, e[n]) && t.push(e[n]);}return t;};}, function (e, t, n) {"use strict";(function (t) {var o = n(115),r = n(30);e.exports = l;var i,s = /\n/g,a = /\\n/g;function u() {}function c() {return "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== t ? t : {};}function l(e) {if (o.call(this, e), this.query = this.query || {}, !i) {var t = c();i = t.___eio = t.___eio || [];}this.index = i.length;var n = this;i.push(function (e) {n.onData(e);}), this.query.j = this.index, "function" == typeof addEventListener && addEventListener("beforeunload", function () {n.script && (n.script.onerror = u);}, !1);}r(l, o), l.prototype.supportsBinary = !1, l.prototype.doClose = function () {this.script && (this.script.parentNode.removeChild(this.script), this.script = null), this.form && (this.form.parentNode.removeChild(this.form), this.form = null, this.iframe = null), o.prototype.doClose.call(this);}, l.prototype.doPoll = function () {var e = this,t = document.createElement("script");this.script && (this.script.parentNode.removeChild(this.script), this.script = null), t.async = !0, t.src = this.uri(), t.onerror = function (t) {e.onError("jsonp poll error", t);};var n = document.getElementsByTagName("script")[0];n ? n.parentNode.insertBefore(t, n) : (document.head || document.body).appendChild(t), this.script = t, "undefined" != typeof navigator && /gecko/i.test(navigator.userAgent) && setTimeout(function () {var e = document.createElement("iframe");document.body.appendChild(e), document.body.removeChild(e);}, 100);}, l.prototype.doWrite = function (e, t) {var n = this;if (!this.form) {var o,r = document.createElement("form"),i = document.createElement("textarea"),u = this.iframeId = "eio_iframe_" + this.index;r.className = "socketio", r.style.position = "absolute", r.style.top = "-1000px", r.style.left = "-1000px", r.target = u, r.method = "POST", r.setAttribute("accept-charset", "utf-8"), i.name = "d", r.appendChild(i), document.body.appendChild(r), this.form = r, this.area = i;}function c() {l(), t();}function l() {if (n.iframe) try {n.form.removeChild(n.iframe);} catch (t) {n.onError("jsonp polling iframe removal error", t);}try {var e = '