import{at as e,P as n}from"./index-849cf30e.js";var i,t={};i=window,{get exports(){return t},set exports(e){t=e}}.exports=function(e,n){if(!e.jWeixin){var i,t={config:"preVerifyJSAPI",onMenuShareTimeline:"menu:share:timeline",onMenuShareAppMessage:"menu:share:appmessage",onMenuShareQQ:"menu:share:qq",onMenuShareWeibo:"menu:share:weiboApp",onMenuShareQZone:"menu:share:QZone",previewImage:"imagePreview",getLocation:"geoLocation",openProductSpecificView:"openProductViewWithPid",addCard:"batchAddCard",openCard:"batchViewCard",chooseWXPay:"getBrandWCPayRequest",openEnterpriseRedPacket:"getRecevieBizHongBaoRequest",startSearchBeacons:"startMonitoringBeacons",stopSearchBeacons:"stopMonitoringBeacons",onSearchBeacons:"onBeaconsInRange",consumeAndShareCard:"consumedShareCard",openAddress:"editAddress"},o=function(){var e={};for(var n in t)e[t[n]]=n;return e}(),r=e.document,a=r.title,c=navigator.userAgent.toLowerCase(),s=navigator.platform.toLowerCase(),d=!(!s.match("mac")&&!s.match("win")),u=-1!=c.indexOf("wxdebugger"),l=-1!=c.indexOf("micromessenger"),p=-1!=c.indexOf("android"),f=-1!=c.indexOf("iphone")||-1!=c.indexOf("ipad"),g=(i=c.match(/micromessenger\/(\d+\.\d+\.\d+)/)||c.match(/micromessenger\/(\d+\.\d+)/))?i[1]:"",m={initStartTime:B(),initEndTime:0,preVerifyStartTime:0,preVerifyEndTime:0},h={version:1,appId:"",initTime:0,preVerifyTime:0,networkType:"",isPreVerifyOk:1,systemType:f?1:p?2:-1,clientVersion:g,url:encodeURIComponent(location.href)},S={},v={_completes:[]},y={state:0,data:{}};O((function(){m.initEndTime=B()}));var I=!1,w=[],_={config:function(n){L("config",S=n);var i=!1!==S.check;O((function(){if(i)M(t.config,{verifyJsApiList:C(S.jsApiList),verifyOpenTagList:C(S.openTagList)},function(){v._complete=function(e){m.preVerifyEndTime=B(),y.state=1,y.data=e},v.success=function(e){h.isPreVerifyOk=0},v.fail=function(e){v._fail?v._fail(e):y.state=-1};var e=v._completes;return e.push((function(){!function(){if(!(d||u||S.debug||g<"6.0.2"||h.systemType<0)){var e=new Image;h.appId=S.appId,h.initTime=m.initEndTime-m.initStartTime,h.preVerifyTime=m.preVerifyEndTime-m.preVerifyStartTime,_.getNetworkType({isInnerInvoke:!0,success:function(n){h.networkType=n.networkType;var i="https://open.weixin.qq.com/sdk/report?v="+h.version+"&o="+h.isPreVerifyOk+"&s="+h.systemType+"&c="+h.clientVersion+"&a="+h.appId+"&n="+h.networkType+"&i="+h.initTime+"&p="+h.preVerifyTime+"&u="+h.url;e.src=i}})}}()})),v.complete=function(n){for(var i=0,t=e.length;i{const{data:n}=e;t.config({debug:!1,appId:n.appId,timestamp:n.timestamp,nonceStr:n.nonceStr,signature:n.signature,jsApiList:["chooseWXPay","updateAppMessageShareData","updateTimelineShareData"]})}))}pay(e){t.ready((()=>{t.chooseWXPay(e)}))}share(e){t.ready((()=>{t.updateAppMessageShareData(e),t.updateTimelineShareData(e)}))}};export{o as w};