!function(e,n){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=n():"function"==typeofdefine&&define.amd?define(n):(e=e||self).uni=n()}(this,function(){"use strict";functioni(e,n){vari={options:{timestamp:+newDate},name:e,arg:n};if(!window.plus)returnwindow.parent.postMessage({type:s,data:i,pageId:""},"*");if(0===d.length){vart=plus.webview.currentWebview();if(!t)thrownewError("plus.webview.currentWebview() is undefined");varo=t.parent(),a="";a=o?o.id:t.id,d.push(a)}varr=JSON.stringify(i);plus.webview.getWebviewById(u)?plus.webview.postMessageToUniNView({type:s,args:{data:i,webviewIds:d}},u):plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat(s,'",').concat(r,",").concat(JSON.stringify(d),");"))}vard=[],u="__uniapp__service",s="WEB_INVOKE_APPSERVICE",n={navigateTo:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("navigateTo",{url:encodeURI(n)})},navigateBack:function(e){varn=(0<arguments.length&&void0!==e?e:{}).delta;i("navigateBack",{delta:parseInt(n)||1})},switchTab:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("switchTab",{url:encodeURI(n)})},reLaunch:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("reLaunch",{url:encodeURI(n)})},redirectTo:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("redirectTo",{url:encodeURI(n)})},getEnv:function(e){window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(e){i("postMessage",(0<arguments.length&&void0!==e?e:{}).data||{})}},t=/uni-app/i.test(navigator.userAgent),o=/complete|loaded|interactive/;vara=window.my&&-1<navigator.userAgent.indexOf("AlipayClient");varr=window.swan&&window.swan.webView&&/swan-baiduboxapp/i.test(navigator.userAgent);varw=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);varc=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);varg=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);for(vare,v=function(){window.UniAppJSBridge=!0,document.dispatchEvent(newCustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},f=[function(e){if(t)returnsetTimeout(function(){window.plus&&o.test(document.readyState)?e():document.addEventListener("plusready",e)},0),n},function(e){if(g)returnsetTimeout(function(){window.WeixinJSBridge&&window.WeixinJSBridge.invoke?e():document.addEventListener("WeixinJSBridgeReady",e)},0),window.wx.miniProgram},function(e){if(w)returnsetTimeout(function(){window.QQJSBridge&&window.QQJSBridge.invoke?e():document.addEventListener("QQJSBridgeReady",e)},0),window.qq.miniProgram},function(e){if(a){setTimeout(function(){document.addEventListener("DOMContentLoaded",e)},0);varn=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(r)returnsetTimeout(function(){document.addEventListener("DOMContentLoaded",e)},0),window.swan.webView},function(e){if(c)returnsetTimeout(function(){document.addEventListener("DOMContentLoaded",e)},0),window.tt.miniProgram},function(e){returnsetTimeout(function(){document.addEventListener("DOMContentLoaded",e)},0),n}],m=0;m<f.length&&!(e=f[m](v));m++);e=e||{};varp="undefined"!=typeofuni?uni:{};returnp.navigateTo?p.miniProgram=e:Object.assign(p,e,{miniProgram:e}),p});
!function(e,n){"object"==typeofexports&&"undefined"!=typeofmodule?module.exports=n():"function"==typeofdefine&&define.amd?define(n):(e=e||self).uni=n()}(this,function(){"use strict";functioni(e,n){vari={options:{timestamp:+newDate},name:e,arg:n};if(!window.plus)returnwindow.parent.postMessage({type:s,data:i,pageId:""},"*");if(0===d.length){vart=plus.webview.currentWebview();if(!t)thrownewError("plus.webview.currentWebview() is undefined");vara=t.parent(),r="";r=a?a.id:t.id,d.push(r)}varo=JSON.stringify(i);plus.webview.getWebviewById(u)?plus.webview.postMessageToUniNView({type:s,args:{data:i,webviewIds:d}},u):plus.webview.getLaunchWebview().evalJS('UniPlusBridge.subscribeHandler("'.concat(s,'",').concat(o,",").concat(JSON.stringify(d),");"))}vard=[],u="__uniapp__service",s="WEB_INVOKE_APPSERVICE",n={navigateTo:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("navigateTo",{url:encodeURI(n)})},navigateBack:function(e){varn=(0<arguments.length&&void0!==e?e:{}).delta;i("navigateBack",{delta:parseInt(n)||1})},switchTab:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("switchTab",{url:encodeURI(n)})},reLaunch:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("reLaunch",{url:encodeURI(n)})},redirectTo:function(e){varn=(0<arguments.length&&void0!==e?e:{}).url;i("redirectTo",{url:encodeURI(n)})},getEnv:function(e){window.plus?e({plus:!0}):e({h5:!0})},postMessage:function(e){i("postMessage",(0<arguments.length&&void0!==e?e:{}).data||{})}},t=/uni-app/i.test(navigator.userAgent),a=/complete|loaded|interactive/;varr=window.my&&-1<navigator.userAgent.indexOf("AlipayClient");varo=window.swan&&window.swan.webView&&/swan/i.test(navigator.userAgent);varw=window.qq&&window.qq.miniProgram&&/QQ/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);varg=window.tt&&window.tt.miniProgram&&/toutiaomicroapp/i.test(navigator.userAgent);varc=window.wx&&window.wx.miniProgram&&/micromessenger/i.test(navigator.userAgent)&&/miniProgram/i.test(navigator.userAgent);for(vare,v=function(){window.UniAppJSBridge=!0,document.dispatchEvent(newCustomEvent("UniAppJSBridgeReady",{bubbles:!0,cancelable:!0}))},m=[function(e){if(t)returnwindow.plus&&a.test(document.readyState)?setTimeout(e,0):document.addEventListener("plusready",e),n},function(e){if(c)returnwindow.WeixinJSBridge&&window.WeixinJSBridge.invoke?setTimeout(e,0):document.addEventListener("WeixinJSBridgeReady",e),window.wx.miniProgram},function(e){if(w)returnwindow.QQJSBridge&&window.QQJSBridge.invoke?setTimeout(e,0):document.addEventListener("QQJSBridgeReady",e),window.qq.miniProgram},function(e){if(r){document.addEventListener("DOMContentLoaded",e);varn=window.my;return{navigateTo:n.navigateTo,navigateBack:n.navigateBack,switchTab:n.switchTab,reLaunch:n.reLaunch,redirectTo:n.redirectTo,postMessage:n.postMessage,getEnv:n.getEnv}}},function(e){if(o)returndocument.addEventListener("DOMContentLoaded",e),window.swan.webView},function(e){if(g)returndocument.addEventListener("DOMContentLoaded",e),window.tt.miniProgram},function(e){returndocument.addEventListener("DOMContentLoaded",e),n}],p=0;p<m.length&&!(e=m[p](v));p++);e=e||{};varf="undefined"!=typeofuni?uni:{};returnf.navigateTo?f.miniProgram=e:Object.assign(f,e,{miniProgram:e}),f});