module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},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=16)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(e){return e&&e.__esModule?e:{default:e}}(n(9));var a=function(){"#{{FAKE_FUNCTION}}";return new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.setStorageSyncErrorTimes=0,this.watchObjectKeyCaches=null,this.wxAPIMapToOff={onShow:"offShow",onHide:"offHide",onAppHide:"offAppHide",onAppShow:"offAppShow"},this.isCocos=null,this.isLaya=null,this.linearCongruenceSeed=Date.now()}return i(e,[{key:"getNavigateList",value:function(){return void 0!==("undefined"==typeof GameGlobal?"undefined":r(GameGlobal))&&GameGlobal.__wxConfig&&GameGlobal.__wxConfig.navigateToMiniProgramAppIdList||[]}},{key:"needUpdateTips",value:function(e,t){console.error(e+"接口即将被弃用,请使用"+t+"接口。详情请参考文档")}},{key:"getLocationInfo",value:function(){return this.promiseFy(wx.getLocation,{type:"wgs84"}).catch(function(e){return{}})}},{key:"getStorageSync",value:function(e){try{return wx.getStorageSync(e)}catch(e){return""}}},{key:"filterEmptyKey",value:function(e){var t=this;return"Object"===this.getVariableType(e)&&(e=this.deepClone(e),Object.keys(e).forEach(function(n){"Object"===t.getVariableType(e[n])&&(e[n]=t.filterEmptyKey(e[n])),(null===e[n]||void 0===e[n]||""===e[n]||t.isEmptyObject(e[n]))&&delete e[n]})),e}},{key:"setStorageSync",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;try{wx.setStorageSync(e,t)}catch(r){n>0&&this.setStorageSync(e,t,--n)}}},{key:"watchObjectKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.get,i=n.set;if("Object"!==this.getVariableType(e)){var o=this;this.watchObjectKeyCaches=this.watchObjectKeyCaches||new WeakMap;var s=o.watchObjectKeyCaches.get(e)||a.deepClone(e);this.watchObjectKeyCaches.set(e,s),Object.defineProperty(e,t,{set:function(e){"Function"===o.getVariableType(i)&&i(e,s[t]),e!==s[t]&&(s[t]=e)},get:function(){return"Function"===o.getVariableType(r)?r(s[t]):s[t]}})}}},{key:"bindJsScopeToFn",value:function(e,t){var n=this;return t&&("Function"===this.getVariableType(e)?e=e.bind(t):"Object"===this.getVariableType(e)&&Object.keys(e).forEach(function(r){e[r]=n.bindJsScopeToFn(e[r],t)})),e}},{key:"isCocosGame",value:function(){return null!==this.isCocos?this.isCocos:this.isCocos=this.isRuningMiniGame()&&"object"===("undefined"==typeof cc?"undefined":r(cc))&&"object"===r(cc.sys)&&cc.sys.platform===cc.sys.WECHAT_GAME}},{key:"getCocosMainVersion",value:function(){if(this.isCocosGame()&&cc.ENGINE_VERSION)return cc.ENGINE_VERSION.split(".")[0]}},{key:"isLayaGame",value:function(){return null!==this.isLaya?this.isLaya:this.isLaya=this.isRuningMiniGame()&&"object"===("undefined"==typeof Laya?"undefined":r(Laya))&&"function"==typeof Laya.Browser&&r(Laya.Browser.onWeiXin)}},{key:"addPreHook",value:function(e,t){var n=["onShareAppMessage"],r=null;"App"===e&&(r=App),"Page"===e&&(r=Page);var i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=function(r){if(t.hasOwnProperty(r)){var i=t[r]||function(){};if(e[r]){var o=e[r];e[r]=function(){for(var e=this,t=arguments.length,a=Array(t),s=0;s<t;s++)a[s]=arguments[s];if(n.indexOf(r)>-1){var u=o.apply(this,a);return i.call.apply(i,[this,u].concat(a))}var c=i.apply(this,a);c&&c.then?c.then(function(){return o.apply(e,a)}):o.apply(this,a)}}else e[r]=i}};for(var o in t)i(o);r(e)};"App"===e&&(App=i),"Page"===e&&(Page=i)}},{key:"nextShow",value:function(){var e=this;return new Promise(function(t,n){e.isRuningMiniPro()?"function"==typeof wx.onAppShow?e.forceBindWxAPI("onAppShow",function(e){t(e)}):a.addPreHook("App",{onShow:function(e){t(e)}}):e.isRuningMiniGame()?e.forceBindWxAPI("onShow",function(e){t(e)}):t()})}},{key:"listenWxAPI",value:function(e,t){var n=this;try{var r=wx[e];Object.defineProperty(wx,e,{writable:!0}),wx[e]=function(){for(var e=arguments.length,i=Array(e),o=0;o<e;o++)i[o]=arguments[o];var a=r.apply(void 0,i);if("Function"===n.getVariableType(t))return t({userOptions:i,wxOriginReturns:a})},Object.defineProperty(wx,e,{writable:!1})}catch(e){console.error(e)}}},{key:"getRandomNumber",value:function(e,t){this.linearCongruenceSeed=(9301*this.linearCongruenceSeed+49297)%233280;var n=this.linearCongruenceSeed/233280;return 0===n?this.getRandomNumber(e,t):Math.floor(n*(t-e+1))}},{key:"forceBindWxAPI",value:function(e,t){"Function"===this.getVariableType(t)&&(wx[e](t),this.listenWxAPI(this.wxAPIMapToOff[e],function(n){0===n.userOptions.length&&wx[e](t)}))}},{key:"normalizeRes",value:function(e){return e.errMsg||e.statusCode?e.data?{err:e.data.err||e.data.code||0,code:e.statusCode,message:e.data.msg||e.data.message,data:e.data.data}:{err:1,code:e.statusCode||e.errCode||999,message:e.errMsg}:{err:e.err||e.code,code:e.statusCode,message:"string"==typeof e?e:e.msg||e.message,data:e.data}}},{key:"cutStringAndBackWidth",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:4,r=t*n,i=e.length,o=0;if(i>n){for(var a=0;a<i;a++)if(e.charCodeAt(a)>127||94==e.charCodeAt(a)?o+=t:o+=t/2,o>r){e=e.substr(0,a)+"...",o+=t/2;break}}else o=t*i;return{string:e,width:o}}},{key:"isHighViewPhone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.width,n=void 0===t?0:t,r=e.height;return(n/(void 0===r?0:r)).toFixed(2)<(9/16).toFixed(2)}},{key:"wxImageLoader",value:function(e){var t=wx.createImage();return new Promise(function(n,r){t.onload=function(){n(t)},t.onerror=function(e){r(e.message||e)},t.src=e})}},{key:"promiseFy",value:function(e,t){var n={};if(t)for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return new Promise(function(t,r){n.success=function(e){e?(200===e.statusCode||e.errMsg.indexOf(":ok")>-1)&&t(e):t(e)},n.fail=function(e){r(a.normalizeRes(e))},e?e.call(wx,n):r(new Error({message:"miniProgramFn is not defined"}))})}},{key:"addQuery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=a.stringifyQuery(t);return n?e.indexOf("?")>-1?e+"&"+n:e+"?"+n:e}},{key:"parseQuery",value:function(e){if("string"==typeof e&&e.indexOf("=")>-1){var t={};try{(e.indexOf("?")>-1?e.split("?")[1].split("&"):e.split("&")).forEach(function(e){var n=e.split("=");n&&n.length>1&&(t[n[0]]=n[1])})}catch(e){}return t}return{}}},{key:"stringifyQuery",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];r="string"==typeof r?r:"number"==typeof r&&isNaN(r)?"NaN":